apify-client 2.15.1 → 2.16.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/bundle.js CHANGED
@@ -67034,13 +67034,13 @@ class DatasetClient extends _base_resource_client__WEBPACK_IMPORTED_MODULE_1__.R
67034
67034
  * If the client has permission to access the dataset's URL signing key,
67035
67035
  * the URL will include a signature which will allow the link to work even without authentication.
67036
67036
  *
67037
- * You can optionally control how long the signed URL should be valid using the `expiresInMillis` option.
67038
- * This value sets the expiration duration in milliseconds from the time the URL is generated.
67037
+ * You can optionally control how long the signed URL should be valid using the `expiresInSecs` option.
67038
+ * This value sets the expiration duration in seconds from the time the URL is generated.
67039
67039
  * If not provided, the URL will not expire.
67040
67040
  *
67041
67041
  * Any other options (like `limit` or `prefix`) will be included as query parameters in the URL.
67042
67042
  */ async createItemsPublicUrl() {
67043
- let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, expiresInMillis = arguments.length > 1 ? arguments[1] : void 0;
67043
+ let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
67044
67044
  ow__WEBPACK_IMPORTED_MODULE_3___default()(options, ow__WEBPACK_IMPORTED_MODULE_3___default().object.exactShape({
67045
67045
  clean: (ow__WEBPACK_IMPORTED_MODULE_3___default().optional.boolean),
67046
67046
  desc: (ow__WEBPACK_IMPORTED_MODULE_3___default().optional.boolean),
@@ -67052,7 +67052,8 @@ class DatasetClient extends _base_resource_client__WEBPACK_IMPORTED_MODULE_1__.R
67052
67052
  skipEmpty: (ow__WEBPACK_IMPORTED_MODULE_3___default().optional.boolean),
67053
67053
  skipHidden: (ow__WEBPACK_IMPORTED_MODULE_3___default().optional.boolean),
67054
67054
  unwind: ow__WEBPACK_IMPORTED_MODULE_3___default().optional.any((ow__WEBPACK_IMPORTED_MODULE_3___default().string), ow__WEBPACK_IMPORTED_MODULE_3___default().array.ofType((ow__WEBPACK_IMPORTED_MODULE_3___default().string))),
67055
- view: (ow__WEBPACK_IMPORTED_MODULE_3___default().optional.string)
67055
+ view: (ow__WEBPACK_IMPORTED_MODULE_3___default().optional.string),
67056
+ expiresInSecs: (ow__WEBPACK_IMPORTED_MODULE_3___default().optional.number)
67056
67057
  }));
67057
67058
  const dataset = await this.get();
67058
67059
  let createdItemsPublicUrl = new URL(this._url('items'));
@@ -67060,7 +67061,7 @@ class DatasetClient extends _base_resource_client__WEBPACK_IMPORTED_MODULE_1__.R
67060
67061
  const signature = (0,_apify_utilities__WEBPACK_IMPORTED_MODULE_0__.createStorageContentSignature)({
67061
67062
  resourceId: dataset.id,
67062
67063
  urlSigningSecretKey: dataset.urlSigningSecretKey,
67063
- expiresInMillis
67064
+ expiresInMillis: options.expiresInSecs ? options.expiresInSecs * 1000 : undefined
67064
67065
  });
67065
67066
  createdItemsPublicUrl.searchParams.set('signature', signature);
67066
67067
  }
@@ -67219,18 +67220,19 @@ class KeyValueStoreClient extends _base_resource_client__WEBPACK_IMPORTED_MODULE
67219
67220
  * If the client has permission to access the key-value store's URL signing key,
67220
67221
  * the URL will include a signature which will allow the link to work even without authentication.
67221
67222
  *
67222
- * You can optionally control how long the signed URL should be valid using the `expiresInMillis` option.
67223
- * This value sets the expiration duration in milliseconds from the time the URL is generated.
67223
+ * You can optionally control how long the signed URL should be valid using the `expiresInSecs` option.
67224
+ * This value sets the expiration duration in seconds from the time the URL is generated.
67224
67225
  * If not provided, the URL will not expire.
67225
67226
  *
67226
67227
  * Any other options (like `limit` or `prefix`) will be included as query parameters in the URL.
67227
67228
  */ async createKeysPublicUrl() {
67228
- let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, expiresInMillis = arguments.length > 1 ? arguments[1] : void 0;
67229
+ let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
67229
67230
  ow__WEBPACK_IMPORTED_MODULE_4___default()(options, ow__WEBPACK_IMPORTED_MODULE_4___default().object.exactShape({
67230
67231
  limit: (ow__WEBPACK_IMPORTED_MODULE_4___default().optional.number),
67231
67232
  exclusiveStartKey: (ow__WEBPACK_IMPORTED_MODULE_4___default().optional.string),
67232
67233
  collection: (ow__WEBPACK_IMPORTED_MODULE_4___default().optional.string),
67233
- prefix: (ow__WEBPACK_IMPORTED_MODULE_4___default().optional.string)
67234
+ prefix: (ow__WEBPACK_IMPORTED_MODULE_4___default().optional.string),
67235
+ expiresInSecs: (ow__WEBPACK_IMPORTED_MODULE_4___default().optional.number)
67234
67236
  }));
67235
67237
  const store = await this.get();
67236
67238
  let createdPublicKeysUrl = new URL(this._url('keys'));
@@ -67238,7 +67240,7 @@ class KeyValueStoreClient extends _base_resource_client__WEBPACK_IMPORTED_MODULE
67238
67240
  const signature = (0,_apify_utilities__WEBPACK_IMPORTED_MODULE_1__.createStorageContentSignature)({
67239
67241
  resourceId: store.id,
67240
67242
  urlSigningSecretKey: store.urlSigningSecretKey,
67241
- expiresInMillis
67243
+ expiresInMillis: options.expiresInSecs ? options.expiresInSecs * 1000 : undefined
67242
67244
  });
67243
67245
  createdPublicKeysUrl.searchParams.set('signature', signature);
67244
67246
  }
@@ -69006,7 +69008,7 @@ function isStream(value) {
69006
69008
  function getVersionData() {
69007
69009
  if (true) {
69008
69010
  return {
69009
- version: "2.15.1"
69011
+ version: "2.16.0"
69010
69012
  };
69011
69013
  }
69012
69014
  // eslint-disable-next-line
@@ -76839,7 +76841,7 @@ module.exports = JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1
76839
76841
  }),
76840
76842
  "./package.json": (function (module) {
76841
76843
  "use strict";
76842
- module.exports = JSON.parse('{"name":"apify-client","version":"2.15.1","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"}')
76844
+ module.exports = JSON.parse('{"name":"apify-client","version":"2.16.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"}')
76843
76845
 
76844
76846
  }),
76845
76847
 
@@ -76933,7 +76935,7 @@ __webpack_require__.hu = (chunkId) => ('' + chunkId + '.' + __webpack_require__.
76933
76935
  })();
76934
76936
  // webpack/runtime/get_full_hash
76935
76937
  (() => {
76936
- __webpack_require__.h = () => ("8d4dcc20e0e62031")
76938
+ __webpack_require__.h = () => ("c9cc0c7bdcf595ae")
76937
76939
  })();
76938
76940
  // webpack/runtime/get_main_filename/update manifest
76939
76941
  (() => {