From 643ae08bde792e8ceea795564d3f8e66c2837b49 Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Mon, 26 Aug 2024 17:20:08 +0000 Subject: [PATCH] chore(deps): dependencies 2024-08-19 (generated) https://github.com/algolia/api-clients-automation/pull/3530 Co-authored-by: algolia-bot Co-authored-by: Algolia Bot <30854082+algolia-bot@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: shortcuts Co-authored-by: Pierre Millot --- .nvmrc | 2 +- .prettierignore | 2 - .prettierrc | 4 - package.json | 16 +- .../__tests__/algoliasearch.browser.test.ts | 30 +- .../__tests__/algoliasearch.node.test.ts | 34 +- packages/algoliasearch/builds/browser.ts | 63 +- packages/algoliasearch/builds/models.ts | 4 +- packages/algoliasearch/builds/node.ts | 77 +- packages/algoliasearch/lite/builds/browser.ts | 11 +- packages/algoliasearch/lite/builds/node.ts | 6 +- .../lite/model/alternativesAsExact.ts | 5 +- .../lite/model/baseIndexSettings.ts | 4 +- .../lite/model/baseSearchResponse.ts | 8 +- .../lite/model/boughtTogetherQuery.ts | 3 +- .../lite/model/browseResponse.ts | 5 +- .../lite/model/clientMethodProps.ts | 2 +- .../lite/model/consequenceParams.ts | 4 +- .../lite/model/facetStats.ts} | 2 +- .../lite/model/fallbackParams.ts | 2 +- packages/algoliasearch/lite/model/index.ts | 2 +- .../lite/model/recommendationsResults.ts | 4 +- .../lite/model/removeWordsIfNoResults.ts | 6 +- .../algoliasearch/lite/model/searchParams.ts | 2 +- .../lite/model/searchResponse.ts | 4 +- .../algoliasearch/lite/model/searchResult.ts | 4 +- packages/algoliasearch/lite/src/liteClient.ts | 55 +- packages/algoliasearch/package.json | 6 +- packages/algoliasearch/rollup.config.js | 2 +- packages/client-abtesting/builds/browser.ts | 22 +- packages/client-abtesting/builds/node.ts | 11 +- .../model/clientMethodProps.ts | 4 +- .../model/customSearchParams.ts | 2 +- packages/client-abtesting/model/effect.ts | 6 +- packages/client-abtesting/package.json | 4 +- packages/client-abtesting/rollup.config.js | 2 +- .../client-abtesting/src/abtestingClient.ts | 133 +-- packages/client-analytics/builds/browser.ts | 22 +- packages/client-analytics/builds/node.ts | 11 +- .../model/clientMethodProps.ts | 4 +- .../{currenciesValue.ts => currencyCode.ts} | 2 +- .../client-analytics/model/dailyRevenue.ts | 4 +- packages/client-analytics/model/getRevenue.ts | 4 +- .../model/getTopHitsResponse.ts | 5 +- packages/client-analytics/model/index.ts | 2 +- packages/client-analytics/model/orderBy.ts | 6 +- .../model/topHitWithRevenueAnalytics.ts | 4 +- .../model/topSearchWithRevenueAnalytics.ts | 4 +- packages/client-analytics/package.json | 4 +- packages/client-analytics/rollup.config.js | 2 +- .../client-analytics/src/analyticsClient.ts | 322 ++----- packages/client-common/package.json | 6 +- packages/client-common/rollup.config.js | 2 +- packages/client-insights/builds/browser.ts | 22 +- packages/client-insights/builds/node.ts | 11 +- .../model/clientMethodProps.ts | 4 +- packages/client-insights/package.json | 4 +- packages/client-insights/rollup.config.js | 2 +- .../client-insights/src/insightsClient.ts | 75 +- .../client-personalization/builds/browser.ts | 27 +- .../client-personalization/builds/node.ts | 21 +- .../model/clientMethodProps.ts | 4 +- .../model/getUserTokenResponse.ts | 2 +- packages/client-personalization/package.json | 4 +- .../client-personalization/rollup.config.js | 2 +- .../src/personalizationClient.ts | 82 +- .../builds/browser.ts | 27 +- .../client-query-suggestions/builds/node.ts | 21 +- .../model/clientMethodProps.ts | 4 +- .../model/configurationWithIndex.ts | 2 +- .../client-query-suggestions/package.json | 4 +- .../client-query-suggestions/rollup.config.js | 2 +- .../src/querySuggestionsClient.ts | 134 +-- packages/client-search/builds/browser.ts | 11 +- packages/client-search/builds/node.ts | 30 +- .../model/alternativesAsExact.ts | 5 +- .../client-search/model/baseIndexSettings.ts | 4 +- .../client-search/model/baseSearchResponse.ts | 8 +- packages/client-search/model/batchRequest.ts | 2 +- .../client-search/model/browseResponse.ts | 5 +- .../client-search/model/clientMethodProps.ts | 22 +- .../client-search/model/consequenceParams.ts | 4 +- .../model/facetStats.ts} | 2 +- packages/client-search/model/index.ts | 2 +- .../model/multipleBatchRequest.ts | 2 +- .../model/removeWordsIfNoResults.ts | 6 +- .../client-search/model/searchResponse.ts | 4 +- packages/client-search/model/searchResult.ts | 4 +- packages/client-search/model/synonymType.ts | 7 +- packages/client-search/package.json | 4 +- packages/client-search/rollup.config.js | 2 +- packages/client-search/src/searchClient.ts | 905 +++++------------- packages/client-usage/builds/browser.ts | 11 +- packages/client-usage/builds/node.ts | 6 +- .../client-usage/model/clientMethodProps.ts | 4 +- packages/client-usage/package.json | 4 +- packages/client-usage/rollup.config.js | 2 +- packages/client-usage/src/usageClient.ts | 96 +- packages/ingestion/builds/browser.ts | 27 +- packages/ingestion/builds/node.ts | 16 +- .../ingestion/model/authenticationSortKeys.ts | 7 +- .../ingestion/model/authenticationType.ts | 8 +- packages/ingestion/model/batchRequest.ts | 2 +- packages/ingestion/model/clientMethodProps.ts | 4 +- packages/ingestion/model/eventStatus.ts | 8 +- packages/ingestion/model/mappingTypeCSV.ts | 7 +- packages/ingestion/model/runReasonCode.ts | 9 +- packages/ingestion/model/runStatus.ts | 7 +- packages/ingestion/model/sourceDocker.ts | 2 +- .../ingestion/model/sourceUpdateDocker.ts | 2 +- .../ingestion/model/sourceWatchResponse.ts | 2 +- packages/ingestion/model/taskCreateTrigger.ts | 6 +- packages/ingestion/model/taskSortKeys.ts | 7 +- packages/ingestion/model/transformationTry.ts | 2 +- .../model/transformationTryResponse.ts | 2 +- packages/ingestion/model/trigger.ts | 6 +- packages/ingestion/model/triggerType.ts | 6 +- packages/ingestion/package.json | 4 +- packages/ingestion/rollup.config.js | 2 +- packages/ingestion/src/ingestionClient.ts | 829 ++++------------ packages/monitoring/builds/browser.ts | 16 +- packages/monitoring/builds/node.ts | 6 +- .../monitoring/model/clientMethodProps.ts | 4 +- packages/monitoring/model/metric.ts | 8 +- packages/monitoring/model/status.ts | 6 +- packages/monitoring/package.json | 4 +- packages/monitoring/rollup.config.js | 2 +- packages/monitoring/src/monitoringClient.ts | 122 +-- packages/recommend/builds/browser.ts | 16 +- packages/recommend/builds/node.ts | 6 +- .../recommend/model/alternativesAsExact.ts | 5 +- .../recommend/model/baseSearchResponse.ts | 8 +- .../recommend/model/boughtTogetherQuery.ts | 3 +- packages/recommend/model/clientMethodProps.ts | 4 +- .../model/facetStats.ts} | 2 +- packages/recommend/model/fallbackParams.ts | 2 +- packages/recommend/model/index.ts | 2 +- packages/recommend/model/recommendModels.ts | 6 +- .../recommend/model/recommendationsResults.ts | 4 +- .../recommend/model/removeWordsIfNoResults.ts | 6 +- packages/recommend/model/searchParams.ts | 2 +- packages/recommend/package.json | 4 +- packages/recommend/rollup.config.js | 2 +- packages/recommend/src/recommendClient.ts | 144 +-- packages/requester-browser-xhr/package.json | 6 +- .../requester-browser-xhr/rollup.config.js | 2 +- packages/requester-fetch/package.json | 8 +- packages/requester-fetch/rollup.config.js | 2 +- packages/requester-node-http/package.json | 8 +- packages/requester-node-http/rollup.config.js | 2 +- yarn.lock | 732 +++++++------- 151 files changed, 1380 insertions(+), 3292 deletions(-) delete mode 100644 .prettierignore delete mode 100644 .prettierrc rename packages/{client-search/model/facetsStats.ts => algoliasearch/lite/model/facetStats.ts} (94%) rename packages/client-analytics/model/{currenciesValue.ts => currencyCode.ts} (91%) rename packages/{recommend/model/facetsStats.ts => client-search/model/facetStats.ts} (94%) rename packages/{algoliasearch/lite/model/facetsStats.ts => recommend/model/facetStats.ts} (94%) diff --git a/.nvmrc b/.nvmrc index 8ce703082..2062ac7e5 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.16.0 +22.7.0 diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index de4d1f007..000000000 --- a/.prettierignore +++ /dev/null @@ -1,2 +0,0 @@ -dist -node_modules diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 6e778b4fb..000000000 --- a/.prettierrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "trailingComma": "all", - "singleQuote": true -} diff --git a/package.json b/package.json index 9a0438af9..ae4291e9b 100644 --- a/package.json +++ b/package.json @@ -16,22 +16,22 @@ }, "devDependencies": { "@babel/core": "7.25.2", - "@babel/plugin-transform-class-properties": "7.24.7", - "@babel/plugin-transform-runtime": "7.24.7", - "@babel/preset-env": "7.25.3", - "@babel/runtime": "7.25.0", + "@babel/plugin-transform-class-properties": "7.25.4", + "@babel/plugin-transform-runtime": "7.25.4", + "@babel/preset-env": "7.25.4", + "@babel/runtime": "7.25.4", "@rollup/plugin-babel": "6.0.4", "@rollup/plugin-node-resolve": "15.2.3", "@rollup/plugin-terser": "0.4.4", "@types/jest": "29.5.12", - "@types/node": "20.14.14", + "@types/node": "22.5.0", "@types/rollup-plugin-node-globals": "1.4.4", "@types/semver": "7.5.8", "bundlesize": "0.18.2", - "execa": "9.3.0", + "execa": "9.3.1", "lerna": "8.1.8", - "nx": "19.5.7", - "rollup": "4.20.0", + "nx": "19.6.2", + "rollup": "4.21.0", "rollup-plugin-node-globals": "1.4.0", "rollup-plugin-typescript2": "0.36.0", "semver": "7.6.3", diff --git a/packages/algoliasearch/__tests__/algoliasearch.browser.test.ts b/packages/algoliasearch/__tests__/algoliasearch.browser.test.ts index 4240e1948..6e500a4fb 100644 --- a/packages/algoliasearch/__tests__/algoliasearch.browser.test.ts +++ b/packages/algoliasearch/__tests__/algoliasearch.browser.test.ts @@ -28,7 +28,7 @@ describe('api', () => { })) as unknown as EchoResponse; expect(req.algoliaAgent).toMatchInlineSnapshot( - `"Algolia%20for%20JavaScript%20(${apiClientVersion})%3B%20Search%20(${apiClientVersion})%3B%20Browser"` + `"Algolia%20for%20JavaScript%20(${apiClientVersion})%3B%20Search%20(${apiClientVersion})%3B%20Browser"`, ); }); @@ -47,9 +47,7 @@ describe('api', () => { describe('_ua', () => { it('provides a backward compatible `_ua` variable at the root of the client', () => { expect(client._ua).toEqual( - expect.stringContaining( - `Algolia for JavaScript (${apiClientVersion}); Search (${apiClientVersion});` - ) + expect.stringContaining(`Algolia for JavaScript (${apiClientVersion}); Search (${apiClientVersion});`), ); }); @@ -58,9 +56,7 @@ describe('api', () => { client.addAlgoliaAgent('Jest', '0.0.1'); - expect(client._ua).toEqual( - expect.stringMatching(/.*; Jest \(0\.0\.1\)$/g) - ); + expect(client._ua).toEqual(expect.stringMatching(/.*; Jest \(0\.0\.1\)$/g)); }); }); @@ -69,9 +65,7 @@ describe('api', () => { expect(client.transporter).toEqual({ algoliaAgent: { add: expect.any(Function), - value: expect.stringContaining( - `Algolia for JavaScript (${apiClientVersion}); Search (${apiClientVersion});` - ), + value: expect.stringContaining(`Algolia for JavaScript (${apiClientVersion}); Search (${apiClientVersion});`), }, baseHeaders: { 'content-type': 'text/plain', @@ -171,19 +165,19 @@ describe('api', () => { expect.objectContaining({ 'x-algolia-application-id': 'APP_ID', 'x-algolia-api-key': 'API_KEY', - }) + }), ); expect(res2.searchParams).toEqual( expect.objectContaining({ 'x-algolia-application-id': 'APP_ID', 'x-algolia-api-key': 'API_KEY', - }) + }), ); expect(res3.searchParams).toEqual( expect.objectContaining({ 'x-algolia-application-id': 'APP_ID', 'x-algolia-api-key': 'API_KEY', - }) + }), ); }); @@ -216,19 +210,19 @@ describe('api', () => { expect.objectContaining({ 'x-algolia-application-id': 'appId1', 'x-algolia-api-key': 'apiKey1', - }) + }), ); expect(res2.searchParams).toEqual( expect.objectContaining({ 'x-algolia-application-id': 'appId2', 'x-algolia-api-key': 'apiKey2', - }) + }), ); expect(res3.searchParams).toEqual( expect.objectContaining({ 'x-algolia-application-id': 'appId3', 'x-algolia-api-key': 'apiKey3', - }) + }), ); }); }); @@ -274,9 +268,7 @@ describe('search with legacy signature', () => { expect(req.path).toEqual('/1/indexes/*/queries'); expect(req.method).toEqual('POST'); expect(req.data).toEqual({ - requests: [ - { indexName: 'theIndexName', type: 'facet', facet: 'theFacet' }, - ], + requests: [{ indexName: 'theIndexName', type: 'facet', facet: 'theFacet' }], }); expect(req.searchParams).toStrictEqual({ 'x-algolia-api-key': 'API_KEY', diff --git a/packages/algoliasearch/__tests__/algoliasearch.node.test.ts b/packages/algoliasearch/__tests__/algoliasearch.node.test.ts index ae1475451..162d65233 100644 --- a/packages/algoliasearch/__tests__/algoliasearch.node.test.ts +++ b/packages/algoliasearch/__tests__/algoliasearch.node.test.ts @@ -28,7 +28,7 @@ describe('api', () => { })) as unknown as EchoResponse; expect(req.algoliaAgent).toMatchInlineSnapshot( - `"Algolia%20for%20JavaScript%20(${apiClientVersion})%3B%20Search%20(${apiClientVersion})%3B%20Node.js%20(${process.versions.node})"` + `"Algolia%20for%20JavaScript%20(${apiClientVersion})%3B%20Search%20(${apiClientVersion})%3B%20Node.js%20(${process.versions.node})"`, ); }); @@ -47,22 +47,16 @@ describe('api', () => { describe('_ua', () => { it('provides a backward compatible `_ua` variable at the root of the client', () => { expect(client._ua).toEqual( - expect.stringContaining( - `Algolia for JavaScript (${apiClientVersion}); Search (${apiClientVersion});` - ) + expect.stringContaining(`Algolia for JavaScript (${apiClientVersion}); Search (${apiClientVersion});`), ); }); it('keeps `_ua` updated with the transporter algolia agent', () => { - expect(client._ua).toEqual( - expect.stringMatching(/.*; Node\.js \(.*\)$/g) - ); + expect(client._ua).toEqual(expect.stringMatching(/.*; Node\.js \(.*\)$/g)); client.addAlgoliaAgent('Jest', '0.0.1'); - expect(client._ua).toEqual( - expect.stringMatching(/.*; Jest \(0\.0\.1\)$/g) - ); + expect(client._ua).toEqual(expect.stringMatching(/.*; Jest \(0\.0\.1\)$/g)); }); }); @@ -71,9 +65,7 @@ describe('api', () => { expect(client.transporter).toEqual({ algoliaAgent: { add: expect.any(Function), - value: expect.stringContaining( - `Algolia for JavaScript (${apiClientVersion}); Search (${apiClientVersion});` - ), + value: expect.stringContaining(`Algolia for JavaScript (${apiClientVersion}); Search (${apiClientVersion});`), }, baseHeaders: { 'content-type': 'text/plain', @@ -172,19 +164,19 @@ describe('api', () => { expect.objectContaining({ 'x-algolia-application-id': 'APP_ID', 'x-algolia-api-key': 'API_KEY', - }) + }), ); expect(res2.headers).toEqual( expect.objectContaining({ 'x-algolia-application-id': 'APP_ID', 'x-algolia-api-key': 'API_KEY', - }) + }), ); expect(res3.headers).toEqual( expect.objectContaining({ 'x-algolia-application-id': 'APP_ID', 'x-algolia-api-key': 'API_KEY', - }) + }), ); }); @@ -217,19 +209,19 @@ describe('api', () => { expect.objectContaining({ 'x-algolia-application-id': 'appId1', 'x-algolia-api-key': 'apiKey1', - }) + }), ); expect(res2.headers).toEqual( expect.objectContaining({ 'x-algolia-application-id': 'appId2', 'x-algolia-api-key': 'apiKey2', - }) + }), ); expect(res3.headers).toEqual( expect.objectContaining({ 'x-algolia-application-id': 'appId3', 'x-algolia-api-key': 'apiKey3', - }) + }), ); }); }); @@ -272,9 +264,7 @@ describe('search with legacy signature', () => { expect(req.path).toEqual('/1/indexes/*/queries'); expect(req.method).toEqual('POST'); expect(req.data).toEqual({ - requests: [ - { indexName: 'theIndexName', type: 'facet', facet: 'theFacet' }, - ], + requests: [{ indexName: 'theIndexName', type: 'facet', facet: 'theFacet' }], }); expect(req.searchParams).toStrictEqual(undefined); }); diff --git a/packages/algoliasearch/builds/browser.ts b/packages/algoliasearch/builds/browser.ts index 93c087a2d..25ada6218 100644 --- a/packages/algoliasearch/builds/browser.ts +++ b/packages/algoliasearch/builds/browser.ts @@ -2,15 +2,9 @@ import type { AbtestingClient } from '@algolia/client-abtesting'; import type { Region as AbtestingRegion } from '@algolia/client-abtesting/src/abtestingClient'; -import { - createAbtestingClient, - REGIONS as abtestingRegions, -} from '@algolia/client-abtesting/src/abtestingClient'; +import { createAbtestingClient, REGIONS as abtestingRegions } from '@algolia/client-abtesting/src/abtestingClient'; import type { AnalyticsClient } from '@algolia/client-analytics'; -import { - createAnalyticsClient, - REGIONS as analyticsRegions, -} from '@algolia/client-analytics/src/analyticsClient'; +import { createAnalyticsClient, REGIONS as analyticsRegions } from '@algolia/client-analytics/src/analyticsClient'; import type { Region as AnalyticsRegion } from '@algolia/client-analytics/src/analyticsClient'; import { DEFAULT_CONNECT_TIMEOUT_BROWSER, @@ -20,20 +14,14 @@ import { createFallbackableCache, createMemoryCache, } from '@algolia/client-common'; -import type { - ClientOptions, - CreateClientOptions, -} from '@algolia/client-common'; +import type { ClientOptions, CreateClientOptions } from '@algolia/client-common'; import type { PersonalizationClient } from '@algolia/client-personalization'; import type { Region as PersonalizationRegion } from '@algolia/client-personalization/src/personalizationClient'; import { createPersonalizationClient, REGIONS as personalizationRegions, } from '@algolia/client-personalization/src/personalizationClient'; -import { - createSearchClient, - apiClientVersion as searchClientVersion, -} from '@algolia/client-search/src/searchClient'; +import { createSearchClient, apiClientVersion as searchClientVersion } from '@algolia/client-search/src/searchClient'; import type { RecommendClient } from '@algolia/recommend'; import { createRecommendClient } from '@algolia/recommend/src/recommendClient'; import { createXhrRequester } from '@algolia/requester-browser-xhr'; @@ -50,11 +38,7 @@ export const apiClientVersion = searchClientVersion; export type Algoliasearch = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function algoliasearch( - appId: string, - apiKey: string, - options?: ClientOptions -) { +export function algoliasearch(appId: string, apiKey: string, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -76,10 +60,7 @@ export function algoliasearch( responsesCache: createMemoryCache(), requestsCache: createMemoryCache({ serializable: false }), hostsCache: createFallbackableCache({ - caches: [ - createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), - createMemoryCache(), - ], + caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()], }), ...options, }; @@ -92,17 +73,12 @@ export function algoliasearch( }); } - function initAnalytics( - initOptions: InitClientOptions & InitClientRegion = {} - ): AnalyticsClient { + function initAnalytics(initOptions: InitClientOptions & InitClientRegion = {}): AnalyticsClient { if ( initOptions.region && - (typeof initOptions.region !== 'string' || - !analyticsRegions.includes(initOptions.region)) + (typeof initOptions.region !== 'string' || !analyticsRegions.includes(initOptions.region)) ) { - throw new Error( - `\`region\` must be one of the following: ${analyticsRegions.join(', ')}` - ); + throw new Error(`\`region\` must be one of the following: ${analyticsRegions.join(', ')}`); } return createAnalyticsClient({ @@ -112,17 +88,12 @@ export function algoliasearch( }); } - function initAbtesting( - initOptions: InitClientOptions & InitClientRegion = {} - ): AbtestingClient { + function initAbtesting(initOptions: InitClientOptions & InitClientRegion = {}): AbtestingClient { if ( initOptions.region && - (typeof initOptions.region !== 'string' || - !abtestingRegions.includes(initOptions.region)) + (typeof initOptions.region !== 'string' || !abtestingRegions.includes(initOptions.region)) ) { - throw new Error( - `\`region\` must be one of the following: ${abtestingRegions.join(', ')}` - ); + throw new Error(`\`region\` must be one of the following: ${abtestingRegions.join(', ')}`); } return createAbtestingClient({ @@ -133,18 +104,14 @@ export function algoliasearch( } function initPersonalization( - initOptions: InitClientOptions & - Required> + initOptions: InitClientOptions & Required>, ): PersonalizationClient { if ( !initOptions.region || (initOptions.region && - (typeof initOptions.region !== 'string' || - !personalizationRegions.includes(initOptions.region))) + (typeof initOptions.region !== 'string' || !personalizationRegions.includes(initOptions.region))) ) { - throw new Error( - `\`region\` is required and must be one of the following: ${personalizationRegions.join(', ')}` - ); + throw new Error(`\`region\` is required and must be one of the following: ${personalizationRegions.join(', ')}`); } return createPersonalizationClient({ diff --git a/packages/algoliasearch/builds/models.ts b/packages/algoliasearch/builds/models.ts index 2c6377335..64273b151 100644 --- a/packages/algoliasearch/builds/models.ts +++ b/packages/algoliasearch/builds/models.ts @@ -33,7 +33,7 @@ import { FacetFilters, FacetOrdering, Facets, - FacetsStats, + FacetStats, HighlightResult, HighlightResultOption, IgnorePlurals, @@ -119,7 +119,7 @@ export { FacetFilters, FacetOrdering, Facets, - FacetsStats, + FacetStats, HighlightResult, HighlightResultOption, IgnorePlurals, diff --git a/packages/algoliasearch/builds/node.ts b/packages/algoliasearch/builds/node.ts index 59ddbb48a..34ca55f52 100644 --- a/packages/algoliasearch/builds/node.ts +++ b/packages/algoliasearch/builds/node.ts @@ -4,15 +4,9 @@ import { createHmac } from 'crypto'; import type { AbtestingClient } from '@algolia/client-abtesting'; import type { Region as AbtestingRegion } from '@algolia/client-abtesting/src/abtestingClient'; -import { - createAbtestingClient, - REGIONS as abtestingRegions, -} from '@algolia/client-abtesting/src/abtestingClient'; +import { createAbtestingClient, REGIONS as abtestingRegions } from '@algolia/client-abtesting/src/abtestingClient'; import type { AnalyticsClient } from '@algolia/client-analytics'; -import { - createAnalyticsClient, - REGIONS as analyticsRegions, -} from '@algolia/client-analytics/src/analyticsClient'; +import { createAnalyticsClient, REGIONS as analyticsRegions } from '@algolia/client-analytics/src/analyticsClient'; import type { Region as AnalyticsRegion } from '@algolia/client-analytics/src/analyticsClient'; import { DEFAULT_CONNECT_TIMEOUT_NODE, @@ -22,20 +16,14 @@ import { createNullCache, serializeQueryParameters, } from '@algolia/client-common'; -import type { - ClientOptions, - CreateClientOptions, -} from '@algolia/client-common'; +import type { ClientOptions, CreateClientOptions } from '@algolia/client-common'; import type { PersonalizationClient } from '@algolia/client-personalization'; import type { Region as PersonalizationRegion } from '@algolia/client-personalization/src/personalizationClient'; import { createPersonalizationClient, REGIONS as personalizationRegions, } from '@algolia/client-personalization/src/personalizationClient'; -import { - createSearchClient, - apiClientVersion as searchClientVersion, -} from '@algolia/client-search/src/searchClient'; +import { createSearchClient, apiClientVersion as searchClientVersion } from '@algolia/client-search/src/searchClient'; import type { RecommendClient } from '@algolia/recommend'; import { createRecommendClient } from '@algolia/recommend/src/recommendClient'; import { createHttpRequester } from '@algolia/requester-node-http'; @@ -57,11 +45,7 @@ export const apiClientVersion = searchClientVersion; export type Algoliasearch = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function algoliasearch( - appId: string, - apiKey: string, - options?: ClientOptions -) { +export function algoliasearch(appId: string, apiKey: string, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -93,17 +77,12 @@ export function algoliasearch( }); } - function initAnalytics( - initOptions: InitClientOptions & InitClientRegion = {} - ): AnalyticsClient { + function initAnalytics(initOptions: InitClientOptions & InitClientRegion = {}): AnalyticsClient { if ( initOptions.region && - (typeof initOptions.region !== 'string' || - !analyticsRegions.includes(initOptions.region)) + (typeof initOptions.region !== 'string' || !analyticsRegions.includes(initOptions.region)) ) { - throw new Error( - `\`region\` must be one of the following: ${analyticsRegions.join(', ')}` - ); + throw new Error(`\`region\` must be one of the following: ${analyticsRegions.join(', ')}`); } return createAnalyticsClient({ @@ -113,17 +92,12 @@ export function algoliasearch( }); } - function initAbtesting( - initOptions: InitClientOptions & InitClientRegion = {} - ): AbtestingClient { + function initAbtesting(initOptions: InitClientOptions & InitClientRegion = {}): AbtestingClient { if ( initOptions.region && - (typeof initOptions.region !== 'string' || - !abtestingRegions.includes(initOptions.region)) + (typeof initOptions.region !== 'string' || !abtestingRegions.includes(initOptions.region)) ) { - throw new Error( - `\`region\` must be one of the following: ${abtestingRegions.join(', ')}` - ); + throw new Error(`\`region\` must be one of the following: ${abtestingRegions.join(', ')}`); } return createAbtestingClient({ @@ -134,18 +108,14 @@ export function algoliasearch( } function initPersonalization( - initOptions: InitClientOptions & - Required> + initOptions: InitClientOptions & Required>, ): PersonalizationClient { if ( !initOptions.region || (initOptions.region && - (typeof initOptions.region !== 'string' || - !personalizationRegions.includes(initOptions.region))) + (typeof initOptions.region !== 'string' || !personalizationRegions.includes(initOptions.region))) ) { - throw new Error( - `\`region\` is required and must be one of the following: ${personalizationRegions.join(', ')}` - ); + throw new Error(`\`region\` is required and must be one of the following: ${personalizationRegions.join(', ')}`); } return createPersonalizationClient({ @@ -175,10 +145,7 @@ export function algoliasearch( * @param generateSecuredApiKey.parentApiKey - The base API key from which to generate the new secured one. * @param generateSecuredApiKey.restrictions - A set of properties defining the restrictions of the secured API key. */ - generateSecuredApiKey({ - parentApiKey, - restrictions = {}, - }: GenerateSecuredApiKeyOptions): string { + generateSecuredApiKey({ parentApiKey, restrictions = {} }: GenerateSecuredApiKeyOptions): string { let mergedRestrictions = restrictions; if (restrictions.searchParams) { // merge searchParams with the root restrictions @@ -198,14 +165,12 @@ export function algoliasearch( acc[key] = (mergedRestrictions as any)[key]; return acc; }, - {} as Record + {} as Record, ); const queryParameters = serializeQueryParameters(mergedRestrictions); return Buffer.from( - createHmac('sha256', parentApiKey) - .update(queryParameters) - .digest('hex') + queryParameters + createHmac('sha256', parentApiKey).update(queryParameters).digest('hex') + queryParameters, ).toString('base64'); }, @@ -216,12 +181,8 @@ export function algoliasearch( * @param getSecuredApiKeyRemainingValidity - The `getSecuredApiKeyRemainingValidity` object. * @param getSecuredApiKeyRemainingValidity.securedApiKey - The secured API key generated with the `generateSecuredApiKey` method. */ - getSecuredApiKeyRemainingValidity({ - securedApiKey, - }: GetSecuredApiKeyRemainingValidityOptions): number { - const decodedString = Buffer.from(securedApiKey, 'base64').toString( - 'ascii' - ); + getSecuredApiKeyRemainingValidity({ securedApiKey }: GetSecuredApiKeyRemainingValidityOptions): number { + const decodedString = Buffer.from(securedApiKey, 'base64').toString('ascii'); const regex = /validUntil=(\d+)/; const match = decodedString.match(regex); diff --git a/packages/algoliasearch/lite/builds/browser.ts b/packages/algoliasearch/lite/builds/browser.ts index 1a09933ef..b89d0a7f9 100644 --- a/packages/algoliasearch/lite/builds/browser.ts +++ b/packages/algoliasearch/lite/builds/browser.ts @@ -22,11 +22,7 @@ export * from '../model'; export type LiteClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function liteClient( - appId: string, - apiKey: string, - options?: ClientOptions -) { +export function liteClient(appId: string, apiKey: string, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -49,10 +45,7 @@ export function liteClient( responsesCache: createMemoryCache(), requestsCache: createMemoryCache({ serializable: false }), hostsCache: createFallbackableCache({ - caches: [ - createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), - createMemoryCache(), - ], + caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()], }), ...options, }); diff --git a/packages/algoliasearch/lite/builds/node.ts b/packages/algoliasearch/lite/builds/node.ts index 5f785ab5b..3d0cb0796 100644 --- a/packages/algoliasearch/lite/builds/node.ts +++ b/packages/algoliasearch/lite/builds/node.ts @@ -21,11 +21,7 @@ export * from '../model'; export type LiteClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function liteClient( - appId: string, - apiKey: string, - options?: ClientOptions -) { +export function liteClient(appId: string, apiKey: string, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } diff --git a/packages/algoliasearch/lite/model/alternativesAsExact.ts b/packages/algoliasearch/lite/model/alternativesAsExact.ts index 126646f42..d18409281 100644 --- a/packages/algoliasearch/lite/model/alternativesAsExact.ts +++ b/packages/algoliasearch/lite/model/alternativesAsExact.ts @@ -1,6 +1,3 @@ // 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. -export type AlternativesAsExact = - | 'ignorePlurals' - | 'multiWordsSynonym' - | 'singleWordSynonym'; +export type AlternativesAsExact = 'ignorePlurals' | 'multiWordsSynonym' | 'singleWordSynonym'; diff --git a/packages/algoliasearch/lite/model/baseIndexSettings.ts b/packages/algoliasearch/lite/model/baseIndexSettings.ts index fca7e872c..50847c81e 100644 --- a/packages/algoliasearch/lite/model/baseIndexSettings.ts +++ b/packages/algoliasearch/lite/model/baseIndexSettings.ts @@ -41,7 +41,7 @@ export type BaseIndexSettings = { /** * Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Attribute names are case-sensitive. Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). Decompounding doesn\'t work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won\'t be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). */ - decompoundedAttributes?: Record; + decompoundedAttributes?: Record; /** * Languages for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @@ -76,7 +76,7 @@ export type BaseIndexSettings = { /** * An object with custom data. You can store up to 32kB as custom data. */ - userData?: Record; + userData?: Record; /** * Characters and their normalized replacements. This overrides Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). diff --git a/packages/algoliasearch/lite/model/baseSearchResponse.ts b/packages/algoliasearch/lite/model/baseSearchResponse.ts index 227c5fb37..bcaf93dfc 100644 --- a/packages/algoliasearch/lite/model/baseSearchResponse.ts +++ b/packages/algoliasearch/lite/model/baseSearchResponse.ts @@ -1,7 +1,7 @@ // 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. import type { Exhaustive } from './exhaustive'; -import type { FacetsStats } from './facetsStats'; +import type { FacetStats } from './facetStats'; import type { Redirect } from './redirect'; import type { RenderingContent } from './renderingContent'; @@ -51,7 +51,7 @@ export type BaseSearchResponse = Record & { /** * Statistics for numerical facets. */ - facets_stats?: Record; + facets_stats?: Record; /** * Index name used for the query. @@ -86,7 +86,7 @@ export type BaseSearchResponse = Record & { /** * Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues. */ - processingTimingsMS?: Record; + processingTimingsMS?: Record; /** * Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set. @@ -110,7 +110,7 @@ export type BaseSearchResponse = Record & { /** * An object with custom data. You can store up to 32kB as custom data. */ - userData?: Record; + userData?: Record; /** * Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). diff --git a/packages/algoliasearch/lite/model/boughtTogetherQuery.ts b/packages/algoliasearch/lite/model/boughtTogetherQuery.ts index 478a11daf..19c909cb9 100644 --- a/packages/algoliasearch/lite/model/boughtTogetherQuery.ts +++ b/packages/algoliasearch/lite/model/boughtTogetherQuery.ts @@ -3,5 +3,4 @@ import type { BaseRecommendRequest } from './baseRecommendRequest'; import type { FrequentlyBoughtTogether } from './frequentlyBoughtTogether'; -export type BoughtTogetherQuery = BaseRecommendRequest & - FrequentlyBoughtTogether; +export type BoughtTogetherQuery = BaseRecommendRequest & FrequentlyBoughtTogether; diff --git a/packages/algoliasearch/lite/model/browseResponse.ts b/packages/algoliasearch/lite/model/browseResponse.ts index ec2bed56a..772709377 100644 --- a/packages/algoliasearch/lite/model/browseResponse.ts +++ b/packages/algoliasearch/lite/model/browseResponse.ts @@ -5,7 +5,4 @@ import type { BrowsePagination } from './browsePagination'; import type { Cursor } from './cursor'; import type { SearchHits } from './searchHits'; -export type BrowseResponse> = BaseSearchResponse & - BrowsePagination & - Cursor & - SearchHits; +export type BrowseResponse> = BaseSearchResponse & BrowsePagination & Cursor & SearchHits; diff --git a/packages/algoliasearch/lite/model/clientMethodProps.ts b/packages/algoliasearch/lite/model/clientMethodProps.ts index 130015934..d0e596c49 100644 --- a/packages/algoliasearch/lite/model/clientMethodProps.ts +++ b/packages/algoliasearch/lite/model/clientMethodProps.ts @@ -20,7 +20,7 @@ export type CustomPostProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** diff --git a/packages/algoliasearch/lite/model/consequenceParams.ts b/packages/algoliasearch/lite/model/consequenceParams.ts index 554166a69..94b26e7fc 100644 --- a/packages/algoliasearch/lite/model/consequenceParams.ts +++ b/packages/algoliasearch/lite/model/consequenceParams.ts @@ -4,6 +4,4 @@ import type { BaseSearchParamsWithoutQuery } from './baseSearchParamsWithoutQuer import type { IndexSettingsAsSearchParams } from './indexSettingsAsSearchParams'; import type { Params } from './params'; -export type ConsequenceParams = BaseSearchParamsWithoutQuery & - IndexSettingsAsSearchParams & - Params; +export type ConsequenceParams = BaseSearchParamsWithoutQuery & IndexSettingsAsSearchParams & Params; diff --git a/packages/client-search/model/facetsStats.ts b/packages/algoliasearch/lite/model/facetStats.ts similarity index 94% rename from packages/client-search/model/facetsStats.ts rename to packages/algoliasearch/lite/model/facetStats.ts index 658a047c6..f8bb276a8 100644 --- a/packages/client-search/model/facetsStats.ts +++ b/packages/algoliasearch/lite/model/facetStats.ts @@ -1,6 +1,6 @@ // 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. -export type FacetsStats = { +export type FacetStats = { /** * Minimum value in the results. */ diff --git a/packages/algoliasearch/lite/model/fallbackParams.ts b/packages/algoliasearch/lite/model/fallbackParams.ts index 7838a3206..627a78334 100644 --- a/packages/algoliasearch/lite/model/fallbackParams.ts +++ b/packages/algoliasearch/lite/model/fallbackParams.ts @@ -2,4 +2,4 @@ import type { SearchParamsObject } from './searchParamsObject'; -export type FallbackParams = Record & SearchParamsObject; +export type FallbackParams = Record & SearchParamsObject; diff --git a/packages/algoliasearch/lite/model/index.ts b/packages/algoliasearch/lite/model/index.ts index b10724100..6939b4a02 100644 --- a/packages/algoliasearch/lite/model/index.ts +++ b/packages/algoliasearch/lite/model/index.ts @@ -32,8 +32,8 @@ export * from './exhaustive'; export * from './facetFilters'; export * from './facetHits'; export * from './facetOrdering'; +export * from './facetStats'; export * from './facets'; -export * from './facetsStats'; export * from './fallbackParams'; export * from './fbtModel'; export * from './frequentlyBoughtTogether'; diff --git a/packages/algoliasearch/lite/model/recommendationsResults.ts b/packages/algoliasearch/lite/model/recommendationsResults.ts index 3688fc364..b8fff9801 100644 --- a/packages/algoliasearch/lite/model/recommendationsResults.ts +++ b/packages/algoliasearch/lite/model/recommendationsResults.ts @@ -4,6 +4,4 @@ import type { BaseSearchResponse } from './baseSearchResponse'; import type { RecommendationsHits } from './recommendationsHits'; import type { SearchPagination } from './searchPagination'; -export type RecommendationsResults = BaseSearchResponse & - RecommendationsHits & - SearchPagination; +export type RecommendationsResults = BaseSearchResponse & RecommendationsHits & SearchPagination; diff --git a/packages/algoliasearch/lite/model/removeWordsIfNoResults.ts b/packages/algoliasearch/lite/model/removeWordsIfNoResults.ts index fbd9ca081..23086007c 100644 --- a/packages/algoliasearch/lite/model/removeWordsIfNoResults.ts +++ b/packages/algoliasearch/lite/model/removeWordsIfNoResults.ts @@ -3,8 +3,4 @@ /** * Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). */ -export type RemoveWordsIfNoResults = - | 'allOptional' - | 'firstWords' - | 'lastWords' - | 'none'; +export type RemoveWordsIfNoResults = 'allOptional' | 'firstWords' | 'lastWords' | 'none'; diff --git a/packages/algoliasearch/lite/model/searchParams.ts b/packages/algoliasearch/lite/model/searchParams.ts index 5159c0eac..69d7a78ab 100644 --- a/packages/algoliasearch/lite/model/searchParams.ts +++ b/packages/algoliasearch/lite/model/searchParams.ts @@ -2,4 +2,4 @@ import type { SearchParamsObject } from './searchParamsObject'; -export type SearchParams = Record & SearchParamsObject; +export type SearchParams = Record & SearchParamsObject; diff --git a/packages/algoliasearch/lite/model/searchResponse.ts b/packages/algoliasearch/lite/model/searchResponse.ts index e785a3e5d..2e074e18f 100644 --- a/packages/algoliasearch/lite/model/searchResponse.ts +++ b/packages/algoliasearch/lite/model/searchResponse.ts @@ -4,6 +4,4 @@ import type { BaseSearchResponse } from './baseSearchResponse'; import type { SearchHits } from './searchHits'; import type { SearchPagination } from './searchPagination'; -export type SearchResponse> = BaseSearchResponse & - SearchHits & - SearchPagination; +export type SearchResponse> = BaseSearchResponse & SearchHits & SearchPagination; diff --git a/packages/algoliasearch/lite/model/searchResult.ts b/packages/algoliasearch/lite/model/searchResult.ts index 99c11e2cf..544b0ddba 100644 --- a/packages/algoliasearch/lite/model/searchResult.ts +++ b/packages/algoliasearch/lite/model/searchResult.ts @@ -3,6 +3,4 @@ import type { SearchForFacetValuesResponse } from './searchForFacetValuesResponse'; import type { SearchResponse } from './searchResponse'; -export type SearchResult> = - | SearchForFacetValuesResponse - | SearchResponse; +export type SearchResult> = SearchForFacetValuesResponse | SearchResponse; diff --git a/packages/algoliasearch/lite/src/liteClient.ts b/packages/algoliasearch/lite/src/liteClient.ts index 4b67adc4d..8ba2bbcd8 100644 --- a/packages/algoliasearch/lite/src/liteClient.ts +++ b/packages/algoliasearch/lite/src/liteClient.ts @@ -1,11 +1,6 @@ // 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. -import { - createAuth, - createTransporter, - getAlgoliaAgent, - shuffle, -} from '@algolia/client-common'; +import { createAuth, createTransporter, getAlgoliaAgent, shuffle } from '@algolia/client-common'; import type { CreateClientOptions, Headers, @@ -60,7 +55,7 @@ function getDefaultHosts(appId: string): Host[] { accept: 'readWrite', protocol: 'https', }, - ]) + ]), ); } @@ -104,10 +99,7 @@ export function createLiteClient({ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties. */ clearCache(): Promise { - return Promise.all([ - transporter.requestsCache.clear(), - transporter.responsesCache.clear(), - ]).then(() => undefined); + return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined); }, /** @@ -126,7 +118,6 @@ export function createLiteClient({ addAlgoliaAgent(segment: string, version?: string): void { transporter.algoliaAgent.add({ segment, version }); }, - /** * Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets. * Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes. @@ -137,11 +128,9 @@ export function createLiteClient({ */ searchForHits( searchMethodParams: LegacySearchMethodProps | SearchMethodParams, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise<{ results: Array> }> { - return this.search(searchMethodParams, requestOptions) as Promise<{ - results: Array>; - }>; + return this.search(searchMethodParams, requestOptions) as Promise<{ results: Array> }>; }, /** @@ -154,7 +143,7 @@ export function createLiteClient({ */ searchForFacets( searchMethodParams: LegacySearchMethodProps | SearchMethodParams, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise<{ results: SearchForFacetValuesResponse[] }> { return this.search(searchMethodParams, requestOptions) as Promise<{ results: SearchForFacetValuesResponse[]; @@ -171,12 +160,10 @@ export function createLiteClient({ */ customPost( { path, parameters, body }: CustomPostProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPost`.' - ); + throw new Error('Parameter `path` is required when calling `customPost`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -204,10 +191,8 @@ export function createLiteClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getRecommendations( - getRecommendationsParams: - | GetRecommendationsParams - | LegacyGetRecommendationsParams, - requestOptions?: RequestOptions + getRecommendationsParams: GetRecommendationsParams | LegacyGetRecommendationsParams, + requestOptions?: RequestOptions, ): Promise { if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) { const newSignatureRequest: GetRecommendationsParams = { @@ -219,15 +204,11 @@ export function createLiteClient({ } if (!getRecommendationsParams) { - throw new Error( - 'Parameter `getRecommendationsParams` is required when calling `getRecommendations`.' - ); + throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.'); } if (!getRecommendationsParams.requests) { - throw new Error( - 'Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.' - ); + throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.'); } const requestPath = '/1/indexes/*/recommendations'; @@ -258,7 +239,7 @@ export function createLiteClient({ */ search( searchMethodParams: LegacySearchMethodProps | SearchMethodParams, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise> { if (searchMethodParams && Array.isArray(searchMethodParams)) { const newSignatureRequest: SearchMethodParams = { @@ -286,15 +267,11 @@ export function createLiteClient({ } if (!searchMethodParams) { - throw new Error( - 'Parameter `searchMethodParams` is required when calling `search`.' - ); + throw new Error('Parameter `searchMethodParams` is required when calling `search`.'); } if (!searchMethodParams.requests) { - throw new Error( - 'Parameter `searchMethodParams.requests` is required when calling `search`.' - ); + throw new Error('Parameter `searchMethodParams.requests` is required when calling `search`.'); } const requestPath = '/1/indexes/*/queries'; diff --git a/packages/algoliasearch/package.json b/packages/algoliasearch/package.json index e93ccdd0e..588c3e11b 100644 --- a/packages/algoliasearch/package.json +++ b/packages/algoliasearch/package.json @@ -77,12 +77,12 @@ "@algolia/requester-node-http": "5.1.1" }, "devDependencies": { - "@babel/preset-env": "7.25.3", + "@babel/preset-env": "7.25.4", "@babel/preset-typescript": "7.24.7", "@types/jest": "29.5.12", - "@types/node": "22.2.0", + "@types/node": "22.5.0", "jest": "29.7.0", - "rollup": "4.20.0", + "rollup": "4.21.0", "typescript": "5.5.4" }, "engines": { diff --git a/packages/algoliasearch/rollup.config.js b/packages/algoliasearch/rollup.config.js index dbcfa8129..0f45d3972 100644 --- a/packages/algoliasearch/rollup.config.js +++ b/packages/algoliasearch/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); \ No newline at end of file diff --git a/packages/client-abtesting/builds/browser.ts b/packages/client-abtesting/builds/browser.ts index e43545735..98ea9ea05 100644 --- a/packages/client-abtesting/builds/browser.ts +++ b/packages/client-abtesting/builds/browser.ts @@ -12,11 +12,7 @@ import { import { createXhrRequester } from '@algolia/requester-browser-xhr'; import type { Region } from '../src/abtestingClient'; -import { - createAbtestingClient, - apiClientVersion, - REGIONS, -} from '../src/abtestingClient'; +import { createAbtestingClient, apiClientVersion, REGIONS } from '../src/abtestingClient'; export { apiClientVersion, Region } from '../src/abtestingClient'; export * from '../model'; @@ -27,12 +23,7 @@ export * from '../model'; export type AbtestingClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function abtestingClient( - appId: string, - apiKey: string, - region?: Region, - options?: ClientOptions -) { +export function abtestingClient(appId: string, apiKey: string, region?: Region, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -42,9 +33,7 @@ export function abtestingClient( } if (region && (typeof region !== 'string' || !REGIONS.includes(region))) { - throw new Error( - `\`region\` must be one of the following: ${REGIONS.join(', ')}` - ); + throw new Error(`\`region\` must be one of the following: ${REGIONS.join(', ')}`); } return createAbtestingClient({ @@ -62,10 +51,7 @@ export function abtestingClient( responsesCache: createMemoryCache(), requestsCache: createMemoryCache({ serializable: false }), hostsCache: createFallbackableCache({ - caches: [ - createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), - createMemoryCache(), - ], + caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()], }), ...options, }); diff --git a/packages/client-abtesting/builds/node.ts b/packages/client-abtesting/builds/node.ts index 66316a4ae..de4a28482 100644 --- a/packages/client-abtesting/builds/node.ts +++ b/packages/client-abtesting/builds/node.ts @@ -22,12 +22,7 @@ export * from '../model'; export type AbtestingClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function abtestingClient( - appId: string, - apiKey: string, - region?: Region, - options?: ClientOptions -) { +export function abtestingClient(appId: string, apiKey: string, region?: Region, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -37,9 +32,7 @@ export function abtestingClient( } if (region && (typeof region !== 'string' || !REGIONS.includes(region))) { - throw new Error( - `\`region\` must be one of the following: ${REGIONS.join(', ')}` - ); + throw new Error(`\`region\` must be one of the following: ${REGIONS.join(', ')}`); } return { diff --git a/packages/client-abtesting/model/clientMethodProps.ts b/packages/client-abtesting/model/clientMethodProps.ts index cffec1343..a7db98866 100644 --- a/packages/client-abtesting/model/clientMethodProps.ts +++ b/packages/client-abtesting/model/clientMethodProps.ts @@ -43,7 +43,7 @@ export type CustomPostProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** @@ -61,7 +61,7 @@ export type CustomPutProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** diff --git a/packages/client-abtesting/model/customSearchParams.ts b/packages/client-abtesting/model/customSearchParams.ts index 6f98d2052..b113a4943 100644 --- a/packages/client-abtesting/model/customSearchParams.ts +++ b/packages/client-abtesting/model/customSearchParams.ts @@ -4,5 +4,5 @@ * Search parameters to add to the test variant. Only use this parameter if the two variants use the same index. */ export type CustomSearchParams = { - customSearchParameters: Record; + customSearchParameters: Record; }; diff --git a/packages/client-abtesting/model/effect.ts b/packages/client-abtesting/model/effect.ts index 665354935..b884ebfb1 100644 --- a/packages/client-abtesting/model/effect.ts +++ b/packages/client-abtesting/model/effect.ts @@ -3,8 +3,4 @@ /** * Metric for which you want to detect the smallest relative difference. */ -export type Effect = - | 'addToCartRate' - | 'clickThroughRate' - | 'conversionRate' - | 'purchaseRate'; +export type Effect = 'addToCartRate' | 'clickThroughRate' | 'conversionRate' | 'purchaseRate'; diff --git a/packages/client-abtesting/package.json b/packages/client-abtesting/package.json index 564945e4e..b659622f1 100644 --- a/packages/client-abtesting/package.json +++ b/packages/client-abtesting/package.json @@ -49,8 +49,8 @@ "@algolia/requester-node-http": "5.1.1" }, "devDependencies": { - "@types/node": "22.2.0", - "rollup": "4.20.0", + "@types/node": "22.5.0", + "rollup": "4.21.0", "typescript": "5.5.4" }, "engines": { diff --git a/packages/client-abtesting/rollup.config.js b/packages/client-abtesting/rollup.config.js index dbcfa8129..0f45d3972 100644 --- a/packages/client-abtesting/rollup.config.js +++ b/packages/client-abtesting/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); \ No newline at end of file diff --git a/packages/client-abtesting/src/abtestingClient.ts b/packages/client-abtesting/src/abtestingClient.ts index 9615c9de2..b7fb05405 100644 --- a/packages/client-abtesting/src/abtestingClient.ts +++ b/packages/client-abtesting/src/abtestingClient.ts @@ -1,10 +1,6 @@ // 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. -import { - createAuth, - createTransporter, - getAlgoliaAgent, -} from '@algolia/client-common'; +import { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common'; import type { CreateClientOptions, Headers, @@ -37,9 +33,7 @@ export const REGIONS = ['de', 'us'] as const; export type Region = (typeof REGIONS)[number]; function getDefaultHosts(region?: Region): Host[] { - const url = !region - ? 'analytics.algolia.com' - : 'analytics.{region}.algolia.com'.replace('{region}', region); + const url = !region ? 'analytics.algolia.com' : 'analytics.{region}.algolia.com'.replace('{region}', region); return [{ url, accept: 'readWrite', protocol: 'https' }]; } @@ -85,10 +79,7 @@ export function createAbtestingClient({ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties. */ clearCache(): Promise { - return Promise.all([ - transporter.requestsCache.clear(), - transporter.responsesCache.clear(), - ]).then(() => undefined); + return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined); }, /** @@ -117,30 +108,19 @@ export function createAbtestingClient({ * @param addABTestsRequest - The addABTestsRequest object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - addABTests( - addABTestsRequest: AddABTestsRequest, - requestOptions?: RequestOptions - ): Promise { + addABTests(addABTestsRequest: AddABTestsRequest, requestOptions?: RequestOptions): Promise { if (!addABTestsRequest) { - throw new Error( - 'Parameter `addABTestsRequest` is required when calling `addABTests`.' - ); + throw new Error('Parameter `addABTestsRequest` is required when calling `addABTests`.'); } if (!addABTestsRequest.name) { - throw new Error( - 'Parameter `addABTestsRequest.name` is required when calling `addABTests`.' - ); + throw new Error('Parameter `addABTestsRequest.name` is required when calling `addABTests`.'); } if (!addABTestsRequest.variants) { - throw new Error( - 'Parameter `addABTestsRequest.variants` is required when calling `addABTests`.' - ); + throw new Error('Parameter `addABTestsRequest.variants` is required when calling `addABTests`.'); } if (!addABTestsRequest.endAt) { - throw new Error( - 'Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.' - ); + throw new Error('Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.'); } const requestPath = '/2/abtests'; @@ -168,12 +148,10 @@ export function createAbtestingClient({ */ customDelete( { path, parameters }: CustomDeleteProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customDelete`.' - ); + throw new Error('Parameter `path` is required when calling `customDelete`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -198,14 +176,9 @@ export function createAbtestingClient({ * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - customGet( - { path, parameters }: CustomGetProps, - requestOptions?: RequestOptions - ): Promise> { + customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customGet`.' - ); + throw new Error('Parameter `path` is required when calling `customGet`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -233,12 +206,10 @@ export function createAbtestingClient({ */ customPost( { path, parameters, body }: CustomPostProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPost`.' - ); + throw new Error('Parameter `path` is required when calling `customPost`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -267,12 +238,10 @@ export function createAbtestingClient({ */ customPut( { path, parameters, body }: CustomPutProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPut`.' - ); + throw new Error('Parameter `path` is required when calling `customPut`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -300,20 +269,12 @@ export function createAbtestingClient({ * @param deleteABTest.id - Unique A/B test identifier. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - deleteABTest( - { id }: DeleteABTestProps, - requestOptions?: RequestOptions - ): Promise { + deleteABTest({ id }: DeleteABTestProps, requestOptions?: RequestOptions): Promise { if (!id) { - throw new Error( - 'Parameter `id` is required when calling `deleteABTest`.' - ); + throw new Error('Parameter `id` is required when calling `deleteABTest`.'); } - const requestPath = '/2/abtests/{id}'.replace( - '{id}', - encodeURIComponent(id) - ); + const requestPath = '/2/abtests/{id}'.replace('{id}', encodeURIComponent(id)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -337,18 +298,12 @@ export function createAbtestingClient({ * @param getABTest.id - Unique A/B test identifier. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getABTest( - { id }: GetABTestProps, - requestOptions?: RequestOptions - ): Promise { + getABTest({ id }: GetABTestProps, requestOptions?: RequestOptions): Promise { if (!id) { throw new Error('Parameter `id` is required when calling `getABTest`.'); } - const requestPath = '/2/abtests/{id}'.replace( - '{id}', - encodeURIComponent(id) - ); + const requestPath = '/2/abtests/{id}'.replace('{id}', encodeURIComponent(id)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -377,7 +332,7 @@ export function createAbtestingClient({ */ listABTests( { offset, limit, indexPrefix, indexSuffix }: ListABTestsProps = {}, - requestOptions: RequestOptions | undefined = undefined + requestOptions: RequestOptions | undefined = undefined, ): Promise { const requestPath = '/2/abtests'; const headers: Headers = {}; @@ -386,7 +341,6 @@ export function createAbtestingClient({ if (offset !== undefined) { queryParameters.offset = offset.toString(); } - if (limit !== undefined) { queryParameters.limit = limit.toString(); } @@ -394,7 +348,6 @@ export function createAbtestingClient({ if (indexPrefix !== undefined) { queryParameters.indexPrefix = indexPrefix.toString(); } - if (indexSuffix !== undefined) { queryParameters.indexSuffix = indexSuffix.toString(); } @@ -420,33 +373,23 @@ export function createAbtestingClient({ */ scheduleABTest( scheduleABTestsRequest: ScheduleABTestsRequest, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!scheduleABTestsRequest) { - throw new Error( - 'Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.' - ); + throw new Error('Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.'); } if (!scheduleABTestsRequest.name) { - throw new Error( - 'Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.' - ); + throw new Error('Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.'); } if (!scheduleABTestsRequest.variants) { - throw new Error( - 'Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.' - ); + throw new Error('Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.'); } if (!scheduleABTestsRequest.scheduledAt) { - throw new Error( - 'Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.' - ); + throw new Error('Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.'); } if (!scheduleABTestsRequest.endAt) { - throw new Error( - 'Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.' - ); + throw new Error('Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.'); } const requestPath = '/2/abtests/schedule'; @@ -474,20 +417,12 @@ export function createAbtestingClient({ * @param stopABTest.id - Unique A/B test identifier. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - stopABTest( - { id }: StopABTestProps, - requestOptions?: RequestOptions - ): Promise { + stopABTest({ id }: StopABTestProps, requestOptions?: RequestOptions): Promise { if (!id) { - throw new Error( - 'Parameter `id` is required when calling `stopABTest`.' - ); + throw new Error('Parameter `id` is required when calling `stopABTest`.'); } - const requestPath = '/2/abtests/{id}/stop'.replace( - '{id}', - encodeURIComponent(id) - ); + const requestPath = '/2/abtests/{id}/stop'.replace('{id}', encodeURIComponent(id)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; diff --git a/packages/client-analytics/builds/browser.ts b/packages/client-analytics/builds/browser.ts index 0d0b768d5..718cbb101 100644 --- a/packages/client-analytics/builds/browser.ts +++ b/packages/client-analytics/builds/browser.ts @@ -12,11 +12,7 @@ import { import { createXhrRequester } from '@algolia/requester-browser-xhr'; import type { Region } from '../src/analyticsClient'; -import { - createAnalyticsClient, - apiClientVersion, - REGIONS, -} from '../src/analyticsClient'; +import { createAnalyticsClient, apiClientVersion, REGIONS } from '../src/analyticsClient'; export { apiClientVersion, Region } from '../src/analyticsClient'; export * from '../model'; @@ -27,12 +23,7 @@ export * from '../model'; export type AnalyticsClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function analyticsClient( - appId: string, - apiKey: string, - region?: Region, - options?: ClientOptions -) { +export function analyticsClient(appId: string, apiKey: string, region?: Region, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -42,9 +33,7 @@ export function analyticsClient( } if (region && (typeof region !== 'string' || !REGIONS.includes(region))) { - throw new Error( - `\`region\` must be one of the following: ${REGIONS.join(', ')}` - ); + throw new Error(`\`region\` must be one of the following: ${REGIONS.join(', ')}`); } return createAnalyticsClient({ @@ -62,10 +51,7 @@ export function analyticsClient( responsesCache: createMemoryCache(), requestsCache: createMemoryCache({ serializable: false }), hostsCache: createFallbackableCache({ - caches: [ - createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), - createMemoryCache(), - ], + caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()], }), ...options, }); diff --git a/packages/client-analytics/builds/node.ts b/packages/client-analytics/builds/node.ts index dda97e8d0..3c0b18fb8 100644 --- a/packages/client-analytics/builds/node.ts +++ b/packages/client-analytics/builds/node.ts @@ -22,12 +22,7 @@ export * from '../model'; export type AnalyticsClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function analyticsClient( - appId: string, - apiKey: string, - region?: Region, - options?: ClientOptions -) { +export function analyticsClient(appId: string, apiKey: string, region?: Region, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -37,9 +32,7 @@ export function analyticsClient( } if (region && (typeof region !== 'string' || !REGIONS.includes(region))) { - throw new Error( - `\`region\` must be one of the following: ${REGIONS.join(', ')}` - ); + throw new Error(`\`region\` must be one of the following: ${REGIONS.join(', ')}`); } return { diff --git a/packages/client-analytics/model/clientMethodProps.ts b/packages/client-analytics/model/clientMethodProps.ts index 02628ecbc..4c3cbe483 100644 --- a/packages/client-analytics/model/clientMethodProps.ts +++ b/packages/client-analytics/model/clientMethodProps.ts @@ -46,7 +46,7 @@ export type CustomPostProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** @@ -64,7 +64,7 @@ export type CustomPutProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** diff --git a/packages/client-analytics/model/currenciesValue.ts b/packages/client-analytics/model/currencyCode.ts similarity index 91% rename from packages/client-analytics/model/currenciesValue.ts rename to packages/client-analytics/model/currencyCode.ts index 644505de0..5d36ebaa0 100644 --- a/packages/client-analytics/model/currenciesValue.ts +++ b/packages/client-analytics/model/currencyCode.ts @@ -3,7 +3,7 @@ /** * Currency code. */ -export type CurrenciesValue = { +export type CurrencyCode = { /** * Currency code. */ diff --git a/packages/client-analytics/model/dailyRevenue.ts b/packages/client-analytics/model/dailyRevenue.ts index 074da42bf..d3577b2f4 100644 --- a/packages/client-analytics/model/dailyRevenue.ts +++ b/packages/client-analytics/model/dailyRevenue.ts @@ -1,12 +1,12 @@ // 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. -import type { CurrenciesValue } from './currenciesValue'; +import type { CurrencyCode } from './currencyCode'; export type DailyRevenue = { /** * Revenue associated with this search, broken-down by currencies. */ - currencies: Record; + currencies: Record; /** * Date in the format YYYY-MM-DD. diff --git a/packages/client-analytics/model/getRevenue.ts b/packages/client-analytics/model/getRevenue.ts index e0960bd0f..b106982cc 100644 --- a/packages/client-analytics/model/getRevenue.ts +++ b/packages/client-analytics/model/getRevenue.ts @@ -1,13 +1,13 @@ // 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. -import type { CurrenciesValue } from './currenciesValue'; +import type { CurrencyCode } from './currencyCode'; import type { DailyRevenue } from './dailyRevenue'; export type GetRevenue = { /** * Revenue associated with this search, broken-down by currencies. */ - currencies: Record; + currencies: Record; /** * Daily revenue. diff --git a/packages/client-analytics/model/getTopHitsResponse.ts b/packages/client-analytics/model/getTopHitsResponse.ts index e42396edb..735cf41db 100644 --- a/packages/client-analytics/model/getTopHitsResponse.ts +++ b/packages/client-analytics/model/getTopHitsResponse.ts @@ -4,7 +4,4 @@ import type { TopHitsResponse } from './topHitsResponse'; import type { TopHitsResponseWithAnalytics } from './topHitsResponseWithAnalytics'; import type { TopHitsResponseWithRevenueAnalytics } from './topHitsResponseWithRevenueAnalytics'; -export type GetTopHitsResponse = - | TopHitsResponse - | TopHitsResponseWithAnalytics - | TopHitsResponseWithRevenueAnalytics; +export type GetTopHitsResponse = TopHitsResponse | TopHitsResponseWithAnalytics | TopHitsResponseWithRevenueAnalytics; diff --git a/packages/client-analytics/model/index.ts b/packages/client-analytics/model/index.ts index 8ffc05813..f1b80eae9 100644 --- a/packages/client-analytics/model/index.ts +++ b/packages/client-analytics/model/index.ts @@ -1,7 +1,7 @@ // 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. export * from './clickPosition'; -export * from './currenciesValue'; +export * from './currencyCode'; export * from './dailyAddToCartRates'; export * from './dailyAverageClicks'; export * from './dailyClickThroughRates'; diff --git a/packages/client-analytics/model/orderBy.ts b/packages/client-analytics/model/orderBy.ts index bafc2adf1..b4f938ef6 100644 --- a/packages/client-analytics/model/orderBy.ts +++ b/packages/client-analytics/model/orderBy.ts @@ -3,8 +3,4 @@ /** * Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available. */ -export type OrderBy = - | 'averageClickPosition' - | 'clickThroughRate' - | 'conversionRate' - | 'searchCount'; +export type OrderBy = 'averageClickPosition' | 'clickThroughRate' | 'conversionRate' | 'searchCount'; diff --git a/packages/client-analytics/model/topHitWithRevenueAnalytics.ts b/packages/client-analytics/model/topHitWithRevenueAnalytics.ts index f8f2f1bc6..338590a40 100644 --- a/packages/client-analytics/model/topHitWithRevenueAnalytics.ts +++ b/packages/client-analytics/model/topHitWithRevenueAnalytics.ts @@ -1,6 +1,6 @@ // 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. -import type { CurrenciesValue } from './currenciesValue'; +import type { CurrencyCode } from './currencyCode'; export type TopHitWithRevenueAnalytics = { /** @@ -61,5 +61,5 @@ export type TopHitWithRevenueAnalytics = { /** * Revenue associated with this search, broken-down by currencies. */ - currencies: Record; + currencies: Record; }; diff --git a/packages/client-analytics/model/topSearchWithRevenueAnalytics.ts b/packages/client-analytics/model/topSearchWithRevenueAnalytics.ts index 98e02056d..d85277cf4 100644 --- a/packages/client-analytics/model/topSearchWithRevenueAnalytics.ts +++ b/packages/client-analytics/model/topSearchWithRevenueAnalytics.ts @@ -1,7 +1,7 @@ // 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. import type { ClickPosition } from './clickPosition'; -import type { CurrenciesValue } from './currenciesValue'; +import type { CurrencyCode } from './currencyCode'; export type TopSearchWithRevenueAnalytics = { /** @@ -57,7 +57,7 @@ export type TopSearchWithRevenueAnalytics = { /** * Revenue associated with this search, broken-down by currencies. */ - currencies: Record; + currencies: Record; /** * Add-to-cart rate, calculated as number of tracked searches with at least one add-to-cart event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true. diff --git a/packages/client-analytics/package.json b/packages/client-analytics/package.json index 95abfe5e6..ac901be30 100644 --- a/packages/client-analytics/package.json +++ b/packages/client-analytics/package.json @@ -49,8 +49,8 @@ "@algolia/requester-node-http": "5.1.1" }, "devDependencies": { - "@types/node": "22.2.0", - "rollup": "4.20.0", + "@types/node": "22.5.0", + "rollup": "4.21.0", "typescript": "5.5.4" }, "engines": { diff --git a/packages/client-analytics/rollup.config.js b/packages/client-analytics/rollup.config.js index dbcfa8129..0f45d3972 100644 --- a/packages/client-analytics/rollup.config.js +++ b/packages/client-analytics/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); \ No newline at end of file diff --git a/packages/client-analytics/src/analyticsClient.ts b/packages/client-analytics/src/analyticsClient.ts index 6e6db4d7c..559c416af 100644 --- a/packages/client-analytics/src/analyticsClient.ts +++ b/packages/client-analytics/src/analyticsClient.ts @@ -1,10 +1,6 @@ // 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. -import { - createAuth, - createTransporter, - getAlgoliaAgent, -} from '@algolia/client-common'; +import { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common'; import type { CreateClientOptions, Headers, @@ -67,9 +63,7 @@ export const REGIONS = ['de', 'us'] as const; export type Region = (typeof REGIONS)[number]; function getDefaultHosts(region?: Region): Host[] { - const url = !region - ? 'analytics.algolia.com' - : 'analytics.{region}.algolia.com'.replace('{region}', region); + const url = !region ? 'analytics.algolia.com' : 'analytics.{region}.algolia.com'.replace('{region}', region); return [{ url, accept: 'readWrite', protocol: 'https' }]; } @@ -115,10 +109,7 @@ export function createAnalyticsClient({ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties. */ clearCache(): Promise { - return Promise.all([ - transporter.requestsCache.clear(), - transporter.responsesCache.clear(), - ]).then(() => undefined); + return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined); }, /** @@ -148,12 +139,10 @@ export function createAnalyticsClient({ */ customDelete( { path, parameters }: CustomDeleteProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customDelete`.' - ); + throw new Error('Parameter `path` is required when calling `customDelete`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -178,14 +167,9 @@ export function createAnalyticsClient({ * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - customGet( - { path, parameters }: CustomGetProps, - requestOptions?: RequestOptions - ): Promise> { + customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customGet`.' - ); + throw new Error('Parameter `path` is required when calling `customGet`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -213,12 +197,10 @@ export function createAnalyticsClient({ */ customPost( { path, parameters, body }: CustomPostProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPost`.' - ); + throw new Error('Parameter `path` is required when calling `customPost`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -247,12 +229,10 @@ export function createAnalyticsClient({ */ customPut( { path, parameters, body }: CustomPutProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPut`.' - ); + throw new Error('Parameter `path` is required when calling `customPut`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -285,18 +265,15 @@ export function createAnalyticsClient({ */ getAddToCartRate( { index, startDate, endDate, tags }: GetAddToCartRateProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getAddToCartRate`.' - ); + throw new Error('Parameter `index` is required when calling `getAddToCartRate`.'); } const requestPath = '/2/conversions/addToCartRate'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } @@ -304,11 +281,9 @@ export function createAnalyticsClient({ if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -338,30 +313,24 @@ export function createAnalyticsClient({ */ getAverageClickPosition( { index, startDate, endDate, tags }: GetAverageClickPositionProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getAverageClickPosition`.' - ); + throw new Error('Parameter `index` is required when calling `getAverageClickPosition`.'); } const requestPath = '/2/clicks/averageClickPosition'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } - if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -391,30 +360,24 @@ export function createAnalyticsClient({ */ getClickPositions( { index, startDate, endDate, tags }: GetClickPositionsProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getClickPositions`.' - ); + throw new Error('Parameter `index` is required when calling `getClickPositions`.'); } const requestPath = '/2/clicks/positions'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } - if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -444,30 +407,24 @@ export function createAnalyticsClient({ */ getClickThroughRate( { index, startDate, endDate, tags }: GetClickThroughRateProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getClickThroughRate`.' - ); + throw new Error('Parameter `index` is required when calling `getClickThroughRate`.'); } const requestPath = '/2/clicks/clickThroughRate'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } - if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -497,18 +454,15 @@ export function createAnalyticsClient({ */ getConversionRate( { index, startDate, endDate, tags }: GetConversionRateProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getConversionRate`.' - ); + throw new Error('Parameter `index` is required when calling `getConversionRate`.'); } const requestPath = '/2/conversions/conversionRate'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } @@ -516,11 +470,9 @@ export function createAnalyticsClient({ if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -550,22 +502,18 @@ export function createAnalyticsClient({ */ getNoClickRate( { index, startDate, endDate, tags }: GetNoClickRateProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getNoClickRate`.' - ); + throw new Error('Parameter `index` is required when calling `getNoClickRate`.'); } const requestPath = '/2/searches/noClickRate'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } - if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } @@ -573,7 +521,6 @@ export function createAnalyticsClient({ if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -603,18 +550,15 @@ export function createAnalyticsClient({ */ getNoResultsRate( { index, startDate, endDate, tags }: GetNoResultsRateProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getNoResultsRate`.' - ); + throw new Error('Parameter `index` is required when calling `getNoResultsRate`.'); } const requestPath = '/2/searches/noResultRate'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } @@ -622,7 +566,6 @@ export function createAnalyticsClient({ if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } @@ -656,12 +599,10 @@ export function createAnalyticsClient({ */ getPurchaseRate( { index, startDate, endDate, tags }: GetPurchaseRateProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getPurchaseRate`.' - ); + throw new Error('Parameter `index` is required when calling `getPurchaseRate`.'); } const requestPath = '/2/conversions/purchaseRate'; @@ -671,15 +612,12 @@ export function createAnalyticsClient({ if (index !== undefined) { queryParameters.index = index.toString(); } - if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -709,18 +647,15 @@ export function createAnalyticsClient({ */ getRevenue( { index, startDate, endDate, tags }: GetRevenueProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getRevenue`.' - ); + throw new Error('Parameter `index` is required when calling `getRevenue`.'); } const requestPath = '/2/conversions/revenue'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } @@ -728,11 +663,9 @@ export function createAnalyticsClient({ if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -762,18 +695,15 @@ export function createAnalyticsClient({ */ getSearchesCount( { index, startDate, endDate, tags }: GetSearchesCountProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getSearchesCount`.' - ); + throw new Error('Parameter `index` is required when calling `getSearchesCount`.'); } const requestPath = '/2/searches/count'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } @@ -785,7 +715,6 @@ export function createAnalyticsClient({ if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -816,38 +745,25 @@ export function createAnalyticsClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getSearchesNoClicks( - { - index, - startDate, - endDate, - limit, - offset, - tags, - }: GetSearchesNoClicksProps, - requestOptions?: RequestOptions + { index, startDate, endDate, limit, offset, tags }: GetSearchesNoClicksProps, + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getSearchesNoClicks`.' - ); + throw new Error('Parameter `index` is required when calling `getSearchesNoClicks`.'); } const requestPath = '/2/searches/noClicks'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } - if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (limit !== undefined) { queryParameters.limit = limit.toString(); } @@ -855,7 +771,6 @@ export function createAnalyticsClient({ if (offset !== undefined) { queryParameters.offset = offset.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -886,26 +801,16 @@ export function createAnalyticsClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getSearchesNoResults( - { - index, - startDate, - endDate, - limit, - offset, - tags, - }: GetSearchesNoResultsProps, - requestOptions?: RequestOptions + { index, startDate, endDate, limit, offset, tags }: GetSearchesNoResultsProps, + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getSearchesNoResults`.' - ); + throw new Error('Parameter `index` is required when calling `getSearchesNoResults`.'); } const requestPath = '/2/searches/noResults'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } @@ -913,11 +818,9 @@ export function createAnalyticsClient({ if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (limit !== undefined) { queryParameters.limit = limit.toString(); } @@ -925,7 +828,6 @@ export function createAnalyticsClient({ if (offset !== undefined) { queryParameters.offset = offset.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -950,20 +852,14 @@ export function createAnalyticsClient({ * @param getStatus.index - Index name. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getStatus( - { index }: GetStatusProps, - requestOptions?: RequestOptions - ): Promise { + getStatus({ index }: GetStatusProps, requestOptions?: RequestOptions): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getStatus`.' - ); + throw new Error('Parameter `index` is required when calling `getStatus`.'); } const requestPath = '/2/status'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } @@ -995,30 +891,24 @@ export function createAnalyticsClient({ */ getTopCountries( { index, startDate, endDate, limit, offset, tags }: GetTopCountriesProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getTopCountries`.' - ); + throw new Error('Parameter `index` is required when calling `getTopCountries`.'); } const requestPath = '/2/countries'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } - if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (limit !== undefined) { queryParameters.limit = limit.toString(); } @@ -1026,7 +916,6 @@ export function createAnalyticsClient({ if (offset !== undefined) { queryParameters.offset = offset.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -1058,21 +947,11 @@ export function createAnalyticsClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getTopFilterAttributes( - { - index, - search, - startDate, - endDate, - limit, - offset, - tags, - }: GetTopFilterAttributesProps, - requestOptions?: RequestOptions + { index, search, startDate, endDate, limit, offset, tags }: GetTopFilterAttributesProps, + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getTopFilterAttributes`.' - ); + throw new Error('Parameter `index` is required when calling `getTopFilterAttributes`.'); } const requestPath = '/2/filters'; @@ -1082,19 +961,15 @@ export function createAnalyticsClient({ if (index !== undefined) { queryParameters.index = index.toString(); } - if (search !== undefined) { queryParameters.search = search.toString(); } - if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (limit !== undefined) { queryParameters.limit = limit.toString(); } @@ -1102,7 +977,6 @@ export function createAnalyticsClient({ if (offset !== undefined) { queryParameters.offset = offset.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -1135,41 +1009,23 @@ export function createAnalyticsClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getTopFilterForAttribute( - { - attribute, - index, - search, - startDate, - endDate, - limit, - offset, - tags, - }: GetTopFilterForAttributeProps, - requestOptions?: RequestOptions + { attribute, index, search, startDate, endDate, limit, offset, tags }: GetTopFilterForAttributeProps, + requestOptions?: RequestOptions, ): Promise { if (!attribute) { - throw new Error( - 'Parameter `attribute` is required when calling `getTopFilterForAttribute`.' - ); + throw new Error('Parameter `attribute` is required when calling `getTopFilterForAttribute`.'); } if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getTopFilterForAttribute`.' - ); + throw new Error('Parameter `index` is required when calling `getTopFilterForAttribute`.'); } - const requestPath = '/2/filters/{attribute}'.replace( - '{attribute}', - encodeURIComponent(attribute) - ); + const requestPath = '/2/filters/{attribute}'.replace('{attribute}', encodeURIComponent(attribute)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } - if (search !== undefined) { queryParameters.search = search.toString(); } @@ -1177,19 +1033,15 @@ export function createAnalyticsClient({ if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (limit !== undefined) { queryParameters.limit = limit.toString(); } - if (offset !== undefined) { queryParameters.offset = offset.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -1221,27 +1073,16 @@ export function createAnalyticsClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getTopFiltersNoResults( - { - index, - search, - startDate, - endDate, - limit, - offset, - tags, - }: GetTopFiltersNoResultsProps, - requestOptions?: RequestOptions + { index, search, startDate, endDate, limit, offset, tags }: GetTopFiltersNoResultsProps, + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getTopFiltersNoResults`.' - ); + throw new Error('Parameter `index` is required when calling `getTopFiltersNoResults`.'); } const requestPath = '/2/filters/noResults'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } @@ -1249,23 +1090,18 @@ export function createAnalyticsClient({ if (search !== undefined) { queryParameters.search = search.toString(); } - if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (limit !== undefined) { queryParameters.limit = limit.toString(); } - if (offset !== undefined) { queryParameters.offset = offset.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -1299,33 +1135,19 @@ export function createAnalyticsClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getTopHits( - { - index, - search, - clickAnalytics, - revenueAnalytics, - startDate, - endDate, - limit, - offset, - tags, - }: GetTopHitsProps, - requestOptions?: RequestOptions + { index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags }: GetTopHitsProps, + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getTopHits`.' - ); + throw new Error('Parameter `index` is required when calling `getTopHits`.'); } const requestPath = '/2/hits'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } - if (search !== undefined) { queryParameters.search = search.toString(); } @@ -1333,15 +1155,12 @@ export function createAnalyticsClient({ if (clickAnalytics !== undefined) { queryParameters.clickAnalytics = clickAnalytics.toString(); } - if (revenueAnalytics !== undefined) { queryParameters.revenueAnalytics = revenueAnalytics.toString(); } - if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } @@ -1349,11 +1168,9 @@ export function createAnalyticsClient({ if (limit !== undefined) { queryParameters.limit = limit.toString(); } - if (offset !== undefined) { queryParameters.offset = offset.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -1400,18 +1217,15 @@ export function createAnalyticsClient({ offset, tags, }: GetTopSearchesProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getTopSearches`.' - ); + throw new Error('Parameter `index` is required when calling `getTopSearches`.'); } const requestPath = '/2/searches'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } @@ -1419,35 +1233,27 @@ export function createAnalyticsClient({ if (clickAnalytics !== undefined) { queryParameters.clickAnalytics = clickAnalytics.toString(); } - if (revenueAnalytics !== undefined) { queryParameters.revenueAnalytics = revenueAnalytics.toString(); } - if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (orderBy !== undefined) { queryParameters.orderBy = orderBy.toString(); } - if (direction !== undefined) { queryParameters.direction = direction.toString(); } - if (limit !== undefined) { queryParameters.limit = limit.toString(); } - if (offset !== undefined) { queryParameters.offset = offset.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } @@ -1477,18 +1283,15 @@ export function createAnalyticsClient({ */ getUsersCount( { index, startDate, endDate, tags }: GetUsersCountProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!index) { - throw new Error( - 'Parameter `index` is required when calling `getUsersCount`.' - ); + throw new Error('Parameter `index` is required when calling `getUsersCount`.'); } const requestPath = '/2/users/count'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (index !== undefined) { queryParameters.index = index.toString(); } @@ -1500,7 +1303,6 @@ export function createAnalyticsClient({ if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (tags !== undefined) { queryParameters.tags = tags.toString(); } diff --git a/packages/client-common/package.json b/packages/client-common/package.json index df4a5c430..637faca35 100644 --- a/packages/client-common/package.json +++ b/packages/client-common/package.json @@ -23,13 +23,13 @@ "test": "jest" }, "devDependencies": { - "@babel/preset-env": "7.25.3", + "@babel/preset-env": "7.25.4", "@babel/preset-typescript": "7.24.7", "@types/jest": "29.5.12", - "@types/node": "20.14.14", + "@types/node": "22.5.0", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", - "ts-jest": "29.2.4", + "ts-jest": "29.2.5", "typescript": "5.5.4" }, "engines": { diff --git a/packages/client-common/rollup.config.js b/packages/client-common/rollup.config.js index 85ae53895..39acfc260 100644 --- a/packages/client-common/rollup.config.js +++ b/packages/client-common/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); diff --git a/packages/client-insights/builds/browser.ts b/packages/client-insights/builds/browser.ts index 0b665fc32..18c8d66a7 100644 --- a/packages/client-insights/builds/browser.ts +++ b/packages/client-insights/builds/browser.ts @@ -12,11 +12,7 @@ import { import { createXhrRequester } from '@algolia/requester-browser-xhr'; import type { Region } from '../src/insightsClient'; -import { - createInsightsClient, - apiClientVersion, - REGIONS, -} from '../src/insightsClient'; +import { createInsightsClient, apiClientVersion, REGIONS } from '../src/insightsClient'; export { apiClientVersion, Region } from '../src/insightsClient'; export * from '../model'; @@ -27,12 +23,7 @@ export * from '../model'; export type InsightsClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function insightsClient( - appId: string, - apiKey: string, - region?: Region, - options?: ClientOptions -) { +export function insightsClient(appId: string, apiKey: string, region?: Region, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -42,9 +33,7 @@ export function insightsClient( } if (region && (typeof region !== 'string' || !REGIONS.includes(region))) { - throw new Error( - `\`region\` must be one of the following: ${REGIONS.join(', ')}` - ); + throw new Error(`\`region\` must be one of the following: ${REGIONS.join(', ')}`); } return createInsightsClient({ @@ -62,10 +51,7 @@ export function insightsClient( responsesCache: createMemoryCache(), requestsCache: createMemoryCache({ serializable: false }), hostsCache: createFallbackableCache({ - caches: [ - createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), - createMemoryCache(), - ], + caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()], }), ...options, }); diff --git a/packages/client-insights/builds/node.ts b/packages/client-insights/builds/node.ts index 8657e9b5c..5d96eaf04 100644 --- a/packages/client-insights/builds/node.ts +++ b/packages/client-insights/builds/node.ts @@ -22,12 +22,7 @@ export * from '../model'; export type InsightsClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function insightsClient( - appId: string, - apiKey: string, - region?: Region, - options?: ClientOptions -) { +export function insightsClient(appId: string, apiKey: string, region?: Region, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -37,9 +32,7 @@ export function insightsClient( } if (region && (typeof region !== 'string' || !REGIONS.includes(region))) { - throw new Error( - `\`region\` must be one of the following: ${REGIONS.join(', ')}` - ); + throw new Error(`\`region\` must be one of the following: ${REGIONS.join(', ')}`); } return { diff --git a/packages/client-insights/model/clientMethodProps.ts b/packages/client-insights/model/clientMethodProps.ts index 4f8119fc9..8c922c129 100644 --- a/packages/client-insights/model/clientMethodProps.ts +++ b/packages/client-insights/model/clientMethodProps.ts @@ -43,7 +43,7 @@ export type CustomPostProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** @@ -61,7 +61,7 @@ export type CustomPutProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** diff --git a/packages/client-insights/package.json b/packages/client-insights/package.json index d0afdae79..c404aab89 100644 --- a/packages/client-insights/package.json +++ b/packages/client-insights/package.json @@ -49,8 +49,8 @@ "@algolia/requester-node-http": "5.1.1" }, "devDependencies": { - "@types/node": "22.2.0", - "rollup": "4.20.0", + "@types/node": "22.5.0", + "rollup": "4.21.0", "typescript": "5.5.4" }, "engines": { diff --git a/packages/client-insights/rollup.config.js b/packages/client-insights/rollup.config.js index dbcfa8129..0f45d3972 100644 --- a/packages/client-insights/rollup.config.js +++ b/packages/client-insights/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); \ No newline at end of file diff --git a/packages/client-insights/src/insightsClient.ts b/packages/client-insights/src/insightsClient.ts index 7c374e2a5..ed6df1f1d 100644 --- a/packages/client-insights/src/insightsClient.ts +++ b/packages/client-insights/src/insightsClient.ts @@ -1,10 +1,6 @@ // 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. -import { - createAuth, - createTransporter, - getAlgoliaAgent, -} from '@algolia/client-common'; +import { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common'; import type { CreateClientOptions, Headers, @@ -30,9 +26,7 @@ export const REGIONS = ['de', 'us'] as const; export type Region = (typeof REGIONS)[number]; function getDefaultHosts(region?: Region): Host[] { - const url = !region - ? 'insights.algolia.io' - : 'insights.{region}.algolia.io'.replace('{region}', region); + const url = !region ? 'insights.algolia.io' : 'insights.{region}.algolia.io'.replace('{region}', region); return [{ url, accept: 'readWrite', protocol: 'https' }]; } @@ -78,10 +72,7 @@ export function createInsightsClient({ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties. */ clearCache(): Promise { - return Promise.all([ - transporter.requestsCache.clear(), - transporter.responsesCache.clear(), - ]).then(() => undefined); + return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined); }, /** @@ -111,12 +102,10 @@ export function createInsightsClient({ */ customDelete( { path, parameters }: CustomDeleteProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customDelete`.' - ); + throw new Error('Parameter `path` is required when calling `customDelete`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -141,14 +130,9 @@ export function createInsightsClient({ * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - customGet( - { path, parameters }: CustomGetProps, - requestOptions?: RequestOptions - ): Promise> { + customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customGet`.' - ); + throw new Error('Parameter `path` is required when calling `customGet`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -176,12 +160,10 @@ export function createInsightsClient({ */ customPost( { path, parameters, body }: CustomPostProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPost`.' - ); + throw new Error('Parameter `path` is required when calling `customPost`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -210,12 +192,10 @@ export function createInsightsClient({ */ customPut( { path, parameters, body }: CustomPutProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPut`.' - ); + throw new Error('Parameter `path` is required when calling `customPut`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -240,20 +220,12 @@ export function createInsightsClient({ * @param deleteUserToken.userToken - User token for which to delete all associated events. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - deleteUserToken( - { userToken }: DeleteUserTokenProps, - requestOptions?: RequestOptions - ): Promise { + deleteUserToken({ userToken }: DeleteUserTokenProps, requestOptions?: RequestOptions): Promise { if (!userToken) { - throw new Error( - 'Parameter `userToken` is required when calling `deleteUserToken`.' - ); + throw new Error('Parameter `userToken` is required when calling `deleteUserToken`.'); } - const requestPath = '/1/usertokens/{userToken}'.replace( - '{userToken}', - encodeURIComponent(userToken) - ); + const requestPath = '/1/usertokens/{userToken}'.replace('{userToken}', encodeURIComponent(userToken)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -273,20 +245,13 @@ export function createInsightsClient({ * @param insightsEvents - The insightsEvents object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - pushEvents( - insightsEvents: InsightsEvents, - requestOptions?: RequestOptions - ): Promise { + pushEvents(insightsEvents: InsightsEvents, requestOptions?: RequestOptions): Promise { if (!insightsEvents) { - throw new Error( - 'Parameter `insightsEvents` is required when calling `pushEvents`.' - ); + throw new Error('Parameter `insightsEvents` is required when calling `pushEvents`.'); } if (!insightsEvents.events) { - throw new Error( - 'Parameter `insightsEvents.events` is required when calling `pushEvents`.' - ); + throw new Error('Parameter `insightsEvents.events` is required when calling `pushEvents`.'); } const requestPath = '/1/events'; diff --git a/packages/client-personalization/builds/browser.ts b/packages/client-personalization/builds/browser.ts index 05188e1bc..494c06855 100644 --- a/packages/client-personalization/builds/browser.ts +++ b/packages/client-personalization/builds/browser.ts @@ -12,11 +12,7 @@ import { import { createXhrRequester } from '@algolia/requester-browser-xhr'; import type { Region } from '../src/personalizationClient'; -import { - createPersonalizationClient, - apiClientVersion, - REGIONS, -} from '../src/personalizationClient'; +import { createPersonalizationClient, apiClientVersion, REGIONS } from '../src/personalizationClient'; export { apiClientVersion, Region } from '../src/personalizationClient'; export * from '../model'; @@ -27,12 +23,7 @@ export * from '../model'; export type PersonalizationClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function personalizationClient( - appId: string, - apiKey: string, - region: Region, - options?: ClientOptions -) { +export function personalizationClient(appId: string, apiKey: string, region: Region, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -41,13 +32,8 @@ export function personalizationClient( throw new Error('`apiKey` is missing.'); } - if ( - !region || - (region && (typeof region !== 'string' || !REGIONS.includes(region))) - ) { - throw new Error( - `\`region\` is required and must be one of the following: ${REGIONS.join(', ')}` - ); + if (!region || (region && (typeof region !== 'string' || !REGIONS.includes(region)))) { + throw new Error(`\`region\` is required and must be one of the following: ${REGIONS.join(', ')}`); } return createPersonalizationClient({ @@ -65,10 +51,7 @@ export function personalizationClient( responsesCache: createMemoryCache(), requestsCache: createMemoryCache({ serializable: false }), hostsCache: createFallbackableCache({ - caches: [ - createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), - createMemoryCache(), - ], + caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()], }), ...options, }); diff --git a/packages/client-personalization/builds/node.ts b/packages/client-personalization/builds/node.ts index b86db1b1b..26ebb74d4 100644 --- a/packages/client-personalization/builds/node.ts +++ b/packages/client-personalization/builds/node.ts @@ -11,10 +11,7 @@ import { import { createHttpRequester } from '@algolia/requester-node-http'; import type { Region } from '../src/personalizationClient'; -import { - createPersonalizationClient, - REGIONS, -} from '../src/personalizationClient'; +import { createPersonalizationClient, REGIONS } from '../src/personalizationClient'; export { apiClientVersion, Region } from '../src/personalizationClient'; export * from '../model'; @@ -25,12 +22,7 @@ export * from '../model'; export type PersonalizationClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function personalizationClient( - appId: string, - apiKey: string, - region: Region, - options?: ClientOptions -) { +export function personalizationClient(appId: string, apiKey: string, region: Region, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -39,13 +31,8 @@ export function personalizationClient( throw new Error('`apiKey` is missing.'); } - if ( - !region || - (region && (typeof region !== 'string' || !REGIONS.includes(region))) - ) { - throw new Error( - `\`region\` is required and must be one of the following: ${REGIONS.join(', ')}` - ); + if (!region || (region && (typeof region !== 'string' || !REGIONS.includes(region)))) { + throw new Error(`\`region\` is required and must be one of the following: ${REGIONS.join(', ')}`); } return { diff --git a/packages/client-personalization/model/clientMethodProps.ts b/packages/client-personalization/model/clientMethodProps.ts index 823eb1718..ef7a21d45 100644 --- a/packages/client-personalization/model/clientMethodProps.ts +++ b/packages/client-personalization/model/clientMethodProps.ts @@ -43,7 +43,7 @@ export type CustomPostProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** @@ -61,7 +61,7 @@ export type CustomPutProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** diff --git a/packages/client-personalization/model/getUserTokenResponse.ts b/packages/client-personalization/model/getUserTokenResponse.ts index c95f1aba9..e85077c90 100644 --- a/packages/client-personalization/model/getUserTokenResponse.ts +++ b/packages/client-personalization/model/getUserTokenResponse.ts @@ -14,5 +14,5 @@ export type GetUserTokenResponse = { /** * Scores for different facet values. Scores represent the user affinity for a user profile towards specific facet values, given the personalization strategy and past events. */ - scores: Record; + scores: Record; }; diff --git a/packages/client-personalization/package.json b/packages/client-personalization/package.json index b6e504655..a347a6535 100644 --- a/packages/client-personalization/package.json +++ b/packages/client-personalization/package.json @@ -49,8 +49,8 @@ "@algolia/requester-node-http": "5.1.1" }, "devDependencies": { - "@types/node": "22.2.0", - "rollup": "4.20.0", + "@types/node": "22.5.0", + "rollup": "4.21.0", "typescript": "5.5.4" }, "engines": { diff --git a/packages/client-personalization/rollup.config.js b/packages/client-personalization/rollup.config.js index dbcfa8129..0f45d3972 100644 --- a/packages/client-personalization/rollup.config.js +++ b/packages/client-personalization/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); \ No newline at end of file diff --git a/packages/client-personalization/src/personalizationClient.ts b/packages/client-personalization/src/personalizationClient.ts index d86a27a68..fa69a6e94 100644 --- a/packages/client-personalization/src/personalizationClient.ts +++ b/packages/client-personalization/src/personalizationClient.ts @@ -1,10 +1,6 @@ // 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. -import { - createAuth, - createTransporter, - getAlgoliaAgent, -} from '@algolia/client-common'; +import { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common'; import type { CreateClientOptions, Headers, @@ -33,10 +29,7 @@ export const REGIONS = ['eu', 'us'] as const; export type Region = (typeof REGIONS)[number]; function getDefaultHosts(region: Region): Host[] { - const url = 'personalization.{region}.algolia.com'.replace( - '{region}', - region - ); + const url = 'personalization.{region}.algolia.com'.replace('{region}', region); return [{ url, accept: 'readWrite', protocol: 'https' }]; } @@ -82,10 +75,7 @@ export function createPersonalizationClient({ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties. */ clearCache(): Promise { - return Promise.all([ - transporter.requestsCache.clear(), - transporter.responsesCache.clear(), - ]).then(() => undefined); + return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined); }, /** @@ -115,12 +105,10 @@ export function createPersonalizationClient({ */ customDelete( { path, parameters }: CustomDeleteProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customDelete`.' - ); + throw new Error('Parameter `path` is required when calling `customDelete`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -145,14 +133,9 @@ export function createPersonalizationClient({ * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - customGet( - { path, parameters }: CustomGetProps, - requestOptions?: RequestOptions - ): Promise> { + customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customGet`.' - ); + throw new Error('Parameter `path` is required when calling `customGet`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -180,12 +163,10 @@ export function createPersonalizationClient({ */ customPost( { path, parameters, body }: CustomPostProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPost`.' - ); + throw new Error('Parameter `path` is required when calling `customPost`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -214,12 +195,10 @@ export function createPersonalizationClient({ */ customPut( { path, parameters, body }: CustomPutProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPut`.' - ); + throw new Error('Parameter `path` is required when calling `customPut`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -249,18 +228,13 @@ export function createPersonalizationClient({ */ deleteUserProfile( { userToken }: DeleteUserProfileProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!userToken) { - throw new Error( - 'Parameter `userToken` is required when calling `deleteUserProfile`.' - ); + throw new Error('Parameter `userToken` is required when calling `deleteUserProfile`.'); } - const requestPath = '/1/profiles/{userToken}'.replace( - '{userToken}', - encodeURIComponent(userToken) - ); + const requestPath = '/1/profiles/{userToken}'.replace('{userToken}', encodeURIComponent(userToken)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -282,9 +256,7 @@ export function createPersonalizationClient({ * * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getPersonalizationStrategy( - requestOptions?: RequestOptions - ): Promise { + getPersonalizationStrategy(requestOptions?: RequestOptions): Promise { const requestPath = '/1/strategies/personalization'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -311,17 +283,15 @@ export function createPersonalizationClient({ */ getUserTokenProfile( { userToken }: GetUserTokenProfileProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!userToken) { - throw new Error( - 'Parameter `userToken` is required when calling `getUserTokenProfile`.' - ); + throw new Error('Parameter `userToken` is required when calling `getUserTokenProfile`.'); } const requestPath = '/1/profiles/personalization/{userToken}'.replace( '{userToken}', - encodeURIComponent(userToken) + encodeURIComponent(userToken), ); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -347,27 +317,27 @@ export function createPersonalizationClient({ */ setPersonalizationStrategy( personalizationStrategyParams: PersonalizationStrategyParams, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!personalizationStrategyParams) { throw new Error( - 'Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.' + 'Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.', ); } if (!personalizationStrategyParams.eventScoring) { throw new Error( - 'Parameter `personalizationStrategyParams.eventScoring` is required when calling `setPersonalizationStrategy`.' + 'Parameter `personalizationStrategyParams.eventScoring` is required when calling `setPersonalizationStrategy`.', ); } if (!personalizationStrategyParams.facetScoring) { throw new Error( - 'Parameter `personalizationStrategyParams.facetScoring` is required when calling `setPersonalizationStrategy`.' + 'Parameter `personalizationStrategyParams.facetScoring` is required when calling `setPersonalizationStrategy`.', ); } if (!personalizationStrategyParams.personalizationImpact) { throw new Error( - 'Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.' + 'Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.', ); } diff --git a/packages/client-query-suggestions/builds/browser.ts b/packages/client-query-suggestions/builds/browser.ts index cd0776758..30a40c33c 100644 --- a/packages/client-query-suggestions/builds/browser.ts +++ b/packages/client-query-suggestions/builds/browser.ts @@ -12,11 +12,7 @@ import { import { createXhrRequester } from '@algolia/requester-browser-xhr'; import type { Region } from '../src/querySuggestionsClient'; -import { - createQuerySuggestionsClient, - apiClientVersion, - REGIONS, -} from '../src/querySuggestionsClient'; +import { createQuerySuggestionsClient, apiClientVersion, REGIONS } from '../src/querySuggestionsClient'; export { apiClientVersion, Region } from '../src/querySuggestionsClient'; export * from '../model'; @@ -27,12 +23,7 @@ export * from '../model'; export type QuerySuggestionsClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function querySuggestionsClient( - appId: string, - apiKey: string, - region: Region, - options?: ClientOptions -) { +export function querySuggestionsClient(appId: string, apiKey: string, region: Region, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -41,13 +32,8 @@ export function querySuggestionsClient( throw new Error('`apiKey` is missing.'); } - if ( - !region || - (region && (typeof region !== 'string' || !REGIONS.includes(region))) - ) { - throw new Error( - `\`region\` is required and must be one of the following: ${REGIONS.join(', ')}` - ); + if (!region || (region && (typeof region !== 'string' || !REGIONS.includes(region)))) { + throw new Error(`\`region\` is required and must be one of the following: ${REGIONS.join(', ')}`); } return createQuerySuggestionsClient({ @@ -65,10 +51,7 @@ export function querySuggestionsClient( responsesCache: createMemoryCache(), requestsCache: createMemoryCache({ serializable: false }), hostsCache: createFallbackableCache({ - caches: [ - createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), - createMemoryCache(), - ], + caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()], }), ...options, }); diff --git a/packages/client-query-suggestions/builds/node.ts b/packages/client-query-suggestions/builds/node.ts index f92e9918b..9c3488e0a 100644 --- a/packages/client-query-suggestions/builds/node.ts +++ b/packages/client-query-suggestions/builds/node.ts @@ -11,10 +11,7 @@ import { import { createHttpRequester } from '@algolia/requester-node-http'; import type { Region } from '../src/querySuggestionsClient'; -import { - createQuerySuggestionsClient, - REGIONS, -} from '../src/querySuggestionsClient'; +import { createQuerySuggestionsClient, REGIONS } from '../src/querySuggestionsClient'; export { apiClientVersion, Region } from '../src/querySuggestionsClient'; export * from '../model'; @@ -25,12 +22,7 @@ export * from '../model'; export type QuerySuggestionsClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function querySuggestionsClient( - appId: string, - apiKey: string, - region: Region, - options?: ClientOptions -) { +export function querySuggestionsClient(appId: string, apiKey: string, region: Region, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -39,13 +31,8 @@ export function querySuggestionsClient( throw new Error('`apiKey` is missing.'); } - if ( - !region || - (region && (typeof region !== 'string' || !REGIONS.includes(region))) - ) { - throw new Error( - `\`region\` is required and must be one of the following: ${REGIONS.join(', ')}` - ); + if (!region || (region && (typeof region !== 'string' || !REGIONS.includes(region)))) { + throw new Error(`\`region\` is required and must be one of the following: ${REGIONS.join(', ')}`); } return { diff --git a/packages/client-query-suggestions/model/clientMethodProps.ts b/packages/client-query-suggestions/model/clientMethodProps.ts index e9635ea63..9634622a2 100644 --- a/packages/client-query-suggestions/model/clientMethodProps.ts +++ b/packages/client-query-suggestions/model/clientMethodProps.ts @@ -45,7 +45,7 @@ export type CustomPostProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** @@ -63,7 +63,7 @@ export type CustomPutProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** diff --git a/packages/client-query-suggestions/model/configurationWithIndex.ts b/packages/client-query-suggestions/model/configurationWithIndex.ts index 5773a7396..f6511e7c7 100644 --- a/packages/client-query-suggestions/model/configurationWithIndex.ts +++ b/packages/client-query-suggestions/model/configurationWithIndex.ts @@ -5,4 +5,4 @@ import type { Configuration } from './configuration'; /** * Query Suggestions configuration. */ -export type ConfigurationWithIndex = Configuration & Record; +export type ConfigurationWithIndex = Configuration & Record; diff --git a/packages/client-query-suggestions/package.json b/packages/client-query-suggestions/package.json index 978df7446..9535210cd 100644 --- a/packages/client-query-suggestions/package.json +++ b/packages/client-query-suggestions/package.json @@ -49,8 +49,8 @@ "@algolia/requester-node-http": "5.1.1" }, "devDependencies": { - "@types/node": "22.2.0", - "rollup": "4.20.0", + "@types/node": "22.5.0", + "rollup": "4.21.0", "typescript": "5.5.4" }, "engines": { diff --git a/packages/client-query-suggestions/rollup.config.js b/packages/client-query-suggestions/rollup.config.js index dbcfa8129..0f45d3972 100644 --- a/packages/client-query-suggestions/rollup.config.js +++ b/packages/client-query-suggestions/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); \ No newline at end of file diff --git a/packages/client-query-suggestions/src/querySuggestionsClient.ts b/packages/client-query-suggestions/src/querySuggestionsClient.ts index 71df69c47..7c270e63b 100644 --- a/packages/client-query-suggestions/src/querySuggestionsClient.ts +++ b/packages/client-query-suggestions/src/querySuggestionsClient.ts @@ -1,10 +1,6 @@ // 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. -import { - createAuth, - createTransporter, - getAlgoliaAgent, -} from '@algolia/client-common'; +import { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common'; import type { CreateClientOptions, Headers, @@ -37,10 +33,7 @@ export const REGIONS = ['eu', 'us'] as const; export type Region = (typeof REGIONS)[number]; function getDefaultHosts(region: Region): Host[] { - const url = 'query-suggestions.{region}.algolia.com'.replace( - '{region}', - region - ); + const url = 'query-suggestions.{region}.algolia.com'.replace('{region}', region); return [{ url, accept: 'readWrite', protocol: 'https' }]; } @@ -86,10 +79,7 @@ export function createQuerySuggestionsClient({ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties. */ clearCache(): Promise { - return Promise.all([ - transporter.requestsCache.clear(), - transporter.responsesCache.clear(), - ]).then(() => undefined); + return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined); }, /** @@ -120,12 +110,10 @@ export function createQuerySuggestionsClient({ */ createConfig( configurationWithIndex: ConfigurationWithIndex, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!configurationWithIndex) { - throw new Error( - 'Parameter `configurationWithIndex` is required when calling `createConfig`.' - ); + throw new Error('Parameter `configurationWithIndex` is required when calling `createConfig`.'); } const requestPath = '/1/configs'; @@ -153,12 +141,10 @@ export function createQuerySuggestionsClient({ */ customDelete( { path, parameters }: CustomDeleteProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customDelete`.' - ); + throw new Error('Parameter `path` is required when calling `customDelete`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -183,14 +169,9 @@ export function createQuerySuggestionsClient({ * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - customGet( - { path, parameters }: CustomGetProps, - requestOptions?: RequestOptions - ): Promise> { + customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customGet`.' - ); + throw new Error('Parameter `path` is required when calling `customGet`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -218,12 +199,10 @@ export function createQuerySuggestionsClient({ */ customPost( { path, parameters, body }: CustomPostProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPost`.' - ); + throw new Error('Parameter `path` is required when calling `customPost`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -252,12 +231,10 @@ export function createQuerySuggestionsClient({ */ customPut( { path, parameters, body }: CustomPutProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPut`.' - ); + throw new Error('Parameter `path` is required when calling `customPut`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -285,20 +262,12 @@ export function createQuerySuggestionsClient({ * @param deleteConfig.indexName - Query Suggestions index name. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - deleteConfig( - { indexName }: DeleteConfigProps, - requestOptions?: RequestOptions - ): Promise { + deleteConfig({ indexName }: DeleteConfigProps, requestOptions?: RequestOptions): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `deleteConfig`.' - ); + throw new Error('Parameter `indexName` is required when calling `deleteConfig`.'); } - const requestPath = '/1/configs/{indexName}'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -320,9 +289,7 @@ export function createQuerySuggestionsClient({ * * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getAllConfigs( - requestOptions?: RequestOptions - ): Promise { + getAllConfigs(requestOptions?: RequestOptions): Promise { const requestPath = '/1/configs'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -347,20 +314,12 @@ export function createQuerySuggestionsClient({ * @param getConfig.indexName - Query Suggestions index name. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getConfig( - { indexName }: GetConfigProps, - requestOptions?: RequestOptions - ): Promise { + getConfig({ indexName }: GetConfigProps, requestOptions?: RequestOptions): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `getConfig`.' - ); + throw new Error('Parameter `indexName` is required when calling `getConfig`.'); } - const requestPath = '/1/configs/{indexName}'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -384,20 +343,12 @@ export function createQuerySuggestionsClient({ * @param getConfigStatus.indexName - Query Suggestions index name. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getConfigStatus( - { indexName }: GetConfigStatusProps, - requestOptions?: RequestOptions - ): Promise { + getConfigStatus({ indexName }: GetConfigStatusProps, requestOptions?: RequestOptions): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `getConfigStatus`.' - ); + throw new Error('Parameter `indexName` is required when calling `getConfigStatus`.'); } - const requestPath = '/1/configs/{indexName}/status'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/configs/{indexName}/status'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -421,20 +372,12 @@ export function createQuerySuggestionsClient({ * @param getLogFile.indexName - Query Suggestions index name. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getLogFile( - { indexName }: GetLogFileProps, - requestOptions?: RequestOptions - ): Promise { + getLogFile({ indexName }: GetLogFileProps, requestOptions?: RequestOptions): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `getLogFile`.' - ); + throw new Error('Parameter `indexName` is required when calling `getLogFile`.'); } - const requestPath = '/1/logs/{indexName}'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/logs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -461,30 +404,21 @@ export function createQuerySuggestionsClient({ */ updateConfig( { indexName, configuration }: UpdateConfigProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `updateConfig`.' - ); + throw new Error('Parameter `indexName` is required when calling `updateConfig`.'); } if (!configuration) { - throw new Error( - 'Parameter `configuration` is required when calling `updateConfig`.' - ); + throw new Error('Parameter `configuration` is required when calling `updateConfig`.'); } if (!configuration.sourceIndices) { - throw new Error( - 'Parameter `configuration.sourceIndices` is required when calling `updateConfig`.' - ); + throw new Error('Parameter `configuration.sourceIndices` is required when calling `updateConfig`.'); } - const requestPath = '/1/configs/{indexName}'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; diff --git a/packages/client-search/builds/browser.ts b/packages/client-search/builds/browser.ts index b16781f63..e8f97503c 100644 --- a/packages/client-search/builds/browser.ts +++ b/packages/client-search/builds/browser.ts @@ -22,11 +22,7 @@ export * from '../model'; export type SearchClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function searchClient( - appId: string, - apiKey: string, - options?: ClientOptions -) { +export function searchClient(appId: string, apiKey: string, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -49,10 +45,7 @@ export function searchClient( responsesCache: createMemoryCache(), requestsCache: createMemoryCache({ serializable: false }), hostsCache: createFallbackableCache({ - caches: [ - createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), - createMemoryCache(), - ], + caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()], }), ...options, }); diff --git a/packages/client-search/builds/node.ts b/packages/client-search/builds/node.ts index d51a6dc3c..b05626e76 100644 --- a/packages/client-search/builds/node.ts +++ b/packages/client-search/builds/node.ts @@ -13,10 +13,7 @@ import { } from '@algolia/client-common'; import { createHttpRequester } from '@algolia/requester-node-http'; -import type { - GenerateSecuredApiKeyOptions, - GetSecuredApiKeyRemainingValidityOptions, -} from '../model'; +import type { GenerateSecuredApiKeyOptions, GetSecuredApiKeyRemainingValidityOptions } from '../model'; import { createSearchClient } from '../src/searchClient'; export { apiClientVersion } from '../src/searchClient'; @@ -28,11 +25,7 @@ export * from '../model'; export type SearchClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function searchClient( - appId: string, - apiKey: string, - options?: ClientOptions -) { +export function searchClient(appId: string, apiKey: string, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -66,10 +59,7 @@ export function searchClient( * @param generateSecuredApiKey.parentApiKey - The base API key from which to generate the new secured one. * @param generateSecuredApiKey.restrictions - A set of properties defining the restrictions of the secured API key. */ - generateSecuredApiKey({ - parentApiKey, - restrictions = {}, - }: GenerateSecuredApiKeyOptions): string { + generateSecuredApiKey({ parentApiKey, restrictions = {} }: GenerateSecuredApiKeyOptions): string { let mergedRestrictions = restrictions; if (restrictions.searchParams) { // merge searchParams with the root restrictions @@ -89,14 +79,12 @@ export function searchClient( acc[key] = (mergedRestrictions as any)[key]; return acc; }, - {} as Record + {} as Record, ); const queryParameters = serializeQueryParameters(mergedRestrictions); return Buffer.from( - createHmac('sha256', parentApiKey) - .update(queryParameters) - .digest('hex') + queryParameters + createHmac('sha256', parentApiKey).update(queryParameters).digest('hex') + queryParameters, ).toString('base64'); }, @@ -107,12 +95,8 @@ export function searchClient( * @param getSecuredApiKeyRemainingValidity - The `getSecuredApiKeyRemainingValidity` object. * @param getSecuredApiKeyRemainingValidity.securedApiKey - The secured API key generated with the `generateSecuredApiKey` method. */ - getSecuredApiKeyRemainingValidity({ - securedApiKey, - }: GetSecuredApiKeyRemainingValidityOptions): number { - const decodedString = Buffer.from(securedApiKey, 'base64').toString( - 'ascii' - ); + getSecuredApiKeyRemainingValidity({ securedApiKey }: GetSecuredApiKeyRemainingValidityOptions): number { + const decodedString = Buffer.from(securedApiKey, 'base64').toString('ascii'); const regex = /validUntil=(\d+)/; const match = decodedString.match(regex); diff --git a/packages/client-search/model/alternativesAsExact.ts b/packages/client-search/model/alternativesAsExact.ts index 126646f42..d18409281 100644 --- a/packages/client-search/model/alternativesAsExact.ts +++ b/packages/client-search/model/alternativesAsExact.ts @@ -1,6 +1,3 @@ // 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. -export type AlternativesAsExact = - | 'ignorePlurals' - | 'multiWordsSynonym' - | 'singleWordSynonym'; +export type AlternativesAsExact = 'ignorePlurals' | 'multiWordsSynonym' | 'singleWordSynonym'; diff --git a/packages/client-search/model/baseIndexSettings.ts b/packages/client-search/model/baseIndexSettings.ts index fca7e872c..50847c81e 100644 --- a/packages/client-search/model/baseIndexSettings.ts +++ b/packages/client-search/model/baseIndexSettings.ts @@ -41,7 +41,7 @@ export type BaseIndexSettings = { /** * Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Attribute names are case-sensitive. Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). Decompounding doesn\'t work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won\'t be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308). */ - decompoundedAttributes?: Record; + decompoundedAttributes?: Record; /** * Languages for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/). @@ -76,7 +76,7 @@ export type BaseIndexSettings = { /** * An object with custom data. You can store up to 32kB as custom data. */ - userData?: Record; + userData?: Record; /** * Characters and their normalized replacements. This overrides Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/). diff --git a/packages/client-search/model/baseSearchResponse.ts b/packages/client-search/model/baseSearchResponse.ts index 227c5fb37..bcaf93dfc 100644 --- a/packages/client-search/model/baseSearchResponse.ts +++ b/packages/client-search/model/baseSearchResponse.ts @@ -1,7 +1,7 @@ // 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. import type { Exhaustive } from './exhaustive'; -import type { FacetsStats } from './facetsStats'; +import type { FacetStats } from './facetStats'; import type { Redirect } from './redirect'; import type { RenderingContent } from './renderingContent'; @@ -51,7 +51,7 @@ export type BaseSearchResponse = Record & { /** * Statistics for numerical facets. */ - facets_stats?: Record; + facets_stats?: Record; /** * Index name used for the query. @@ -86,7 +86,7 @@ export type BaseSearchResponse = Record & { /** * Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues. */ - processingTimingsMS?: Record; + processingTimingsMS?: Record; /** * Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set. @@ -110,7 +110,7 @@ export type BaseSearchResponse = Record & { /** * An object with custom data. You can store up to 32kB as custom data. */ - userData?: Record; + userData?: Record; /** * Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). diff --git a/packages/client-search/model/batchRequest.ts b/packages/client-search/model/batchRequest.ts index 2417081f0..cea7356ab 100644 --- a/packages/client-search/model/batchRequest.ts +++ b/packages/client-search/model/batchRequest.ts @@ -8,5 +8,5 @@ export type BatchRequest = { /** * Operation arguments (varies with specified `action`). */ - body: Record; + body: Record; }; diff --git a/packages/client-search/model/browseResponse.ts b/packages/client-search/model/browseResponse.ts index ec2bed56a..772709377 100644 --- a/packages/client-search/model/browseResponse.ts +++ b/packages/client-search/model/browseResponse.ts @@ -5,7 +5,4 @@ import type { BrowsePagination } from './browsePagination'; import type { Cursor } from './cursor'; import type { SearchHits } from './searchHits'; -export type BrowseResponse> = BaseSearchResponse & - BrowsePagination & - Cursor & - SearchHits; +export type BrowseResponse> = BaseSearchResponse & BrowsePagination & Cursor & SearchHits; diff --git a/packages/client-search/model/clientMethodProps.ts b/packages/client-search/model/clientMethodProps.ts index 87da985ae..ef57ade04 100644 --- a/packages/client-search/model/clientMethodProps.ts +++ b/packages/client-search/model/clientMethodProps.ts @@ -44,7 +44,7 @@ export type AddOrUpdateObjectProps = { /** * The record, a schemaless object with attributes that are useful in the context of search and discovery. */ - body: Record; + body: Record; }; /** @@ -183,7 +183,7 @@ export type CustomPostProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** @@ -201,7 +201,7 @@ export type CustomPutProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** @@ -529,7 +529,7 @@ export type SaveObjectProps = { /** * The record, a schemaless object with attributes that are useful in the context of search and discovery. */ - body: Record; + body: Record; }; /** @@ -731,9 +731,7 @@ export type UpdateApiKeyProps = { /** * The `browseObjects`, `browseRules`, `browseSynonyms` options. */ -export type BrowseOptions = Partial< - Pick, 'validate'> -> & +export type BrowseOptions = Partial, 'validate'>> & Required, 'aggregator'>>; type WaitForOptions = Partial<{ @@ -813,20 +811,14 @@ export type DeleteObjectsOptions = Pick & { objectIDs: string[]; }; -export type PartialUpdateObjectsOptions = Pick< - ChunkedBatchOptions, - 'indexName' | 'objects' -> & { +export type PartialUpdateObjectsOptions = Pick & { /** *To be provided if non-existing objects are passed, otherwise, the call will fail. */ createIfNotExists?: boolean; }; -export type SaveObjectsOptions = Pick< - ChunkedBatchOptions, - 'indexName' | 'objects' ->; +export type SaveObjectsOptions = Pick; export type ChunkedBatchOptions = ReplaceAllObjectsOptions & { /** diff --git a/packages/client-search/model/consequenceParams.ts b/packages/client-search/model/consequenceParams.ts index 554166a69..94b26e7fc 100644 --- a/packages/client-search/model/consequenceParams.ts +++ b/packages/client-search/model/consequenceParams.ts @@ -4,6 +4,4 @@ import type { BaseSearchParamsWithoutQuery } from './baseSearchParamsWithoutQuer import type { IndexSettingsAsSearchParams } from './indexSettingsAsSearchParams'; import type { Params } from './params'; -export type ConsequenceParams = BaseSearchParamsWithoutQuery & - IndexSettingsAsSearchParams & - Params; +export type ConsequenceParams = BaseSearchParamsWithoutQuery & IndexSettingsAsSearchParams & Params; diff --git a/packages/recommend/model/facetsStats.ts b/packages/client-search/model/facetStats.ts similarity index 94% rename from packages/recommend/model/facetsStats.ts rename to packages/client-search/model/facetStats.ts index 658a047c6..f8bb276a8 100644 --- a/packages/recommend/model/facetsStats.ts +++ b/packages/client-search/model/facetStats.ts @@ -1,6 +1,6 @@ // 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. -export type FacetsStats = { +export type FacetStats = { /** * Minimum value in the results. */ diff --git a/packages/client-search/model/index.ts b/packages/client-search/model/index.ts index 73f280d71..87d8f9c2c 100644 --- a/packages/client-search/model/index.ts +++ b/packages/client-search/model/index.ts @@ -62,8 +62,8 @@ export * from './exhaustive'; export * from './facetFilters'; export * from './facetHits'; export * from './facetOrdering'; +export * from './facetStats'; export * from './facets'; -export * from './facetsStats'; export * from './fetchedIndex'; export * from './getApiKeyResponse'; export * from './getDictionarySettingsResponse'; diff --git a/packages/client-search/model/multipleBatchRequest.ts b/packages/client-search/model/multipleBatchRequest.ts index cf8992381..05413d51b 100644 --- a/packages/client-search/model/multipleBatchRequest.ts +++ b/packages/client-search/model/multipleBatchRequest.ts @@ -8,7 +8,7 @@ export type MultipleBatchRequest = { /** * Operation arguments (varies with specified `action`). */ - body?: Record; + body?: Record; /** * Index name (case-sensitive). diff --git a/packages/client-search/model/removeWordsIfNoResults.ts b/packages/client-search/model/removeWordsIfNoResults.ts index fbd9ca081..23086007c 100644 --- a/packages/client-search/model/removeWordsIfNoResults.ts +++ b/packages/client-search/model/removeWordsIfNoResults.ts @@ -3,8 +3,4 @@ /** * Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). */ -export type RemoveWordsIfNoResults = - | 'allOptional' - | 'firstWords' - | 'lastWords' - | 'none'; +export type RemoveWordsIfNoResults = 'allOptional' | 'firstWords' | 'lastWords' | 'none'; diff --git a/packages/client-search/model/searchResponse.ts b/packages/client-search/model/searchResponse.ts index e785a3e5d..2e074e18f 100644 --- a/packages/client-search/model/searchResponse.ts +++ b/packages/client-search/model/searchResponse.ts @@ -4,6 +4,4 @@ import type { BaseSearchResponse } from './baseSearchResponse'; import type { SearchHits } from './searchHits'; import type { SearchPagination } from './searchPagination'; -export type SearchResponse> = BaseSearchResponse & - SearchHits & - SearchPagination; +export type SearchResponse> = BaseSearchResponse & SearchHits & SearchPagination; diff --git a/packages/client-search/model/searchResult.ts b/packages/client-search/model/searchResult.ts index 99c11e2cf..544b0ddba 100644 --- a/packages/client-search/model/searchResult.ts +++ b/packages/client-search/model/searchResult.ts @@ -3,6 +3,4 @@ import type { SearchForFacetValuesResponse } from './searchForFacetValuesResponse'; import type { SearchResponse } from './searchResponse'; -export type SearchResult> = - | SearchForFacetValuesResponse - | SearchResponse; +export type SearchResult> = SearchForFacetValuesResponse | SearchResponse; diff --git a/packages/client-search/model/synonymType.ts b/packages/client-search/model/synonymType.ts index 7ffc87e7a..6585c2dfa 100644 --- a/packages/client-search/model/synonymType.ts +++ b/packages/client-search/model/synonymType.ts @@ -3,9 +3,4 @@ /** * Synonym type. */ -export type SynonymType = - | 'altcorrection1' - | 'altcorrection2' - | 'onewaysynonym' - | 'placeholder' - | 'synonym'; +export type SynonymType = 'altcorrection1' | 'altcorrection2' | 'onewaysynonym' | 'placeholder' | 'synonym'; diff --git a/packages/client-search/package.json b/packages/client-search/package.json index f85593f9f..5dee16c63 100644 --- a/packages/client-search/package.json +++ b/packages/client-search/package.json @@ -49,8 +49,8 @@ "@algolia/requester-node-http": "5.1.1" }, "devDependencies": { - "@types/node": "22.2.0", - "rollup": "4.20.0", + "@types/node": "22.5.0", + "rollup": "4.21.0", "typescript": "5.5.4" }, "engines": { diff --git a/packages/client-search/rollup.config.js b/packages/client-search/rollup.config.js index dbcfa8129..0f45d3972 100644 --- a/packages/client-search/rollup.config.js +++ b/packages/client-search/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); \ No newline at end of file diff --git a/packages/client-search/src/searchClient.ts b/packages/client-search/src/searchClient.ts index a983bfa48..d272210af 100644 --- a/packages/client-search/src/searchClient.ts +++ b/packages/client-search/src/searchClient.ts @@ -1,12 +1,6 @@ // 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. -import { - createAuth, - createTransporter, - getAlgoliaAgent, - shuffle, - createIterablePromise, -} from '@algolia/client-common'; +import { createAuth, createTransporter, getAlgoliaAgent, shuffle, createIterablePromise } from '@algolia/client-common'; import type { CreateClientOptions, Headers, @@ -161,7 +155,7 @@ function getDefaultHosts(appId: string): Host[] { accept: 'readWrite', protocol: 'https', }, - ]) + ]), ); } @@ -205,10 +199,7 @@ export function createSearchClient({ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties. */ clearCache(): Promise { - return Promise.all([ - transporter.requestsCache.clear(), - transporter.responsesCache.clear(), - ]).then(() => undefined); + return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined); }, /** @@ -244,10 +235,9 @@ export function createSearchClient({ indexName, taskID, maxRetries = 50, - timeout = (retryCount: number): number => - Math.min(retryCount * 200, 5000), + timeout = (retryCount: number): number => Math.min(retryCount * 200, 5000), }: WaitForTaskOptions, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { let retryCount = 0; @@ -257,8 +247,7 @@ export function createSearchClient({ aggregator: () => (retryCount += 1), error: { validate: () => retryCount >= maxRetries, - message: () => - `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`, + message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`, }, timeout: () => timeout(retryCount), }); @@ -278,10 +267,9 @@ export function createSearchClient({ { taskID, maxRetries = 50, - timeout = (retryCount: number): number => - Math.min(retryCount * 200, 5000), + timeout = (retryCount: number): number => Math.min(retryCount * 200, 5000), }: WaitForAppTaskOptions, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { let retryCount = 0; @@ -291,8 +279,7 @@ export function createSearchClient({ aggregator: () => (retryCount += 1), error: { validate: () => retryCount >= maxRetries, - message: () => - `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`, + message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`, }, timeout: () => timeout(retryCount), }); @@ -316,29 +303,23 @@ export function createSearchClient({ key, apiKey, maxRetries = 50, - timeout = (retryCount: number): number => - Math.min(retryCount * 200, 5000), + timeout = (retryCount: number): number => Math.min(retryCount * 200, 5000), }: WaitForApiKeyOptions, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { let retryCount = 0; - const baseIteratorOptions: IterableOptions< - GetApiKeyResponse | undefined - > = { + const baseIteratorOptions: IterableOptions = { aggregator: () => (retryCount += 1), error: { validate: () => retryCount >= maxRetries, - message: () => - `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`, + message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`, }, timeout: () => timeout(retryCount), }; if (operation === 'update') { if (!apiKey) { - throw new Error( - '`apiKey` is required when waiting for an `update` operation.' - ); + throw new Error('`apiKey` is required when waiting for an `update` operation.'); } return createIterablePromise({ @@ -349,10 +330,7 @@ export function createSearchClient({ const value = apiKey[field as keyof ApiKey]; const resValue = response[field as keyof ApiKey]; if (Array.isArray(value) && Array.isArray(resValue)) { - if ( - value.length !== resValue.length || - value.some((v, index) => v !== resValue[index]) - ) { + if (value.length !== resValue.length || value.some((v, index) => v !== resValue[index])) { return false; } } else if (value !== resValue) { @@ -374,8 +352,7 @@ export function createSearchClient({ throw error; }), - validate: (response) => - operation === 'add' ? response !== undefined : response === undefined, + validate: (response) => (operation === 'add' ? response !== undefined : response === undefined), }); }, @@ -391,12 +368,8 @@ export function createSearchClient({ * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions. */ browseObjects( - { - indexName, - browseParams, - ...browseObjectsOptions - }: BrowseOptions> & BrowseProps, - requestOptions?: RequestOptions + { indexName, browseParams, ...browseObjectsOptions }: BrowseOptions> & BrowseProps, + requestOptions?: RequestOptions, ): Promise> { return createIterablePromise>({ func: (previousResponse) => { @@ -408,7 +381,7 @@ export function createSearchClient({ ...browseParams, }, }, - requestOptions + requestOptions, ); }, validate: (response) => response.cursor === undefined, @@ -428,12 +401,8 @@ export function createSearchClient({ * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions. */ browseRules( - { - indexName, - searchRulesParams, - ...browseRulesOptions - }: BrowseOptions & SearchRulesProps, - requestOptions?: RequestOptions + { indexName, searchRulesParams, ...browseRulesOptions }: BrowseOptions & SearchRulesProps, + requestOptions?: RequestOptions, ): Promise { const params = { hitsPerPage: 1000, @@ -447,12 +416,10 @@ export function createSearchClient({ indexName, searchRulesParams: { ...params, - page: previousResponse - ? previousResponse.page + 1 - : params.page || 0, + page: previousResponse ? previousResponse.page + 1 : params.page || 0, }, }, - requestOptions + requestOptions, ); }, validate: (response) => response.nbHits < params.hitsPerPage, @@ -477,7 +444,7 @@ export function createSearchClient({ searchSynonymsParams, ...browseSynonymsOptions }: BrowseOptions & SearchSynonymsProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { const params = { page: 0, @@ -495,7 +462,7 @@ export function createSearchClient({ page: params.page, }, }, - requestOptions + requestOptions, ); params.page += 1; return resp; @@ -518,14 +485,8 @@ export function createSearchClient({ * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions. */ async chunkedBatch( - { - indexName, - objects, - action = 'addObject', - waitForTasks, - batchSize = 1000, - }: ChunkedBatchOptions, - requestOptions?: RequestOptions + { indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000 }: ChunkedBatchOptions, + requestOptions?: RequestOptions, ): Promise { let requests: BatchRequest[] = []; const responses: BatchResponse[] = []; @@ -534,12 +495,7 @@ export function createSearchClient({ for (const [i, obj] of objectEntries) { requests.push({ action, body: obj }); if (requests.length === batchSize || i === objects.length - 1) { - responses.push( - await this.batch( - { indexName, batchWriteParams: { requests } }, - requestOptions - ) - ); + responses.push(await this.batch({ indexName, batchWriteParams: { requests } }, requestOptions)); requests = []; } } @@ -564,12 +520,9 @@ export function createSearchClient({ */ async saveObjects( { indexName, objects }: SaveObjectsOptions, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { - return await this.chunkedBatch( - { indexName, objects, action: 'addObject' }, - requestOptions - ); + return await this.chunkedBatch({ indexName, objects, action: 'addObject' }, requestOptions); }, /** @@ -583,7 +536,7 @@ export function createSearchClient({ */ async deleteObjects( { indexName, objectIDs }: DeleteObjectsOptions, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { return await this.chunkedBatch( { @@ -591,7 +544,7 @@ export function createSearchClient({ objects: objectIDs.map((objectID) => ({ objectID })), action: 'deleteObject', }, - requestOptions + requestOptions, ); }, @@ -607,17 +560,15 @@ export function createSearchClient({ */ async partialUpdateObjects( { indexName, objects, createIfNotExists }: PartialUpdateObjectsOptions, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { return await this.chunkedBatch( { indexName, objects, - action: createIfNotExists - ? 'partialUpdateObject' - : 'partialUpdateObjectNoCreate', + action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate', }, - requestOptions + requestOptions, ); }, @@ -634,7 +585,7 @@ export function createSearchClient({ */ async replaceAllObjects( { indexName, objects, batchSize }: ReplaceAllObjectsOptions, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { const randomSuffix = Math.floor(Math.random() * 1000000) + 100000; const tmpIndexName = `${indexName}_tmp_${randomSuffix}`; @@ -648,12 +599,12 @@ export function createSearchClient({ scope: ['settings', 'rules', 'synonyms'], }, }, - requestOptions + requestOptions, ); const batchResponses = await this.chunkedBatch( { indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, - requestOptions + requestOptions, ); await this.waitForTask({ @@ -670,7 +621,7 @@ export function createSearchClient({ scope: ['settings', 'rules', 'synonyms'], }, }, - requestOptions + requestOptions, ); await this.waitForTask({ indexName: tmpIndexName, @@ -682,7 +633,7 @@ export function createSearchClient({ indexName: tmpIndexName, operationIndexParams: { operation: 'move', destination: indexName }, }, - requestOptions + requestOptions, ); await this.waitForTask({ indexName: tmpIndexName, @@ -702,11 +653,9 @@ export function createSearchClient({ */ searchForHits( searchMethodParams: LegacySearchMethodProps | SearchMethodParams, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise<{ results: Array> }> { - return this.search(searchMethodParams, requestOptions) as Promise<{ - results: Array>; - }>; + return this.search(searchMethodParams, requestOptions) as Promise<{ results: Array> }>; }, /** @@ -719,7 +668,7 @@ export function createSearchClient({ */ searchForFacets( searchMethodParams: LegacySearchMethodProps | SearchMethodParams, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise<{ results: SearchForFacetValuesResponse[] }> { return this.search(searchMethodParams, requestOptions) as Promise<{ results: SearchForFacetValuesResponse[]; @@ -734,20 +683,13 @@ export function createSearchClient({ * @param apiKey - The apiKey object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - addApiKey( - apiKey: ApiKey, - requestOptions?: RequestOptions - ): Promise { + addApiKey(apiKey: ApiKey, requestOptions?: RequestOptions): Promise { if (!apiKey) { - throw new Error( - 'Parameter `apiKey` is required when calling `addApiKey`.' - ); + throw new Error('Parameter `apiKey` is required when calling `addApiKey`.'); } if (!apiKey.acl) { - throw new Error( - 'Parameter `apiKey.acl` is required when calling `addApiKey`.' - ); + throw new Error('Parameter `apiKey.acl` is required when calling `addApiKey`.'); } const requestPath = '/1/keys'; @@ -779,24 +721,18 @@ export function createSearchClient({ */ addOrUpdateObject( { indexName, objectID, body }: AddOrUpdateObjectProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `addOrUpdateObject`.' - ); + throw new Error('Parameter `indexName` is required when calling `addOrUpdateObject`.'); } if (!objectID) { - throw new Error( - 'Parameter `objectID` is required when calling `addOrUpdateObject`.' - ); + throw new Error('Parameter `objectID` is required when calling `addOrUpdateObject`.'); } if (!body) { - throw new Error( - 'Parameter `body` is required when calling `addOrUpdateObject`.' - ); + throw new Error('Parameter `body` is required when calling `addOrUpdateObject`.'); } const requestPath = '/1/indexes/{indexName}/{objectID}' @@ -825,20 +761,13 @@ export function createSearchClient({ * @param source - Source to add. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - appendSource( - source: Source, - requestOptions?: RequestOptions - ): Promise { + appendSource(source: Source, requestOptions?: RequestOptions): Promise { if (!source) { - throw new Error( - 'Parameter `source` is required when calling `appendSource`.' - ); + throw new Error('Parameter `source` is required when calling `appendSource`.'); } if (!source.source) { - throw new Error( - 'Parameter `source.source` is required when calling `appendSource`.' - ); + throw new Error('Parameter `source.source` is required when calling `appendSource`.'); } const requestPath = '/1/security/sources/append'; @@ -869,24 +798,18 @@ export function createSearchClient({ */ assignUserId( { xAlgoliaUserID, assignUserIdParams }: AssignUserIdProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!xAlgoliaUserID) { - throw new Error( - 'Parameter `xAlgoliaUserID` is required when calling `assignUserId`.' - ); + throw new Error('Parameter `xAlgoliaUserID` is required when calling `assignUserId`.'); } if (!assignUserIdParams) { - throw new Error( - 'Parameter `assignUserIdParams` is required when calling `assignUserId`.' - ); + throw new Error('Parameter `assignUserIdParams` is required when calling `assignUserId`.'); } if (!assignUserIdParams.cluster) { - throw new Error( - 'Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.' - ); + throw new Error('Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.'); } const requestPath = '/1/clusters/mapping'; @@ -916,32 +839,20 @@ export function createSearchClient({ * @param batch.batchWriteParams - The batchWriteParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - batch( - { indexName, batchWriteParams }: BatchProps, - requestOptions?: RequestOptions - ): Promise { + batch({ indexName, batchWriteParams }: BatchProps, requestOptions?: RequestOptions): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `batch`.' - ); + throw new Error('Parameter `indexName` is required when calling `batch`.'); } if (!batchWriteParams) { - throw new Error( - 'Parameter `batchWriteParams` is required when calling `batch`.' - ); + throw new Error('Parameter `batchWriteParams` is required when calling `batch`.'); } if (!batchWriteParams.requests) { - throw new Error( - 'Parameter `batchWriteParams.requests` is required when calling `batch`.' - ); + throw new Error('Parameter `batchWriteParams.requests` is required when calling `batch`.'); } - const requestPath = '/1/indexes/{indexName}/batch'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}/batch'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -969,29 +880,21 @@ export function createSearchClient({ */ batchAssignUserIds( { xAlgoliaUserID, batchAssignUserIdsParams }: BatchAssignUserIdsProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!xAlgoliaUserID) { - throw new Error( - 'Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.' - ); + throw new Error('Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.'); } if (!batchAssignUserIdsParams) { - throw new Error( - 'Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.' - ); + throw new Error('Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.'); } if (!batchAssignUserIdsParams.cluster) { - throw new Error( - 'Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.' - ); + throw new Error('Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.'); } if (!batchAssignUserIdsParams.users) { - throw new Error( - 'Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.' - ); + throw new Error('Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.'); } const requestPath = '/1/clusters/mapping/batch'; @@ -1025,33 +928,26 @@ export function createSearchClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ batchDictionaryEntries( - { - dictionaryName, - batchDictionaryEntriesParams, - }: BatchDictionaryEntriesProps, - requestOptions?: RequestOptions + { dictionaryName, batchDictionaryEntriesParams }: BatchDictionaryEntriesProps, + requestOptions?: RequestOptions, ): Promise { if (!dictionaryName) { - throw new Error( - 'Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.' - ); + throw new Error('Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.'); } if (!batchDictionaryEntriesParams) { - throw new Error( - 'Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.' - ); + throw new Error('Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.'); } if (!batchDictionaryEntriesParams.requests) { throw new Error( - 'Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.' + 'Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.', ); } const requestPath = '/1/dictionaries/{dictionaryName}/batch'.replace( '{dictionaryName}', - encodeURIComponent(dictionaryName) + encodeURIComponent(dictionaryName), ); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1078,20 +974,12 @@ export function createSearchClient({ * @param browse.browseParams - The browseParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - browse( - { indexName, browseParams }: BrowseProps, - requestOptions?: RequestOptions - ): Promise> { + browse({ indexName, browseParams }: BrowseProps, requestOptions?: RequestOptions): Promise> { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `browse`.' - ); + throw new Error('Parameter `indexName` is required when calling `browse`.'); } - const requestPath = '/1/indexes/{indexName}/browse'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}/browse'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1116,20 +1004,12 @@ export function createSearchClient({ * @param clearObjects.indexName - Name of the index on which to perform the operation. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - clearObjects( - { indexName }: ClearObjectsProps, - requestOptions?: RequestOptions - ): Promise { + clearObjects({ indexName }: ClearObjectsProps, requestOptions?: RequestOptions): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `clearObjects`.' - ); + throw new Error('Parameter `indexName` is required when calling `clearObjects`.'); } - const requestPath = '/1/indexes/{indexName}/clear'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}/clear'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1156,18 +1036,13 @@ export function createSearchClient({ */ clearRules( { indexName, forwardToReplicas }: ClearRulesProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `clearRules`.' - ); + throw new Error('Parameter `indexName` is required when calling `clearRules`.'); } - const requestPath = '/1/indexes/{indexName}/rules/clear'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}/rules/clear'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1198,18 +1073,13 @@ export function createSearchClient({ */ clearSynonyms( { indexName, forwardToReplicas }: ClearSynonymsProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `clearSynonyms`.' - ); + throw new Error('Parameter `indexName` is required when calling `clearSynonyms`.'); } - const requestPath = '/1/indexes/{indexName}/synonyms/clear'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}/synonyms/clear'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1237,12 +1107,10 @@ export function createSearchClient({ */ customDelete( { path, parameters }: CustomDeleteProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customDelete`.' - ); + throw new Error('Parameter `path` is required when calling `customDelete`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -1267,14 +1135,9 @@ export function createSearchClient({ * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - customGet( - { path, parameters }: CustomGetProps, - requestOptions?: RequestOptions - ): Promise> { + customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customGet`.' - ); + throw new Error('Parameter `path` is required when calling `customGet`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -1302,12 +1165,10 @@ export function createSearchClient({ */ customPost( { path, parameters, body }: CustomPostProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPost`.' - ); + throw new Error('Parameter `path` is required when calling `customPost`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -1336,12 +1197,10 @@ export function createSearchClient({ */ customPut( { path, parameters, body }: CustomPutProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPut`.' - ); + throw new Error('Parameter `path` is required when calling `customPut`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -1369,20 +1228,12 @@ export function createSearchClient({ * @param deleteApiKey.key - API key. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - deleteApiKey( - { key }: DeleteApiKeyProps, - requestOptions?: RequestOptions - ): Promise { + deleteApiKey({ key }: DeleteApiKeyProps, requestOptions?: RequestOptions): Promise { if (!key) { - throw new Error( - 'Parameter `key` is required when calling `deleteApiKey`.' - ); + throw new Error('Parameter `key` is required when calling `deleteApiKey`.'); } - const requestPath = '/1/keys/{key}'.replace( - '{key}', - encodeURIComponent(key) - ); + const requestPath = '/1/keys/{key}'.replace('{key}', encodeURIComponent(key)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1409,24 +1260,17 @@ export function createSearchClient({ */ deleteBy( { indexName, deleteByParams }: DeleteByProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `deleteBy`.' - ); + throw new Error('Parameter `indexName` is required when calling `deleteBy`.'); } if (!deleteByParams) { - throw new Error( - 'Parameter `deleteByParams` is required when calling `deleteBy`.' - ); + throw new Error('Parameter `deleteByParams` is required when calling `deleteBy`.'); } - const requestPath = '/1/indexes/{indexName}/deleteByQuery'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}/deleteByQuery'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1451,20 +1295,12 @@ export function createSearchClient({ * @param deleteIndex.indexName - Name of the index on which to perform the operation. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - deleteIndex( - { indexName }: DeleteIndexProps, - requestOptions?: RequestOptions - ): Promise { + deleteIndex({ indexName }: DeleteIndexProps, requestOptions?: RequestOptions): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `deleteIndex`.' - ); + throw new Error('Parameter `indexName` is required when calling `deleteIndex`.'); } - const requestPath = '/1/indexes/{indexName}'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1491,18 +1327,14 @@ export function createSearchClient({ */ deleteObject( { indexName, objectID }: DeleteObjectProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `deleteObject`.' - ); + throw new Error('Parameter `indexName` is required when calling `deleteObject`.'); } if (!objectID) { - throw new Error( - 'Parameter `objectID` is required when calling `deleteObject`.' - ); + throw new Error('Parameter `objectID` is required when calling `deleteObject`.'); } const requestPath = '/1/indexes/{indexName}/{objectID}' @@ -1535,18 +1367,14 @@ export function createSearchClient({ */ deleteRule( { indexName, objectID, forwardToReplicas }: DeleteRuleProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `deleteRule`.' - ); + throw new Error('Parameter `indexName` is required when calling `deleteRule`.'); } if (!objectID) { - throw new Error( - 'Parameter `objectID` is required when calling `deleteRule`.' - ); + throw new Error('Parameter `objectID` is required when calling `deleteRule`.'); } const requestPath = '/1/indexes/{indexName}/rules/{objectID}' @@ -1554,7 +1382,6 @@ export function createSearchClient({ .replace('{objectID}', encodeURIComponent(objectID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (forwardToReplicas !== undefined) { queryParameters.forwardToReplicas = forwardToReplicas.toString(); } @@ -1579,20 +1406,12 @@ export function createSearchClient({ * @param deleteSource.source - IP address range of the source. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - deleteSource( - { source }: DeleteSourceProps, - requestOptions?: RequestOptions - ): Promise { + deleteSource({ source }: DeleteSourceProps, requestOptions?: RequestOptions): Promise { if (!source) { - throw new Error( - 'Parameter `source` is required when calling `deleteSource`.' - ); + throw new Error('Parameter `source` is required when calling `deleteSource`.'); } - const requestPath = '/1/security/sources/{source}'.replace( - '{source}', - encodeURIComponent(source) - ); + const requestPath = '/1/security/sources/{source}'.replace('{source}', encodeURIComponent(source)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1620,18 +1439,14 @@ export function createSearchClient({ */ deleteSynonym( { indexName, objectID, forwardToReplicas }: DeleteSynonymProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `deleteSynonym`.' - ); + throw new Error('Parameter `indexName` is required when calling `deleteSynonym`.'); } if (!objectID) { - throw new Error( - 'Parameter `objectID` is required when calling `deleteSynonym`.' - ); + throw new Error('Parameter `objectID` is required when calling `deleteSynonym`.'); } const requestPath = '/1/indexes/{indexName}/synonyms/{objectID}' @@ -1639,7 +1454,6 @@ export function createSearchClient({ .replace('{objectID}', encodeURIComponent(objectID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (forwardToReplicas !== undefined) { queryParameters.forwardToReplicas = forwardToReplicas.toString(); } @@ -1661,20 +1475,12 @@ export function createSearchClient({ * @param getApiKey.key - API key. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getApiKey( - { key }: GetApiKeyProps, - requestOptions?: RequestOptions - ): Promise { + getApiKey({ key }: GetApiKeyProps, requestOptions?: RequestOptions): Promise { if (!key) { - throw new Error( - 'Parameter `key` is required when calling `getApiKey`.' - ); + throw new Error('Parameter `key` is required when calling `getApiKey`.'); } - const requestPath = '/1/keys/{key}'.replace( - '{key}', - encodeURIComponent(key) - ); + const requestPath = '/1/keys/{key}'.replace('{key}', encodeURIComponent(key)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1698,20 +1504,12 @@ export function createSearchClient({ * @param getAppTask.taskID - Unique task identifier. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getAppTask( - { taskID }: GetAppTaskProps, - requestOptions?: RequestOptions - ): Promise { + getAppTask({ taskID }: GetAppTaskProps, requestOptions?: RequestOptions): Promise { if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `getAppTask`.' - ); + throw new Error('Parameter `taskID` is required when calling `getAppTask`.'); } - const requestPath = '/1/task/{taskID}'.replace( - '{taskID}', - encodeURIComponent(taskID) - ); + const requestPath = '/1/task/{taskID}'.replace('{taskID}', encodeURIComponent(taskID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1733,9 +1531,7 @@ export function createSearchClient({ * * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getDictionaryLanguages( - requestOptions?: RequestOptions - ): Promise> { + getDictionaryLanguages(requestOptions?: RequestOptions): Promise> { const requestPath = '/1/dictionaries/*/languages'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1758,9 +1554,7 @@ export function createSearchClient({ * * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getDictionarySettings( - requestOptions?: RequestOptions - ): Promise { + getDictionarySettings(requestOptions?: RequestOptions): Promise { const requestPath = '/1/dictionaries/*/settings'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1790,16 +1584,14 @@ export function createSearchClient({ */ getLogs( { offset, length, indexName, type }: GetLogsProps = {}, - requestOptions: RequestOptions | undefined = undefined + requestOptions: RequestOptions | undefined = undefined, ): Promise { const requestPath = '/1/logs'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (offset !== undefined) { queryParameters.offset = offset.toString(); } - if (length !== undefined) { queryParameters.length = length.toString(); } @@ -1807,7 +1599,6 @@ export function createSearchClient({ if (indexName !== undefined) { queryParameters.indexName = indexName.toString(); } - if (type !== undefined) { queryParameters.type = type.toString(); } @@ -1836,18 +1627,14 @@ export function createSearchClient({ */ getObject( { indexName, objectID, attributesToRetrieve }: GetObjectProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `getObject`.' - ); + throw new Error('Parameter `indexName` is required when calling `getObject`.'); } if (!objectID) { - throw new Error( - 'Parameter `objectID` is required when calling `getObject`.' - ); + throw new Error('Parameter `objectID` is required when calling `getObject`.'); } const requestPath = '/1/indexes/{indexName}/{objectID}' @@ -1855,7 +1642,6 @@ export function createSearchClient({ .replace('{objectID}', encodeURIComponent(objectID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (attributesToRetrieve !== undefined) { queryParameters.attributesToRetrieve = attributesToRetrieve.toString(); } @@ -1879,20 +1665,13 @@ export function createSearchClient({ * @param getObjectsParams - Request object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getObjects( - getObjectsParams: GetObjectsParams, - requestOptions?: RequestOptions - ): Promise> { + getObjects(getObjectsParams: GetObjectsParams, requestOptions?: RequestOptions): Promise> { if (!getObjectsParams) { - throw new Error( - 'Parameter `getObjectsParams` is required when calling `getObjects`.' - ); + throw new Error('Parameter `getObjectsParams` is required when calling `getObjects`.'); } if (!getObjectsParams.requests) { - throw new Error( - 'Parameter `getObjectsParams.requests` is required when calling `getObjects`.' - ); + throw new Error('Parameter `getObjectsParams.requests` is required when calling `getObjects`.'); } const requestPath = '/1/indexes/*/objects'; @@ -1923,20 +1702,13 @@ export function createSearchClient({ * @param getRule.objectID - Unique identifier of a rule object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getRule( - { indexName, objectID }: GetRuleProps, - requestOptions?: RequestOptions - ): Promise { + getRule({ indexName, objectID }: GetRuleProps, requestOptions?: RequestOptions): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `getRule`.' - ); + throw new Error('Parameter `indexName` is required when calling `getRule`.'); } if (!objectID) { - throw new Error( - 'Parameter `objectID` is required when calling `getRule`.' - ); + throw new Error('Parameter `objectID` is required when calling `getRule`.'); } const requestPath = '/1/indexes/{indexName}/rules/{objectID}' @@ -1965,20 +1737,12 @@ export function createSearchClient({ * @param getSettings.indexName - Name of the index on which to perform the operation. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getSettings( - { indexName }: GetSettingsProps, - requestOptions?: RequestOptions - ): Promise { + getSettings({ indexName }: GetSettingsProps, requestOptions?: RequestOptions): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `getSettings`.' - ); + throw new Error('Parameter `indexName` is required when calling `getSettings`.'); } - const requestPath = '/1/indexes/{indexName}/settings'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}/settings'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2026,20 +1790,13 @@ export function createSearchClient({ * @param getSynonym.objectID - Unique identifier of a synonym object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getSynonym( - { indexName, objectID }: GetSynonymProps, - requestOptions?: RequestOptions - ): Promise { + getSynonym({ indexName, objectID }: GetSynonymProps, requestOptions?: RequestOptions): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `getSynonym`.' - ); + throw new Error('Parameter `indexName` is required when calling `getSynonym`.'); } if (!objectID) { - throw new Error( - 'Parameter `objectID` is required when calling `getSynonym`.' - ); + throw new Error('Parameter `objectID` is required when calling `getSynonym`.'); } const requestPath = '/1/indexes/{indexName}/synonyms/{objectID}' @@ -2069,20 +1826,13 @@ export function createSearchClient({ * @param getTask.taskID - Unique task identifier. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getTask( - { indexName, taskID }: GetTaskProps, - requestOptions?: RequestOptions - ): Promise { + getTask({ indexName, taskID }: GetTaskProps, requestOptions?: RequestOptions): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `getTask`.' - ); + throw new Error('Parameter `indexName` is required when calling `getTask`.'); } if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `getTask`.' - ); + throw new Error('Parameter `taskID` is required when calling `getTask`.'); } const requestPath = '/1/indexes/{indexName}/task/{taskID}' @@ -2109,9 +1859,7 @@ export function createSearchClient({ * * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getTopUserIds( - requestOptions?: RequestOptions - ): Promise { + getTopUserIds(requestOptions?: RequestOptions): Promise { const requestPath = '/1/clusters/mapping/top'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2136,20 +1884,12 @@ export function createSearchClient({ * @param getUserId.userID - Unique identifier of the user who makes the search request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getUserId( - { userID }: GetUserIdProps, - requestOptions?: RequestOptions - ): Promise { + getUserId({ userID }: GetUserIdProps, requestOptions?: RequestOptions): Promise { if (!userID) { - throw new Error( - 'Parameter `userID` is required when calling `getUserId`.' - ); + throw new Error('Parameter `userID` is required when calling `getUserId`.'); } - const requestPath = '/1/clusters/mapping/{userID}'.replace( - '{userID}', - encodeURIComponent(userID) - ); + const requestPath = '/1/clusters/mapping/{userID}'.replace('{userID}', encodeURIComponent(userID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2175,12 +1915,11 @@ export function createSearchClient({ */ hasPendingMappings( { getClusters }: HasPendingMappingsProps = {}, - requestOptions: RequestOptions | undefined = undefined + requestOptions: RequestOptions | undefined = undefined, ): Promise { const requestPath = '/1/clusters/mapping/pending'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (getClusters !== undefined) { queryParameters.getClusters = getClusters.toString(); } @@ -2226,9 +1965,7 @@ export function createSearchClient({ * * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - listClusters( - requestOptions?: RequestOptions - ): Promise { + listClusters(requestOptions?: RequestOptions): Promise { const requestPath = '/1/clusters'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2256,12 +1993,11 @@ export function createSearchClient({ */ listIndices( { page, hitsPerPage }: ListIndicesProps = {}, - requestOptions: RequestOptions | undefined = undefined + requestOptions: RequestOptions | undefined = undefined, ): Promise { const requestPath = '/1/indexes'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (page !== undefined) { queryParameters.page = page.toString(); } @@ -2293,7 +2029,7 @@ export function createSearchClient({ */ listUserIds( { page, hitsPerPage }: ListUserIdsProps = {}, - requestOptions: RequestOptions | undefined = undefined + requestOptions: RequestOptions | undefined = undefined, ): Promise { const requestPath = '/1/clusters/mapping'; const headers: Headers = {}; @@ -2302,7 +2038,6 @@ export function createSearchClient({ if (page !== undefined) { queryParameters.page = page.toString(); } - if (hitsPerPage !== undefined) { queryParameters.hitsPerPage = hitsPerPage.toString(); } @@ -2323,20 +2058,13 @@ export function createSearchClient({ * @param batchParams - The batchParams object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - multipleBatch( - batchParams: BatchParams, - requestOptions?: RequestOptions - ): Promise { + multipleBatch(batchParams: BatchParams, requestOptions?: RequestOptions): Promise { if (!batchParams) { - throw new Error( - 'Parameter `batchParams` is required when calling `multipleBatch`.' - ); + throw new Error('Parameter `batchParams` is required when calling `multipleBatch`.'); } if (!batchParams.requests) { - throw new Error( - 'Parameter `batchParams.requests` is required when calling `multipleBatch`.' - ); + throw new Error('Parameter `batchParams.requests` is required when calling `multipleBatch`.'); } const requestPath = '/1/indexes/*/batch'; @@ -2367,35 +2095,24 @@ export function createSearchClient({ */ operationIndex( { indexName, operationIndexParams }: OperationIndexProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `operationIndex`.' - ); + throw new Error('Parameter `indexName` is required when calling `operationIndex`.'); } if (!operationIndexParams) { - throw new Error( - 'Parameter `operationIndexParams` is required when calling `operationIndex`.' - ); + throw new Error('Parameter `operationIndexParams` is required when calling `operationIndex`.'); } if (!operationIndexParams.operation) { - throw new Error( - 'Parameter `operationIndexParams.operation` is required when calling `operationIndex`.' - ); + throw new Error('Parameter `operationIndexParams.operation` is required when calling `operationIndex`.'); } if (!operationIndexParams.destination) { - throw new Error( - 'Parameter `operationIndexParams.destination` is required when calling `operationIndex`.' - ); + throw new Error('Parameter `operationIndexParams.destination` is required when calling `operationIndex`.'); } - const requestPath = '/1/indexes/{indexName}/operation'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}/operation'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2424,30 +2141,19 @@ export function createSearchClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ partialUpdateObject( - { - indexName, - objectID, - attributesToUpdate, - createIfNotExists, - }: PartialUpdateObjectProps, - requestOptions?: RequestOptions + { indexName, objectID, attributesToUpdate, createIfNotExists }: PartialUpdateObjectProps, + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `partialUpdateObject`.' - ); + throw new Error('Parameter `indexName` is required when calling `partialUpdateObject`.'); } if (!objectID) { - throw new Error( - 'Parameter `objectID` is required when calling `partialUpdateObject`.' - ); + throw new Error('Parameter `objectID` is required when calling `partialUpdateObject`.'); } if (!attributesToUpdate) { - throw new Error( - 'Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.' - ); + throw new Error('Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.'); } const requestPath = '/1/indexes/{indexName}/{objectID}/partial' @@ -2455,7 +2161,6 @@ export function createSearchClient({ .replace('{objectID}', encodeURIComponent(objectID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (createIfNotExists !== undefined) { queryParameters.createIfNotExists = createIfNotExists.toString(); } @@ -2481,20 +2186,12 @@ export function createSearchClient({ * @param removeUserId.userID - Unique identifier of the user who makes the search request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - removeUserId( - { userID }: RemoveUserIdProps, - requestOptions?: RequestOptions - ): Promise { + removeUserId({ userID }: RemoveUserIdProps, requestOptions?: RequestOptions): Promise { if (!userID) { - throw new Error( - 'Parameter `userID` is required when calling `removeUserId`.' - ); + throw new Error('Parameter `userID` is required when calling `removeUserId`.'); } - const requestPath = '/1/clusters/mapping/{userID}'.replace( - '{userID}', - encodeURIComponent(userID) - ); + const requestPath = '/1/clusters/mapping/{userID}'.replace('{userID}', encodeURIComponent(userID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2518,14 +2215,9 @@ export function createSearchClient({ * @param replaceSources.source - Allowed sources. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - replaceSources( - { source }: ReplaceSourcesProps, - requestOptions?: RequestOptions - ): Promise { + replaceSources({ source }: ReplaceSourcesProps, requestOptions?: RequestOptions): Promise { if (!source) { - throw new Error( - 'Parameter `source` is required when calling `replaceSources`.' - ); + throw new Error('Parameter `source` is required when calling `replaceSources`.'); } const requestPath = '/1/security/sources'; @@ -2553,20 +2245,12 @@ export function createSearchClient({ * @param restoreApiKey.key - API key. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - restoreApiKey( - { key }: RestoreApiKeyProps, - requestOptions?: RequestOptions - ): Promise { + restoreApiKey({ key }: RestoreApiKeyProps, requestOptions?: RequestOptions): Promise { if (!key) { - throw new Error( - 'Parameter `key` is required when calling `restoreApiKey`.' - ); + throw new Error('Parameter `key` is required when calling `restoreApiKey`.'); } - const requestPath = '/1/keys/{key}/restore'.replace( - '{key}', - encodeURIComponent(key) - ); + const requestPath = '/1/keys/{key}/restore'.replace('{key}', encodeURIComponent(key)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2591,26 +2275,16 @@ export function createSearchClient({ * @param saveObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - saveObject( - { indexName, body }: SaveObjectProps, - requestOptions?: RequestOptions - ): Promise { + saveObject({ indexName, body }: SaveObjectProps, requestOptions?: RequestOptions): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `saveObject`.' - ); + throw new Error('Parameter `indexName` is required when calling `saveObject`.'); } if (!body) { - throw new Error( - 'Parameter `body` is required when calling `saveObject`.' - ); + throw new Error('Parameter `body` is required when calling `saveObject`.'); } - const requestPath = '/1/indexes/{indexName}'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2640,30 +2314,22 @@ export function createSearchClient({ */ saveRule( { indexName, objectID, rule, forwardToReplicas }: SaveRuleProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `saveRule`.' - ); + throw new Error('Parameter `indexName` is required when calling `saveRule`.'); } if (!objectID) { - throw new Error( - 'Parameter `objectID` is required when calling `saveRule`.' - ); + throw new Error('Parameter `objectID` is required when calling `saveRule`.'); } if (!rule) { - throw new Error( - 'Parameter `rule` is required when calling `saveRule`.' - ); + throw new Error('Parameter `rule` is required when calling `saveRule`.'); } if (!rule.objectID) { - throw new Error( - 'Parameter `rule.objectID` is required when calling `saveRule`.' - ); + throw new Error('Parameter `rule.objectID` is required when calling `saveRule`.'); } const requestPath = '/1/indexes/{indexName}/rules/{objectID}' @@ -2701,33 +2367,20 @@ export function createSearchClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ saveRules( - { - indexName, - rules, - forwardToReplicas, - clearExistingRules, - }: SaveRulesProps, - requestOptions?: RequestOptions + { indexName, rules, forwardToReplicas, clearExistingRules }: SaveRulesProps, + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `saveRules`.' - ); + throw new Error('Parameter `indexName` is required when calling `saveRules`.'); } if (!rules) { - throw new Error( - 'Parameter `rules` is required when calling `saveRules`.' - ); + throw new Error('Parameter `rules` is required when calling `saveRules`.'); } - const requestPath = '/1/indexes/{indexName}/rules/batch'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}/rules/batch'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (forwardToReplicas !== undefined) { queryParameters.forwardToReplicas = forwardToReplicas.toString(); } @@ -2762,35 +2415,25 @@ export function createSearchClient({ */ saveSynonym( { indexName, objectID, synonymHit, forwardToReplicas }: SaveSynonymProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `saveSynonym`.' - ); + throw new Error('Parameter `indexName` is required when calling `saveSynonym`.'); } if (!objectID) { - throw new Error( - 'Parameter `objectID` is required when calling `saveSynonym`.' - ); + throw new Error('Parameter `objectID` is required when calling `saveSynonym`.'); } if (!synonymHit) { - throw new Error( - 'Parameter `synonymHit` is required when calling `saveSynonym`.' - ); + throw new Error('Parameter `synonymHit` is required when calling `saveSynonym`.'); } if (!synonymHit.objectID) { - throw new Error( - 'Parameter `synonymHit.objectID` is required when calling `saveSynonym`.' - ); + throw new Error('Parameter `synonymHit.objectID` is required when calling `saveSynonym`.'); } if (!synonymHit.type) { - throw new Error( - 'Parameter `synonymHit.type` is required when calling `saveSynonym`.' - ); + throw new Error('Parameter `synonymHit.type` is required when calling `saveSynonym`.'); } const requestPath = '/1/indexes/{indexName}/synonyms/{objectID}' @@ -2798,7 +2441,6 @@ export function createSearchClient({ .replace('{objectID}', encodeURIComponent(objectID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (forwardToReplicas !== undefined) { queryParameters.forwardToReplicas = forwardToReplicas.toString(); } @@ -2828,40 +2470,26 @@ export function createSearchClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ saveSynonyms( - { - indexName, - synonymHit, - forwardToReplicas, - replaceExistingSynonyms, - }: SaveSynonymsProps, - requestOptions?: RequestOptions + { indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }: SaveSynonymsProps, + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `saveSynonyms`.' - ); + throw new Error('Parameter `indexName` is required when calling `saveSynonyms`.'); } if (!synonymHit) { - throw new Error( - 'Parameter `synonymHit` is required when calling `saveSynonyms`.' - ); + throw new Error('Parameter `synonymHit` is required when calling `saveSynonyms`.'); } - const requestPath = '/1/indexes/{indexName}/synonyms/batch'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}/synonyms/batch'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (forwardToReplicas !== undefined) { queryParameters.forwardToReplicas = forwardToReplicas.toString(); } if (replaceExistingSynonyms !== undefined) { - queryParameters.replaceExistingSynonyms = - replaceExistingSynonyms.toString(); + queryParameters.replaceExistingSynonyms = replaceExistingSynonyms.toString(); } const request: Request = { @@ -2886,7 +2514,7 @@ export function createSearchClient({ */ search( searchMethodParams: LegacySearchMethodProps | SearchMethodParams, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise> { if (searchMethodParams && Array.isArray(searchMethodParams)) { const newSignatureRequest: SearchMethodParams = { @@ -2914,15 +2542,11 @@ export function createSearchClient({ } if (!searchMethodParams) { - throw new Error( - 'Parameter `searchMethodParams` is required when calling `search`.' - ); + throw new Error('Parameter `searchMethodParams` is required when calling `search`.'); } if (!searchMethodParams.requests) { - throw new Error( - 'Parameter `searchMethodParams.requests` is required when calling `search`.' - ); + throw new Error('Parameter `searchMethodParams.requests` is required when calling `search`.'); } const requestPath = '/1/indexes/*/queries'; @@ -2954,33 +2578,28 @@ export function createSearchClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ searchDictionaryEntries( - { - dictionaryName, - searchDictionaryEntriesParams, - }: SearchDictionaryEntriesProps, - requestOptions?: RequestOptions + { dictionaryName, searchDictionaryEntriesParams }: SearchDictionaryEntriesProps, + requestOptions?: RequestOptions, ): Promise { if (!dictionaryName) { - throw new Error( - 'Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.' - ); + throw new Error('Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.'); } if (!searchDictionaryEntriesParams) { throw new Error( - 'Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.' + 'Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.', ); } if (!searchDictionaryEntriesParams.query) { throw new Error( - 'Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.' + 'Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.', ); } const requestPath = '/1/dictionaries/{dictionaryName}/search'.replace( '{dictionaryName}', - encodeURIComponent(dictionaryName) + encodeURIComponent(dictionaryName), ); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -3011,23 +2630,15 @@ export function createSearchClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ searchForFacetValues( - { - indexName, - facetName, - searchForFacetValuesRequest, - }: SearchForFacetValuesProps, - requestOptions?: RequestOptions + { indexName, facetName, searchForFacetValuesRequest }: SearchForFacetValuesProps, + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `searchForFacetValues`.' - ); + throw new Error('Parameter `indexName` is required when calling `searchForFacetValues`.'); } if (!facetName) { - throw new Error( - 'Parameter `facetName` is required when calling `searchForFacetValues`.' - ); + throw new Error('Parameter `facetName` is required when calling `searchForFacetValues`.'); } const requestPath = '/1/indexes/{indexName}/facets/{facetName}/query' @@ -3062,18 +2673,13 @@ export function createSearchClient({ */ searchRules( { indexName, searchRulesParams }: SearchRulesProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `searchRules`.' - ); + throw new Error('Parameter `indexName` is required when calling `searchRules`.'); } - const requestPath = '/1/indexes/{indexName}/rules/search'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}/rules/search'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -3103,18 +2709,13 @@ export function createSearchClient({ */ searchSingleIndex( { indexName, searchParams }: SearchSingleIndexProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise> { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `searchSingleIndex`.' - ); + throw new Error('Parameter `indexName` is required when calling `searchSingleIndex`.'); } - const requestPath = '/1/indexes/{indexName}/query'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}/query'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -3144,17 +2745,15 @@ export function createSearchClient({ */ searchSynonyms( { indexName, searchSynonymsParams }: SearchSynonymsProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `searchSynonyms`.' - ); + throw new Error('Parameter `indexName` is required when calling `searchSynonyms`.'); } const requestPath = '/1/indexes/{indexName}/synonyms/search'.replace( '{indexName}', - encodeURIComponent(indexName) + encodeURIComponent(indexName), ); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -3183,18 +2782,14 @@ export function createSearchClient({ */ searchUserIds( searchUserIdsParams: SearchUserIdsParams, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!searchUserIdsParams) { - throw new Error( - 'Parameter `searchUserIdsParams` is required when calling `searchUserIds`.' - ); + throw new Error('Parameter `searchUserIdsParams` is required when calling `searchUserIds`.'); } if (!searchUserIdsParams.query) { - throw new Error( - 'Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.' - ); + throw new Error('Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.'); } const requestPath = '/1/clusters/mapping/search'; @@ -3225,17 +2820,15 @@ export function createSearchClient({ */ setDictionarySettings( dictionarySettingsParams: DictionarySettingsParams, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!dictionarySettingsParams) { - throw new Error( - 'Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.' - ); + throw new Error('Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.'); } if (!dictionarySettingsParams.disableStandardEntries) { throw new Error( - 'Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.' + 'Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.', ); } @@ -3268,27 +2861,19 @@ export function createSearchClient({ */ setSettings( { indexName, indexSettings, forwardToReplicas }: SetSettingsProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `setSettings`.' - ); + throw new Error('Parameter `indexName` is required when calling `setSettings`.'); } if (!indexSettings) { - throw new Error( - 'Parameter `indexSettings` is required when calling `setSettings`.' - ); + throw new Error('Parameter `indexSettings` is required when calling `setSettings`.'); } - const requestPath = '/1/indexes/{indexName}/settings'.replace( - '{indexName}', - encodeURIComponent(indexName) - ); + const requestPath = '/1/indexes/{indexName}/settings'.replace('{indexName}', encodeURIComponent(indexName)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (forwardToReplicas !== undefined) { queryParameters.forwardToReplicas = forwardToReplicas.toString(); } @@ -3315,32 +2900,20 @@ export function createSearchClient({ * @param updateApiKey.apiKey - The apiKey object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - updateApiKey( - { key, apiKey }: UpdateApiKeyProps, - requestOptions?: RequestOptions - ): Promise { + updateApiKey({ key, apiKey }: UpdateApiKeyProps, requestOptions?: RequestOptions): Promise { if (!key) { - throw new Error( - 'Parameter `key` is required when calling `updateApiKey`.' - ); + throw new Error('Parameter `key` is required when calling `updateApiKey`.'); } if (!apiKey) { - throw new Error( - 'Parameter `apiKey` is required when calling `updateApiKey`.' - ); + throw new Error('Parameter `apiKey` is required when calling `updateApiKey`.'); } if (!apiKey.acl) { - throw new Error( - 'Parameter `apiKey.acl` is required when calling `updateApiKey`.' - ); + throw new Error('Parameter `apiKey.acl` is required when calling `updateApiKey`.'); } - const requestPath = '/1/keys/{key}'.replace( - '{key}', - encodeURIComponent(key) - ); + const requestPath = '/1/keys/{key}'.replace('{key}', encodeURIComponent(key)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; diff --git a/packages/client-usage/builds/browser.ts b/packages/client-usage/builds/browser.ts index 875d08ec1..09583319b 100644 --- a/packages/client-usage/builds/browser.ts +++ b/packages/client-usage/builds/browser.ts @@ -22,11 +22,7 @@ export * from '../model'; export type UsageClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function usageClient( - appId: string, - apiKey: string, - options?: ClientOptions -) { +export function usageClient(appId: string, apiKey: string, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -49,10 +45,7 @@ export function usageClient( responsesCache: createMemoryCache(), requestsCache: createMemoryCache({ serializable: false }), hostsCache: createFallbackableCache({ - caches: [ - createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), - createMemoryCache(), - ], + caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()], }), ...options, }); diff --git a/packages/client-usage/builds/node.ts b/packages/client-usage/builds/node.ts index 61dd6fc0c..554889c1c 100644 --- a/packages/client-usage/builds/node.ts +++ b/packages/client-usage/builds/node.ts @@ -21,11 +21,7 @@ export * from '../model'; export type UsageClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function usageClient( - appId: string, - apiKey: string, - options?: ClientOptions -) { +export function usageClient(appId: string, apiKey: string, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } diff --git a/packages/client-usage/model/clientMethodProps.ts b/packages/client-usage/model/clientMethodProps.ts index 351cbf698..0c7d7075d 100644 --- a/packages/client-usage/model/clientMethodProps.ts +++ b/packages/client-usage/model/clientMethodProps.ts @@ -46,7 +46,7 @@ export type CustomPostProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** @@ -64,7 +64,7 @@ export type CustomPutProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** diff --git a/packages/client-usage/package.json b/packages/client-usage/package.json index 2ade09819..4f44353f4 100644 --- a/packages/client-usage/package.json +++ b/packages/client-usage/package.json @@ -49,8 +49,8 @@ "@algolia/requester-node-http": "5.1.1" }, "devDependencies": { - "@types/node": "22.2.0", - "rollup": "4.20.0", + "@types/node": "22.5.0", + "rollup": "4.21.0", "typescript": "5.5.4" }, "engines": { diff --git a/packages/client-usage/rollup.config.js b/packages/client-usage/rollup.config.js index dbcfa8129..0f45d3972 100644 --- a/packages/client-usage/rollup.config.js +++ b/packages/client-usage/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); \ No newline at end of file diff --git a/packages/client-usage/src/usageClient.ts b/packages/client-usage/src/usageClient.ts index c61bd17bc..d10228933 100644 --- a/packages/client-usage/src/usageClient.ts +++ b/packages/client-usage/src/usageClient.ts @@ -1,11 +1,6 @@ // 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. -import { - createAuth, - createTransporter, - getAlgoliaAgent, - shuffle, -} from '@algolia/client-common'; +import { createAuth, createTransporter, getAlgoliaAgent, shuffle } from '@algolia/client-common'; import type { CreateClientOptions, Headers, @@ -58,7 +53,7 @@ function getDefaultHosts(appId: string): Host[] { accept: 'readWrite', protocol: 'https', }, - ]) + ]), ); } @@ -102,10 +97,7 @@ export function createUsageClient({ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties. */ clearCache(): Promise { - return Promise.all([ - transporter.requestsCache.clear(), - transporter.responsesCache.clear(), - ]).then(() => undefined); + return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined); }, /** @@ -135,12 +127,10 @@ export function createUsageClient({ */ customDelete( { path, parameters }: CustomDeleteProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customDelete`.' - ); + throw new Error('Parameter `path` is required when calling `customDelete`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -165,14 +155,9 @@ export function createUsageClient({ * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - customGet( - { path, parameters }: CustomGetProps, - requestOptions?: RequestOptions - ): Promise> { + customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customGet`.' - ); + throw new Error('Parameter `path` is required when calling `customGet`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -200,12 +185,10 @@ export function createUsageClient({ */ customPost( { path, parameters, body }: CustomPostProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPost`.' - ); + throw new Error('Parameter `path` is required when calling `customPost`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -234,12 +217,10 @@ export function createUsageClient({ */ customPut( { path, parameters, body }: CustomPutProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPut`.' - ); + throw new Error('Parameter `path` is required when calling `customPut`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -269,37 +250,23 @@ export function createUsageClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getIndexUsage( - { - statistic, - indexName, - startDate, - endDate, - granularity, - }: GetIndexUsageProps, - requestOptions?: RequestOptions + { statistic, indexName, startDate, endDate, granularity }: GetIndexUsageProps, + requestOptions?: RequestOptions, ): Promise { if (!statistic) { - throw new Error( - 'Parameter `statistic` is required when calling `getIndexUsage`.' - ); + throw new Error('Parameter `statistic` is required when calling `getIndexUsage`.'); } if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `getIndexUsage`.' - ); + throw new Error('Parameter `indexName` is required when calling `getIndexUsage`.'); } if (!startDate) { - throw new Error( - 'Parameter `startDate` is required when calling `getIndexUsage`.' - ); + throw new Error('Parameter `startDate` is required when calling `getIndexUsage`.'); } if (!endDate) { - throw new Error( - 'Parameter `endDate` is required when calling `getIndexUsage`.' - ); + throw new Error('Parameter `endDate` is required when calling `getIndexUsage`.'); } const requestPath = '/1/usage/{statistic}/{indexName}' @@ -311,11 +278,9 @@ export function createUsageClient({ if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (granularity !== undefined) { queryParameters.granularity = granularity.toString(); } @@ -342,41 +307,30 @@ export function createUsageClient({ */ getUsage( { statistic, startDate, endDate, granularity }: GetUsageProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!statistic) { - throw new Error( - 'Parameter `statistic` is required when calling `getUsage`.' - ); + throw new Error('Parameter `statistic` is required when calling `getUsage`.'); } if (!startDate) { - throw new Error( - 'Parameter `startDate` is required when calling `getUsage`.' - ); + throw new Error('Parameter `startDate` is required when calling `getUsage`.'); } if (!endDate) { - throw new Error( - 'Parameter `endDate` is required when calling `getUsage`.' - ); + throw new Error('Parameter `endDate` is required when calling `getUsage`.'); } - const requestPath = '/1/usage/{statistic}'.replace( - '{statistic}', - encodeURIComponent(statistic) - ); + const requestPath = '/1/usage/{statistic}'.replace('{statistic}', encodeURIComponent(statistic)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } - if (granularity !== undefined) { queryParameters.granularity = granularity.toString(); } diff --git a/packages/ingestion/builds/browser.ts b/packages/ingestion/builds/browser.ts index 96e15b6be..97dd8b381 100644 --- a/packages/ingestion/builds/browser.ts +++ b/packages/ingestion/builds/browser.ts @@ -12,11 +12,7 @@ import { import { createXhrRequester } from '@algolia/requester-browser-xhr'; import type { Region } from '../src/ingestionClient'; -import { - createIngestionClient, - apiClientVersion, - REGIONS, -} from '../src/ingestionClient'; +import { createIngestionClient, apiClientVersion, REGIONS } from '../src/ingestionClient'; export { apiClientVersion, @@ -33,12 +29,7 @@ export * from '../model'; export type IngestionClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function ingestionClient( - appId: string, - apiKey: string, - region: Region, - options?: ClientOptions -) { +export function ingestionClient(appId: string, apiKey: string, region: Region, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -47,13 +38,8 @@ export function ingestionClient( throw new Error('`apiKey` is missing.'); } - if ( - !region || - (region && (typeof region !== 'string' || !REGIONS.includes(region))) - ) { - throw new Error( - `\`region\` is required and must be one of the following: ${REGIONS.join(', ')}` - ); + if (!region || (region && (typeof region !== 'string' || !REGIONS.includes(region)))) { + throw new Error(`\`region\` is required and must be one of the following: ${REGIONS.join(', ')}`); } return createIngestionClient({ @@ -71,10 +57,7 @@ export function ingestionClient( responsesCache: createMemoryCache(), requestsCache: createMemoryCache({ serializable: false }), hostsCache: createFallbackableCache({ - caches: [ - createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), - createMemoryCache(), - ], + caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()], }), ...options, }); diff --git a/packages/ingestion/builds/node.ts b/packages/ingestion/builds/node.ts index 8314fc862..78863d25e 100644 --- a/packages/ingestion/builds/node.ts +++ b/packages/ingestion/builds/node.ts @@ -28,12 +28,7 @@ export * from '../model'; export type IngestionClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function ingestionClient( - appId: string, - apiKey: string, - region: Region, - options?: ClientOptions -) { +export function ingestionClient(appId: string, apiKey: string, region: Region, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -42,13 +37,8 @@ export function ingestionClient( throw new Error('`apiKey` is missing.'); } - if ( - !region || - (region && (typeof region !== 'string' || !REGIONS.includes(region))) - ) { - throw new Error( - `\`region\` is required and must be one of the following: ${REGIONS.join(', ')}` - ); + if (!region || (region && (typeof region !== 'string' || !REGIONS.includes(region)))) { + throw new Error(`\`region\` is required and must be one of the following: ${REGIONS.join(', ')}`); } return { diff --git a/packages/ingestion/model/authenticationSortKeys.ts b/packages/ingestion/model/authenticationSortKeys.ts index 287e5bcdf..385808032 100644 --- a/packages/ingestion/model/authenticationSortKeys.ts +++ b/packages/ingestion/model/authenticationSortKeys.ts @@ -3,9 +3,4 @@ /** * Property by which to sort the list of authentication resources. */ -export type AuthenticationSortKeys = - | 'auth_type' - | 'createdAt' - | 'name' - | 'platform' - | 'updatedAt'; +export type AuthenticationSortKeys = 'auth_type' | 'createdAt' | 'name' | 'platform' | 'updatedAt'; diff --git a/packages/ingestion/model/authenticationType.ts b/packages/ingestion/model/authenticationType.ts index 33cc0467d..012a3517d 100644 --- a/packages/ingestion/model/authenticationType.ts +++ b/packages/ingestion/model/authenticationType.ts @@ -3,10 +3,4 @@ /** * Type of authentication. This determines the type of credentials required in the `input` object. */ -export type AuthenticationType = - | 'algolia' - | 'algoliaInsights' - | 'apiKey' - | 'basic' - | 'googleServiceAccount' - | 'oauth'; +export type AuthenticationType = 'algolia' | 'algoliaInsights' | 'apiKey' | 'basic' | 'googleServiceAccount' | 'oauth'; diff --git a/packages/ingestion/model/batchRequest.ts b/packages/ingestion/model/batchRequest.ts index 2417081f0..cea7356ab 100644 --- a/packages/ingestion/model/batchRequest.ts +++ b/packages/ingestion/model/batchRequest.ts @@ -8,5 +8,5 @@ export type BatchRequest = { /** * Operation arguments (varies with specified `action`). */ - body: Record; + body: Record; }; diff --git a/packages/ingestion/model/clientMethodProps.ts b/packages/ingestion/model/clientMethodProps.ts index af5d84716..f102d940a 100644 --- a/packages/ingestion/model/clientMethodProps.ts +++ b/packages/ingestion/model/clientMethodProps.ts @@ -70,7 +70,7 @@ export type CustomPostProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** @@ -88,7 +88,7 @@ export type CustomPutProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** diff --git a/packages/ingestion/model/eventStatus.ts b/packages/ingestion/model/eventStatus.ts index 4332e8c5a..3ad381927 100644 --- a/packages/ingestion/model/eventStatus.ts +++ b/packages/ingestion/model/eventStatus.ts @@ -1,9 +1,3 @@ // 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. -export type EventStatus = - | 'created' - | 'critical' - | 'failed' - | 'retried' - | 'started' - | 'succeeded'; +export type EventStatus = 'created' | 'critical' | 'failed' | 'retried' | 'started' | 'succeeded'; diff --git a/packages/ingestion/model/mappingTypeCSV.ts b/packages/ingestion/model/mappingTypeCSV.ts index 8ac56170a..408d2c611 100644 --- a/packages/ingestion/model/mappingTypeCSV.ts +++ b/packages/ingestion/model/mappingTypeCSV.ts @@ -1,8 +1,3 @@ // 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. -export type MappingTypeCSV = - | 'boolean' - | 'float' - | 'integer' - | 'json' - | 'string'; +export type MappingTypeCSV = 'boolean' | 'float' | 'integer' | 'json' | 'string'; diff --git a/packages/ingestion/model/runReasonCode.ts b/packages/ingestion/model/runReasonCode.ts index 3a023cc44..82ace58f0 100644 --- a/packages/ingestion/model/runReasonCode.ts +++ b/packages/ingestion/model/runReasonCode.ts @@ -3,11 +3,4 @@ /** * A code for the task run\'s outcome. A readable description of the code is included in the `reason` response property. */ -export type RunReasonCode = - | 'blocking' - | 'critical' - | 'discarded' - | 'internal' - | 'no_events' - | 'ok' - | 'too_many_errors'; +export type RunReasonCode = 'blocking' | 'critical' | 'discarded' | 'internal' | 'no_events' | 'ok' | 'too_many_errors'; diff --git a/packages/ingestion/model/runStatus.ts b/packages/ingestion/model/runStatus.ts index 4c6b79e63..87d6eface 100644 --- a/packages/ingestion/model/runStatus.ts +++ b/packages/ingestion/model/runStatus.ts @@ -3,9 +3,4 @@ /** * Task run status. */ -export type RunStatus = - | 'created' - | 'finished' - | 'idled' - | 'skipped' - | 'started'; +export type RunStatus = 'created' | 'finished' | 'idled' | 'skipped' | 'started'; diff --git a/packages/ingestion/model/sourceDocker.ts b/packages/ingestion/model/sourceDocker.ts index 428bfeac2..884d59666 100644 --- a/packages/ingestion/model/sourceDocker.ts +++ b/packages/ingestion/model/sourceDocker.ts @@ -21,5 +21,5 @@ export type SourceDocker = { /** * Configuration of the spec. */ - configuration: Record; + configuration: Record; }; diff --git a/packages/ingestion/model/sourceUpdateDocker.ts b/packages/ingestion/model/sourceUpdateDocker.ts index 0eb1ca297..1ab9d43ce 100644 --- a/packages/ingestion/model/sourceUpdateDocker.ts +++ b/packages/ingestion/model/sourceUpdateDocker.ts @@ -18,5 +18,5 @@ export type SourceUpdateDocker = { /** * Configuration of the spec. */ - configuration: Record; + configuration: Record; }; diff --git a/packages/ingestion/model/sourceWatchResponse.ts b/packages/ingestion/model/sourceWatchResponse.ts index 869387b7f..937c8b61b 100644 --- a/packages/ingestion/model/sourceWatchResponse.ts +++ b/packages/ingestion/model/sourceWatchResponse.ts @@ -11,7 +11,7 @@ export type SourceWatchResponse = { /** * Depending on the source type, the validation returns sampling data of your source (JSON, CSV, BigQuery). */ - data?: Array>; + data?: Array>; /** * In case of error, observability events will be added to the response, if any. diff --git a/packages/ingestion/model/taskCreateTrigger.ts b/packages/ingestion/model/taskCreateTrigger.ts index 40f2625b3..a2713e0d6 100644 --- a/packages/ingestion/model/taskCreateTrigger.ts +++ b/packages/ingestion/model/taskCreateTrigger.ts @@ -5,8 +5,4 @@ import type { ScheduleTriggerInput } from './scheduleTriggerInput'; import type { StreamingTrigger } from './streamingTrigger'; import type { SubscriptionTrigger } from './subscriptionTrigger'; -export type TaskCreateTrigger = - | OnDemandTriggerInput - | ScheduleTriggerInput - | StreamingTrigger - | SubscriptionTrigger; +export type TaskCreateTrigger = OnDemandTriggerInput | ScheduleTriggerInput | StreamingTrigger | SubscriptionTrigger; diff --git a/packages/ingestion/model/taskSortKeys.ts b/packages/ingestion/model/taskSortKeys.ts index 4a06ee006..e17748265 100644 --- a/packages/ingestion/model/taskSortKeys.ts +++ b/packages/ingestion/model/taskSortKeys.ts @@ -3,9 +3,4 @@ /** * Property by which to sort the list of tasks. */ -export type TaskSortKeys = - | 'action' - | 'createdAt' - | 'enabled' - | 'triggerType' - | 'updatedAt'; +export type TaskSortKeys = 'action' | 'createdAt' | 'enabled' | 'triggerType' | 'updatedAt'; diff --git a/packages/ingestion/model/transformationTry.ts b/packages/ingestion/model/transformationTry.ts index 40d74d097..aba7469f0 100644 --- a/packages/ingestion/model/transformationTry.ts +++ b/packages/ingestion/model/transformationTry.ts @@ -11,7 +11,7 @@ export type TransformationTry = { /** * The record to apply the given code to. */ - sampleRecord: Record; + sampleRecord: Record; authentications?: AuthenticationCreate[]; }; diff --git a/packages/ingestion/model/transformationTryResponse.ts b/packages/ingestion/model/transformationTryResponse.ts index 7f91565bc..6cdc8ced9 100644 --- a/packages/ingestion/model/transformationTryResponse.ts +++ b/packages/ingestion/model/transformationTryResponse.ts @@ -6,7 +6,7 @@ export type TransformationTryResponse = { /** * The array of records returned by the transformation service. */ - payloads: Array>; + payloads: Array>; error?: TransformationError; }; diff --git a/packages/ingestion/model/trigger.ts b/packages/ingestion/model/trigger.ts index 56afeaade..2571957e5 100644 --- a/packages/ingestion/model/trigger.ts +++ b/packages/ingestion/model/trigger.ts @@ -8,8 +8,4 @@ import type { SubscriptionTrigger } from './subscriptionTrigger'; /** * Trigger that runs the task. */ -export type Trigger = - | OnDemandTrigger - | ScheduleTrigger - | StreamingTrigger - | SubscriptionTrigger; +export type Trigger = OnDemandTrigger | ScheduleTrigger | StreamingTrigger | SubscriptionTrigger; diff --git a/packages/ingestion/model/triggerType.ts b/packages/ingestion/model/triggerType.ts index 1c5c95a71..ee7d74144 100644 --- a/packages/ingestion/model/triggerType.ts +++ b/packages/ingestion/model/triggerType.ts @@ -3,8 +3,4 @@ /** * Task trigger, describing when a task should run. - `onDemand`. Manually trigger the task with the `/run` endpoint. - `schedule`. Regularly trigger the task on a `cron` schedule. - `subscription`. Trigger the task after an event is received, such as, a webhook. - `streaming`. Run the task continuously. */ -export type TriggerType = - | 'onDemand' - | 'schedule' - | 'streaming' - | 'subscription'; +export type TriggerType = 'onDemand' | 'schedule' | 'streaming' | 'subscription'; diff --git a/packages/ingestion/package.json b/packages/ingestion/package.json index 970542169..09611f021 100644 --- a/packages/ingestion/package.json +++ b/packages/ingestion/package.json @@ -49,8 +49,8 @@ "@algolia/requester-node-http": "5.1.1" }, "devDependencies": { - "@types/node": "22.2.0", - "rollup": "4.20.0", + "@types/node": "22.5.0", + "rollup": "4.21.0", "typescript": "5.5.4" }, "engines": { diff --git a/packages/ingestion/rollup.config.js b/packages/ingestion/rollup.config.js index dbcfa8129..0f45d3972 100644 --- a/packages/ingestion/rollup.config.js +++ b/packages/ingestion/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); \ No newline at end of file diff --git a/packages/ingestion/src/ingestionClient.ts b/packages/ingestion/src/ingestionClient.ts index 9a0011e82..6a7f50b53 100644 --- a/packages/ingestion/src/ingestionClient.ts +++ b/packages/ingestion/src/ingestionClient.ts @@ -1,10 +1,6 @@ // 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. -import { - createAuth, - createTransporter, - getAlgoliaAgent, -} from '@algolia/client-common'; +import { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common'; import type { CreateClientOptions, Headers, @@ -128,9 +124,7 @@ function getDefaultHosts(region: Region): Host[] { * @summary Guard method that returns a strongly typed specific OnDemandTrigger for a given Trigger. * @param trigger - The given Task Trigger. */ -export function isOnDemandTrigger( - trigger: TaskCreateTrigger | Trigger -): trigger is OnDemandTrigger { +export function isOnDemandTrigger(trigger: TaskCreateTrigger | Trigger): trigger is OnDemandTrigger { return trigger.type === 'onDemand'; } @@ -140,9 +134,7 @@ export function isOnDemandTrigger( * @summary Guard method that returns a strongly typed specific ScheduleTrigger for a given Trigger. * @param trigger - The given Task Trigger. */ -export function isScheduleTrigger( - trigger: TaskCreateTrigger | Trigger -): trigger is ScheduleTrigger { +export function isScheduleTrigger(trigger: TaskCreateTrigger | Trigger): trigger is ScheduleTrigger { return trigger.type === 'schedule'; } @@ -152,9 +144,7 @@ export function isScheduleTrigger( * @summary Guard method that returns a strongly typed specific SubscriptionTrigger for a given Trigger. * @param trigger - The given Task Trigger. */ -export function isSubscriptionTrigger( - trigger: TaskCreateTrigger | Trigger -): trigger is SubscriptionTrigger { +export function isSubscriptionTrigger(trigger: TaskCreateTrigger | Trigger): trigger is SubscriptionTrigger { return trigger.type === 'subscription'; } @@ -199,10 +189,7 @@ export function createIngestionClient({ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties. */ clearCache(): Promise { - return Promise.all([ - transporter.requestsCache.clear(), - transporter.responsesCache.clear(), - ]).then(() => undefined); + return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined); }, /** @@ -235,28 +222,20 @@ export function createIngestionClient({ */ createAuthentication( authenticationCreate: AuthenticationCreate, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!authenticationCreate) { - throw new Error( - 'Parameter `authenticationCreate` is required when calling `createAuthentication`.' - ); + throw new Error('Parameter `authenticationCreate` is required when calling `createAuthentication`.'); } if (!authenticationCreate.type) { - throw new Error( - 'Parameter `authenticationCreate.type` is required when calling `createAuthentication`.' - ); + throw new Error('Parameter `authenticationCreate.type` is required when calling `createAuthentication`.'); } if (!authenticationCreate.name) { - throw new Error( - 'Parameter `authenticationCreate.name` is required when calling `createAuthentication`.' - ); + throw new Error('Parameter `authenticationCreate.name` is required when calling `createAuthentication`.'); } if (!authenticationCreate.input) { - throw new Error( - 'Parameter `authenticationCreate.input` is required when calling `createAuthentication`.' - ); + throw new Error('Parameter `authenticationCreate.input` is required when calling `createAuthentication`.'); } const requestPath = '/1/authentications'; @@ -287,28 +266,20 @@ export function createIngestionClient({ */ createDestination( destinationCreate: DestinationCreate, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!destinationCreate) { - throw new Error( - 'Parameter `destinationCreate` is required when calling `createDestination`.' - ); + throw new Error('Parameter `destinationCreate` is required when calling `createDestination`.'); } if (!destinationCreate.type) { - throw new Error( - 'Parameter `destinationCreate.type` is required when calling `createDestination`.' - ); + throw new Error('Parameter `destinationCreate.type` is required when calling `createDestination`.'); } if (!destinationCreate.name) { - throw new Error( - 'Parameter `destinationCreate.name` is required when calling `createDestination`.' - ); + throw new Error('Parameter `destinationCreate.name` is required when calling `createDestination`.'); } if (!destinationCreate.input) { - throw new Error( - 'Parameter `destinationCreate.input` is required when calling `createDestination`.' - ); + throw new Error('Parameter `destinationCreate.input` is required when calling `createDestination`.'); } const requestPath = '/1/destinations'; @@ -337,30 +308,19 @@ export function createIngestionClient({ * @param sourceCreate -. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - createSource( - sourceCreate: SourceCreate, - requestOptions?: RequestOptions - ): Promise { + createSource(sourceCreate: SourceCreate, requestOptions?: RequestOptions): Promise { if (!sourceCreate) { - throw new Error( - 'Parameter `sourceCreate` is required when calling `createSource`.' - ); + throw new Error('Parameter `sourceCreate` is required when calling `createSource`.'); } if (!sourceCreate.type) { - throw new Error( - 'Parameter `sourceCreate.type` is required when calling `createSource`.' - ); + throw new Error('Parameter `sourceCreate.type` is required when calling `createSource`.'); } if (!sourceCreate.name) { - throw new Error( - 'Parameter `sourceCreate.name` is required when calling `createSource`.' - ); + throw new Error('Parameter `sourceCreate.name` is required when calling `createSource`.'); } if (!sourceCreate.input) { - throw new Error( - 'Parameter `sourceCreate.input` is required when calling `createSource`.' - ); + throw new Error('Parameter `sourceCreate.input` is required when calling `createSource`.'); } const requestPath = '/1/sources'; @@ -384,30 +344,19 @@ export function createIngestionClient({ * @param taskCreate - Request body for creating a task. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - createTask( - taskCreate: TaskCreate, - requestOptions?: RequestOptions - ): Promise { + createTask(taskCreate: TaskCreate, requestOptions?: RequestOptions): Promise { if (!taskCreate) { - throw new Error( - 'Parameter `taskCreate` is required when calling `createTask`.' - ); + throw new Error('Parameter `taskCreate` is required when calling `createTask`.'); } if (!taskCreate.sourceID) { - throw new Error( - 'Parameter `taskCreate.sourceID` is required when calling `createTask`.' - ); + throw new Error('Parameter `taskCreate.sourceID` is required when calling `createTask`.'); } if (!taskCreate.destinationID) { - throw new Error( - 'Parameter `taskCreate.destinationID` is required when calling `createTask`.' - ); + throw new Error('Parameter `taskCreate.destinationID` is required when calling `createTask`.'); } if (!taskCreate.action) { - throw new Error( - 'Parameter `taskCreate.action` is required when calling `createTask`.' - ); + throw new Error('Parameter `taskCreate.action` is required when calling `createTask`.'); } const requestPath = '/2/tasks'; @@ -431,35 +380,22 @@ export function createIngestionClient({ * @param taskCreate - Request body for creating a task. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - createTaskV1( - taskCreate: TaskCreateV1, - requestOptions?: RequestOptions - ): Promise { + createTaskV1(taskCreate: TaskCreateV1, requestOptions?: RequestOptions): Promise { if (!taskCreate) { - throw new Error( - 'Parameter `taskCreate` is required when calling `createTaskV1`.' - ); + throw new Error('Parameter `taskCreate` is required when calling `createTaskV1`.'); } if (!taskCreate.sourceID) { - throw new Error( - 'Parameter `taskCreate.sourceID` is required when calling `createTaskV1`.' - ); + throw new Error('Parameter `taskCreate.sourceID` is required when calling `createTaskV1`.'); } if (!taskCreate.destinationID) { - throw new Error( - 'Parameter `taskCreate.destinationID` is required when calling `createTaskV1`.' - ); + throw new Error('Parameter `taskCreate.destinationID` is required when calling `createTaskV1`.'); } if (!taskCreate.trigger) { - throw new Error( - 'Parameter `taskCreate.trigger` is required when calling `createTaskV1`.' - ); + throw new Error('Parameter `taskCreate.trigger` is required when calling `createTaskV1`.'); } if (!taskCreate.action) { - throw new Error( - 'Parameter `taskCreate.action` is required when calling `createTaskV1`.' - ); + throw new Error('Parameter `taskCreate.action` is required when calling `createTaskV1`.'); } const requestPath = '/1/tasks'; @@ -485,23 +421,17 @@ export function createIngestionClient({ */ createTransformation( transformationCreate: TransformationCreate, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!transformationCreate) { - throw new Error( - 'Parameter `transformationCreate` is required when calling `createTransformation`.' - ); + throw new Error('Parameter `transformationCreate` is required when calling `createTransformation`.'); } if (!transformationCreate.code) { - throw new Error( - 'Parameter `transformationCreate.code` is required when calling `createTransformation`.' - ); + throw new Error('Parameter `transformationCreate.code` is required when calling `createTransformation`.'); } if (!transformationCreate.name) { - throw new Error( - 'Parameter `transformationCreate.name` is required when calling `createTransformation`.' - ); + throw new Error('Parameter `transformationCreate.name` is required when calling `createTransformation`.'); } const requestPath = '/1/transformations'; @@ -529,12 +459,10 @@ export function createIngestionClient({ */ customDelete( { path, parameters }: CustomDeleteProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customDelete`.' - ); + throw new Error('Parameter `path` is required when calling `customDelete`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -559,14 +487,9 @@ export function createIngestionClient({ * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - customGet( - { path, parameters }: CustomGetProps, - requestOptions?: RequestOptions - ): Promise> { + customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customGet`.' - ); + throw new Error('Parameter `path` is required when calling `customGet`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -594,12 +517,10 @@ export function createIngestionClient({ */ customPost( { path, parameters, body }: CustomPostProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPost`.' - ); + throw new Error('Parameter `path` is required when calling `customPost`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -628,12 +549,10 @@ export function createIngestionClient({ */ customPut( { path, parameters, body }: CustomPutProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPut`.' - ); + throw new Error('Parameter `path` is required when calling `customPut`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -665,17 +584,15 @@ export function createIngestionClient({ */ deleteAuthentication( { authenticationID }: DeleteAuthenticationProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!authenticationID) { - throw new Error( - 'Parameter `authenticationID` is required when calling `deleteAuthentication`.' - ); + throw new Error('Parameter `authenticationID` is required when calling `deleteAuthentication`.'); } const requestPath = '/1/authentications/{authenticationID}'.replace( '{authenticationID}', - encodeURIComponent(authenticationID) + encodeURIComponent(authenticationID), ); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -704,17 +621,15 @@ export function createIngestionClient({ */ deleteDestination( { destinationID }: DeleteDestinationProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!destinationID) { - throw new Error( - 'Parameter `destinationID` is required when calling `deleteDestination`.' - ); + throw new Error('Parameter `destinationID` is required when calling `deleteDestination`.'); } const requestPath = '/1/destinations/{destinationID}'.replace( '{destinationID}', - encodeURIComponent(destinationID) + encodeURIComponent(destinationID), ); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -741,20 +656,12 @@ export function createIngestionClient({ * @param deleteSource.sourceID - Unique identifier of a source. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - deleteSource( - { sourceID }: DeleteSourceProps, - requestOptions?: RequestOptions - ): Promise { + deleteSource({ sourceID }: DeleteSourceProps, requestOptions?: RequestOptions): Promise { if (!sourceID) { - throw new Error( - 'Parameter `sourceID` is required when calling `deleteSource`.' - ); + throw new Error('Parameter `sourceID` is required when calling `deleteSource`.'); } - const requestPath = '/1/sources/{sourceID}'.replace( - '{sourceID}', - encodeURIComponent(sourceID) - ); + const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -775,20 +682,12 @@ export function createIngestionClient({ * @param deleteTask.taskID - Unique identifier of a task. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - deleteTask( - { taskID }: DeleteTaskProps, - requestOptions?: RequestOptions - ): Promise { + deleteTask({ taskID }: DeleteTaskProps, requestOptions?: RequestOptions): Promise { if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `deleteTask`.' - ); + throw new Error('Parameter `taskID` is required when calling `deleteTask`.'); } - const requestPath = '/2/tasks/{taskID}'.replace( - '{taskID}', - encodeURIComponent(taskID) - ); + const requestPath = '/2/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -809,20 +708,12 @@ export function createIngestionClient({ * @param deleteTaskV1.taskID - Unique identifier of a task. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - deleteTaskV1( - { taskID }: DeleteTaskV1Props, - requestOptions?: RequestOptions - ): Promise { + deleteTaskV1({ taskID }: DeleteTaskV1Props, requestOptions?: RequestOptions): Promise { if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `deleteTaskV1`.' - ); + throw new Error('Parameter `taskID` is required when calling `deleteTaskV1`.'); } - const requestPath = '/1/tasks/{taskID}'.replace( - '{taskID}', - encodeURIComponent(taskID) - ); + const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -845,17 +736,15 @@ export function createIngestionClient({ */ deleteTransformation( { transformationID }: DeleteTransformationProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!transformationID) { - throw new Error( - 'Parameter `transformationID` is required when calling `deleteTransformation`.' - ); + throw new Error('Parameter `transformationID` is required when calling `deleteTransformation`.'); } const requestPath = '/1/transformations/{transformationID}'.replace( '{transformationID}', - encodeURIComponent(transformationID) + encodeURIComponent(transformationID), ); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -882,20 +771,12 @@ export function createIngestionClient({ * @param disableTask.taskID - Unique identifier of a task. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - disableTask( - { taskID }: DisableTaskProps, - requestOptions?: RequestOptions - ): Promise { + disableTask({ taskID }: DisableTaskProps, requestOptions?: RequestOptions): Promise { if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `disableTask`.' - ); + throw new Error('Parameter `taskID` is required when calling `disableTask`.'); } - const requestPath = '/2/tasks/{taskID}/disable'.replace( - '{taskID}', - encodeURIComponent(taskID) - ); + const requestPath = '/2/tasks/{taskID}/disable'.replace('{taskID}', encodeURIComponent(taskID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -921,20 +802,12 @@ export function createIngestionClient({ * @param disableTaskV1.taskID - Unique identifier of a task. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - disableTaskV1( - { taskID }: DisableTaskV1Props, - requestOptions?: RequestOptions - ): Promise { + disableTaskV1({ taskID }: DisableTaskV1Props, requestOptions?: RequestOptions): Promise { if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `disableTaskV1`.' - ); + throw new Error('Parameter `taskID` is required when calling `disableTaskV1`.'); } - const requestPath = '/1/tasks/{taskID}/disable'.replace( - '{taskID}', - encodeURIComponent(taskID) - ); + const requestPath = '/1/tasks/{taskID}/disable'.replace('{taskID}', encodeURIComponent(taskID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -960,20 +833,12 @@ export function createIngestionClient({ * @param enableTask.taskID - Unique identifier of a task. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - enableTask( - { taskID }: EnableTaskProps, - requestOptions?: RequestOptions - ): Promise { + enableTask({ taskID }: EnableTaskProps, requestOptions?: RequestOptions): Promise { if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `enableTask`.' - ); + throw new Error('Parameter `taskID` is required when calling `enableTask`.'); } - const requestPath = '/2/tasks/{taskID}/enable'.replace( - '{taskID}', - encodeURIComponent(taskID) - ); + const requestPath = '/2/tasks/{taskID}/enable'.replace('{taskID}', encodeURIComponent(taskID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -999,20 +864,12 @@ export function createIngestionClient({ * @param enableTaskV1.taskID - Unique identifier of a task. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - enableTaskV1( - { taskID }: EnableTaskV1Props, - requestOptions?: RequestOptions - ): Promise { + enableTaskV1({ taskID }: EnableTaskV1Props, requestOptions?: RequestOptions): Promise { if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `enableTaskV1`.' - ); + throw new Error('Parameter `taskID` is required when calling `enableTaskV1`.'); } - const requestPath = '/1/tasks/{taskID}/enable'.replace( - '{taskID}', - encodeURIComponent(taskID) - ); + const requestPath = '/1/tasks/{taskID}/enable'.replace('{taskID}', encodeURIComponent(taskID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1039,22 +896,22 @@ export function createIngestionClient({ */ generateTransformationCode( generateTransformationCodePayload: GenerateTransformationCodePayload, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!generateTransformationCodePayload) { throw new Error( - 'Parameter `generateTransformationCodePayload` is required when calling `generateTransformationCode`.' + 'Parameter `generateTransformationCodePayload` is required when calling `generateTransformationCode`.', ); } if (!generateTransformationCodePayload.id) { throw new Error( - 'Parameter `generateTransformationCodePayload.id` is required when calling `generateTransformationCode`.' + 'Parameter `generateTransformationCodePayload.id` is required when calling `generateTransformationCode`.', ); } if (!generateTransformationCodePayload.userPrompt) { throw new Error( - 'Parameter `generateTransformationCodePayload.userPrompt` is required when calling `generateTransformationCode`.' + 'Parameter `generateTransformationCodePayload.userPrompt` is required when calling `generateTransformationCode`.', ); } @@ -1087,17 +944,15 @@ export function createIngestionClient({ */ getAuthentication( { authenticationID }: GetAuthenticationProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!authenticationID) { - throw new Error( - 'Parameter `authenticationID` is required when calling `getAuthentication`.' - ); + throw new Error('Parameter `authenticationID` is required when calling `getAuthentication`.'); } const requestPath = '/1/authentications/{authenticationID}'.replace( '{authenticationID}', - encodeURIComponent(authenticationID) + encodeURIComponent(authenticationID), ); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1124,19 +979,14 @@ export function createIngestionClient({ * @param getDestination.destinationID - Unique identifier of a destination. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getDestination( - { destinationID }: GetDestinationProps, - requestOptions?: RequestOptions - ): Promise { + getDestination({ destinationID }: GetDestinationProps, requestOptions?: RequestOptions): Promise { if (!destinationID) { - throw new Error( - 'Parameter `destinationID` is required when calling `getDestination`.' - ); + throw new Error('Parameter `destinationID` is required when calling `getDestination`.'); } const requestPath = '/1/destinations/{destinationID}'.replace( '{destinationID}', - encodeURIComponent(destinationID) + encodeURIComponent(destinationID), ); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1164,20 +1014,13 @@ export function createIngestionClient({ * @param getEvent.eventID - Unique identifier of an event. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getEvent( - { runID, eventID }: GetEventProps, - requestOptions?: RequestOptions - ): Promise { + getEvent({ runID, eventID }: GetEventProps, requestOptions?: RequestOptions): Promise { if (!runID) { - throw new Error( - 'Parameter `runID` is required when calling `getEvent`.' - ); + throw new Error('Parameter `runID` is required when calling `getEvent`.'); } if (!eventID) { - throw new Error( - 'Parameter `eventID` is required when calling `getEvent`.' - ); + throw new Error('Parameter `eventID` is required when calling `getEvent`.'); } const requestPath = '/1/runs/{runID}/events/{eventID}' @@ -1208,18 +1051,12 @@ export function createIngestionClient({ * @param getRun.runID - Unique identifier of a task run. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getRun( - { runID }: GetRunProps, - requestOptions?: RequestOptions - ): Promise { + getRun({ runID }: GetRunProps, requestOptions?: RequestOptions): Promise { if (!runID) { throw new Error('Parameter `runID` is required when calling `getRun`.'); } - const requestPath = '/1/runs/{runID}'.replace( - '{runID}', - encodeURIComponent(runID) - ); + const requestPath = '/1/runs/{runID}'.replace('{runID}', encodeURIComponent(runID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1245,20 +1082,12 @@ export function createIngestionClient({ * @param getSource.sourceID - Unique identifier of a source. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getSource( - { sourceID }: GetSourceProps, - requestOptions?: RequestOptions - ): Promise { + getSource({ sourceID }: GetSourceProps, requestOptions?: RequestOptions): Promise { if (!sourceID) { - throw new Error( - 'Parameter `sourceID` is required when calling `getSource`.' - ); + throw new Error('Parameter `sourceID` is required when calling `getSource`.'); } - const requestPath = '/1/sources/{sourceID}'.replace( - '{sourceID}', - encodeURIComponent(sourceID) - ); + const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1284,20 +1113,12 @@ export function createIngestionClient({ * @param getTask.taskID - Unique identifier of a task. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getTask( - { taskID }: GetTaskProps, - requestOptions?: RequestOptions - ): Promise { + getTask({ taskID }: GetTaskProps, requestOptions?: RequestOptions): Promise { if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `getTask`.' - ); + throw new Error('Parameter `taskID` is required when calling `getTask`.'); } - const requestPath = '/2/tasks/{taskID}'.replace( - '{taskID}', - encodeURIComponent(taskID) - ); + const requestPath = '/2/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1323,20 +1144,12 @@ export function createIngestionClient({ * @param getTaskV1.taskID - Unique identifier of a task. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getTaskV1( - { taskID }: GetTaskV1Props, - requestOptions?: RequestOptions - ): Promise { + getTaskV1({ taskID }: GetTaskV1Props, requestOptions?: RequestOptions): Promise { if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `getTaskV1`.' - ); + throw new Error('Parameter `taskID` is required when calling `getTaskV1`.'); } - const requestPath = '/1/tasks/{taskID}'.replace( - '{taskID}', - encodeURIComponent(taskID) - ); + const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1364,17 +1177,15 @@ export function createIngestionClient({ */ getTransformation( { transformationID }: GetTransformationProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!transformationID) { - throw new Error( - 'Parameter `transformationID` is required when calling `getTransformation`.' - ); + throw new Error('Parameter `transformationID` is required when calling `getTransformation`.'); } const requestPath = '/1/transformations/{transformationID}'.replace( '{transformationID}', - encodeURIComponent(transformationID) + encodeURIComponent(transformationID), ); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1407,20 +1218,12 @@ export function createIngestionClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listAuthentications( - { - itemsPerPage, - page, - type, - platform, - sort, - order, - }: ListAuthenticationsProps = {}, - requestOptions: RequestOptions | undefined = undefined + { itemsPerPage, page, type, platform, sort, order }: ListAuthenticationsProps = {}, + requestOptions: RequestOptions | undefined = undefined, ): Promise { const requestPath = '/1/authentications'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (itemsPerPage !== undefined) { queryParameters.itemsPerPage = itemsPerPage.toString(); } @@ -1428,19 +1231,15 @@ export function createIngestionClient({ if (page !== undefined) { queryParameters.page = page.toString(); } - if (type !== undefined) { queryParameters.type = type.toString(); } - if (platform !== undefined) { queryParameters.platform = platform.toString(); } - if (sort !== undefined) { queryParameters.sort = sort.toString(); } - if (order !== undefined) { queryParameters.order = order.toString(); } @@ -1473,28 +1272,18 @@ export function createIngestionClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listDestinations( - { - itemsPerPage, - page, - type, - authenticationID, - sort, - order, - }: ListDestinationsProps = {}, - requestOptions: RequestOptions | undefined = undefined + { itemsPerPage, page, type, authenticationID, sort, order }: ListDestinationsProps = {}, + requestOptions: RequestOptions | undefined = undefined, ): Promise { const requestPath = '/1/destinations'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (itemsPerPage !== undefined) { queryParameters.itemsPerPage = itemsPerPage.toString(); } - if (page !== undefined) { queryParameters.page = page.toString(); } - if (type !== undefined) { queryParameters.type = type.toString(); } @@ -1502,11 +1291,9 @@ export function createIngestionClient({ if (authenticationID !== undefined) { queryParameters.authenticationID = authenticationID.toString(); } - if (sort !== undefined) { queryParameters.sort = sort.toString(); } - if (order !== undefined) { queryParameters.order = order.toString(); } @@ -1542,36 +1329,20 @@ export function createIngestionClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listEvents( - { - runID, - itemsPerPage, - page, - status, - type, - sort, - order, - startDate, - endDate, - }: ListEventsProps, - requestOptions?: RequestOptions + { runID, itemsPerPage, page, status, type, sort, order, startDate, endDate }: ListEventsProps, + requestOptions?: RequestOptions, ): Promise { if (!runID) { - throw new Error( - 'Parameter `runID` is required when calling `listEvents`.' - ); + throw new Error('Parameter `runID` is required when calling `listEvents`.'); } - const requestPath = '/1/runs/{runID}/events'.replace( - '{runID}', - encodeURIComponent(runID) - ); + const requestPath = '/1/runs/{runID}/events'.replace('{runID}', encodeURIComponent(runID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; if (itemsPerPage !== undefined) { queryParameters.itemsPerPage = itemsPerPage.toString(); } - if (page !== undefined) { queryParameters.page = page.toString(); } @@ -1579,23 +1350,18 @@ export function createIngestionClient({ if (status !== undefined) { queryParameters.status = status.toString(); } - if (type !== undefined) { queryParameters.type = type.toString(); } - if (sort !== undefined) { queryParameters.sort = sort.toString(); } - if (order !== undefined) { queryParameters.order = order.toString(); } - if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } @@ -1630,30 +1396,18 @@ export function createIngestionClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listRuns( - { - itemsPerPage, - page, - status, - taskID, - sort, - order, - startDate, - endDate, - }: ListRunsProps = {}, - requestOptions: RequestOptions | undefined = undefined + { itemsPerPage, page, status, taskID, sort, order, startDate, endDate }: ListRunsProps = {}, + requestOptions: RequestOptions | undefined = undefined, ): Promise { const requestPath = '/1/runs'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (itemsPerPage !== undefined) { queryParameters.itemsPerPage = itemsPerPage.toString(); } - if (page !== undefined) { queryParameters.page = page.toString(); } - if (status !== undefined) { queryParameters.status = status.toString(); } @@ -1661,19 +1415,15 @@ export function createIngestionClient({ if (taskID !== undefined) { queryParameters.taskID = taskID.toString(); } - if (sort !== undefined) { queryParameters.sort = sort.toString(); } - if (order !== undefined) { queryParameters.order = order.toString(); } - if (startDate !== undefined) { queryParameters.startDate = startDate.toString(); } - if (endDate !== undefined) { queryParameters.endDate = endDate.toString(); } @@ -1706,28 +1456,18 @@ export function createIngestionClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listSources( - { - itemsPerPage, - page, - type, - authenticationID, - sort, - order, - }: ListSourcesProps = {}, - requestOptions: RequestOptions | undefined = undefined + { itemsPerPage, page, type, authenticationID, sort, order }: ListSourcesProps = {}, + requestOptions: RequestOptions | undefined = undefined, ): Promise { const requestPath = '/1/sources'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (itemsPerPage !== undefined) { queryParameters.itemsPerPage = itemsPerPage.toString(); } - if (page !== undefined) { queryParameters.page = page.toString(); } - if (type !== undefined) { queryParameters.type = type.toString(); } @@ -1735,7 +1475,6 @@ export function createIngestionClient({ if (authenticationID !== undefined) { queryParameters.authenticationID = authenticationID.toString(); } - if (sort !== undefined) { queryParameters.sort = sort.toString(); } @@ -1775,47 +1514,30 @@ export function createIngestionClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listTasks( - { - itemsPerPage, - page, - action, - enabled, - sourceID, - destinationID, - triggerType, - sort, - order, - }: ListTasksProps = {}, - requestOptions: RequestOptions | undefined = undefined + { itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order }: ListTasksProps = {}, + requestOptions: RequestOptions | undefined = undefined, ): Promise { const requestPath = '/2/tasks'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (itemsPerPage !== undefined) { queryParameters.itemsPerPage = itemsPerPage.toString(); } - if (page !== undefined) { queryParameters.page = page.toString(); } - if (action !== undefined) { queryParameters.action = action.toString(); } - if (enabled !== undefined) { queryParameters.enabled = enabled.toString(); } - if (sourceID !== undefined) { queryParameters.sourceID = sourceID.toString(); } - if (destinationID !== undefined) { queryParameters.destinationID = destinationID.toString(); } - if (triggerType !== undefined) { queryParameters.triggerType = triggerType.toString(); } @@ -1823,7 +1545,6 @@ export function createIngestionClient({ if (sort !== undefined) { queryParameters.sort = sort.toString(); } - if (order !== undefined) { queryParameters.order = order.toString(); } @@ -1859,23 +1580,12 @@ export function createIngestionClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ listTasksV1( - { - itemsPerPage, - page, - action, - enabled, - sourceID, - destinationID, - triggerType, - sort, - order, - }: ListTasksV1Props = {}, - requestOptions: RequestOptions | undefined = undefined + { itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order }: ListTasksV1Props = {}, + requestOptions: RequestOptions | undefined = undefined, ): Promise { const requestPath = '/1/tasks'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (itemsPerPage !== undefined) { queryParameters.itemsPerPage = itemsPerPage.toString(); } @@ -1883,15 +1593,12 @@ export function createIngestionClient({ if (page !== undefined) { queryParameters.page = page.toString(); } - if (action !== undefined) { queryParameters.action = action.toString(); } - if (enabled !== undefined) { queryParameters.enabled = enabled.toString(); } - if (sourceID !== undefined) { queryParameters.sourceID = sourceID.toString(); } @@ -1899,7 +1606,6 @@ export function createIngestionClient({ if (destinationID !== undefined) { queryParameters.destinationID = destinationID.toString(); } - if (triggerType !== undefined) { queryParameters.triggerType = triggerType.toString(); } @@ -1907,7 +1613,6 @@ export function createIngestionClient({ if (sort !== undefined) { queryParameters.sort = sort.toString(); } - if (order !== undefined) { queryParameters.order = order.toString(); } @@ -1932,9 +1637,7 @@ export function createIngestionClient({ * * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - listTransformationModels( - requestOptions?: RequestOptions - ): Promise { + listTransformationModels(requestOptions?: RequestOptions): Promise { const requestPath = '/1/transformations/models'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -1966,24 +1669,20 @@ export function createIngestionClient({ */ listTransformations( { itemsPerPage, page, sort, order }: ListTransformationsProps = {}, - requestOptions: RequestOptions | undefined = undefined + requestOptions: RequestOptions | undefined = undefined, ): Promise { const requestPath = '/1/transformations'; const headers: Headers = {}; const queryParameters: QueryParameters = {}; - if (itemsPerPage !== undefined) { queryParameters.itemsPerPage = itemsPerPage.toString(); } - if (page !== undefined) { queryParameters.page = page.toString(); } - if (sort !== undefined) { queryParameters.sort = sort.toString(); } - if (order !== undefined) { queryParameters.order = order.toString(); } @@ -2011,32 +1710,20 @@ export function createIngestionClient({ * @param pushTask.batchWriteParams - Request body of a Search API `batch` request that will be pushed in the Connectors pipeline. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - pushTask( - { taskID, batchWriteParams }: PushTaskProps, - requestOptions?: RequestOptions - ): Promise { + pushTask({ taskID, batchWriteParams }: PushTaskProps, requestOptions?: RequestOptions): Promise { if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `pushTask`.' - ); + throw new Error('Parameter `taskID` is required when calling `pushTask`.'); } if (!batchWriteParams) { - throw new Error( - 'Parameter `batchWriteParams` is required when calling `pushTask`.' - ); + throw new Error('Parameter `batchWriteParams` is required when calling `pushTask`.'); } if (!batchWriteParams.requests) { - throw new Error( - 'Parameter `batchWriteParams.requests` is required when calling `pushTask`.' - ); + throw new Error('Parameter `batchWriteParams.requests` is required when calling `pushTask`.'); } - const requestPath = '/2/tasks/{taskID}/push'.replace( - '{taskID}', - encodeURIComponent(taskID) - ); + const requestPath = '/2/tasks/{taskID}/push'.replace('{taskID}', encodeURIComponent(taskID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2066,18 +1753,13 @@ export function createIngestionClient({ */ runSource( { sourceID, runSourcePayload }: RunSourceProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!sourceID) { - throw new Error( - 'Parameter `sourceID` is required when calling `runSource`.' - ); + throw new Error('Parameter `sourceID` is required when calling `runSource`.'); } - const requestPath = '/1/sources/{sourceID}/run'.replace( - '{sourceID}', - encodeURIComponent(sourceID) - ); + const requestPath = '/1/sources/{sourceID}/run'.replace('{sourceID}', encodeURIComponent(sourceID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2104,20 +1786,12 @@ export function createIngestionClient({ * @param runTask.taskID - Unique identifier of a task. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - runTask( - { taskID }: RunTaskProps, - requestOptions?: RequestOptions - ): Promise { + runTask({ taskID }: RunTaskProps, requestOptions?: RequestOptions): Promise { if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `runTask`.' - ); + throw new Error('Parameter `taskID` is required when calling `runTask`.'); } - const requestPath = '/2/tasks/{taskID}/run'.replace( - '{taskID}', - encodeURIComponent(taskID) - ); + const requestPath = '/2/tasks/{taskID}/run'.replace('{taskID}', encodeURIComponent(taskID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2143,20 +1817,12 @@ export function createIngestionClient({ * @param runTaskV1.taskID - Unique identifier of a task. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - runTaskV1( - { taskID }: RunTaskV1Props, - requestOptions?: RequestOptions - ): Promise { + runTaskV1({ taskID }: RunTaskV1Props, requestOptions?: RequestOptions): Promise { if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `runTaskV1`.' - ); + throw new Error('Parameter `taskID` is required when calling `runTaskV1`.'); } - const requestPath = '/1/tasks/{taskID}/run'.replace( - '{taskID}', - encodeURIComponent(taskID) - ); + const requestPath = '/1/tasks/{taskID}/run'.replace('{taskID}', encodeURIComponent(taskID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2183,17 +1849,15 @@ export function createIngestionClient({ */ searchAuthentications( authenticationSearch: AuthenticationSearch, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!authenticationSearch) { - throw new Error( - 'Parameter `authenticationSearch` is required when calling `searchAuthentications`.' - ); + throw new Error('Parameter `authenticationSearch` is required when calling `searchAuthentications`.'); } if (!authenticationSearch.authenticationIDs) { throw new Error( - 'Parameter `authenticationSearch.authenticationIDs` is required when calling `searchAuthentications`.' + 'Parameter `authenticationSearch.authenticationIDs` is required when calling `searchAuthentications`.', ); } @@ -2223,20 +1887,13 @@ export function createIngestionClient({ * @param destinationSearch - The destinationSearch object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - searchDestinations( - destinationSearch: DestinationSearch, - requestOptions?: RequestOptions - ): Promise { + searchDestinations(destinationSearch: DestinationSearch, requestOptions?: RequestOptions): Promise { if (!destinationSearch) { - throw new Error( - 'Parameter `destinationSearch` is required when calling `searchDestinations`.' - ); + throw new Error('Parameter `destinationSearch` is required when calling `searchDestinations`.'); } if (!destinationSearch.destinationIDs) { - throw new Error( - 'Parameter `destinationSearch.destinationIDs` is required when calling `searchDestinations`.' - ); + throw new Error('Parameter `destinationSearch.destinationIDs` is required when calling `searchDestinations`.'); } const requestPath = '/1/destinations/search'; @@ -2265,20 +1922,13 @@ export function createIngestionClient({ * @param sourceSearch - The sourceSearch object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - searchSources( - sourceSearch: SourceSearch, - requestOptions?: RequestOptions - ): Promise { + searchSources(sourceSearch: SourceSearch, requestOptions?: RequestOptions): Promise { if (!sourceSearch) { - throw new Error( - 'Parameter `sourceSearch` is required when calling `searchSources`.' - ); + throw new Error('Parameter `sourceSearch` is required when calling `searchSources`.'); } if (!sourceSearch.sourceIDs) { - throw new Error( - 'Parameter `sourceSearch.sourceIDs` is required when calling `searchSources`.' - ); + throw new Error('Parameter `sourceSearch.sourceIDs` is required when calling `searchSources`.'); } const requestPath = '/1/sources/search'; @@ -2307,20 +1957,13 @@ export function createIngestionClient({ * @param taskSearch - The taskSearch object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - searchTasks( - taskSearch: TaskSearch, - requestOptions?: RequestOptions - ): Promise { + searchTasks(taskSearch: TaskSearch, requestOptions?: RequestOptions): Promise { if (!taskSearch) { - throw new Error( - 'Parameter `taskSearch` is required when calling `searchTasks`.' - ); + throw new Error('Parameter `taskSearch` is required when calling `searchTasks`.'); } if (!taskSearch.taskIDs) { - throw new Error( - 'Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.' - ); + throw new Error('Parameter `taskSearch.taskIDs` is required when calling `searchTasks`.'); } const requestPath = '/2/tasks/search'; @@ -2349,20 +1992,13 @@ export function createIngestionClient({ * @param taskSearch - The taskSearch object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - searchTasksV1( - taskSearch: TaskSearch, - requestOptions?: RequestOptions - ): Promise { + searchTasksV1(taskSearch: TaskSearch, requestOptions?: RequestOptions): Promise { if (!taskSearch) { - throw new Error( - 'Parameter `taskSearch` is required when calling `searchTasksV1`.' - ); + throw new Error('Parameter `taskSearch` is required when calling `searchTasksV1`.'); } if (!taskSearch.taskIDs) { - throw new Error( - 'Parameter `taskSearch.taskIDs` is required when calling `searchTasksV1`.' - ); + throw new Error('Parameter `taskSearch.taskIDs` is required when calling `searchTasksV1`.'); } const requestPath = '/1/tasks/search'; @@ -2393,17 +2029,15 @@ export function createIngestionClient({ */ searchTransformations( transformationSearch: TransformationSearch, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!transformationSearch) { - throw new Error( - 'Parameter `transformationSearch` is required when calling `searchTransformations`.' - ); + throw new Error('Parameter `transformationSearch` is required when calling `searchTransformations`.'); } if (!transformationSearch.transformationIDs) { throw new Error( - 'Parameter `transformationSearch.transformationIDs` is required when calling `searchTransformations`.' + 'Parameter `transformationSearch.transformationIDs` is required when calling `searchTransformations`.', ); } @@ -2436,18 +2070,13 @@ export function createIngestionClient({ */ triggerDockerSourceDiscover( { sourceID }: TriggerDockerSourceDiscoverProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!sourceID) { - throw new Error( - 'Parameter `sourceID` is required when calling `triggerDockerSourceDiscover`.' - ); + throw new Error('Parameter `sourceID` is required when calling `triggerDockerSourceDiscover`.'); } - const requestPath = '/1/sources/{sourceID}/discover'.replace( - '{sourceID}', - encodeURIComponent(sourceID) - ); + const requestPath = '/1/sources/{sourceID}/discover'.replace('{sourceID}', encodeURIComponent(sourceID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2474,23 +2103,17 @@ export function createIngestionClient({ */ tryTransformation( transformationTry: TransformationTry, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!transformationTry) { - throw new Error( - 'Parameter `transformationTry` is required when calling `tryTransformation`.' - ); + throw new Error('Parameter `transformationTry` is required when calling `tryTransformation`.'); } if (!transformationTry.code) { - throw new Error( - 'Parameter `transformationTry.code` is required when calling `tryTransformation`.' - ); + throw new Error('Parameter `transformationTry.code` is required when calling `tryTransformation`.'); } if (!transformationTry.sampleRecord) { - throw new Error( - 'Parameter `transformationTry.sampleRecord` is required when calling `tryTransformation`.' - ); + throw new Error('Parameter `transformationTry.sampleRecord` is required when calling `tryTransformation`.'); } const requestPath = '/1/transformations/try'; @@ -2522,38 +2145,29 @@ export function createIngestionClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ tryTransformationBeforeUpdate( - { - transformationID, - transformationTry, - }: TryTransformationBeforeUpdateProps, - requestOptions?: RequestOptions + { transformationID, transformationTry }: TryTransformationBeforeUpdateProps, + requestOptions?: RequestOptions, ): Promise { if (!transformationID) { - throw new Error( - 'Parameter `transformationID` is required when calling `tryTransformationBeforeUpdate`.' - ); + throw new Error('Parameter `transformationID` is required when calling `tryTransformationBeforeUpdate`.'); } if (!transformationTry) { - throw new Error( - 'Parameter `transformationTry` is required when calling `tryTransformationBeforeUpdate`.' - ); + throw new Error('Parameter `transformationTry` is required when calling `tryTransformationBeforeUpdate`.'); } if (!transformationTry.code) { - throw new Error( - 'Parameter `transformationTry.code` is required when calling `tryTransformationBeforeUpdate`.' - ); + throw new Error('Parameter `transformationTry.code` is required when calling `tryTransformationBeforeUpdate`.'); } if (!transformationTry.sampleRecord) { throw new Error( - 'Parameter `transformationTry.sampleRecord` is required when calling `tryTransformationBeforeUpdate`.' + 'Parameter `transformationTry.sampleRecord` is required when calling `tryTransformationBeforeUpdate`.', ); } const requestPath = '/1/transformations/{transformationID}/try'.replace( '{transformationID}', - encodeURIComponent(transformationID) + encodeURIComponent(transformationID), ); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2584,23 +2198,19 @@ export function createIngestionClient({ */ updateAuthentication( { authenticationID, authenticationUpdate }: UpdateAuthenticationProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!authenticationID) { - throw new Error( - 'Parameter `authenticationID` is required when calling `updateAuthentication`.' - ); + throw new Error('Parameter `authenticationID` is required when calling `updateAuthentication`.'); } if (!authenticationUpdate) { - throw new Error( - 'Parameter `authenticationUpdate` is required when calling `updateAuthentication`.' - ); + throw new Error('Parameter `authenticationUpdate` is required when calling `updateAuthentication`.'); } const requestPath = '/1/authentications/{authenticationID}'.replace( '{authenticationID}', - encodeURIComponent(authenticationID) + encodeURIComponent(authenticationID), ); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2631,23 +2241,19 @@ export function createIngestionClient({ */ updateDestination( { destinationID, destinationUpdate }: UpdateDestinationProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!destinationID) { - throw new Error( - 'Parameter `destinationID` is required when calling `updateDestination`.' - ); + throw new Error('Parameter `destinationID` is required when calling `updateDestination`.'); } if (!destinationUpdate) { - throw new Error( - 'Parameter `destinationUpdate` is required when calling `updateDestination`.' - ); + throw new Error('Parameter `destinationUpdate` is required when calling `updateDestination`.'); } const requestPath = '/1/destinations/{destinationID}'.replace( '{destinationID}', - encodeURIComponent(destinationID) + encodeURIComponent(destinationID), ); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2678,24 +2284,17 @@ export function createIngestionClient({ */ updateSource( { sourceID, sourceUpdate }: UpdateSourceProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!sourceID) { - throw new Error( - 'Parameter `sourceID` is required when calling `updateSource`.' - ); + throw new Error('Parameter `sourceID` is required when calling `updateSource`.'); } if (!sourceUpdate) { - throw new Error( - 'Parameter `sourceUpdate` is required when calling `updateSource`.' - ); + throw new Error('Parameter `sourceUpdate` is required when calling `updateSource`.'); } - const requestPath = '/1/sources/{sourceID}'.replace( - '{sourceID}', - encodeURIComponent(sourceID) - ); + const requestPath = '/1/sources/{sourceID}'.replace('{sourceID}', encodeURIComponent(sourceID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2718,26 +2317,16 @@ export function createIngestionClient({ * @param updateTask.taskUpdate - The taskUpdate object. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - updateTask( - { taskID, taskUpdate }: UpdateTaskProps, - requestOptions?: RequestOptions - ): Promise { + updateTask({ taskID, taskUpdate }: UpdateTaskProps, requestOptions?: RequestOptions): Promise { if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `updateTask`.' - ); + throw new Error('Parameter `taskID` is required when calling `updateTask`.'); } if (!taskUpdate) { - throw new Error( - 'Parameter `taskUpdate` is required when calling `updateTask`.' - ); + throw new Error('Parameter `taskUpdate` is required when calling `updateTask`.'); } - const requestPath = '/2/tasks/{taskID}'.replace( - '{taskID}', - encodeURIComponent(taskID) - ); + const requestPath = '/2/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2762,24 +2351,17 @@ export function createIngestionClient({ */ updateTaskV1( { taskID, taskUpdate }: UpdateTaskV1Props, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `updateTaskV1`.' - ); + throw new Error('Parameter `taskID` is required when calling `updateTaskV1`.'); } if (!taskUpdate) { - throw new Error( - 'Parameter `taskUpdate` is required when calling `updateTaskV1`.' - ); + throw new Error('Parameter `taskUpdate` is required when calling `updateTaskV1`.'); } - const requestPath = '/1/tasks/{taskID}'.replace( - '{taskID}', - encodeURIComponent(taskID) - ); + const requestPath = '/1/tasks/{taskID}'.replace('{taskID}', encodeURIComponent(taskID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2804,34 +2386,26 @@ export function createIngestionClient({ */ updateTransformation( { transformationID, transformationCreate }: UpdateTransformationProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!transformationID) { - throw new Error( - 'Parameter `transformationID` is required when calling `updateTransformation`.' - ); + throw new Error('Parameter `transformationID` is required when calling `updateTransformation`.'); } if (!transformationCreate) { - throw new Error( - 'Parameter `transformationCreate` is required when calling `updateTransformation`.' - ); + throw new Error('Parameter `transformationCreate` is required when calling `updateTransformation`.'); } if (!transformationCreate.code) { - throw new Error( - 'Parameter `transformationCreate.code` is required when calling `updateTransformation`.' - ); + throw new Error('Parameter `transformationCreate.code` is required when calling `updateTransformation`.'); } if (!transformationCreate.name) { - throw new Error( - 'Parameter `transformationCreate.name` is required when calling `updateTransformation`.' - ); + throw new Error('Parameter `transformationCreate.name` is required when calling `updateTransformation`.'); } const requestPath = '/1/transformations/{transformationID}'.replace( '{transformationID}', - encodeURIComponent(transformationID) + encodeURIComponent(transformationID), ); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -2860,7 +2434,7 @@ export function createIngestionClient({ */ validateSource( sourceCreate: SourceCreate, - requestOptions: RequestOptions | undefined = undefined + requestOptions: RequestOptions | undefined = undefined, ): Promise { const requestPath = '/1/sources/validate'; const headers: Headers = {}; @@ -2892,24 +2466,17 @@ export function createIngestionClient({ */ validateSourceBeforeUpdate( { sourceID, sourceUpdate }: ValidateSourceBeforeUpdateProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!sourceID) { - throw new Error( - 'Parameter `sourceID` is required when calling `validateSourceBeforeUpdate`.' - ); + throw new Error('Parameter `sourceID` is required when calling `validateSourceBeforeUpdate`.'); } if (!sourceUpdate) { - throw new Error( - 'Parameter `sourceUpdate` is required when calling `validateSourceBeforeUpdate`.' - ); + throw new Error('Parameter `sourceUpdate` is required when calling `validateSourceBeforeUpdate`.'); } - const requestPath = '/1/sources/{sourceID}/validate'.replace( - '{sourceID}', - encodeURIComponent(sourceID) - ); + const requestPath = '/1/sources/{sourceID}/validate'.replace('{sourceID}', encodeURIComponent(sourceID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; diff --git a/packages/monitoring/builds/browser.ts b/packages/monitoring/builds/browser.ts index 49f0ab4c0..1eaa63cd4 100644 --- a/packages/monitoring/builds/browser.ts +++ b/packages/monitoring/builds/browser.ts @@ -11,10 +11,7 @@ import { } from '@algolia/client-common'; import { createXhrRequester } from '@algolia/requester-browser-xhr'; -import { - createMonitoringClient, - apiClientVersion, -} from '../src/monitoringClient'; +import { createMonitoringClient, apiClientVersion } from '../src/monitoringClient'; export { apiClientVersion } from '../src/monitoringClient'; export * from '../model'; @@ -25,11 +22,7 @@ export * from '../model'; export type MonitoringClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function monitoringClient( - appId: string, - apiKey: string, - options?: ClientOptions -) { +export function monitoringClient(appId: string, apiKey: string, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -52,10 +45,7 @@ export function monitoringClient( responsesCache: createMemoryCache(), requestsCache: createMemoryCache({ serializable: false }), hostsCache: createFallbackableCache({ - caches: [ - createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), - createMemoryCache(), - ], + caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()], }), ...options, }); diff --git a/packages/monitoring/builds/node.ts b/packages/monitoring/builds/node.ts index e779ea4ac..6ac3eead7 100644 --- a/packages/monitoring/builds/node.ts +++ b/packages/monitoring/builds/node.ts @@ -21,11 +21,7 @@ export * from '../model'; export type MonitoringClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function monitoringClient( - appId: string, - apiKey: string, - options?: ClientOptions -) { +export function monitoringClient(appId: string, apiKey: string, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } diff --git a/packages/monitoring/model/clientMethodProps.ts b/packages/monitoring/model/clientMethodProps.ts index f077ad858..188dc50ef 100644 --- a/packages/monitoring/model/clientMethodProps.ts +++ b/packages/monitoring/model/clientMethodProps.ts @@ -46,7 +46,7 @@ export type CustomPostProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** @@ -64,7 +64,7 @@ export type CustomPutProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** diff --git a/packages/monitoring/model/metric.ts b/packages/monitoring/model/metric.ts index f4d678d5e..ec4d9d511 100644 --- a/packages/monitoring/model/metric.ts +++ b/packages/monitoring/model/metric.ts @@ -1,9 +1,3 @@ // 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. -export type Metric = - | '*' - | 'avg_build_time' - | 'cpu_usage' - | 'ram_indexing_usage' - | 'ram_search_usage' - | 'ssd_usage'; +export type Metric = '*' | 'avg_build_time' | 'cpu_usage' | 'ram_indexing_usage' | 'ram_search_usage' | 'ssd_usage'; diff --git a/packages/monitoring/model/status.ts b/packages/monitoring/model/status.ts index e6bdc0fef..e8f1ae3cd 100644 --- a/packages/monitoring/model/status.ts +++ b/packages/monitoring/model/status.ts @@ -3,8 +3,4 @@ /** * Status of the cluster. */ -export type Status = - | 'degraded_performance' - | 'major_outage' - | 'operational' - | 'partial_outage'; +export type Status = 'degraded_performance' | 'major_outage' | 'operational' | 'partial_outage'; diff --git a/packages/monitoring/package.json b/packages/monitoring/package.json index d7bb59ca8..c69fb327f 100644 --- a/packages/monitoring/package.json +++ b/packages/monitoring/package.json @@ -49,8 +49,8 @@ "@algolia/requester-node-http": "5.1.1" }, "devDependencies": { - "@types/node": "22.2.0", - "rollup": "4.20.0", + "@types/node": "22.5.0", + "rollup": "4.21.0", "typescript": "5.5.4" }, "engines": { diff --git a/packages/monitoring/rollup.config.js b/packages/monitoring/rollup.config.js index dbcfa8129..0f45d3972 100644 --- a/packages/monitoring/rollup.config.js +++ b/packages/monitoring/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); \ No newline at end of file diff --git a/packages/monitoring/src/monitoringClient.ts b/packages/monitoring/src/monitoringClient.ts index ccb4a6fff..a3e5f5f43 100644 --- a/packages/monitoring/src/monitoringClient.ts +++ b/packages/monitoring/src/monitoringClient.ts @@ -1,10 +1,6 @@ // 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. -import { - createAuth, - createTransporter, - getAlgoliaAgent, -} from '@algolia/client-common'; +import { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common'; import type { CreateClientOptions, Headers, @@ -36,9 +32,7 @@ import type { StatusResponse } from '../model/statusResponse'; export const apiClientVersion = '1.1.1'; function getDefaultHosts(): Host[] { - return [ - { url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' }, - ]; + return [{ url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' }]; } // eslint-disable-next-line @typescript-eslint/explicit-function-return-type @@ -81,10 +75,7 @@ export function createMonitoringClient({ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties. */ clearCache(): Promise { - return Promise.all([ - transporter.requestsCache.clear(), - transporter.responsesCache.clear(), - ]).then(() => undefined); + return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined); }, /** @@ -114,12 +105,10 @@ export function createMonitoringClient({ */ customDelete( { path, parameters }: CustomDeleteProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customDelete`.' - ); + throw new Error('Parameter `path` is required when calling `customDelete`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -144,14 +133,9 @@ export function createMonitoringClient({ * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - customGet( - { path, parameters }: CustomGetProps, - requestOptions?: RequestOptions - ): Promise> { + customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customGet`.' - ); + throw new Error('Parameter `path` is required when calling `customGet`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -179,12 +163,10 @@ export function createMonitoringClient({ */ customPost( { path, parameters, body }: CustomPostProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPost`.' - ); + throw new Error('Parameter `path` is required when calling `customPost`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -213,12 +195,10 @@ export function createMonitoringClient({ */ customPut( { path, parameters, body }: CustomPutProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPut`.' - ); + throw new Error('Parameter `path` is required when calling `customPut`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -245,18 +225,13 @@ export function createMonitoringClient({ */ getClusterIncidents( { clusters }: GetClusterIncidentsProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!clusters) { - throw new Error( - 'Parameter `clusters` is required when calling `getClusterIncidents`.' - ); + throw new Error('Parameter `clusters` is required when calling `getClusterIncidents`.'); } - const requestPath = '/1/incidents/{clusters}'.replace( - '{clusters}', - encodeURIComponent(clusters) - ); + const requestPath = '/1/incidents/{clusters}'.replace('{clusters}', encodeURIComponent(clusters)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -277,20 +252,12 @@ export function createMonitoringClient({ * @param getClusterStatus.clusters - Subset of clusters, separated by comma. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getClusterStatus( - { clusters }: GetClusterStatusProps, - requestOptions?: RequestOptions - ): Promise { + getClusterStatus({ clusters }: GetClusterStatusProps, requestOptions?: RequestOptions): Promise { if (!clusters) { - throw new Error( - 'Parameter `clusters` is required when calling `getClusterStatus`.' - ); + throw new Error('Parameter `clusters` is required when calling `getClusterStatus`.'); } - const requestPath = '/1/status/{clusters}'.replace( - '{clusters}', - encodeURIComponent(clusters) - ); + const requestPath = '/1/status/{clusters}'.replace('{clusters}', encodeURIComponent(clusters)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -333,18 +300,13 @@ export function createMonitoringClient({ */ getIndexingTime( { clusters }: GetIndexingTimeProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!clusters) { - throw new Error( - 'Parameter `clusters` is required when calling `getIndexingTime`.' - ); + throw new Error('Parameter `clusters` is required when calling `getIndexingTime`.'); } - const requestPath = '/1/indexing/{clusters}'.replace( - '{clusters}', - encodeURIComponent(clusters) - ); + const requestPath = '/1/indexing/{clusters}'.replace('{clusters}', encodeURIComponent(clusters)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -365,20 +327,12 @@ export function createMonitoringClient({ * @param getLatency.clusters - Subset of clusters, separated by comma. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getLatency( - { clusters }: GetLatencyProps, - requestOptions?: RequestOptions - ): Promise { + getLatency({ clusters }: GetLatencyProps, requestOptions?: RequestOptions): Promise { if (!clusters) { - throw new Error( - 'Parameter `clusters` is required when calling `getLatency`.' - ); + throw new Error('Parameter `clusters` is required when calling `getLatency`.'); } - const requestPath = '/1/latency/{clusters}'.replace( - '{clusters}', - encodeURIComponent(clusters) - ); + const requestPath = '/1/latency/{clusters}'.replace('{clusters}', encodeURIComponent(clusters)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -400,20 +354,13 @@ export function createMonitoringClient({ * @param getMetrics.period - Period over which to aggregate the metrics: - `minute`. Aggregate the last minute. 1 data point per 10 seconds. - `hour`. Aggregate the last hour. 1 data point per minute. - `day`. Aggregate the last day. 1 data point per 10 minutes. - `week`. Aggregate the last week. 1 data point per hour. - `month`. Aggregate the last month. 1 data point per day. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getMetrics( - { metric, period }: GetMetricsProps, - requestOptions?: RequestOptions - ): Promise { + getMetrics({ metric, period }: GetMetricsProps, requestOptions?: RequestOptions): Promise { if (!metric) { - throw new Error( - 'Parameter `metric` is required when calling `getMetrics`.' - ); + throw new Error('Parameter `metric` is required when calling `getMetrics`.'); } if (!period) { - throw new Error( - 'Parameter `period` is required when calling `getMetrics`.' - ); + throw new Error('Parameter `period` is required when calling `getMetrics`.'); } const requestPath = '/1/infrastructure/{metric}/period/{period}' @@ -441,18 +388,13 @@ export function createMonitoringClient({ */ getReachability( { clusters }: GetReachabilityProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise>> { if (!clusters) { - throw new Error( - 'Parameter `clusters` is required when calling `getReachability`.' - ); + throw new Error('Parameter `clusters` is required when calling `getReachability`.'); } - const requestPath = '/1/reachability/{clusters}/probes'.replace( - '{clusters}', - encodeURIComponent(clusters) - ); + const requestPath = '/1/reachability/{clusters}/probes'.replace('{clusters}', encodeURIComponent(clusters)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; diff --git a/packages/recommend/builds/browser.ts b/packages/recommend/builds/browser.ts index b2c516ceb..96da26562 100644 --- a/packages/recommend/builds/browser.ts +++ b/packages/recommend/builds/browser.ts @@ -11,10 +11,7 @@ import { } from '@algolia/client-common'; import { createXhrRequester } from '@algolia/requester-browser-xhr'; -import { - createRecommendClient, - apiClientVersion, -} from '../src/recommendClient'; +import { createRecommendClient, apiClientVersion } from '../src/recommendClient'; export { apiClientVersion } from '../src/recommendClient'; export * from '../model'; @@ -25,11 +22,7 @@ export * from '../model'; export type RecommendClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function recommendClient( - appId: string, - apiKey: string, - options?: ClientOptions -) { +export function recommendClient(appId: string, apiKey: string, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } @@ -52,10 +45,7 @@ export function recommendClient( responsesCache: createMemoryCache(), requestsCache: createMemoryCache({ serializable: false }), hostsCache: createFallbackableCache({ - caches: [ - createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), - createMemoryCache(), - ], + caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()], }), ...options, }); diff --git a/packages/recommend/builds/node.ts b/packages/recommend/builds/node.ts index c73c7cfe8..4bd89f555 100644 --- a/packages/recommend/builds/node.ts +++ b/packages/recommend/builds/node.ts @@ -21,11 +21,7 @@ export * from '../model'; export type RecommendClient = ReturnType; // eslint-disable-next-line @typescript-eslint/explicit-function-return-type -export function recommendClient( - appId: string, - apiKey: string, - options?: ClientOptions -) { +export function recommendClient(appId: string, apiKey: string, options?: ClientOptions) { if (!appId || typeof appId !== 'string') { throw new Error('`appId` is missing.'); } diff --git a/packages/recommend/model/alternativesAsExact.ts b/packages/recommend/model/alternativesAsExact.ts index 126646f42..d18409281 100644 --- a/packages/recommend/model/alternativesAsExact.ts +++ b/packages/recommend/model/alternativesAsExact.ts @@ -1,6 +1,3 @@ // 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. -export type AlternativesAsExact = - | 'ignorePlurals' - | 'multiWordsSynonym' - | 'singleWordSynonym'; +export type AlternativesAsExact = 'ignorePlurals' | 'multiWordsSynonym' | 'singleWordSynonym'; diff --git a/packages/recommend/model/baseSearchResponse.ts b/packages/recommend/model/baseSearchResponse.ts index 227c5fb37..bcaf93dfc 100644 --- a/packages/recommend/model/baseSearchResponse.ts +++ b/packages/recommend/model/baseSearchResponse.ts @@ -1,7 +1,7 @@ // 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. import type { Exhaustive } from './exhaustive'; -import type { FacetsStats } from './facetsStats'; +import type { FacetStats } from './facetStats'; import type { Redirect } from './redirect'; import type { RenderingContent } from './renderingContent'; @@ -51,7 +51,7 @@ export type BaseSearchResponse = Record & { /** * Statistics for numerical facets. */ - facets_stats?: Record; + facets_stats?: Record; /** * Index name used for the query. @@ -86,7 +86,7 @@ export type BaseSearchResponse = Record & { /** * Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues. */ - processingTimingsMS?: Record; + processingTimingsMS?: Record; /** * Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set. @@ -110,7 +110,7 @@ export type BaseSearchResponse = Record & { /** * An object with custom data. You can store up to 32kB as custom data. */ - userData?: Record; + userData?: Record; /** * Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). diff --git a/packages/recommend/model/boughtTogetherQuery.ts b/packages/recommend/model/boughtTogetherQuery.ts index 478a11daf..19c909cb9 100644 --- a/packages/recommend/model/boughtTogetherQuery.ts +++ b/packages/recommend/model/boughtTogetherQuery.ts @@ -3,5 +3,4 @@ import type { BaseRecommendRequest } from './baseRecommendRequest'; import type { FrequentlyBoughtTogether } from './frequentlyBoughtTogether'; -export type BoughtTogetherQuery = BaseRecommendRequest & - FrequentlyBoughtTogether; +export type BoughtTogetherQuery = BaseRecommendRequest & FrequentlyBoughtTogether; diff --git a/packages/recommend/model/clientMethodProps.ts b/packages/recommend/model/clientMethodProps.ts index 982b6c019..95c656df4 100644 --- a/packages/recommend/model/clientMethodProps.ts +++ b/packages/recommend/model/clientMethodProps.ts @@ -47,7 +47,7 @@ export type CustomPostProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** @@ -65,7 +65,7 @@ export type CustomPutProps = { /** * Parameters to send with the custom request. */ - body?: Record; + body?: Record; }; /** diff --git a/packages/algoliasearch/lite/model/facetsStats.ts b/packages/recommend/model/facetStats.ts similarity index 94% rename from packages/algoliasearch/lite/model/facetsStats.ts rename to packages/recommend/model/facetStats.ts index 658a047c6..f8bb276a8 100644 --- a/packages/algoliasearch/lite/model/facetsStats.ts +++ b/packages/recommend/model/facetStats.ts @@ -1,6 +1,6 @@ // 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. -export type FacetsStats = { +export type FacetStats = { /** * Minimum value in the results. */ diff --git a/packages/recommend/model/fallbackParams.ts b/packages/recommend/model/fallbackParams.ts index 7838a3206..627a78334 100644 --- a/packages/recommend/model/fallbackParams.ts +++ b/packages/recommend/model/fallbackParams.ts @@ -2,4 +2,4 @@ import type { SearchParamsObject } from './searchParamsObject'; -export type FallbackParams = Record & SearchParamsObject; +export type FallbackParams = Record & SearchParamsObject; diff --git a/packages/recommend/model/index.ts b/packages/recommend/model/index.ts index dd4e31419..9b575c2b8 100644 --- a/packages/recommend/model/index.ts +++ b/packages/recommend/model/index.ts @@ -20,8 +20,8 @@ export * from './exactOnSingleWordQuery'; export * from './exhaustive'; export * from './facetFilters'; export * from './facetOrdering'; +export * from './facetStats'; export * from './facets'; -export * from './facetsStats'; export * from './fallbackParams'; export * from './fbtModel'; export * from './frequentlyBoughtTogether'; diff --git a/packages/recommend/model/recommendModels.ts b/packages/recommend/model/recommendModels.ts index 821358fa4..37757c4c5 100644 --- a/packages/recommend/model/recommendModels.ts +++ b/packages/recommend/model/recommendModels.ts @@ -1,7 +1,3 @@ // 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. -export type RecommendModels = - | 'bought-together' - | 'related-products' - | 'trending-facets' - | 'trending-items'; +export type RecommendModels = 'bought-together' | 'related-products' | 'trending-facets' | 'trending-items'; diff --git a/packages/recommend/model/recommendationsResults.ts b/packages/recommend/model/recommendationsResults.ts index 3688fc364..b8fff9801 100644 --- a/packages/recommend/model/recommendationsResults.ts +++ b/packages/recommend/model/recommendationsResults.ts @@ -4,6 +4,4 @@ import type { BaseSearchResponse } from './baseSearchResponse'; import type { RecommendationsHits } from './recommendationsHits'; import type { SearchPagination } from './searchPagination'; -export type RecommendationsResults = BaseSearchResponse & - RecommendationsHits & - SearchPagination; +export type RecommendationsResults = BaseSearchResponse & RecommendationsHits & SearchPagination; diff --git a/packages/recommend/model/removeWordsIfNoResults.ts b/packages/recommend/model/removeWordsIfNoResults.ts index fbd9ca081..23086007c 100644 --- a/packages/recommend/model/removeWordsIfNoResults.ts +++ b/packages/recommend/model/removeWordsIfNoResults.ts @@ -3,8 +3,4 @@ /** * Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/). */ -export type RemoveWordsIfNoResults = - | 'allOptional' - | 'firstWords' - | 'lastWords' - | 'none'; +export type RemoveWordsIfNoResults = 'allOptional' | 'firstWords' | 'lastWords' | 'none'; diff --git a/packages/recommend/model/searchParams.ts b/packages/recommend/model/searchParams.ts index 5159c0eac..69d7a78ab 100644 --- a/packages/recommend/model/searchParams.ts +++ b/packages/recommend/model/searchParams.ts @@ -2,4 +2,4 @@ import type { SearchParamsObject } from './searchParamsObject'; -export type SearchParams = Record & SearchParamsObject; +export type SearchParams = Record & SearchParamsObject; diff --git a/packages/recommend/package.json b/packages/recommend/package.json index e9aac8f65..ed5cb5f8d 100644 --- a/packages/recommend/package.json +++ b/packages/recommend/package.json @@ -49,8 +49,8 @@ "@algolia/requester-node-http": "5.1.1" }, "devDependencies": { - "@types/node": "22.2.0", - "rollup": "4.20.0", + "@types/node": "22.5.0", + "rollup": "4.21.0", "typescript": "5.5.4" }, "engines": { diff --git a/packages/recommend/rollup.config.js b/packages/recommend/rollup.config.js index dbcfa8129..0f45d3972 100644 --- a/packages/recommend/rollup.config.js +++ b/packages/recommend/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); \ No newline at end of file diff --git a/packages/recommend/src/recommendClient.ts b/packages/recommend/src/recommendClient.ts index f6728af63..9331a6b21 100644 --- a/packages/recommend/src/recommendClient.ts +++ b/packages/recommend/src/recommendClient.ts @@ -1,11 +1,6 @@ // 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. -import { - createAuth, - createTransporter, - getAlgoliaAgent, - shuffle, -} from '@algolia/client-common'; +import { createAuth, createTransporter, getAlgoliaAgent, shuffle } from '@algolia/client-common'; import type { CreateClientOptions, Headers, @@ -66,7 +61,7 @@ function getDefaultHosts(appId: string): Host[] { accept: 'readWrite', protocol: 'https', }, - ]) + ]), ); } @@ -110,10 +105,7 @@ export function createRecommendClient({ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties. */ clearCache(): Promise { - return Promise.all([ - transporter.requestsCache.clear(), - transporter.responsesCache.clear(), - ]).then(() => undefined); + return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined); }, /** @@ -143,12 +135,10 @@ export function createRecommendClient({ */ customDelete( { path, parameters }: CustomDeleteProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customDelete`.' - ); + throw new Error('Parameter `path` is required when calling `customDelete`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -173,14 +163,9 @@ export function createRecommendClient({ * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - customGet( - { path, parameters }: CustomGetProps, - requestOptions?: RequestOptions - ): Promise> { + customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customGet`.' - ); + throw new Error('Parameter `path` is required when calling `customGet`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -208,12 +193,10 @@ export function createRecommendClient({ */ customPost( { path, parameters, body }: CustomPostProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPost`.' - ); + throw new Error('Parameter `path` is required when calling `customPost`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -242,12 +225,10 @@ export function createRecommendClient({ */ customPut( { path, parameters, body }: CustomPutProps, - requestOptions?: RequestOptions - ): Promise> { + requestOptions?: RequestOptions, + ): Promise> { if (!path) { - throw new Error( - 'Parameter `path` is required when calling `customPut`.' - ); + throw new Error('Parameter `path` is required when calling `customPut`.'); } const requestPath = '/{path}'.replace('{path}', path); @@ -279,31 +260,24 @@ export function createRecommendClient({ */ deleteRecommendRule( { indexName, model, objectID }: DeleteRecommendRuleProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `deleteRecommendRule`.' - ); + throw new Error('Parameter `indexName` is required when calling `deleteRecommendRule`.'); } if (!model) { - throw new Error( - 'Parameter `model` is required when calling `deleteRecommendRule`.' - ); + throw new Error('Parameter `model` is required when calling `deleteRecommendRule`.'); } if (!objectID) { - throw new Error( - 'Parameter `objectID` is required when calling `deleteRecommendRule`.' - ); + throw new Error('Parameter `objectID` is required when calling `deleteRecommendRule`.'); } - const requestPath = - '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}' - .replace('{indexName}', encodeURIComponent(indexName)) - .replace('{model}', encodeURIComponent(model)) - .replace('{objectID}', encodeURIComponent(objectID)); + const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}' + .replace('{indexName}', encodeURIComponent(indexName)) + .replace('{model}', encodeURIComponent(model)) + .replace('{objectID}', encodeURIComponent(objectID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -331,31 +305,24 @@ export function createRecommendClient({ */ getRecommendRule( { indexName, model, objectID }: GetRecommendRuleProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `getRecommendRule`.' - ); + throw new Error('Parameter `indexName` is required when calling `getRecommendRule`.'); } if (!model) { - throw new Error( - 'Parameter `model` is required when calling `getRecommendRule`.' - ); + throw new Error('Parameter `model` is required when calling `getRecommendRule`.'); } if (!objectID) { - throw new Error( - 'Parameter `objectID` is required when calling `getRecommendRule`.' - ); + throw new Error('Parameter `objectID` is required when calling `getRecommendRule`.'); } - const requestPath = - '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}' - .replace('{indexName}', encodeURIComponent(indexName)) - .replace('{model}', encodeURIComponent(model)) - .replace('{objectID}', encodeURIComponent(objectID)); + const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}' + .replace('{indexName}', encodeURIComponent(indexName)) + .replace('{model}', encodeURIComponent(model)) + .replace('{objectID}', encodeURIComponent(objectID)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; @@ -383,24 +350,18 @@ export function createRecommendClient({ */ getRecommendStatus( { indexName, model, taskID }: GetRecommendStatusProps, - requestOptions?: RequestOptions + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `getRecommendStatus`.' - ); + throw new Error('Parameter `indexName` is required when calling `getRecommendStatus`.'); } if (!model) { - throw new Error( - 'Parameter `model` is required when calling `getRecommendStatus`.' - ); + throw new Error('Parameter `model` is required when calling `getRecommendStatus`.'); } if (!taskID) { - throw new Error( - 'Parameter `taskID` is required when calling `getRecommendStatus`.' - ); + throw new Error('Parameter `taskID` is required when calling `getRecommendStatus`.'); } const requestPath = '/1/indexes/{indexName}/{model}/task/{taskID}' @@ -430,10 +391,8 @@ export function createRecommendClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ getRecommendations( - getRecommendationsParams: - | GetRecommendationsParams - | LegacyGetRecommendationsParams, - requestOptions?: RequestOptions + getRecommendationsParams: GetRecommendationsParams | LegacyGetRecommendationsParams, + requestOptions?: RequestOptions, ): Promise { if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) { const newSignatureRequest: GetRecommendationsParams = { @@ -445,15 +404,11 @@ export function createRecommendClient({ } if (!getRecommendationsParams) { - throw new Error( - 'Parameter `getRecommendationsParams` is required when calling `getRecommendations`.' - ); + throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.'); } if (!getRecommendationsParams.requests) { - throw new Error( - 'Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.' - ); + throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.'); } const requestPath = '/1/indexes/*/recommendations'; @@ -486,29 +441,20 @@ export function createRecommendClient({ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ searchRecommendRules( - { - indexName, - model, - searchRecommendRulesParams, - }: SearchRecommendRulesProps, - requestOptions?: RequestOptions + { indexName, model, searchRecommendRulesParams }: SearchRecommendRulesProps, + requestOptions?: RequestOptions, ): Promise { if (!indexName) { - throw new Error( - 'Parameter `indexName` is required when calling `searchRecommendRules`.' - ); + throw new Error('Parameter `indexName` is required when calling `searchRecommendRules`.'); } if (!model) { - throw new Error( - 'Parameter `model` is required when calling `searchRecommendRules`.' - ); + throw new Error('Parameter `model` is required when calling `searchRecommendRules`.'); } - const requestPath = - '/1/indexes/{indexName}/{model}/recommend/rules/search' - .replace('{indexName}', encodeURIComponent(indexName)) - .replace('{model}', encodeURIComponent(model)); + const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/search' + .replace('{indexName}', encodeURIComponent(indexName)) + .replace('{model}', encodeURIComponent(model)); const headers: Headers = {}; const queryParameters: QueryParameters = {}; diff --git a/packages/requester-browser-xhr/package.json b/packages/requester-browser-xhr/package.json index 39f9c8c61..9b2700ec1 100644 --- a/packages/requester-browser-xhr/package.json +++ b/packages/requester-browser-xhr/package.json @@ -26,13 +26,13 @@ "@algolia/client-common": "5.1.1" }, "devDependencies": { - "@babel/preset-env": "7.25.3", + "@babel/preset-env": "7.25.4", "@babel/preset-typescript": "7.24.7", "@types/jest": "29.5.12", - "@types/node": "20.14.14", + "@types/node": "22.5.0", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", - "ts-jest": "29.2.4", + "ts-jest": "29.2.5", "typescript": "5.5.4", "xhr-mock": "2.5.1" }, diff --git a/packages/requester-browser-xhr/rollup.config.js b/packages/requester-browser-xhr/rollup.config.js index 85ae53895..39acfc260 100644 --- a/packages/requester-browser-xhr/rollup.config.js +++ b/packages/requester-browser-xhr/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); diff --git a/packages/requester-fetch/package.json b/packages/requester-fetch/package.json index 15a893ca1..d33c4a8c7 100644 --- a/packages/requester-fetch/package.json +++ b/packages/requester-fetch/package.json @@ -26,14 +26,14 @@ "@algolia/client-common": "5.1.1" }, "devDependencies": { - "@babel/preset-env": "7.25.3", + "@babel/preset-env": "7.25.4", "@babel/preset-typescript": "7.24.7", "@types/jest": "29.5.12", - "@types/node": "20.14.14", + "@types/node": "22.5.0", "cross-fetch": "4.0.0", "jest": "29.7.0", - "nock": "13.5.4", - "ts-jest": "29.2.4", + "nock": "13.5.5", + "ts-jest": "29.2.5", "typescript": "5.5.4" }, "engines": { diff --git a/packages/requester-fetch/rollup.config.js b/packages/requester-fetch/rollup.config.js index 85ae53895..39acfc260 100644 --- a/packages/requester-fetch/rollup.config.js +++ b/packages/requester-fetch/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); diff --git a/packages/requester-node-http/package.json b/packages/requester-node-http/package.json index 6da5125af..0585db743 100644 --- a/packages/requester-node-http/package.json +++ b/packages/requester-node-http/package.json @@ -26,13 +26,13 @@ "@algolia/client-common": "5.1.1" }, "devDependencies": { - "@babel/preset-env": "7.25.3", + "@babel/preset-env": "7.25.4", "@babel/preset-typescript": "7.24.7", "@types/jest": "29.5.12", - "@types/node": "20.14.14", + "@types/node": "22.5.0", "jest": "29.7.0", - "nock": "13.5.4", - "ts-jest": "29.2.4", + "nock": "13.5.5", + "ts-jest": "29.2.5", "typescript": "5.5.4" }, "engines": { diff --git a/packages/requester-node-http/rollup.config.js b/packages/requester-node-http/rollup.config.js index 85ae53895..39acfc260 100644 --- a/packages/requester-node-http/rollup.config.js +++ b/packages/requester-node-http/rollup.config.js @@ -1,5 +1,5 @@ import { buildConfigs } from '../../base.rollup.config.js'; -import pkg from './package.json' assert { type: 'json' }; +import pkg from './package.json' with { type: 'json' }; export default buildConfigs(pkg); diff --git a/yarn.lock b/yarn.lock index f45696270..3f0bfb527 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,8 +12,8 @@ __metadata: "@algolia/client-common": "npm:5.1.1" "@algolia/requester-browser-xhr": "npm:5.1.1" "@algolia/requester-node-http": "npm:5.1.1" - "@types/node": "npm:22.2.0" - rollup: "npm:4.20.0" + "@types/node": "npm:22.5.0" + rollup: "npm:4.21.0" typescript: "npm:5.5.4" languageName: unknown linkType: soft @@ -25,8 +25,8 @@ __metadata: "@algolia/client-common": "npm:5.1.1" "@algolia/requester-browser-xhr": "npm:5.1.1" "@algolia/requester-node-http": "npm:5.1.1" - "@types/node": "npm:22.2.0" - rollup: "npm:4.20.0" + "@types/node": "npm:22.5.0" + rollup: "npm:4.21.0" typescript: "npm:5.5.4" languageName: unknown linkType: soft @@ -35,13 +35,13 @@ __metadata: version: 0.0.0-use.local resolution: "@algolia/client-common@workspace:packages/client-common" dependencies: - "@babel/preset-env": "npm:7.25.3" + "@babel/preset-env": "npm:7.25.4" "@babel/preset-typescript": "npm:7.24.7" "@types/jest": "npm:29.5.12" - "@types/node": "npm:20.14.14" + "@types/node": "npm:22.5.0" jest: "npm:29.7.0" jest-environment-jsdom: "npm:29.7.0" - ts-jest: "npm:29.2.4" + ts-jest: "npm:29.2.5" typescript: "npm:5.5.4" languageName: unknown linkType: soft @@ -53,8 +53,8 @@ __metadata: "@algolia/client-common": "npm:5.1.1" "@algolia/requester-browser-xhr": "npm:5.1.1" "@algolia/requester-node-http": "npm:5.1.1" - "@types/node": "npm:22.2.0" - rollup: "npm:4.20.0" + "@types/node": "npm:22.5.0" + rollup: "npm:4.21.0" typescript: "npm:5.5.4" languageName: unknown linkType: soft @@ -66,8 +66,8 @@ __metadata: "@algolia/client-common": "npm:5.1.1" "@algolia/requester-browser-xhr": "npm:5.1.1" "@algolia/requester-node-http": "npm:5.1.1" - "@types/node": "npm:22.2.0" - rollup: "npm:4.20.0" + "@types/node": "npm:22.5.0" + rollup: "npm:4.21.0" typescript: "npm:5.5.4" languageName: unknown linkType: soft @@ -79,8 +79,8 @@ __metadata: "@algolia/client-common": "npm:5.1.1" "@algolia/requester-browser-xhr": "npm:5.1.1" "@algolia/requester-node-http": "npm:5.1.1" - "@types/node": "npm:22.2.0" - rollup: "npm:4.20.0" + "@types/node": "npm:22.5.0" + rollup: "npm:4.21.0" typescript: "npm:5.5.4" languageName: unknown linkType: soft @@ -92,8 +92,8 @@ __metadata: "@algolia/client-common": "npm:5.1.1" "@algolia/requester-browser-xhr": "npm:5.1.1" "@algolia/requester-node-http": "npm:5.1.1" - "@types/node": "npm:22.2.0" - rollup: "npm:4.20.0" + "@types/node": "npm:22.5.0" + rollup: "npm:4.21.0" typescript: "npm:5.5.4" languageName: unknown linkType: soft @@ -105,8 +105,8 @@ __metadata: "@algolia/client-common": "npm:5.1.1" "@algolia/requester-browser-xhr": "npm:5.1.1" "@algolia/requester-node-http": "npm:5.1.1" - "@types/node": "npm:22.2.0" - rollup: "npm:4.20.0" + "@types/node": "npm:22.5.0" + rollup: "npm:4.21.0" typescript: "npm:5.5.4" languageName: unknown linkType: soft @@ -118,8 +118,8 @@ __metadata: "@algolia/client-common": "npm:5.1.1" "@algolia/requester-browser-xhr": "npm:5.1.1" "@algolia/requester-node-http": "npm:5.1.1" - "@types/node": "npm:22.2.0" - rollup: "npm:4.20.0" + "@types/node": "npm:22.5.0" + rollup: "npm:4.21.0" typescript: "npm:5.5.4" languageName: unknown linkType: soft @@ -131,8 +131,8 @@ __metadata: "@algolia/client-common": "npm:5.1.1" "@algolia/requester-browser-xhr": "npm:5.1.1" "@algolia/requester-node-http": "npm:5.1.1" - "@types/node": "npm:22.2.0" - rollup: "npm:4.20.0" + "@types/node": "npm:22.5.0" + rollup: "npm:4.21.0" typescript: "npm:5.5.4" languageName: unknown linkType: soft @@ -144,8 +144,8 @@ __metadata: "@algolia/client-common": "npm:5.1.1" "@algolia/requester-browser-xhr": "npm:5.1.1" "@algolia/requester-node-http": "npm:5.1.1" - "@types/node": "npm:22.2.0" - rollup: "npm:4.20.0" + "@types/node": "npm:22.5.0" + rollup: "npm:4.21.0" typescript: "npm:5.5.4" languageName: unknown linkType: soft @@ -155,13 +155,13 @@ __metadata: resolution: "@algolia/requester-browser-xhr@workspace:packages/requester-browser-xhr" dependencies: "@algolia/client-common": "npm:5.1.1" - "@babel/preset-env": "npm:7.25.3" + "@babel/preset-env": "npm:7.25.4" "@babel/preset-typescript": "npm:7.24.7" "@types/jest": "npm:29.5.12" - "@types/node": "npm:20.14.14" + "@types/node": "npm:22.5.0" jest: "npm:29.7.0" jest-environment-jsdom: "npm:29.7.0" - ts-jest: "npm:29.2.4" + ts-jest: "npm:29.2.5" typescript: "npm:5.5.4" xhr-mock: "npm:2.5.1" languageName: unknown @@ -172,14 +172,14 @@ __metadata: resolution: "@algolia/requester-fetch@workspace:packages/requester-fetch" dependencies: "@algolia/client-common": "npm:5.1.1" - "@babel/preset-env": "npm:7.25.3" + "@babel/preset-env": "npm:7.25.4" "@babel/preset-typescript": "npm:7.24.7" "@types/jest": "npm:29.5.12" - "@types/node": "npm:20.14.14" + "@types/node": "npm:22.5.0" cross-fetch: "npm:4.0.0" jest: "npm:29.7.0" - nock: "npm:13.5.4" - ts-jest: "npm:29.2.4" + nock: "npm:13.5.5" + ts-jest: "npm:29.2.5" typescript: "npm:5.5.4" languageName: unknown linkType: soft @@ -189,13 +189,13 @@ __metadata: resolution: "@algolia/requester-node-http@workspace:packages/requester-node-http" dependencies: "@algolia/client-common": "npm:5.1.1" - "@babel/preset-env": "npm:7.25.3" + "@babel/preset-env": "npm:7.25.4" "@babel/preset-typescript": "npm:7.24.7" "@types/jest": "npm:29.5.12" - "@types/node": "npm:20.14.14" + "@types/node": "npm:22.5.0" jest: "npm:29.7.0" - nock: "npm:13.5.4" - ts-jest: "npm:29.2.4" + nock: "npm:13.5.5" + ts-jest: "npm:29.2.5" typescript: "npm:5.5.4" languageName: unknown linkType: soft @@ -220,10 +220,10 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.25.2": - version: 7.25.2 - resolution: "@babel/compat-data@npm:7.25.2" - checksum: 10/fd61de9303db3177fc98173571f81f3f551eac5c9f839c05ad02818b11fe77a74daa632abebf7f423fbb4a29976ae9141e0d2bd7517746a0ff3d74cb659ad33a +"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.25.2, @babel/compat-data@npm:^7.25.4": + version: 7.25.4 + resolution: "@babel/compat-data@npm:7.25.4" + checksum: 10/d37a8936cc355a9ca3050102e03d179bdae26bd2e5c99a977637376c192b23637a039795f153c849437a086727628c9860e2c6af92d7151396e2362c09176337 languageName: node linkType: hard @@ -250,15 +250,15 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.25.0, @babel/generator@npm:^7.7.2": - version: 7.25.0 - resolution: "@babel/generator@npm:7.25.0" +"@babel/generator@npm:^7.25.0, @babel/generator@npm:^7.25.4, @babel/generator@npm:^7.7.2": + version: 7.25.5 + resolution: "@babel/generator@npm:7.25.5" dependencies: - "@babel/types": "npm:^7.25.0" + "@babel/types": "npm:^7.25.4" "@jridgewell/gen-mapping": "npm:^0.3.5" "@jridgewell/trace-mapping": "npm:^0.3.25" jsesc: "npm:^2.5.1" - checksum: 10/de3ce2ae7aa0c9585260556ca5a81ce2ce6b8269e3260d7bb4e47a74661af715184ca6343e9906c22e4dd3eed5ce39977dfaf6cded4d2d8968fa096c7cf66697 + checksum: 10/e6d046afe739cfa706c40c127b7436731acb2a3146d408a7d89dbf16448491b35bc09b7d285cc19c2c1f8980d74b5a99df200d67c859bb5260986614685b0770 languageName: node linkType: hard @@ -294,24 +294,24 @@ __metadata: languageName: node linkType: hard -"@babel/helper-create-class-features-plugin@npm:^7.24.7, @babel/helper-create-class-features-plugin@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/helper-create-class-features-plugin@npm:7.25.0" +"@babel/helper-create-class-features-plugin@npm:^7.24.7, @babel/helper-create-class-features-plugin@npm:^7.25.0, @babel/helper-create-class-features-plugin@npm:^7.25.4": + version: 7.25.4 + resolution: "@babel/helper-create-class-features-plugin@npm:7.25.4" dependencies: "@babel/helper-annotate-as-pure": "npm:^7.24.7" "@babel/helper-member-expression-to-functions": "npm:^7.24.8" "@babel/helper-optimise-call-expression": "npm:^7.24.7" "@babel/helper-replace-supers": "npm:^7.25.0" "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.24.7" - "@babel/traverse": "npm:^7.25.0" + "@babel/traverse": "npm:^7.25.4" semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/d0f6b63bd3f6da5204200ab7bb43ccc04fe75256aacf53e5dd60d5f56f5cb1bc7c8b315ecbbc4edca53aa71021ac9322376d7a4b2ee57166b8660488766d2784 + checksum: 10/47218da9fd964af30d41f0635d9e33eed7518e03aa8f10c3eb8a563bb2c14f52be3e3199db5912ae0e26058c23bb511c811e565c55ecec09427b04b867ed13c2 languageName: node linkType: hard -"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.24.7, @babel/helper-create-regexp-features-plugin@npm:^7.25.0": +"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.24.7, @babel/helper-create-regexp-features-plugin@npm:^7.25.0, @babel/helper-create-regexp-features-plugin@npm:^7.25.2": version: 7.25.2 resolution: "@babel/helper-create-regexp-features-plugin@npm:7.25.2" dependencies: @@ -489,14 +489,14 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.3": - version: 7.25.3 - resolution: "@babel/parser@npm:7.25.3" +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.4": + version: 7.25.4 + resolution: "@babel/parser@npm:7.25.4" dependencies: - "@babel/types": "npm:^7.25.2" + "@babel/types": "npm:^7.25.4" bin: parser: ./bin/babel-parser.js - checksum: 10/7bd57e89110bdc9cffe0ef2f2286f1cfb9bbb3aa1d9208c287e0bf6a1eb4cfe6ab33958876ebc59aafcbe3e2381c4449240fc7cc2ff32b79bc9db89cd52fc779 + checksum: 10/343b8a76c43549e370fe96f4f6d564382a6cdff60e9c3b8a594c51e4cefd58ec9945e82e8c4dfbf15ac865a04e4b29806531440760748e28568e6aec21bc9cb5 languageName: node linkType: hard @@ -590,7 +590,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-class-properties@npm:^7.12.13, @babel/plugin-syntax-class-properties@npm:^7.8.3": +"@babel/plugin-syntax-class-properties@npm:^7.12.13": version: 7.12.13 resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" dependencies: @@ -656,7 +656,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-meta@npm:^7.10.4, @babel/plugin-syntax-import-meta@npm:^7.8.3": +"@babel/plugin-syntax-import-meta@npm:^7.10.4": version: 7.10.4 resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" dependencies: @@ -689,7 +689,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4, @babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": +"@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4": version: 7.10.4 resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" dependencies: @@ -711,7 +711,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-numeric-separator@npm:^7.10.4, @babel/plugin-syntax-numeric-separator@npm:^7.8.3": +"@babel/plugin-syntax-numeric-separator@npm:^7.10.4": version: 7.10.4 resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" dependencies: @@ -766,7 +766,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-top-level-await@npm:^7.14.5, @babel/plugin-syntax-top-level-await@npm:^7.8.3": +"@babel/plugin-syntax-top-level-await@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" dependencies: @@ -778,13 +778,13 @@ __metadata: linkType: hard "@babel/plugin-syntax-typescript@npm:^7.24.7, @babel/plugin-syntax-typescript@npm:^7.7.2": - version: 7.24.7 - resolution: "@babel/plugin-syntax-typescript@npm:7.24.7" + version: 7.25.4 + resolution: "@babel/plugin-syntax-typescript@npm:7.25.4" dependencies: - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.24.8" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/2518cc06323f5673c93142935879c112fea0ee836dfa9a9ec744fc972fdeaf22a06fe631c23817562aaaddadf64626a4fbba98c300b3e2c828f48f0f1cca0ce0 + checksum: 10/0771b45a35fd536cd3b3a48e5eda0f53e2d4f4a0ca07377cc247efa39eaf6002ed1c478106aad2650e54aefaebcb4f34f3284c4ae9252695dbd944bf66addfb0 languageName: node linkType: hard @@ -811,17 +811,17 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-async-generator-functions@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.25.0" +"@babel/plugin-transform-async-generator-functions@npm:^7.25.4": + version: 7.25.4 + resolution: "@babel/plugin-transform-async-generator-functions@npm:7.25.4" dependencies: "@babel/helper-plugin-utils": "npm:^7.24.8" "@babel/helper-remap-async-to-generator": "npm:^7.25.0" "@babel/plugin-syntax-async-generators": "npm:^7.8.4" - "@babel/traverse": "npm:^7.25.0" + "@babel/traverse": "npm:^7.25.4" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/c65757490005234719a9614dbaf5004ca815612eff251edf95d4149fb74f42ebf91ff079f6b3594b6aa93eec6f4b6d2cda9f2c924f6217bb0422896be58ed0fe + checksum: 10/0004d910bbec3ef916acf5c7cf8b11671e65d2dd425a82f1101838b9b6243bfdf9578335584d9dedd20acc162796b687930e127c6042484e05b758af695e6cb8 languageName: node linkType: hard @@ -860,15 +860,15 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-class-properties@npm:7.24.7, @babel/plugin-transform-class-properties@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-class-properties@npm:7.24.7" +"@babel/plugin-transform-class-properties@npm:7.25.4, @babel/plugin-transform-class-properties@npm:^7.25.4": + version: 7.25.4 + resolution: "@babel/plugin-transform-class-properties@npm:7.25.4" dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-create-class-features-plugin": "npm:^7.25.4" + "@babel/helper-plugin-utils": "npm:^7.24.8" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/1c6f645dd3889257028f27bfbb04526ac7676763a923fc8203aa79aa5232820e0201cb858c73b684b1922327af10304121ac013c7b756876d54560a9c1a7bc79 + checksum: 10/203a21384303d66fb5d841b77cba8b8994623ff4d26d208e3d05b36858c4919626a8d74871fa4b9195310c2e7883bf180359c4f5a76481ea55190c224d9746f4 languageName: node linkType: hard @@ -885,19 +885,19 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-classes@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/plugin-transform-classes@npm:7.25.0" +"@babel/plugin-transform-classes@npm:^7.25.4": + version: 7.25.4 + resolution: "@babel/plugin-transform-classes@npm:7.25.4" dependencies: "@babel/helper-annotate-as-pure": "npm:^7.24.7" - "@babel/helper-compilation-targets": "npm:^7.24.8" + "@babel/helper-compilation-targets": "npm:^7.25.2" "@babel/helper-plugin-utils": "npm:^7.24.8" "@babel/helper-replace-supers": "npm:^7.25.0" - "@babel/traverse": "npm:^7.25.0" + "@babel/traverse": "npm:^7.25.4" globals: "npm:^11.1.0" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/59aeb33b91e462a9b01cc9691c6a27e6601c5b76d83e3e4f95fef4086c6561e3557597847fe5243006542723fe4288d8fa6824544b1d94bb3104438f4fd96ebc + checksum: 10/17db5889803529bec366c6f0602687fdd605c2fec8cb6fe918261cb55cd89e9d8c9aa2aa6f3fd64d36492ce02d7d0752b09a284b0f833c1185f7dad9b9506310 languageName: node linkType: hard @@ -1226,15 +1226,15 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-private-methods@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-private-methods@npm:7.24.7" +"@babel/plugin-transform-private-methods@npm:^7.25.4": + version: 7.25.4 + resolution: "@babel/plugin-transform-private-methods@npm:7.25.4" dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-create-class-features-plugin": "npm:^7.25.4" + "@babel/helper-plugin-utils": "npm:^7.24.8" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/5338df2aae53c43e6a7ea0c44f20a1100709778769c7e42d4901a61945c3200ba0e7fca83832f48932423a68528219fbea233cb5b8741a2501fdecbacdc08292 + checksum: 10/d5c29ba121d6ce40e8055a632c32e69006c513607145a29701f93b416a8c53a60e53565df417218e2d8b7f1ba73adb837601e8e9d0a3215da50e4c9507f9f1fa languageName: node linkType: hard @@ -1286,19 +1286,19 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-runtime@npm:7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-runtime@npm:7.24.7" +"@babel/plugin-transform-runtime@npm:7.25.4": + version: 7.25.4 + resolution: "@babel/plugin-transform-runtime@npm:7.25.4" dependencies: "@babel/helper-module-imports": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-plugin-utils": "npm:^7.24.8" babel-plugin-polyfill-corejs2: "npm:^0.4.10" - babel-plugin-polyfill-corejs3: "npm:^0.10.1" + babel-plugin-polyfill-corejs3: "npm:^0.10.6" babel-plugin-polyfill-regenerator: "npm:^0.6.1" semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/6f82f2104394d6efef3ba5b38474018f1072d524087eb223776dd55cf8ec8885e813a73004c95218f37de7c0dbaa1a136d2e359cee8cf9ffb3f2e130a3aeb99a + checksum: 10/081dcc4fb8ae86d80b6b261e7fe55d4876995aa28011813331a14de5b9ecd845c938b6bd688d95febacd72b3f446e1439582e81cee67447c73b78c514849ddde languageName: node linkType: hard @@ -1408,23 +1408,23 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-sets-regex@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.24.7" +"@babel/plugin-transform-unicode-sets-regex@npm:^7.25.4": + version: 7.25.4 + resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.25.4" dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.24.7" - "@babel/helper-plugin-utils": "npm:^7.24.7" + "@babel/helper-create-regexp-features-plugin": "npm:^7.25.2" + "@babel/helper-plugin-utils": "npm:^7.24.8" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/183b72d5987dc93f9971667ce3f26d28b0e1058e71b129733dd9d5282aecba4c062b67c9567526780d2defd2bfbf950ca58d8306dc90b2761fd1e960d867ddb7 + checksum: 10/d5d07d17932656fa4d62fd67ecaa1a5e4c2e92365a924f1a2a8cf8108762f137a30cd55eb3a7d0504258f27a19ad0decca6b62a5c37a5aada709cbb46c4a871f languageName: node linkType: hard -"@babel/preset-env@npm:7.25.3": - version: 7.25.3 - resolution: "@babel/preset-env@npm:7.25.3" +"@babel/preset-env@npm:7.25.4": + version: 7.25.4 + resolution: "@babel/preset-env@npm:7.25.4" dependencies: - "@babel/compat-data": "npm:^7.25.2" + "@babel/compat-data": "npm:^7.25.4" "@babel/helper-compilation-targets": "npm:^7.25.2" "@babel/helper-plugin-utils": "npm:^7.24.8" "@babel/helper-validator-option": "npm:^7.24.8" @@ -1453,13 +1453,13 @@ __metadata: "@babel/plugin-syntax-top-level-await": "npm:^7.14.5" "@babel/plugin-syntax-unicode-sets-regex": "npm:^7.18.6" "@babel/plugin-transform-arrow-functions": "npm:^7.24.7" - "@babel/plugin-transform-async-generator-functions": "npm:^7.25.0" + "@babel/plugin-transform-async-generator-functions": "npm:^7.25.4" "@babel/plugin-transform-async-to-generator": "npm:^7.24.7" "@babel/plugin-transform-block-scoped-functions": "npm:^7.24.7" "@babel/plugin-transform-block-scoping": "npm:^7.25.0" - "@babel/plugin-transform-class-properties": "npm:^7.24.7" + "@babel/plugin-transform-class-properties": "npm:^7.25.4" "@babel/plugin-transform-class-static-block": "npm:^7.24.7" - "@babel/plugin-transform-classes": "npm:^7.25.0" + "@babel/plugin-transform-classes": "npm:^7.25.4" "@babel/plugin-transform-computed-properties": "npm:^7.24.7" "@babel/plugin-transform-destructuring": "npm:^7.24.8" "@babel/plugin-transform-dotall-regex": "npm:^7.24.7" @@ -1487,7 +1487,7 @@ __metadata: "@babel/plugin-transform-optional-catch-binding": "npm:^7.24.7" "@babel/plugin-transform-optional-chaining": "npm:^7.24.8" "@babel/plugin-transform-parameters": "npm:^7.24.7" - "@babel/plugin-transform-private-methods": "npm:^7.24.7" + "@babel/plugin-transform-private-methods": "npm:^7.25.4" "@babel/plugin-transform-private-property-in-object": "npm:^7.24.7" "@babel/plugin-transform-property-literals": "npm:^7.24.7" "@babel/plugin-transform-regenerator": "npm:^7.24.7" @@ -1500,16 +1500,16 @@ __metadata: "@babel/plugin-transform-unicode-escapes": "npm:^7.24.7" "@babel/plugin-transform-unicode-property-regex": "npm:^7.24.7" "@babel/plugin-transform-unicode-regex": "npm:^7.24.7" - "@babel/plugin-transform-unicode-sets-regex": "npm:^7.24.7" + "@babel/plugin-transform-unicode-sets-regex": "npm:^7.25.4" "@babel/preset-modules": "npm:0.1.6-no-external-plugins" babel-plugin-polyfill-corejs2: "npm:^0.4.10" - babel-plugin-polyfill-corejs3: "npm:^0.10.4" + babel-plugin-polyfill-corejs3: "npm:^0.10.6" babel-plugin-polyfill-regenerator: "npm:^0.6.1" core-js-compat: "npm:^3.37.1" semver: "npm:^6.3.1" peerDependencies: "@babel/core": ^7.0.0-0 - checksum: 10/293c32dee33f138d22cea0c0e163b6d79ef3860ac269921a438edb4adbfa53976ce2cd3f7a79408c8e52c852b5feda45abdbc986a54e9d9aa0b6680d7a371a58 + checksum: 10/45ca65bdc7fa11ca51167804052460eda32bf2e6620c7ba998e2d95bc867595913532ee7d748e97e808eabcc66aabe796bd75c59014d996ec8183fa5a7245862 languageName: node linkType: hard @@ -1548,12 +1548,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:7.25.0, @babel/runtime@npm:^7.8.4": - version: 7.25.0 - resolution: "@babel/runtime@npm:7.25.0" +"@babel/runtime@npm:7.25.4, @babel/runtime@npm:^7.8.4": + version: 7.25.4 + resolution: "@babel/runtime@npm:7.25.4" dependencies: regenerator-runtime: "npm:^0.14.0" - checksum: 10/6870e9e0e9125075b3aeba49a266f442b10820bfc693019eb6c1785c5a0edbe927e98b8238662cdcdba17842107c040386c3b69f39a0a3b217f9d00ffe685b27 + checksum: 10/70d2a420c24a3289ea6c4addaf3a1c4186bc3d001c92445faa3cd7601d7d2fbdb32c63b3a26b9771e20ff2f511fa76b726bf256f823cdb95bc37b8eadbd02f70 languageName: node linkType: hard @@ -1568,29 +1568,29 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.24.8, @babel/traverse@npm:^7.25.0, @babel/traverse@npm:^7.25.1, @babel/traverse@npm:^7.25.2, @babel/traverse@npm:^7.25.3": - version: 7.25.3 - resolution: "@babel/traverse@npm:7.25.3" +"@babel/traverse@npm:^7.24.7, @babel/traverse@npm:^7.24.8, @babel/traverse@npm:^7.25.0, @babel/traverse@npm:^7.25.1, @babel/traverse@npm:^7.25.2, @babel/traverse@npm:^7.25.3, @babel/traverse@npm:^7.25.4": + version: 7.25.4 + resolution: "@babel/traverse@npm:7.25.4" dependencies: "@babel/code-frame": "npm:^7.24.7" - "@babel/generator": "npm:^7.25.0" - "@babel/parser": "npm:^7.25.3" + "@babel/generator": "npm:^7.25.4" + "@babel/parser": "npm:^7.25.4" "@babel/template": "npm:^7.25.0" - "@babel/types": "npm:^7.25.2" + "@babel/types": "npm:^7.25.4" debug: "npm:^4.3.1" globals: "npm:^11.1.0" - checksum: 10/fba34f323e17fa83372fc290bc12413a50e2f780a86c7d8b1875c594b6be2857867804de5d52ab10a78a9cae29e1b09ea15d85ad63671ce97d79c40650282bb9 + checksum: 10/a85c16047ab8e454e2e758c75c31994cec328bd6d8b4b22e915fa7393a03b3ab96d1218f43dc7ef77c957cc488dc38100bdf504d08a80a131e89b2e49cfa2be5 languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4": - version: 7.25.2 - resolution: "@babel/types@npm:7.25.2" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.24.7, @babel/types@npm:^7.24.8, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2, @babel/types@npm:^7.25.4, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4": + version: 7.25.4 + resolution: "@babel/types@npm:7.25.4" dependencies: "@babel/helper-string-parser": "npm:^7.24.8" "@babel/helper-validator-identifier": "npm:^7.24.7" to-fast-properties: "npm:^2.0.0" - checksum: 10/ccf5399db1dcd6dd87b84a6f7bc8dd241e04a326f4f038c973c26ccb69cd360c8f2276603f584c58fd94da95229313060b27baceb0d9b18a435742d3f616afd1 + checksum: 10/d4a1194612d0a2a6ce9a0be325578b43d74e5f5278c67409468ba0a924341f0ad349ef0245ee8a36da3766efe5cc59cd6bb52547674150f97d8dc4c8cfa5d6b8 languageName: node linkType: hard @@ -2265,32 +2265,32 @@ __metadata: languageName: node linkType: hard -"@nrwl/devkit@npm:19.5.7": - version: 19.5.7 - resolution: "@nrwl/devkit@npm:19.5.7" +"@nrwl/devkit@npm:19.6.2": + version: 19.6.2 + resolution: "@nrwl/devkit@npm:19.6.2" dependencies: - "@nx/devkit": "npm:19.5.7" - checksum: 10/eb959a5bbd873d3972ffa288f1bb01b2ac91c2a6215db9159df6ab4a4c8bcc058afabcffad7d8a618cb28447ade6fe6a0aaa2af1d4149d9eb576c9676468abf2 + "@nx/devkit": "npm:19.6.2" + checksum: 10/57d27d57739cf8a70fe25d9888e0c4e0e4a5d4592f1584b5e557be6dad926a4efca59785a5554c3c7bd2152ab56621816a0af90be8b37af9d19f90e7bbd789d2 languageName: node linkType: hard -"@nrwl/tao@npm:19.5.7": - version: 19.5.7 - resolution: "@nrwl/tao@npm:19.5.7" +"@nrwl/tao@npm:19.6.2": + version: 19.6.2 + resolution: "@nrwl/tao@npm:19.6.2" dependencies: - nx: "npm:19.5.7" + nx: "npm:19.6.2" tslib: "npm:^2.3.0" bin: tao: index.js - checksum: 10/f33774ed596c88f6fbc01ec5fb4c0151ee80822650a7fef549aaf24c7cced32b09151f0e7764a41617edb59a29fa596f1f3812a086cc7b43941b007c4bf96282 + checksum: 10/aa1ad826ca7f76ea6d8928d56097ed015f059c81e94da621550a0f65007f1bb83cdb547f0b3448410d2b3514d0e73e12a23c5a854c90f8e2e26ae42018fa30db languageName: node linkType: hard -"@nx/devkit@npm:19.5.7, @nx/devkit@npm:>=17.1.2 < 20": - version: 19.5.7 - resolution: "@nx/devkit@npm:19.5.7" +"@nx/devkit@npm:19.6.2, @nx/devkit@npm:>=17.1.2 < 20": + version: 19.6.2 + resolution: "@nx/devkit@npm:19.6.2" dependencies: - "@nrwl/devkit": "npm:19.5.7" + "@nrwl/devkit": "npm:19.6.2" ejs: "npm:^3.1.7" enquirer: "npm:~2.3.6" ignore: "npm:^5.0.4" @@ -2301,76 +2301,76 @@ __metadata: yargs-parser: "npm:21.1.1" peerDependencies: nx: ">= 17 <= 20" - checksum: 10/4905b6739fa0b5f4ff9b4f21eed23be26355eb35e3de2a1789ce86cba98a057a3a9dd3ef90f523432aee4de8badef107e7006ae3422cdd5f283b33c1e2fda7fe + checksum: 10/42690f4a3153362c6096fe83b18a121c1d44468ccb37f5e8a47749b32cfe29a2a6a93b80c247155c3387e858b5bba8ae6690230ce82cde5bc4511a8390acdc0f languageName: node linkType: hard -"@nx/nx-darwin-arm64@npm:19.5.7": - version: 19.5.7 - resolution: "@nx/nx-darwin-arm64@npm:19.5.7" +"@nx/nx-darwin-arm64@npm:19.6.2": + version: 19.6.2 + resolution: "@nx/nx-darwin-arm64@npm:19.6.2" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@nx/nx-darwin-x64@npm:19.5.7": - version: 19.5.7 - resolution: "@nx/nx-darwin-x64@npm:19.5.7" +"@nx/nx-darwin-x64@npm:19.6.2": + version: 19.6.2 + resolution: "@nx/nx-darwin-x64@npm:19.6.2" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@nx/nx-freebsd-x64@npm:19.5.7": - version: 19.5.7 - resolution: "@nx/nx-freebsd-x64@npm:19.5.7" +"@nx/nx-freebsd-x64@npm:19.6.2": + version: 19.6.2 + resolution: "@nx/nx-freebsd-x64@npm:19.6.2" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@nx/nx-linux-arm-gnueabihf@npm:19.5.7": - version: 19.5.7 - resolution: "@nx/nx-linux-arm-gnueabihf@npm:19.5.7" +"@nx/nx-linux-arm-gnueabihf@npm:19.6.2": + version: 19.6.2 + resolution: "@nx/nx-linux-arm-gnueabihf@npm:19.6.2" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@nx/nx-linux-arm64-gnu@npm:19.5.7": - version: 19.5.7 - resolution: "@nx/nx-linux-arm64-gnu@npm:19.5.7" +"@nx/nx-linux-arm64-gnu@npm:19.6.2": + version: 19.6.2 + resolution: "@nx/nx-linux-arm64-gnu@npm:19.6.2" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@nx/nx-linux-arm64-musl@npm:19.5.7": - version: 19.5.7 - resolution: "@nx/nx-linux-arm64-musl@npm:19.5.7" +"@nx/nx-linux-arm64-musl@npm:19.6.2": + version: 19.6.2 + resolution: "@nx/nx-linux-arm64-musl@npm:19.6.2" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@nx/nx-linux-x64-gnu@npm:19.5.7": - version: 19.5.7 - resolution: "@nx/nx-linux-x64-gnu@npm:19.5.7" +"@nx/nx-linux-x64-gnu@npm:19.6.2": + version: 19.6.2 + resolution: "@nx/nx-linux-x64-gnu@npm:19.6.2" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@nx/nx-linux-x64-musl@npm:19.5.7": - version: 19.5.7 - resolution: "@nx/nx-linux-x64-musl@npm:19.5.7" +"@nx/nx-linux-x64-musl@npm:19.6.2": + version: 19.6.2 + resolution: "@nx/nx-linux-x64-musl@npm:19.6.2" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@nx/nx-win32-arm64-msvc@npm:19.5.7": - version: 19.5.7 - resolution: "@nx/nx-win32-arm64-msvc@npm:19.5.7" +"@nx/nx-win32-arm64-msvc@npm:19.6.2": + version: 19.6.2 + resolution: "@nx/nx-win32-arm64-msvc@npm:19.6.2" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@nx/nx-win32-x64-msvc@npm:19.5.7": - version: 19.5.7 - resolution: "@nx/nx-win32-x64-msvc@npm:19.5.7" +"@nx/nx-win32-x64-msvc@npm:19.6.2": + version: 19.6.2 + resolution: "@nx/nx-win32-x64-msvc@npm:19.6.2" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -2614,114 +2614,114 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.20.0" +"@rollup/rollup-android-arm-eabi@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.21.0" conditions: os=android & cpu=arm languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-android-arm64@npm:4.20.0" +"@rollup/rollup-android-arm64@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-android-arm64@npm:4.21.0" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-darwin-arm64@npm:4.20.0" +"@rollup/rollup-darwin-arm64@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-darwin-arm64@npm:4.21.0" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-darwin-x64@npm:4.20.0" +"@rollup/rollup-darwin-x64@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-darwin-x64@npm:4.21.0" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.20.0" +"@rollup/rollup-linux-arm-gnueabihf@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.21.0" conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm-musleabihf@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.20.0" +"@rollup/rollup-linux-arm-musleabihf@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.21.0" conditions: os=linux & cpu=arm & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.20.0" +"@rollup/rollup-linux-arm64-gnu@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.21.0" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.20.0" +"@rollup/rollup-linux-arm64-musl@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.21.0" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.20.0" +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.21.0" conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-gnu@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.20.0" +"@rollup/rollup-linux-riscv64-gnu@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.21.0" conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-s390x-gnu@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.20.0" +"@rollup/rollup-linux-s390x-gnu@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.21.0" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.20.0" +"@rollup/rollup-linux-x64-gnu@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.21.0" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.20.0" +"@rollup/rollup-linux-x64-musl@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.21.0" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.20.0" +"@rollup/rollup-win32-arm64-msvc@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.21.0" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.20.0" +"@rollup/rollup-win32-ia32-msvc@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.21.0" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.20.0": - version: 4.20.0 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.20.0" +"@rollup/rollup-win32-x64-msvc@npm:4.21.0": + version: 4.21.0 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.21.0" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -2980,21 +2980,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:22.2.0": - version: 22.2.0 - resolution: "@types/node@npm:22.2.0" +"@types/node@npm:*, @types/node@npm:22.5.0": + version: 22.5.0 + resolution: "@types/node@npm:22.5.0" dependencies: - undici-types: "npm:~6.13.0" - checksum: 10/2957c5c81f1a07a1210f28382adae65c11070c301e395fa819448516f1a2a710054b29e0ec7d8e28624afbcd90dae810403a497109545dea835b554fc76edf6c - languageName: node - linkType: hard - -"@types/node@npm:20.14.14": - version: 20.14.14 - resolution: "@types/node@npm:20.14.14" - dependencies: - undici-types: "npm:~5.26.4" - checksum: 10/035bc347e3de04888d537801e23eb4b4f99522975ca002dbfef978edd853710031b7cd43bf022670d6aba4ed5d4ac75ea1b5ff77ff8f80998bffd943b7bcef48 + undici-types: "npm:~6.19.2" + checksum: 10/89af3bd217b1559b645a9ed16d4ae3add75749814cbd8eefddd1b96003d1973afb1c8a2b23d69f3a8cc6c532e3aa185eaf5cc29a6e7c42c311a2aad4c99430ae languageName: node linkType: hard @@ -3190,22 +3181,22 @@ __metadata: resolution: "algoliasearch-client-javascript@workspace:." dependencies: "@babel/core": "npm:7.25.2" - "@babel/plugin-transform-class-properties": "npm:7.24.7" - "@babel/plugin-transform-runtime": "npm:7.24.7" - "@babel/preset-env": "npm:7.25.3" - "@babel/runtime": "npm:7.25.0" + "@babel/plugin-transform-class-properties": "npm:7.25.4" + "@babel/plugin-transform-runtime": "npm:7.25.4" + "@babel/preset-env": "npm:7.25.4" + "@babel/runtime": "npm:7.25.4" "@rollup/plugin-babel": "npm:6.0.4" "@rollup/plugin-node-resolve": "npm:15.2.3" "@rollup/plugin-terser": "npm:0.4.4" "@types/jest": "npm:29.5.12" - "@types/node": "npm:20.14.14" + "@types/node": "npm:22.5.0" "@types/rollup-plugin-node-globals": "npm:1.4.4" "@types/semver": "npm:7.5.8" bundlesize: "npm:0.18.2" - execa: "npm:9.3.0" + execa: "npm:9.3.1" lerna: "npm:8.1.8" - nx: "npm:19.5.7" - rollup: "npm:4.20.0" + nx: "npm:19.6.2" + rollup: "npm:4.21.0" rollup-plugin-node-globals: "npm:1.4.0" rollup-plugin-typescript2: "npm:0.36.0" semver: "npm:7.6.3" @@ -3225,12 +3216,12 @@ __metadata: "@algolia/recommend": "npm:5.1.1" "@algolia/requester-browser-xhr": "npm:5.1.1" "@algolia/requester-node-http": "npm:5.1.1" - "@babel/preset-env": "npm:7.25.3" + "@babel/preset-env": "npm:7.25.4" "@babel/preset-typescript": "npm:7.24.7" "@types/jest": "npm:29.5.12" - "@types/node": "npm:22.2.0" + "@types/node": "npm:22.5.0" jest: "npm:29.7.0" - rollup: "npm:4.20.0" + rollup: "npm:4.21.0" typescript: "npm:5.5.4" languageName: unknown linkType: soft @@ -3390,9 +3381,9 @@ __metadata: linkType: hard "async@npm:^3.2.3": - version: 3.2.5 - resolution: "async@npm:3.2.5" - checksum: 10/323c3615c3f0ab1ac25a6f953296bc0ac3213d5e0f1c0debdb12964e55963af288d570293c11e44f7967af58c06d2a88d0ea588c86ec0fbf62fa98037f604a0f + version: 3.2.6 + resolution: "async@npm:3.2.6" + checksum: 10/cb6e0561a3c01c4b56a799cc8bab6ea5fef45f069ab32500b6e19508db270ef2dffa55e5aed5865c5526e9907b1f8be61b27530823b411ffafb5e1538c86c368 languageName: node linkType: hard @@ -3414,25 +3405,14 @@ __metadata: languageName: node linkType: hard -"axios@npm:^1.6.2": - version: 1.7.4 - resolution: "axios@npm:1.7.4" - dependencies: - follow-redirects: "npm:^1.15.6" - form-data: "npm:^4.0.0" - proxy-from-env: "npm:^1.1.0" - checksum: 10/7a1429be1e3d0c2e1b96d4bba4d113efbfabc7c724bed107beb535c782c7bea447ff634886b0c7c43395a264d085450d009eb1154b5f38a8bae49d469fdcbc61 - languageName: node - linkType: hard - -"axios@npm:^1.7.2": - version: 1.7.3 - resolution: "axios@npm:1.7.3" +"axios@npm:^1.6.2, axios@npm:^1.7.4": + version: 1.7.5 + resolution: "axios@npm:1.7.5" dependencies: follow-redirects: "npm:^1.15.6" form-data: "npm:^4.0.0" proxy-from-env: "npm:^1.1.0" - checksum: 10/7f92af205705a8fb4a9d35666b663729507657f252a1d39d83582590119941872d49078017cf992e32f47aa3b7317f5439f77be772a173dac2ae0fedd38f43ae + checksum: 10/6cbcfe943a84089f420a900a3a3aeb54ee94dcc9c2b81b150434896357be5d1079eff0b1bbb628597371e79f896b1bc5776df04184756ba99656ff31df9a75bf languageName: node linkType: hard @@ -3491,7 +3471,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-polyfill-corejs3@npm:^0.10.1, babel-plugin-polyfill-corejs3@npm:^0.10.4": +"babel-plugin-polyfill-corejs3@npm:^0.10.6": version: 0.10.6 resolution: "babel-plugin-polyfill-corejs3@npm:0.10.6" dependencies: @@ -3515,24 +3495,27 @@ __metadata: linkType: hard "babel-preset-current-node-syntax@npm:^1.0.0": - version: 1.0.1 - resolution: "babel-preset-current-node-syntax@npm:1.0.1" + version: 1.1.0 + resolution: "babel-preset-current-node-syntax@npm:1.1.0" dependencies: "@babel/plugin-syntax-async-generators": "npm:^7.8.4" "@babel/plugin-syntax-bigint": "npm:^7.8.3" - "@babel/plugin-syntax-class-properties": "npm:^7.8.3" - "@babel/plugin-syntax-import-meta": "npm:^7.8.3" + "@babel/plugin-syntax-class-properties": "npm:^7.12.13" + "@babel/plugin-syntax-class-static-block": "npm:^7.14.5" + "@babel/plugin-syntax-import-attributes": "npm:^7.24.7" + "@babel/plugin-syntax-import-meta": "npm:^7.10.4" "@babel/plugin-syntax-json-strings": "npm:^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.8.3" + "@babel/plugin-syntax-logical-assignment-operators": "npm:^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator": "npm:^7.8.3" - "@babel/plugin-syntax-numeric-separator": "npm:^7.8.3" + "@babel/plugin-syntax-numeric-separator": "npm:^7.10.4" "@babel/plugin-syntax-object-rest-spread": "npm:^7.8.3" "@babel/plugin-syntax-optional-catch-binding": "npm:^7.8.3" "@babel/plugin-syntax-optional-chaining": "npm:^7.8.3" - "@babel/plugin-syntax-top-level-await": "npm:^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "npm:^7.14.5" + "@babel/plugin-syntax-top-level-await": "npm:^7.14.5" peerDependencies: "@babel/core": ^7.0.0 - checksum: 10/94561959cb12bfa80867c9eeeace7c3d48d61707d33e55b4c3fdbe82fc745913eb2dbfafca62aef297421b38aadcb58550e5943f50fbcebbeefd70ce2bed4b74 + checksum: 10/46331111ae72b7121172fd9e6a4a7830f651ad44bf26dbbf77b3c8a60a18009411a3eacb5e72274004290c110371230272109957d5224d155436b4794ead2f1b languageName: node linkType: hard @@ -3644,7 +3627,7 @@ __metadata: languageName: node linkType: hard -"bs-logger@npm:0.x": +"bs-logger@npm:^0.2.6": version: 0.2.6 resolution: "bs-logger@npm:0.2.6" dependencies: @@ -3820,9 +3803,9 @@ __metadata: linkType: hard "caniuse-lite@npm:^1.0.30001646": - version: 1.0.30001651 - resolution: "caniuse-lite@npm:1.0.30001651" - checksum: 10/fe4857b2a91a9cb77993eec9622de68bea0df17c31cb9584ca5c562f64bb3b8fda316d898aa3b1ee3ee9f7d80f6bf13c42acb09d9a56a1a6c64afaf7381472fa + version: 1.0.30001653 + resolution: "caniuse-lite@npm:1.0.30001653" + checksum: 10/cd9b1c0fe03249e593789a11a9ef14f987b385e60441748945916b19e74e7bc5c82c40d4836496a647586651898741aed1598ae0792114a9f0d7d7fdb2b7deb0 languageName: node linkType: hard @@ -3918,9 +3901,9 @@ __metadata: linkType: hard "cjs-module-lexer@npm:^1.0.0": - version: 1.3.1 - resolution: "cjs-module-lexer@npm:1.3.1" - checksum: 10/6629188d5ce74b57e5dce2222db851b5496a8d65b533a05957fb24089a3cec8d769378013c375a954c5a0f7522cde6a36d5a65bfd88f5575cb2de3176046fa8e + version: 1.4.0 + resolution: "cjs-module-lexer@npm:1.4.0" + checksum: 10/b041096749792526120d8b8756929f8ef5dd4596502a0e1013f857e3027acd6091915fea77037921d70ee1a99988a100d994d3d3c2e323b04dd4c5ffd516cf13 languageName: node linkType: hard @@ -4247,11 +4230,11 @@ __metadata: linkType: hard "core-js-compat@npm:^3.37.1, core-js-compat@npm:^3.38.0": - version: 3.38.0 - resolution: "core-js-compat@npm:3.38.0" + version: 3.38.1 + resolution: "core-js-compat@npm:3.38.1" dependencies: browserslist: "npm:^4.23.3" - checksum: 10/7ebdca6b305c9c470980e1f7e7a3d759add7cb754bff62926242907ee4d1d4e8bb13f70eb9a7d7769e0f63aec3f4cca83abf60f502286853b45d4b63a01c25ed + checksum: 10/4e2f219354fd268895f79486461a12df96f24ed307321482fe2a43529c5a64e7c16bcba654980ba217d603444f5141d43a79058aeac77511085f065c5da72207 languageName: node linkType: hard @@ -4610,9 +4593,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.5.4": - version: 1.5.6 - resolution: "electron-to-chromium@npm:1.5.6" - checksum: 10/9cadd4e0cd607bba7564da11ffd8d767e66556153c0c40096b2ef9b9eac233d8534b12686957815532081b8c9febd2647e444ed234718e89fa64533db3f07d9a + version: 1.5.13 + resolution: "electron-to-chromium@npm:1.5.13" + checksum: 10/b3de6dbca66e399eacd4f7e2b7603394c8949c9e724d838a45e092725005ff435aabfbf00f738e45451eb23147684f7f9251a5ed75619a539642b2bccea20b45 languageName: node linkType: hard @@ -4827,15 +4810,15 @@ __metadata: languageName: node linkType: hard -"execa@npm:9.3.0": - version: 9.3.0 - resolution: "execa@npm:9.3.0" +"execa@npm:9.3.1": + version: 9.3.1 + resolution: "execa@npm:9.3.1" dependencies: "@sindresorhus/merge-streams": "npm:^4.0.0" cross-spawn: "npm:^7.0.3" figures: "npm:^6.1.0" get-stream: "npm:^9.0.0" - human-signals: "npm:^7.0.0" + human-signals: "npm:^8.0.0" is-plain-obj: "npm:^4.1.0" is-stream: "npm:^4.0.1" npm-run-path: "npm:^5.2.0" @@ -4843,7 +4826,7 @@ __metadata: signal-exit: "npm:^4.1.0" strip-final-newline: "npm:^4.0.0" yoctocolors: "npm:^2.0.0" - checksum: 10/07cf570a8482b124971e7a01ba047a3d3f80c7ebf7a6c937a65d9cd593f6487b419ba9e7cf4388464e4a605ea4849d4c266d57465bb0496d8fa9275a063ce842 + checksum: 10/ec4a5aec9660cd990cb6f850159945a25f50ab24e1dc5333700299ed874d8a0e7306c6a870121f0eb83662562c49d5009abf01ae5c1d81d425290c5ca49c0f4f languageName: node linkType: hard @@ -5614,10 +5597,10 @@ __metadata: languageName: node linkType: hard -"human-signals@npm:^7.0.0": - version: 7.0.0 - resolution: "human-signals@npm:7.0.0" - checksum: 10/f1356547f6553a90530527ba2325c2281e33fa3b9b372a647e377fd8f24e9eb8119082051ca6a9f8821e24f1faa13cd462c849a9476c86e7c190dbf0aa2ee8a4 +"human-signals@npm:^8.0.0": + version: 8.0.0 + resolution: "human-signals@npm:8.0.0" + checksum: 10/89acdc7081ac2a065e41cca7351c4b0fe2382e213b7372f90df6a554e340f31b49388a307adc1d6f4c60b2b4fe81eeff0bc1f44be6f5d844311cd92ccc7831c6 languageName: node linkType: hard @@ -5656,9 +5639,9 @@ __metadata: linkType: hard "ignore@npm:^5.0.4, ignore@npm:^5.2.0": - version: 5.3.1 - resolution: "ignore@npm:5.3.1" - checksum: 10/0a884c2fbc8c316f0b9f92beaf84464253b73230a4d4d286697be45fca081199191ca33e1c2e82d9e5f851f5e9a48a78e25a35c951e7eb41e59f150db3530065 + version: 5.3.2 + resolution: "ignore@npm:5.3.2" + checksum: 10/cceb6a457000f8f6a50e1196429750d782afce5680dd878aa4221bd79972d68b3a55b4b1458fc682be978f4d3c6a249046aa0880637367216444ab7b014cfc98 languageName: node linkType: hard @@ -5841,11 +5824,11 @@ __metadata: linkType: hard "is-core-module@npm:^2.13.0, is-core-module@npm:^2.5.0": - version: 2.15.0 - resolution: "is-core-module@npm:2.15.0" + version: 2.15.1 + resolution: "is-core-module@npm:2.15.1" dependencies: hasown: "npm:^2.0.2" - checksum: 10/70e962543e5d3a97c07cb29144a86792d545a21f28e67da5401d85878a0193d46fbab8d97bc3ca680e2778705dca66e7b6ca840c493497a27ca0e8c5f3ac3d1d + checksum: 10/77316d5891d5743854bcef2cd2f24c5458fb69fbc9705c12ca17d54a2017a67d0693bbf1ba8c77af376c0eef6bf6d1b27a4ab08e4db4e69914c3789bdf2ceec5 languageName: node linkType: hard @@ -7006,7 +6989,7 @@ __metadata: languageName: node linkType: hard -"lodash.memoize@npm:4.x": +"lodash.memoize@npm:^4.1.2": version: 4.1.2 resolution: "lodash.memoize@npm:4.1.2" checksum: 10/192b2168f310c86f303580b53acf81ab029761b9bd9caa9506a019ffea5f3363ea98d7e39e7e11e6b9917066c9d36a09a11f6fe16f812326390d8f3a54a1a6da @@ -7092,7 +7075,7 @@ __metadata: languageName: node linkType: hard -"make-error@npm:1.x": +"make-error@npm:^1.3.6": version: 1.3.6 resolution: "make-error@npm:1.3.6" checksum: 10/b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 @@ -7176,12 +7159,12 @@ __metadata: linkType: hard "micromatch@npm:^4.0.4": - version: 4.0.7 - resolution: "micromatch@npm:4.0.7" + version: 4.0.8 + resolution: "micromatch@npm:4.0.8" dependencies: braces: "npm:^3.0.3" picomatch: "npm:^2.3.1" - checksum: 10/a11ed1cb67dcbbe9a5fc02c4062cf8bb0157d73bf86956003af8dcfdf9b287f9e15ec0f6d6925ff6b8b5b496202335e497b01de4d95ef6cf06411bc5e5c474a0 + checksum: 10/6bf2a01672e7965eb9941d1f02044fad2bd12486b5553dc1116ff24c09a8723157601dc992e74c911d896175918448762df3b3fd0a6b61037dd1a9766ddfbf58 languageName: node linkType: hard @@ -7488,14 +7471,14 @@ __metadata: languageName: node linkType: hard -"nock@npm:13.5.4": - version: 13.5.4 - resolution: "nock@npm:13.5.4" +"nock@npm:13.5.5": + version: 13.5.5 + resolution: "nock@npm:13.5.5" dependencies: debug: "npm:^4.1.0" json-stringify-safe: "npm:^5.0.1" propagate: "npm:^2.0.0" - checksum: 10/75bad391bae4efb81b742734af5f2d87309cd93d3ca6b78372fd37946d78ccb254d79104676619866915e6734abfc1b00fee2aa42073a4843ca3c746aad35a4d + checksum: 10/c19d7bf9654db056357a22b00127bb5606c1bbdff188a5b6c469825e580e31cd0cb0701bce8dd8b4876dbbd36a145fdb681fd69fd59308d6db4923ce8ab2439e languageName: node linkType: hard @@ -7767,26 +7750,26 @@ __metadata: languageName: node linkType: hard -"nx@npm:19.5.7, nx@npm:>=17.1.2 < 20": - version: 19.5.7 - resolution: "nx@npm:19.5.7" +"nx@npm:19.6.2, nx@npm:>=17.1.2 < 20": + version: 19.6.2 + resolution: "nx@npm:19.6.2" dependencies: "@napi-rs/wasm-runtime": "npm:0.2.4" - "@nrwl/tao": "npm:19.5.7" - "@nx/nx-darwin-arm64": "npm:19.5.7" - "@nx/nx-darwin-x64": "npm:19.5.7" - "@nx/nx-freebsd-x64": "npm:19.5.7" - "@nx/nx-linux-arm-gnueabihf": "npm:19.5.7" - "@nx/nx-linux-arm64-gnu": "npm:19.5.7" - "@nx/nx-linux-arm64-musl": "npm:19.5.7" - "@nx/nx-linux-x64-gnu": "npm:19.5.7" - "@nx/nx-linux-x64-musl": "npm:19.5.7" - "@nx/nx-win32-arm64-msvc": "npm:19.5.7" - "@nx/nx-win32-x64-msvc": "npm:19.5.7" + "@nrwl/tao": "npm:19.6.2" + "@nx/nx-darwin-arm64": "npm:19.6.2" + "@nx/nx-darwin-x64": "npm:19.6.2" + "@nx/nx-freebsd-x64": "npm:19.6.2" + "@nx/nx-linux-arm-gnueabihf": "npm:19.6.2" + "@nx/nx-linux-arm64-gnu": "npm:19.6.2" + "@nx/nx-linux-arm64-musl": "npm:19.6.2" + "@nx/nx-linux-x64-gnu": "npm:19.6.2" + "@nx/nx-linux-x64-musl": "npm:19.6.2" + "@nx/nx-win32-arm64-msvc": "npm:19.6.2" + "@nx/nx-win32-x64-msvc": "npm:19.6.2" "@yarnpkg/lockfile": "npm:^1.1.0" "@yarnpkg/parsers": "npm:3.0.0-rc.46" "@zkochan/js-yaml": "npm:0.0.7" - axios: "npm:^1.7.2" + axios: "npm:^1.7.4" chalk: "npm:^4.1.0" cli-cursor: "npm:3.1.0" cli-spinners: "npm:2.6.1" @@ -7848,7 +7831,7 @@ __metadata: bin: nx: bin/nx.js nx-cloud: bin/nx-cloud.js - checksum: 10/c002f88ca37ceee948e6da1388005dd9311cbfb0c85fc15c62226c8c2c184bd7fd3551fd9f15516a7208c7cc98c99c2effbefa4bdf99dd0bb53f08a096dc8cf8 + checksum: 10/ab9cb35be1eb3862ec84fbf6813c0a78b74244f9b546769e362addab8b698a4b6cc47701def528656572061a3feb4920dbf3d4051c64b6b7f71cfc05f266e341 languageName: node linkType: hard @@ -8296,12 +8279,12 @@ __metadata: linkType: hard "postcss-selector-parser@npm:^6.0.10": - version: 6.1.1 - resolution: "postcss-selector-parser@npm:6.1.1" + version: 6.1.2 + resolution: "postcss-selector-parser@npm:6.1.2" dependencies: cssesc: "npm:^3.0.0" util-deprecate: "npm:^1.0.2" - checksum: 10/ce2af36b56d9333a6873498d3b6ee858466ceb3e9560f998eeaf294e5c11cafffb122d307f3c2904ee8f87d12c71c5ab0b26ca4228b97b6c70b7d1e7cd9b5737 + checksum: 10/190034c94d809c115cd2f32ee6aade84e933450a43ec3899c3e78e7d7b33efd3a2a975bb45d7700b6c5b196c06a7d9acf3f1ba6f1d87032d9675a29d8bca1dd3 languageName: node linkType: hard @@ -8877,26 +8860,26 @@ __metadata: languageName: node linkType: hard -"rollup@npm:4.20.0": - version: 4.20.0 - resolution: "rollup@npm:4.20.0" - dependencies: - "@rollup/rollup-android-arm-eabi": "npm:4.20.0" - "@rollup/rollup-android-arm64": "npm:4.20.0" - "@rollup/rollup-darwin-arm64": "npm:4.20.0" - "@rollup/rollup-darwin-x64": "npm:4.20.0" - "@rollup/rollup-linux-arm-gnueabihf": "npm:4.20.0" - "@rollup/rollup-linux-arm-musleabihf": "npm:4.20.0" - "@rollup/rollup-linux-arm64-gnu": "npm:4.20.0" - "@rollup/rollup-linux-arm64-musl": "npm:4.20.0" - "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.20.0" - "@rollup/rollup-linux-riscv64-gnu": "npm:4.20.0" - "@rollup/rollup-linux-s390x-gnu": "npm:4.20.0" - "@rollup/rollup-linux-x64-gnu": "npm:4.20.0" - "@rollup/rollup-linux-x64-musl": "npm:4.20.0" - "@rollup/rollup-win32-arm64-msvc": "npm:4.20.0" - "@rollup/rollup-win32-ia32-msvc": "npm:4.20.0" - "@rollup/rollup-win32-x64-msvc": "npm:4.20.0" +"rollup@npm:4.21.0": + version: 4.21.0 + resolution: "rollup@npm:4.21.0" + dependencies: + "@rollup/rollup-android-arm-eabi": "npm:4.21.0" + "@rollup/rollup-android-arm64": "npm:4.21.0" + "@rollup/rollup-darwin-arm64": "npm:4.21.0" + "@rollup/rollup-darwin-x64": "npm:4.21.0" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.21.0" + "@rollup/rollup-linux-arm-musleabihf": "npm:4.21.0" + "@rollup/rollup-linux-arm64-gnu": "npm:4.21.0" + "@rollup/rollup-linux-arm64-musl": "npm:4.21.0" + "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.21.0" + "@rollup/rollup-linux-riscv64-gnu": "npm:4.21.0" + "@rollup/rollup-linux-s390x-gnu": "npm:4.21.0" + "@rollup/rollup-linux-x64-gnu": "npm:4.21.0" + "@rollup/rollup-linux-x64-musl": "npm:4.21.0" + "@rollup/rollup-win32-arm64-msvc": "npm:4.21.0" + "@rollup/rollup-win32-ia32-msvc": "npm:4.21.0" + "@rollup/rollup-win32-x64-msvc": "npm:4.21.0" "@types/estree": "npm:1.0.5" fsevents: "npm:~2.3.2" dependenciesMeta: @@ -8936,7 +8919,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 10/448bd835715aa0f78c6888314e31fb92f1b83325ef0ff861a5a322c2bc87d200b2b6c4acb9223fb669c27ae0c4b071003b6877eec1d3411174615a4057db8946 + checksum: 10/27ac47d5049719249d2a44982e31f01423158a3625cabff2f2362219aee64bdc14c32572b669169c22c324c3a965044ce8f06e27eee00fd8802861cd13697f87 languageName: node linkType: hard @@ -9016,7 +8999,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.6.3, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4": +"semver@npm:7.6.3, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.3": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -9260,9 +9243,9 @@ __metadata: linkType: hard "spdx-license-ids@npm:^3.0.0": - version: 3.0.18 - resolution: "spdx-license-ids@npm:3.0.18" - checksum: 10/45fdbb50c4bbe364720ef0acd19f4fc1914d73ba1e2b1ce9db21ee12d7f9e8bf14336289f6ad3d5acac3dc5b91aafe61e9c652d5806b31cbb8518a14979a16ff + version: 3.0.20 + resolution: "spdx-license-ids@npm:3.0.20" + checksum: 10/30e566ea74b04232c64819d1f5313c00d92e9c73d054541650331fc794499b3bcc4991bcd90fa3c2fc4d040006f58f63104706255266e87a9d452e6574afc60c languageName: node linkType: hard @@ -9565,8 +9548,8 @@ __metadata: linkType: hard "terser@npm:^5.17.4": - version: 5.31.5 - resolution: "terser@npm:5.31.5" + version: 5.31.6 + resolution: "terser@npm:5.31.6" dependencies: "@jridgewell/source-map": "npm:^0.3.3" acorn: "npm:^8.8.2" @@ -9574,7 +9557,7 @@ __metadata: source-map-support: "npm:~0.5.20" bin: terser: bin/terser - checksum: 10/afc72093af3a84d0f93110444f8f5318dad412032ac71dc132351a71b9faef475ac45000bd8c8e23ffc571e0d3937a2047a48fd17e36c4714be520868a934bb4 + checksum: 10/78057c58025151c9bdad82a050f0b51175f9fe3117d8ee369ca7effe038cdd540da2fd5985a4f8ee08dba5616e7911e1392d40670698ff42a49fec338d369e80 languageName: node linkType: hard @@ -9694,19 +9677,19 @@ __metadata: languageName: node linkType: hard -"ts-jest@npm:29.2.4": - version: 29.2.4 - resolution: "ts-jest@npm:29.2.4" +"ts-jest@npm:29.2.5": + version: 29.2.5 + resolution: "ts-jest@npm:29.2.5" dependencies: - bs-logger: "npm:0.x" + bs-logger: "npm:^0.2.6" ejs: "npm:^3.1.10" - fast-json-stable-stringify: "npm:2.x" + fast-json-stable-stringify: "npm:^2.1.0" jest-util: "npm:^29.0.0" json5: "npm:^2.2.3" - lodash.memoize: "npm:4.x" - make-error: "npm:1.x" - semver: "npm:^7.5.3" - yargs-parser: "npm:^21.0.1" + lodash.memoize: "npm:^4.1.2" + make-error: "npm:^1.3.6" + semver: "npm:^7.6.3" + yargs-parser: "npm:^21.1.1" peerDependencies: "@babel/core": ">=7.0.0-beta.0 <8" "@jest/transform": ^29.0.0 @@ -9727,7 +9710,7 @@ __metadata: optional: true bin: ts-jest: cli.js - checksum: 10/69db25e06b93f4ea4e454a54afc4e49c59b71f7efdef94fe728f4d62b8c475364d0fed7253212c5394669dcd143516ab6f630f4b139b2f9c37119245cf5a963c + checksum: 10/f89e562816861ec4510840a6b439be6145f688b999679328de8080dc8e66481325fc5879519b662163e33b7578f35243071c38beb761af34e5fe58e3e326a958 languageName: node linkType: hard @@ -9743,9 +9726,9 @@ __metadata: linkType: hard "tslib@npm:^2.1.0, tslib@npm:^2.3.0, tslib@npm:^2.4.0, tslib@npm:^2.6.2": - version: 2.6.3 - resolution: "tslib@npm:2.6.3" - checksum: 10/52109bb681f8133a2e58142f11a50e05476de4f075ca906d13b596ae5f7f12d30c482feb0bff167ae01cfc84c5803e575a307d47938999246f5a49d174fc558c + version: 2.7.0 + resolution: "tslib@npm:2.7.0" + checksum: 10/9a5b47ddac65874fa011c20ff76db69f97cf90c78cff5934799ab8894a5342db2d17b4e7613a087046bc1d133d21547ddff87ac558abeec31ffa929c88b7fce6 languageName: node linkType: hard @@ -9847,17 +9830,10 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~5.26.4": - version: 5.26.5 - resolution: "undici-types@npm:5.26.5" - checksum: 10/0097779d94bc0fd26f0418b3a05472410408877279141ded2bd449167be1aed7ea5b76f756562cb3586a07f251b90799bab22d9019ceba49c037c76445f7cddd - languageName: node - linkType: hard - -"undici-types@npm:~6.13.0": - version: 6.13.0 - resolution: "undici-types@npm:6.13.0" - checksum: 10/da52e37cbc6da3a75da86fa08dd795ca8924430deb91005eb884b840e46e19013ccd4c1c289f70018e8cf0c338add24a500e7c3acfcd49b1ffb27ff9f91e38b9 +"undici-types@npm:~6.19.2": + version: 6.19.8 + resolution: "undici-types@npm:6.19.8" + checksum: 10/cf0b48ed4fc99baf56584afa91aaffa5010c268b8842f62e02f752df209e3dea138b372a60a963b3b2576ed932f32329ce7ddb9cb5f27a6c83040d8cd74b7a70 languageName: node linkType: hard @@ -10315,7 +10291,7 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:21.1.1, yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": +"yargs-parser@npm:21.1.1, yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" checksum: 10/9dc2c217ea3bf8d858041252d43e074f7166b53f3d010a8c711275e09cd3d62a002969a39858b92bbda2a6a63a585c7127014534a560b9c69ed2d923d113406e