apify-client 3.0.0-beta.24 → 3.0.0-beta.26

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.
@@ -174,8 +174,14 @@ export declare class KeyValueStoreClient extends ResourceClient {
174
174
  */
175
175
  recordExists(key: string, options?: TimeoutOptions): Promise<boolean>;
176
176
  /**
177
+ * By default, the value is parsed by the record's content type: `application/json` is parsed into a value,
178
+ * `text/*` and `application/*xml` are decoded to a string, and anything else is returned as a Buffer (Node.js)
179
+ * or ArrayBuffer (browser). A record whose body does not parse as its content type claims, such as a non-JSON
180
+ * string stored under `application/json`, makes the call throw an {@link InvalidResponseBodyError}, which
181
+ * carries the raw body in `error.response`.
182
+ *
177
183
  * You can use the `buffer` option to get the value in a Buffer (Node.js)
178
- * or ArrayBuffer (browser) format. In Node.js (not in browser) you can also
184
+ * or ArrayBuffer (browser) format, which skips the parsing. In Node.js (not in browser) you can also
179
185
  * use the `stream` option to get a Readable stream.
180
186
  *
181
187
  * When the record does not exist, the function resolves to `undefined`. It does
@@ -198,6 +204,9 @@ export declare class KeyValueStoreClient extends ResourceClient {
198
204
  * The content type is automatically determined based on the value type, but can be
199
205
  * overridden using the `contentType` property.
200
206
  *
207
+ * A string is sent as it is, even under `application/json`, so a string stored under a JSON content type has
208
+ * to be valid JSON already, or {@link getRecord} fails to parse it back.
209
+ *
201
210
  * **Note about streams:** If the value is a stream object (has `.pipe` and `.on` methods),
202
211
  * the upload cannot be retried on failure or follow redirects. For reliable uploads,
203
212
  * buffer the entire stream into memory first.
@@ -351,6 +351,9 @@ export class KeyValueStoreClient extends ResourceClient {
351
351
  * The content type is automatically determined based on the value type, but can be
352
352
  * overridden using the `contentType` property.
353
353
  *
354
+ * A string is sent as it is, even under `application/json`, so a string stored under a JSON content type has
355
+ * to be valid JSON already, or {@link getRecord} fails to parse it back.
356
+ *
354
357
  * **Note about streams:** If the value is a stream object (has `.pipe` and `.on` methods),
355
358
  * the upload cannot be retried on failure or follow redirects. For reliable uploads,
356
359
  * buffer the entire stream into memory first.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apify-client",
3
- "version": "3.0.0-beta.24",
3
+ "version": "3.0.0-beta.26",
4
4
  "description": "Apify API client for JavaScript",
5
5
  "engines": {
6
6
  "node": ">=22.0.0"