@algolia/client-analytics 5.3.1 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.d.ts +1 -1
- package/dist/builds/browser.js +49 -50
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +1 -1
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +3 -3
- package/dist/builds/fetch.js +1126 -0
- package/dist/builds/fetch.js.map +1 -0
- package/dist/builds/node.cjs +49 -50
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +49 -50
- package/dist/builds/node.js.map +1 -1
- package/dist/fetch.d.ts +1742 -0
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/src/analyticsClient.cjs +49 -50
- package/dist/src/analyticsClient.cjs.map +1 -1
- package/dist/src/analyticsClient.js +49 -50
- package/dist/src/analyticsClient.js.map +1 -1
- package/package.json +9 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../builds/fetch.ts","../../src/analyticsClient.ts"],"sourcesContent":["// 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.\n\nimport type { ClientOptions } from '@algolia/client-common';\nimport {\n createMemoryCache,\n createNullCache,\n DEFAULT_CONNECT_TIMEOUT_NODE,\n DEFAULT_READ_TIMEOUT_NODE,\n DEFAULT_WRITE_TIMEOUT_NODE,\n} from '@algolia/client-common';\nimport { createFetchRequester } from '@algolia/requester-fetch';\n\nimport type { Region } from '../src/analyticsClient';\nimport { createAnalyticsClient, REGIONS } from '../src/analyticsClient';\n\nexport type AnalyticsClient = ReturnType<typeof createAnalyticsClient>;\n\nexport { apiClientVersion, Region } from '../src/analyticsClient';\nexport * from '../model';\n\nexport function analyticsClient(\n appId: string,\n apiKey: string,\n region?: Region,\n options?: ClientOptions,\n): AnalyticsClient {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n\n if (region && (typeof region !== 'string' || !REGIONS.includes(region))) {\n throw new Error(`\\`region\\` must be one of the following: ${REGIONS.join(', ')}`);\n }\n\n return {\n ...createAnalyticsClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: DEFAULT_CONNECT_TIMEOUT_NODE,\n read: DEFAULT_READ_TIMEOUT_NODE,\n write: DEFAULT_WRITE_TIMEOUT_NODE,\n },\n algoliaAgents: [{ segment: 'Fetch' }],\n requester: createFetchRequester(),\n responsesCache: createNullCache(),\n requestsCache: createNullCache(),\n hostsCache: createMemoryCache(),\n ...options,\n }),\n };\n}\n","// 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.\n\nimport { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common';\nimport type {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\n\nimport type {\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n GetAddToCartRateProps,\n GetAverageClickPositionProps,\n GetClickPositionsProps,\n GetClickThroughRateProps,\n GetConversionRateProps,\n GetNoClickRateProps,\n GetNoResultsRateProps,\n GetPurchaseRateProps,\n GetRevenueProps,\n GetSearchesCountProps,\n GetSearchesNoClicksProps,\n GetSearchesNoResultsProps,\n GetStatusProps,\n GetTopCountriesProps,\n GetTopFilterAttributesProps,\n GetTopFilterForAttributeProps,\n GetTopFiltersNoResultsProps,\n GetTopHitsProps,\n GetTopSearchesProps,\n GetUsersCountProps,\n} from '../model/clientMethodProps';\nimport type { GetAddToCartRateResponse } from '../model/getAddToCartRateResponse';\nimport type { GetAverageClickPositionResponse } from '../model/getAverageClickPositionResponse';\nimport type { GetClickPositionsResponse } from '../model/getClickPositionsResponse';\nimport type { GetClickThroughRateResponse } from '../model/getClickThroughRateResponse';\nimport type { GetConversionRateResponse } from '../model/getConversionRateResponse';\nimport type { GetNoClickRateResponse } from '../model/getNoClickRateResponse';\nimport type { GetNoResultsRateResponse } from '../model/getNoResultsRateResponse';\nimport type { GetPurchaseRateResponse } from '../model/getPurchaseRateResponse';\nimport type { GetRevenue } from '../model/getRevenue';\nimport type { GetSearchesCountResponse } from '../model/getSearchesCountResponse';\nimport type { GetSearchesNoClicksResponse } from '../model/getSearchesNoClicksResponse';\nimport type { GetSearchesNoResultsResponse } from '../model/getSearchesNoResultsResponse';\nimport type { GetStatusResponse } from '../model/getStatusResponse';\nimport type { GetTopCountriesResponse } from '../model/getTopCountriesResponse';\nimport type { GetTopFilterAttributesResponse } from '../model/getTopFilterAttributesResponse';\nimport type { GetTopFilterForAttributeResponse } from '../model/getTopFilterForAttributeResponse';\nimport type { GetTopFiltersNoResultsResponse } from '../model/getTopFiltersNoResultsResponse';\nimport type { GetTopHitsResponse } from '../model/getTopHitsResponse';\nimport type { GetTopSearchesResponse } from '../model/getTopSearchesResponse';\nimport type { GetUsersCountResponse } from '../model/getUsersCountResponse';\n\nexport const apiClientVersion = '5.4.0';\n\nexport const REGIONS = ['de', 'us'] as const;\nexport type Region = (typeof REGIONS)[number];\n\nfunction getDefaultHosts(region?: Region): Host[] {\n const url = !region ? 'analytics.algolia.com' : 'analytics.{region}.algolia.com'.replace('{region}', region);\n\n return [{ url, accept: 'readWrite', protocol: 'https' }];\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport function createAnalyticsClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}: CreateClientOptions & { region?: Region }) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'Analytics',\n version: apiClientVersion,\n }),\n baseHeaders: {\n 'content-type': 'text/plain',\n ...auth.headers(),\n ...options.baseHeaders,\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters,\n },\n });\n\n return {\n transporter,\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return transporter.algoliaAgent.value;\n },\n\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment: string, version?: string): void {\n transporter.algoliaAgent.add({ segment, version });\n },\n\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }: { apiKey: string }): void {\n if (!authMode || authMode === 'WithinHeaders') {\n transporter.baseHeaders['x-algolia-api-key'] = apiKey;\n } else {\n transporter.baseQueryParameters['x-algolia-api-key'] = apiKey;\n }\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete(\n { path, parameters }: CustomDeleteProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customDelete`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customGet`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPost`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut(\n { path, parameters, body }: CustomPutProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPut`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the add-to-cart rate for all of your searches with at least one add-to-cart event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getAddToCartRate - The getAddToCartRate object.\n * @param getAddToCartRate.index - Index name.\n * @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getAddToCartRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAddToCartRate(\n { index, startDate, endDate, tags }: GetAddToCartRateProps,\n requestOptions?: RequestOptions,\n ): Promise<GetAddToCartRateResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getAddToCartRate`.');\n }\n\n const requestPath = '/2/conversions/addToCartRate';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the average click position of your search results, including a daily breakdown. The average click position is the average of all clicked search results\\' positions. For example, if users only ever click on the first result for any search, the average click position is 1. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getAverageClickPosition - The getAverageClickPosition object.\n * @param getAverageClickPosition.index - Index name.\n * @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getAverageClickPosition.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAverageClickPosition(\n { index, startDate, endDate, tags }: GetAverageClickPositionProps,\n requestOptions?: RequestOptions,\n ): Promise<GetAverageClickPositionResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getAverageClickPosition`.');\n }\n\n const requestPath = '/2/clicks/averageClickPosition';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the positions in the search results and their associated number of clicks. This lets you check how many clicks the first, second, or tenth search results receive.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getClickPositions - The getClickPositions object.\n * @param getClickPositions.index - Index name.\n * @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getClickPositions.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClickPositions(\n { index, startDate, endDate, tags }: GetClickPositionsProps,\n requestOptions?: RequestOptions,\n ): Promise<GetClickPositionsResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getClickPositions`.');\n }\n\n const requestPath = '/2/clicks/positions';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the click-through rate for all of your searches with at least one click event, including a daily breakdown By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getClickThroughRate - The getClickThroughRate object.\n * @param getClickThroughRate.index - Index name.\n * @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getClickThroughRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getClickThroughRate(\n { index, startDate, endDate, tags }: GetClickThroughRateProps,\n requestOptions?: RequestOptions,\n ): Promise<GetClickThroughRateResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getClickThroughRate`.');\n }\n\n const requestPath = '/2/clicks/clickThroughRate';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the conversion rate for all of your searches with at least one conversion event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getConversionRate - The getConversionRate object.\n * @param getConversionRate.index - Index name.\n * @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getConversionRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConversionRate(\n { index, startDate, endDate, tags }: GetConversionRateProps,\n requestOptions?: RequestOptions,\n ): Promise<GetConversionRateResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getConversionRate`.');\n }\n\n const requestPath = '/2/conversions/conversionRate';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the fraction of searches that didn\\'t lead to any click within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getNoClickRate - The getNoClickRate object.\n * @param getNoClickRate.index - Index name.\n * @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getNoClickRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getNoClickRate(\n { index, startDate, endDate, tags }: GetNoClickRateProps,\n requestOptions?: RequestOptions,\n ): Promise<GetNoClickRateResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getNoClickRate`.');\n }\n\n const requestPath = '/2/searches/noClickRate';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the fraction of searches that didn\\'t return any results within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getNoResultsRate - The getNoResultsRate object.\n * @param getNoResultsRate.index - Index name.\n * @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getNoResultsRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getNoResultsRate(\n { index, startDate, endDate, tags }: GetNoResultsRateProps,\n requestOptions?: RequestOptions,\n ): Promise<GetNoResultsRateResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getNoResultsRate`.');\n }\n\n const requestPath = '/2/searches/noResultRate';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the purchase rate for all of your searches with at least one purchase event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getPurchaseRate - The getPurchaseRate object.\n * @param getPurchaseRate.index - Index name.\n * @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getPurchaseRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getPurchaseRate(\n { index, startDate, endDate, tags }: GetPurchaseRateProps,\n requestOptions?: RequestOptions,\n ): Promise<GetPurchaseRateResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getPurchaseRate`.');\n }\n\n const requestPath = '/2/conversions/purchaseRate';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves revenue-related metrics, such as the total revenue or the average order value. To retrieve revenue-related metrics, sent purchase events. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getRevenue - The getRevenue object.\n * @param getRevenue.index - Index name.\n * @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getRevenue.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRevenue(\n { index, startDate, endDate, tags }: GetRevenueProps,\n requestOptions?: RequestOptions,\n ): Promise<GetRevenue> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getRevenue`.');\n }\n\n const requestPath = '/2/conversions/revenue';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the number of searches within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getSearchesCount - The getSearchesCount object.\n * @param getSearchesCount.index - Index name.\n * @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSearchesCount(\n { index, startDate, endDate, tags }: GetSearchesCountProps,\n requestOptions?: RequestOptions,\n ): Promise<GetSearchesCountResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getSearchesCount`.');\n }\n\n const requestPath = '/2/searches/count';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the most popular searches that didn\\'t lead to any clicks, from the 1,000 most frequent searches.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getSearchesNoClicks - The getSearchesNoClicks object.\n * @param getSearchesNoClicks.index - Index name.\n * @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesNoClicks.limit - Number of items to return.\n * @param getSearchesNoClicks.offset - Position of the first item to return.\n * @param getSearchesNoClicks.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSearchesNoClicks(\n { index, startDate, endDate, limit, offset, tags }: GetSearchesNoClicksProps,\n requestOptions?: RequestOptions,\n ): Promise<GetSearchesNoClicksResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getSearchesNoClicks`.');\n }\n\n const requestPath = '/2/searches/noClicks';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (limit !== undefined) {\n queryParameters.limit = limit.toString();\n }\n\n if (offset !== undefined) {\n queryParameters.offset = offset.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the most popular searches that didn\\'t return any results.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getSearchesNoResults - The getSearchesNoResults object.\n * @param getSearchesNoResults.index - Index name.\n * @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getSearchesNoResults.limit - Number of items to return.\n * @param getSearchesNoResults.offset - Position of the first item to return.\n * @param getSearchesNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getSearchesNoResults(\n { index, startDate, endDate, limit, offset, tags }: GetSearchesNoResultsProps,\n requestOptions?: RequestOptions,\n ): Promise<GetSearchesNoResultsResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getSearchesNoResults`.');\n }\n\n const requestPath = '/2/searches/noResults';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (limit !== undefined) {\n queryParameters.limit = limit.toString();\n }\n\n if (offset !== undefined) {\n queryParameters.offset = offset.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getStatus - The getStatus object.\n * @param getStatus.index - Index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getStatus({ index }: GetStatusProps, requestOptions?: RequestOptions): Promise<GetStatusResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getStatus`.');\n }\n\n const requestPath = '/2/status';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the countries with the most searches to your index.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getTopCountries - The getTopCountries object.\n * @param getTopCountries.index - Index name.\n * @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopCountries.limit - Number of items to return.\n * @param getTopCountries.offset - Position of the first item to return.\n * @param getTopCountries.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopCountries(\n { index, startDate, endDate, limit, offset, tags }: GetTopCountriesProps,\n requestOptions?: RequestOptions,\n ): Promise<GetTopCountriesResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getTopCountries`.');\n }\n\n const requestPath = '/2/countries';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (limit !== undefined) {\n queryParameters.limit = limit.toString();\n }\n\n if (offset !== undefined) {\n queryParameters.offset = offset.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getTopFilterAttributes - The getTopFilterAttributes object.\n * @param getTopFilterAttributes.index - Index name.\n * @param getTopFilterAttributes.search - Search query.\n * @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFilterAttributes.limit - Number of items to return.\n * @param getTopFilterAttributes.offset - Position of the first item to return.\n * @param getTopFilterAttributes.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopFilterAttributes(\n { index, search, startDate, endDate, limit, offset, tags }: GetTopFilterAttributesProps,\n requestOptions?: RequestOptions,\n ): Promise<GetTopFilterAttributesResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getTopFilterAttributes`.');\n }\n\n const requestPath = '/2/filters';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n if (search !== undefined) {\n queryParameters.search = search.toString();\n }\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (limit !== undefined) {\n queryParameters.limit = limit.toString();\n }\n\n if (offset !== undefined) {\n queryParameters.offset = offset.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getTopFilterForAttribute - The getTopFilterForAttribute object.\n * @param getTopFilterForAttribute.attribute - Attribute name.\n * @param getTopFilterForAttribute.index - Index name.\n * @param getTopFilterForAttribute.search - Search query.\n * @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFilterForAttribute.limit - Number of items to return.\n * @param getTopFilterForAttribute.offset - Position of the first item to return.\n * @param getTopFilterForAttribute.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopFilterForAttribute(\n { attribute, index, search, startDate, endDate, limit, offset, tags }: GetTopFilterForAttributeProps,\n requestOptions?: RequestOptions,\n ): Promise<GetTopFilterForAttributeResponse> {\n if (!attribute) {\n throw new Error('Parameter `attribute` is required when calling `getTopFilterForAttribute`.');\n }\n\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getTopFilterForAttribute`.');\n }\n\n const requestPath = '/2/filters/{attribute}'.replace('{attribute}', encodeURIComponent(attribute));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n if (search !== undefined) {\n queryParameters.search = search.toString();\n }\n\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (limit !== undefined) {\n queryParameters.limit = limit.toString();\n }\n if (offset !== undefined) {\n queryParameters.offset = offset.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the most frequently used filters for a search that didn\\'t return any results. To get the most frequent searches without results, use the [Retrieve searches without results](#tag/search/operation/getSearchesNoResults) operation.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getTopFiltersNoResults - The getTopFiltersNoResults object.\n * @param getTopFiltersNoResults.index - Index name.\n * @param getTopFiltersNoResults.search - Search query.\n * @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopFiltersNoResults.limit - Number of items to return.\n * @param getTopFiltersNoResults.offset - Position of the first item to return.\n * @param getTopFiltersNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopFiltersNoResults(\n { index, search, startDate, endDate, limit, offset, tags }: GetTopFiltersNoResultsProps,\n requestOptions?: RequestOptions,\n ): Promise<GetTopFiltersNoResultsResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getTopFiltersNoResults`.');\n }\n\n const requestPath = '/2/filters/noResults';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n\n if (search !== undefined) {\n queryParameters.search = search.toString();\n }\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (limit !== undefined) {\n queryParameters.limit = limit.toString();\n }\n if (offset !== undefined) {\n queryParameters.offset = offset.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the object IDs of the most frequent search results.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getTopHits - The getTopHits object.\n * @param getTopHits.index - Index name.\n * @param getTopHits.search - Search query.\n * @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.\n * @param getTopHits.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.\n * @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopHits.limit - Number of items to return.\n * @param getTopHits.offset - Position of the first item to return.\n * @param getTopHits.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopHits(\n { index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags }: GetTopHitsProps,\n requestOptions?: RequestOptions,\n ): Promise<GetTopHitsResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getTopHits`.');\n }\n\n const requestPath = '/2/hits';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n if (search !== undefined) {\n queryParameters.search = search.toString();\n }\n\n if (clickAnalytics !== undefined) {\n queryParameters.clickAnalytics = clickAnalytics.toString();\n }\n if (revenueAnalytics !== undefined) {\n queryParameters.revenueAnalytics = revenueAnalytics.toString();\n }\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n\n if (limit !== undefined) {\n queryParameters.limit = limit.toString();\n }\n if (offset !== undefined) {\n queryParameters.offset = offset.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Returns the most popular search terms.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getTopSearches - The getTopSearches object.\n * @param getTopSearches.index - Index name.\n * @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.\n * @param getTopSearches.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.\n * @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.\n * @param getTopSearches.direction - Sorting direction of the results: ascending or descending.\n * @param getTopSearches.limit - Number of items to return.\n * @param getTopSearches.offset - Position of the first item to return.\n * @param getTopSearches.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTopSearches(\n {\n index,\n clickAnalytics,\n revenueAnalytics,\n startDate,\n endDate,\n orderBy,\n direction,\n limit,\n offset,\n tags,\n }: GetTopSearchesProps,\n requestOptions?: RequestOptions,\n ): Promise<GetTopSearchesResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getTopSearches`.');\n }\n\n const requestPath = '/2/searches';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n\n if (clickAnalytics !== undefined) {\n queryParameters.clickAnalytics = clickAnalytics.toString();\n }\n if (revenueAnalytics !== undefined) {\n queryParameters.revenueAnalytics = revenueAnalytics.toString();\n }\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (orderBy !== undefined) {\n queryParameters.orderBy = orderBy.toString();\n }\n if (direction !== undefined) {\n queryParameters.direction = direction.toString();\n }\n if (limit !== undefined) {\n queryParameters.limit = limit.toString();\n }\n if (offset !== undefined) {\n queryParameters.offset = offset.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the number of unique users within a time range, including a daily breakdown. Since this endpoint returns the number of unique users, the sum of the daily values might be different from the total number. By default, Algolia distinguishes search users by their IP address, _unless_ you include a pseudonymous user identifier in your search requests with the `userToken` API parameter or `x-algolia-usertoken` request header. By default, the analyzed period includes the last eight days including the current day.\n *\n * Required API Key ACLs:\n * - analytics.\n *\n * @param getUsersCount - The getUsersCount object.\n * @param getUsersCount.index - Index name.\n * @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.\n * @param getUsersCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getUsersCount(\n { index, startDate, endDate, tags }: GetUsersCountProps,\n requestOptions?: RequestOptions,\n ): Promise<GetUsersCountResponse> {\n if (!index) {\n throw new Error('Parameter `index` is required when calling `getUsersCount`.');\n }\n\n const requestPath = '/2/users/count';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n if (index !== undefined) {\n queryParameters.index = index.toString();\n }\n\n if (startDate !== undefined) {\n queryParameters.startDate = startDate.toString();\n }\n\n if (endDate !== undefined) {\n queryParameters.endDate = endDate.toString();\n }\n if (tags !== undefined) {\n queryParameters.tags = tags.toString();\n }\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n };\n}\n"],"mappings":";AAGA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,4BAA4B;;;ACRrC,SAAS,YAAY,mBAAmB,uBAAuB;AAyDxD,IAAM,mBAAmB;AAEzB,IAAM,UAAU,CAAC,MAAM,IAAI;AAGlC,SAAS,gBAAgB,QAAyB;AAChD,QAAM,MAAM,CAAC,SAAS,0BAA0B,iCAAiC,QAAQ,YAAY,MAAM;AAE3G,SAAO,CAAC,EAAE,KAAK,QAAQ,aAAa,UAAU,QAAQ,CAAC;AACzD;AAGO,SAAS,sBAAsB;AAAA,EACpC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,GAA8C;AAC5C,QAAM,OAAO,WAAW,aAAa,cAAc,QAAQ;AAC3D,QAAM,cAAc,kBAAkB;AAAA,IACpC,OAAO,gBAAgB,YAAY;AAAA,IACnC,GAAG;AAAA,IACH,cAAc,gBAAgB;AAAA,MAC5B;AAAA,MACA,QAAQ;AAAA,MACR,SAAS;AAAA,IACX,CAAC;AAAA,IACD,aAAa;AAAA,MACX,gBAAgB;AAAA,MAChB,GAAG,KAAK,QAAQ;AAAA,MAChB,GAAG,QAAQ;AAAA,IACb;AAAA,IACA,qBAAqB;AAAA,MACnB,GAAG,KAAK,gBAAgB;AAAA,MACxB,GAAG,QAAQ;AAAA,IACb;AAAA,EACF,CAAC;AAED,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;AAAA,EACvC;AAEA,MAAI,CAAC,UAAU,OAAO,WAAW,UAAU;AACzC,UAAM,IAAI,MAAM,sBAAsB;AAAA,EACxC;AAEA,MAAI,WAAW,OAAO,WAAW,YAAY,CAAC,QAAQ,SAAS,MAAM,IAAI;AACvE,UAAM,IAAI,MAAM,4CAA4C,QAAQ,KAAK,IAAI,CAAC,EAAE;AAAA,EAClF;AAEA,SAAO;AAAA,IACL,GAAG,sBAAsB;AAAA,MACvB;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,QACR,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA,eAAe,CAAC,EAAE,SAAS,QAAQ,CAAC;AAAA,MACpC,WAAW,qBAAqB;AAAA,MAChC,gBAAgB,gBAAgB;AAAA,MAChC,eAAe,gBAAgB;AAAA,MAC/B,YAAY,kBAAkB;AAAA,MAC9B,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;","names":[]}
|
package/dist/builds/node.cjs
CHANGED
|
@@ -29,7 +29,7 @@ var import_requester_node_http = require("@algolia/requester-node-http");
|
|
|
29
29
|
|
|
30
30
|
// src/analyticsClient.ts
|
|
31
31
|
var import_client_common = require("@algolia/client-common");
|
|
32
|
-
var apiClientVersion = "5.
|
|
32
|
+
var apiClientVersion = "5.4.0";
|
|
33
33
|
var REGIONS = ["de", "us"];
|
|
34
34
|
function getDefaultHosts(region) {
|
|
35
35
|
const url = !region ? "analytics.algolia.com" : "analytics.{region}.algolia.com".replace("{region}", region);
|
|
@@ -44,25 +44,26 @@ function createAnalyticsClient({
|
|
|
44
44
|
...options
|
|
45
45
|
}) {
|
|
46
46
|
const auth = (0, import_client_common.createAuth)(appIdOption, apiKeyOption, authMode);
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
version: apiClientVersion
|
|
55
|
-
}),
|
|
56
|
-
baseHeaders: {
|
|
57
|
-
"content-type": "text/plain",
|
|
58
|
-
...auth.headers(),
|
|
59
|
-
...options.baseHeaders
|
|
60
|
-
},
|
|
61
|
-
baseQueryParameters: {
|
|
62
|
-
...auth.queryParameters(),
|
|
63
|
-
...options.baseQueryParameters
|
|
64
|
-
}
|
|
47
|
+
const transporter = (0, import_client_common.createTransporter)({
|
|
48
|
+
hosts: getDefaultHosts(regionOption),
|
|
49
|
+
...options,
|
|
50
|
+
algoliaAgent: (0, import_client_common.getAlgoliaAgent)({
|
|
51
|
+
algoliaAgents,
|
|
52
|
+
client: "Analytics",
|
|
53
|
+
version: apiClientVersion
|
|
65
54
|
}),
|
|
55
|
+
baseHeaders: {
|
|
56
|
+
"content-type": "text/plain",
|
|
57
|
+
...auth.headers(),
|
|
58
|
+
...options.baseHeaders
|
|
59
|
+
},
|
|
60
|
+
baseQueryParameters: {
|
|
61
|
+
...auth.queryParameters(),
|
|
62
|
+
...options.baseQueryParameters
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
return {
|
|
66
|
+
transporter,
|
|
66
67
|
/**
|
|
67
68
|
* The `appId` currently in use.
|
|
68
69
|
*/
|
|
@@ -71,15 +72,13 @@ function createAnalyticsClient({
|
|
|
71
72
|
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
72
73
|
*/
|
|
73
74
|
clearCache() {
|
|
74
|
-
return Promise.all([
|
|
75
|
-
() => void 0
|
|
76
|
-
);
|
|
75
|
+
return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);
|
|
77
76
|
},
|
|
78
77
|
/**
|
|
79
78
|
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
80
79
|
*/
|
|
81
80
|
get _ua() {
|
|
82
|
-
return
|
|
81
|
+
return transporter.algoliaAgent.value;
|
|
83
82
|
},
|
|
84
83
|
/**
|
|
85
84
|
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
|
|
@@ -88,7 +87,7 @@ function createAnalyticsClient({
|
|
|
88
87
|
* @param version - The version of the agent.
|
|
89
88
|
*/
|
|
90
89
|
addAlgoliaAgent(segment, version) {
|
|
91
|
-
|
|
90
|
+
transporter.algoliaAgent.add({ segment, version });
|
|
92
91
|
},
|
|
93
92
|
/**
|
|
94
93
|
* Helper method to switch the API key used to authenticate the requests.
|
|
@@ -98,9 +97,9 @@ function createAnalyticsClient({
|
|
|
98
97
|
*/
|
|
99
98
|
setClientApiKey({ apiKey }) {
|
|
100
99
|
if (!authMode || authMode === "WithinHeaders") {
|
|
101
|
-
|
|
100
|
+
transporter.baseHeaders["x-algolia-api-key"] = apiKey;
|
|
102
101
|
} else {
|
|
103
|
-
|
|
102
|
+
transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
|
|
104
103
|
}
|
|
105
104
|
},
|
|
106
105
|
/**
|
|
@@ -124,7 +123,7 @@ function createAnalyticsClient({
|
|
|
124
123
|
queryParameters,
|
|
125
124
|
headers
|
|
126
125
|
};
|
|
127
|
-
return
|
|
126
|
+
return transporter.request(request, requestOptions);
|
|
128
127
|
},
|
|
129
128
|
/**
|
|
130
129
|
* This method allow you to send requests to the Algolia REST API.
|
|
@@ -147,7 +146,7 @@ function createAnalyticsClient({
|
|
|
147
146
|
queryParameters,
|
|
148
147
|
headers
|
|
149
148
|
};
|
|
150
|
-
return
|
|
149
|
+
return transporter.request(request, requestOptions);
|
|
151
150
|
},
|
|
152
151
|
/**
|
|
153
152
|
* This method allow you to send requests to the Algolia REST API.
|
|
@@ -172,7 +171,7 @@ function createAnalyticsClient({
|
|
|
172
171
|
headers,
|
|
173
172
|
data: body ? body : {}
|
|
174
173
|
};
|
|
175
|
-
return
|
|
174
|
+
return transporter.request(request, requestOptions);
|
|
176
175
|
},
|
|
177
176
|
/**
|
|
178
177
|
* This method allow you to send requests to the Algolia REST API.
|
|
@@ -197,7 +196,7 @@ function createAnalyticsClient({
|
|
|
197
196
|
headers,
|
|
198
197
|
data: body ? body : {}
|
|
199
198
|
};
|
|
200
|
-
return
|
|
199
|
+
return transporter.request(request, requestOptions);
|
|
201
200
|
},
|
|
202
201
|
/**
|
|
203
202
|
* Retrieves the add-to-cart rate for all of your searches with at least one add-to-cart event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
@@ -237,7 +236,7 @@ function createAnalyticsClient({
|
|
|
237
236
|
queryParameters,
|
|
238
237
|
headers
|
|
239
238
|
};
|
|
240
|
-
return
|
|
239
|
+
return transporter.request(request, requestOptions);
|
|
241
240
|
},
|
|
242
241
|
/**
|
|
243
242
|
* Retrieves the average click position of your search results, including a daily breakdown. The average click position is the average of all clicked search results\' positions. For example, if users only ever click on the first result for any search, the average click position is 1. By default, the analyzed period includes the last eight days including the current day.
|
|
@@ -277,7 +276,7 @@ function createAnalyticsClient({
|
|
|
277
276
|
queryParameters,
|
|
278
277
|
headers
|
|
279
278
|
};
|
|
280
|
-
return
|
|
279
|
+
return transporter.request(request, requestOptions);
|
|
281
280
|
},
|
|
282
281
|
/**
|
|
283
282
|
* Retrieves the positions in the search results and their associated number of clicks. This lets you check how many clicks the first, second, or tenth search results receive.
|
|
@@ -317,7 +316,7 @@ function createAnalyticsClient({
|
|
|
317
316
|
queryParameters,
|
|
318
317
|
headers
|
|
319
318
|
};
|
|
320
|
-
return
|
|
319
|
+
return transporter.request(request, requestOptions);
|
|
321
320
|
},
|
|
322
321
|
/**
|
|
323
322
|
* Retrieves the click-through rate for all of your searches with at least one click event, including a daily breakdown By default, the analyzed period includes the last eight days including the current day.
|
|
@@ -357,7 +356,7 @@ function createAnalyticsClient({
|
|
|
357
356
|
queryParameters,
|
|
358
357
|
headers
|
|
359
358
|
};
|
|
360
|
-
return
|
|
359
|
+
return transporter.request(request, requestOptions);
|
|
361
360
|
},
|
|
362
361
|
/**
|
|
363
362
|
* Retrieves the conversion rate for all of your searches with at least one conversion event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
@@ -397,7 +396,7 @@ function createAnalyticsClient({
|
|
|
397
396
|
queryParameters,
|
|
398
397
|
headers
|
|
399
398
|
};
|
|
400
|
-
return
|
|
399
|
+
return transporter.request(request, requestOptions);
|
|
401
400
|
},
|
|
402
401
|
/**
|
|
403
402
|
* Retrieves the fraction of searches that didn\'t lead to any click within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
@@ -437,7 +436,7 @@ function createAnalyticsClient({
|
|
|
437
436
|
queryParameters,
|
|
438
437
|
headers
|
|
439
438
|
};
|
|
440
|
-
return
|
|
439
|
+
return transporter.request(request, requestOptions);
|
|
441
440
|
},
|
|
442
441
|
/**
|
|
443
442
|
* Retrieves the fraction of searches that didn\'t return any results within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
@@ -477,7 +476,7 @@ function createAnalyticsClient({
|
|
|
477
476
|
queryParameters,
|
|
478
477
|
headers
|
|
479
478
|
};
|
|
480
|
-
return
|
|
479
|
+
return transporter.request(request, requestOptions);
|
|
481
480
|
},
|
|
482
481
|
/**
|
|
483
482
|
* Retrieves the purchase rate for all of your searches with at least one purchase event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
@@ -517,7 +516,7 @@ function createAnalyticsClient({
|
|
|
517
516
|
queryParameters,
|
|
518
517
|
headers
|
|
519
518
|
};
|
|
520
|
-
return
|
|
519
|
+
return transporter.request(request, requestOptions);
|
|
521
520
|
},
|
|
522
521
|
/**
|
|
523
522
|
* Retrieves revenue-related metrics, such as the total revenue or the average order value. To retrieve revenue-related metrics, sent purchase events. By default, the analyzed period includes the last eight days including the current day.
|
|
@@ -557,7 +556,7 @@ function createAnalyticsClient({
|
|
|
557
556
|
queryParameters,
|
|
558
557
|
headers
|
|
559
558
|
};
|
|
560
|
-
return
|
|
559
|
+
return transporter.request(request, requestOptions);
|
|
561
560
|
},
|
|
562
561
|
/**
|
|
563
562
|
* Retrieves the number of searches within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
|
|
@@ -597,7 +596,7 @@ function createAnalyticsClient({
|
|
|
597
596
|
queryParameters,
|
|
598
597
|
headers
|
|
599
598
|
};
|
|
600
|
-
return
|
|
599
|
+
return transporter.request(request, requestOptions);
|
|
601
600
|
},
|
|
602
601
|
/**
|
|
603
602
|
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
|
|
@@ -645,7 +644,7 @@ function createAnalyticsClient({
|
|
|
645
644
|
queryParameters,
|
|
646
645
|
headers
|
|
647
646
|
};
|
|
648
|
-
return
|
|
647
|
+
return transporter.request(request, requestOptions);
|
|
649
648
|
},
|
|
650
649
|
/**
|
|
651
650
|
* Retrieves the most popular searches that didn\'t return any results.
|
|
@@ -693,7 +692,7 @@ function createAnalyticsClient({
|
|
|
693
692
|
queryParameters,
|
|
694
693
|
headers
|
|
695
694
|
};
|
|
696
|
-
return
|
|
695
|
+
return transporter.request(request, requestOptions);
|
|
697
696
|
},
|
|
698
697
|
/**
|
|
699
698
|
* Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
|
|
@@ -721,7 +720,7 @@ function createAnalyticsClient({
|
|
|
721
720
|
queryParameters,
|
|
722
721
|
headers
|
|
723
722
|
};
|
|
724
|
-
return
|
|
723
|
+
return transporter.request(request, requestOptions);
|
|
725
724
|
},
|
|
726
725
|
/**
|
|
727
726
|
* Retrieves the countries with the most searches to your index.
|
|
@@ -769,7 +768,7 @@ function createAnalyticsClient({
|
|
|
769
768
|
queryParameters,
|
|
770
769
|
headers
|
|
771
770
|
};
|
|
772
|
-
return
|
|
771
|
+
return transporter.request(request, requestOptions);
|
|
773
772
|
},
|
|
774
773
|
/**
|
|
775
774
|
* Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
@@ -821,7 +820,7 @@ function createAnalyticsClient({
|
|
|
821
820
|
queryParameters,
|
|
822
821
|
headers
|
|
823
822
|
};
|
|
824
|
-
return
|
|
823
|
+
return transporter.request(request, requestOptions);
|
|
825
824
|
},
|
|
826
825
|
/**
|
|
827
826
|
* Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
@@ -877,7 +876,7 @@ function createAnalyticsClient({
|
|
|
877
876
|
queryParameters,
|
|
878
877
|
headers
|
|
879
878
|
};
|
|
880
|
-
return
|
|
879
|
+
return transporter.request(request, requestOptions);
|
|
881
880
|
},
|
|
882
881
|
/**
|
|
883
882
|
* Retrieves the most frequently used filters for a search that didn\'t return any results. To get the most frequent searches without results, use the [Retrieve searches without results](#tag/search/operation/getSearchesNoResults) operation.
|
|
@@ -929,7 +928,7 @@ function createAnalyticsClient({
|
|
|
929
928
|
queryParameters,
|
|
930
929
|
headers
|
|
931
930
|
};
|
|
932
|
-
return
|
|
931
|
+
return transporter.request(request, requestOptions);
|
|
933
932
|
},
|
|
934
933
|
/**
|
|
935
934
|
* Retrieves the object IDs of the most frequent search results.
|
|
@@ -989,7 +988,7 @@ function createAnalyticsClient({
|
|
|
989
988
|
queryParameters,
|
|
990
989
|
headers
|
|
991
990
|
};
|
|
992
|
-
return
|
|
991
|
+
return transporter.request(request, requestOptions);
|
|
993
992
|
},
|
|
994
993
|
/**
|
|
995
994
|
* Returns the most popular search terms.
|
|
@@ -1064,7 +1063,7 @@ function createAnalyticsClient({
|
|
|
1064
1063
|
queryParameters,
|
|
1065
1064
|
headers
|
|
1066
1065
|
};
|
|
1067
|
-
return
|
|
1066
|
+
return transporter.request(request, requestOptions);
|
|
1068
1067
|
},
|
|
1069
1068
|
/**
|
|
1070
1069
|
* Retrieves the number of unique users within a time range, including a daily breakdown. Since this endpoint returns the number of unique users, the sum of the daily values might be different from the total number. By default, Algolia distinguishes search users by their IP address, _unless_ you include a pseudonymous user identifier in your search requests with the `userToken` API parameter or `x-algolia-usertoken` request header. By default, the analyzed period includes the last eight days including the current day.
|
|
@@ -1104,7 +1103,7 @@ function createAnalyticsClient({
|
|
|
1104
1103
|
queryParameters,
|
|
1105
1104
|
headers
|
|
1106
1105
|
};
|
|
1107
|
-
return
|
|
1106
|
+
return transporter.request(request, requestOptions);
|
|
1108
1107
|
}
|
|
1109
1108
|
};
|
|
1110
1109
|
}
|