apify-client 2.13.1-beta.0 → 2.13.1-beta.2

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/bundle.js CHANGED
@@ -67032,7 +67032,7 @@ class DatasetClient extends _base_resource_client__WEBPACK_IMPORTED_MODULE_1__.R
67032
67032
  * Generates a URL that can be used to access dataset items.
67033
67033
  *
67034
67034
  * If the client has permission to access the dataset's URL signing key,
67035
- * the URL will include a signature to verify its authenticity.
67035
+ * the URL will include a signature which will allow the link to work even without authentication.
67036
67036
  *
67037
67037
  * You can optionally control how long the signed URL should be valid using the `expiresInMillis` option.
67038
67038
  * This value sets the expiration duration in milliseconds from the time the URL is generated.
@@ -67199,10 +67199,25 @@ class KeyValueStoreClient extends _base_resource_client__WEBPACK_IMPORTED_MODULE
67199
67199
  return (0,_utils__WEBPACK_IMPORTED_MODULE_3__.cast)((0,_utils__WEBPACK_IMPORTED_MODULE_3__.parseDateFields)((0,_utils__WEBPACK_IMPORTED_MODULE_3__.pluckData)(response.data)));
67200
67200
  }
67201
67201
  /**
67202
- * Generates a URL that can be used to access key-value store keys.
67202
+ * Generates a URL that can be used to access key-value store record.
67203
67203
  *
67204
67204
  * If the client has permission to access the key-value store's URL signing key,
67205
67205
  * the URL will include a signature to verify its authenticity.
67206
+ */ async getRecordPublicUrl(key) {
67207
+ ow__WEBPACK_IMPORTED_MODULE_4___default()(key, (ow__WEBPACK_IMPORTED_MODULE_4___default().string.nonEmpty));
67208
+ const store = await this.get();
67209
+ const recordPublicUrl = new URL(this._url(`records/${key}`));
67210
+ if (store === null || store === void 0 ? void 0 : store.urlSigningSecretKey) {
67211
+ const signature = (0,_apify_utilities__WEBPACK_IMPORTED_MODULE_1__.createHmacSignature)(store.urlSigningSecretKey, key);
67212
+ recordPublicUrl.searchParams.append('signature', signature);
67213
+ }
67214
+ return recordPublicUrl.toString();
67215
+ }
67216
+ /**
67217
+ * Generates a URL that can be used to access key-value store keys.
67218
+ *
67219
+ * If the client has permission to access the key-value store's URL signing key,
67220
+ * the URL will include a signature which will allow the link to work even without authentication.
67206
67221
  *
67207
67222
  * You can optionally control how long the signed URL should be valid using the `expiresInMillis` option.
67208
67223
  * This value sets the expiration duration in milliseconds from the time the URL is generated.
@@ -68991,7 +69006,7 @@ function isStream(value) {
68991
69006
  function getVersionData() {
68992
69007
  if (true) {
68993
69008
  return {
68994
- version: "2.13.1-beta.0"
69009
+ version: "2.13.1-beta.2"
68995
69010
  };
68996
69011
  }
68997
69012
  // eslint-disable-next-line
@@ -76824,7 +76839,7 @@ module.exports = JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1
76824
76839
  }),
76825
76840
  "./package.json": (function (module) {
76826
76841
  "use strict";
76827
- module.exports = JSON.parse('{"name":"apify-client","version":"2.13.1-beta.0","description":"Apify API client for JavaScript","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/bundle.js","unpkg":"dist/bundle.js","exports":{"./package.json":"./package.json",".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts","browser":"./dist/bundle.js"}},"keywords":["apify","api","apifier","crawler","scraper"],"author":{"name":"Apify","email":"support@apify.com","url":"https://apify.com"},"contributors":["Jan Curn <jan@apify.com>","Marek Trunkát <marek@apify.com>","Ondra Urban <ondra@apify.com>","Jakub Drobník <jakub.drobnik@apify.com>"],"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/apify/apify-client-js"},"bugs":{"url":"https://github.com/apify/apify-client-js/issues"},"homepage":"https://docs.apify.com/api/client/js/","files":["dist","!dist/*.tsbuildinfo"],"scripts":{"build":"npm run clean && npm run build:node && npm run build:browser","postbuild":"gen-esm-wrapper dist/index.js dist/index.mjs","prepublishOnly":"(test $CI || (echo \\"Publishing is reserved to CI!\\"; exit 1))","clean":"rimraf dist","test":"npm run build && jest","lint":"eslint","lint:fix":"eslint --fix","tsc-check-tests":"tsc --noEmit --project test/tsconfig.json","format":"prettier --write .","format:check":"prettier --check .","build:node":"tsc","build:browser":"rsbuild build"},"dependencies":{"@apify/consts":"^2.25.0","@apify/log":"^2.2.6","@apify/utilities":"^2.18.0","@crawlee/types":"^3.3.0","agentkeepalive":"^4.2.1","async-retry":"^1.3.3","axios":"^1.6.7","content-type":"^1.0.5","ow":"^0.28.2","tslib":"^2.5.0","type-fest":"^4.0.0"},"devDependencies":{"@apify/eslint-config":"^1.0.0","@apify/tsconfig":"^0.1.1","@babel/cli":"^7.21.0","@babel/core":"^7.21.0","@babel/preset-env":"^7.20.2","@babel/register":"^7.21.0","@crawlee/puppeteer":"^3.2.2","@rsbuild/core":"^1.3.6","@rsbuild/plugin-node-polyfill":"^1.3.0","@stylistic/eslint-plugin-ts":"^4.2.0","@types/async-retry":"^1.4.5","@types/content-type":"^1.1.5","@types/express":"^4.17.17","@types/fs-extra":"^11.0.1","@types/jest":"^29.4.0","@types/node":"^22.0.0","ajv":"^8.17.1","babel-loader":"^10.0.0","body-parser":"^1.20.3","compression":"^1.7.4","eslint":"^9.24.0","eslint-config-prettier":"^10.1.2","express":"^4.21.1","fs-extra":"^11.1.0","gen-esm-wrapper":"^1.1.2","globals":"^16.0.0","jest":"^29.4.3","prettier":"^3.5.3","process":"^0.11.10","puppeteer":"^24.0.0","rimraf":"^6.0.0","source-map-support":"^0.5.21","ts-jest":"^29.0.5","ts-loader":"^9.4.2","ts-node":"^10.9.1","typescript":"^5.8.3","typescript-eslint":"^8.29.1"},"packageManager":"npm@10.9.2"}')
76842
+ module.exports = JSON.parse('{"name":"apify-client","version":"2.13.1-beta.2","description":"Apify API client for JavaScript","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/bundle.js","unpkg":"dist/bundle.js","exports":{"./package.json":"./package.json",".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts","browser":"./dist/bundle.js"}},"keywords":["apify","api","apifier","crawler","scraper"],"author":{"name":"Apify","email":"support@apify.com","url":"https://apify.com"},"contributors":["Jan Curn <jan@apify.com>","Marek Trunkát <marek@apify.com>","Ondra Urban <ondra@apify.com>","Jakub Drobník <jakub.drobnik@apify.com>"],"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/apify/apify-client-js"},"bugs":{"url":"https://github.com/apify/apify-client-js/issues"},"homepage":"https://docs.apify.com/api/client/js/","files":["dist","!dist/*.tsbuildinfo"],"scripts":{"build":"npm run clean && npm run build:node && npm run build:browser","postbuild":"gen-esm-wrapper dist/index.js dist/index.mjs","prepublishOnly":"(test $CI || (echo \\"Publishing is reserved to CI!\\"; exit 1))","clean":"rimraf dist","test":"npm run build && jest","lint":"eslint","lint:fix":"eslint --fix","tsc-check-tests":"tsc --noEmit --project test/tsconfig.json","format":"prettier --write .","format:check":"prettier --check .","build:node":"tsc","build:browser":"rsbuild build"},"dependencies":{"@apify/consts":"^2.25.0","@apify/log":"^2.2.6","@apify/utilities":"^2.18.0","@crawlee/types":"^3.3.0","agentkeepalive":"^4.2.1","async-retry":"^1.3.3","axios":"^1.6.7","content-type":"^1.0.5","ow":"^0.28.2","tslib":"^2.5.0","type-fest":"^4.0.0"},"devDependencies":{"@apify/eslint-config":"^1.0.0","@apify/tsconfig":"^0.1.1","@babel/cli":"^7.21.0","@babel/core":"^7.21.0","@babel/preset-env":"^7.20.2","@babel/register":"^7.21.0","@crawlee/puppeteer":"^3.2.2","@rsbuild/core":"^1.3.6","@rsbuild/plugin-node-polyfill":"^1.3.0","@stylistic/eslint-plugin-ts":"^4.2.0","@types/async-retry":"^1.4.5","@types/content-type":"^1.1.5","@types/express":"^4.17.17","@types/fs-extra":"^11.0.1","@types/jest":"^29.4.0","@types/node":"^22.0.0","ajv":"^8.17.1","babel-loader":"^10.0.0","body-parser":"^1.20.3","compression":"^1.7.4","eslint":"^9.24.0","eslint-config-prettier":"^10.1.2","express":"^4.21.1","fs-extra":"^11.1.0","gen-esm-wrapper":"^1.1.2","globals":"^16.0.0","jest":"^29.4.3","prettier":"^3.5.3","process":"^0.11.10","puppeteer":"^24.0.0","rimraf":"^6.0.0","source-map-support":"^0.5.21","ts-jest":"^29.0.5","ts-loader":"^9.4.2","ts-node":"^10.9.1","typescript":"^5.8.3","typescript-eslint":"^8.29.1"},"packageManager":"npm@10.9.2"}')
76828
76843
 
76829
76844
  }),
76830
76845
 
@@ -76918,7 +76933,7 @@ __webpack_require__.hu = (chunkId) => ('' + chunkId + '.' + __webpack_require__.
76918
76933
  })();
76919
76934
  // webpack/runtime/get_full_hash
76920
76935
  (() => {
76921
- __webpack_require__.h = () => ("cec008fba4255e08")
76936
+ __webpack_require__.h = () => ("f5577e55469a1aab")
76922
76937
  })();
76923
76938
  // webpack/runtime/get_main_filename/update manifest
76924
76939
  (() => {