apify-client 3.0.0-beta.113 → 3.0.0-beta.115

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.
@@ -16,8 +16,8 @@ export const runtime = {
16
16
  async createHttpAgents() {
17
17
  return undefined;
18
18
  },
19
- readableFromWeb() {
20
- throw new Error('Streamed responses are only available in Node.js.');
19
+ streamToWeb() {
20
+ throw new Error('A Readable stream is only available in Node.js.');
21
21
  },
22
22
  // A browser applies the proxy settings of the system on its own.
23
23
  unusedProxyHint() {
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import type { Readable } from 'node:stream';
2
- import type { TypedArray } from 'type-fest';
3
2
  import { z } from 'zod';
4
3
  import type { ApifyApiError } from './apify_api_error.js';
5
4
  import { parseArgument } from '@apify/validations';
@@ -106,6 +105,10 @@ export declare function isBuffer(value: unknown): value is Buffer | ArrayBuffer
106
105
  * request, so a request with a blob body can be retried.
107
106
  */
108
107
  export declare function isBlob(value: unknown): value is Blob;
108
+ /**
109
+ * Whether a value is a web `ReadableStream`, which is what the callers get for a streamed response.
110
+ */
111
+ export declare function isWebStream(value: unknown): value is ReadableStream<Uint8Array>;
109
112
  export declare function isStream(value: unknown): value is Readable;
110
113
  /**
111
114
  * Helper class to create async iterators from paginated list endpoints.
@@ -240,3 +243,23 @@ export declare function toPath(path: string | string[]): string;
240
243
  * @internal
241
244
  */
242
245
  export declare function sleep(millis: number, signal?: AbortSignal): Promise<void>;
246
+ /** Any string, written so that a union with string literals keeps suggesting the literals. */
247
+ export type AnyString = string & {};
248
+ /** Any valid JSON value. */
249
+ export type JsonValue = string | number | boolean | null | {
250
+ [Key in string]: JsonValue;
251
+ } | JsonValue[] | readonly JsonValue[];
252
+ /**
253
+ * Any JSON object.
254
+ * @internal
255
+ */
256
+ export type JsonObject = {
257
+ [Key in string]: JsonValue;
258
+ };
259
+ /**
260
+ * Any JSON array.
261
+ * @internal
262
+ */
263
+ export type JsonArray = JsonValue[] | readonly JsonValue[];
264
+ /** Any typed array, such as `Uint8Array` or `Float64Array`. */
265
+ export type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
package/dist/utils.js CHANGED
@@ -246,6 +246,12 @@ export function isBlob(value) {
246
246
  function isTagged(value, tag) {
247
247
  return Object.prototype.toString.call(value) === `[object ${tag}]`;
248
248
  }
249
+ /**
250
+ * Whether a value is a web `ReadableStream`, which is what the callers get for a streamed response.
251
+ */
252
+ export function isWebStream(value) {
253
+ return isTagged(value, 'ReadableStream');
254
+ }
249
255
  export function isStream(value) {
250
256
  if (value === null || typeof value !== 'object')
251
257
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apify-client",
3
- "version": "3.0.0-beta.113",
3
+ "version": "3.0.0-beta.115",
4
4
  "description": "Apify API client for JavaScript",
5
5
  "engines": {
6
6
  "node": ">=22.15.0"
@@ -74,7 +74,6 @@
74
74
  "ansi-colors": "^4.1.3",
75
75
  "content-type": "^3.1.1",
76
76
  "tslib": "^2.9.1",
77
- "type-fest": "^5.10.0",
78
77
  "zod": "^4.6.7"
79
78
  },
80
79
  "peerDependencies": {