@algolia/client-search 5.17.1 → 5.18.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.
@@ -24,12 +24,13 @@ __export(node_exports, {
24
24
  searchClient: () => searchClient
25
25
  });
26
26
  module.exports = __toCommonJS(node_exports);
27
+ var import_node_crypto = require("crypto");
27
28
  var import_requester_node_http = require("@algolia/requester-node-http");
28
29
  var import_client_common2 = require("@algolia/client-common");
29
30
 
30
31
  // src/searchClient.ts
31
32
  var import_client_common = require("@algolia/client-common");
32
- var apiClientVersion = "5.17.1";
33
+ var apiClientVersion = "5.18.0";
33
34
  function getDefaultHosts(appId) {
34
35
  return [
35
36
  {
@@ -2318,7 +2319,6 @@ function createSearchClient({
2318
2319
  }
2319
2320
 
2320
2321
  // builds/node.ts
2321
- var import_node_crypto = require("crypto");
2322
2322
  function searchClient(appId, apiKey, options) {
2323
2323
  if (!appId || typeof appId !== "string") {
2324
2324
  throw new Error("`appId` is missing.");
@@ -2380,7 +2380,7 @@ function searchClient(appId, apiKey, options) {
2380
2380
  * @param getSecuredApiKeyRemainingValidity.securedApiKey - The secured API key generated with the `generateSecuredApiKey` method.
2381
2381
  */
2382
2382
  getSecuredApiKeyRemainingValidity: ({ securedApiKey }) => {
2383
- const decodedString = Buffer.from(securedApiKey, "base64").toString("ascii");
2383
+ const decodedString = atob(securedApiKey);
2384
2384
  const regex = /validUntil=(\d+)/;
2385
2385
  const match = decodedString.match(regex);
2386
2386
  if (match === null) {