apify-client 3.0.0-beta.12 → 3.0.0-beta.120
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/README.md +23 -2
- package/dist/apify_api_error.d.ts +14 -28
- package/dist/apify_api_error.js +33 -23
- package/dist/apify_client.d.ts +125 -10
- package/dist/apify_client.js +133 -48
- package/dist/apify_client_error.d.ts +10 -0
- package/dist/apify_client_error.js +10 -0
- package/dist/axios.d.ts +2 -0
- package/dist/axios.js +1 -0
- package/dist/base/api_client.d.ts +7 -7
- package/dist/base/api_client.js +36 -36
- package/dist/base/resource_client.d.ts +13 -8
- package/dist/base/resource_client.js +60 -34
- package/dist/base/resource_collection_client.d.ts +12 -4
- package/dist/base/resource_collection_client.js +34 -11
- package/dist/body_parser.d.ts +4 -5
- package/dist/body_parser.js +19 -26
- package/dist/bundle.js +41 -35
- package/dist/bundle.js.map +1 -1
- package/dist/generated/api.d.ts +3259 -1060
- package/dist/generated/schemas.d.ts +2608 -1028
- package/dist/generated/schemas.js +600 -238
- package/dist/http_clients/axios.d.ts +80 -0
- package/dist/http_clients/axios.js +165 -0
- package/dist/http_clients/base.d.ts +402 -0
- package/dist/http_clients/base.js +680 -0
- package/dist/http_clients/fetch.d.ts +53 -0
- package/dist/http_clients/fetch.js +219 -0
- package/dist/http_clients/index.d.ts +4 -0
- package/dist/http_clients/index.js +2 -0
- package/dist/http_compressors/base.d.ts +40 -0
- package/dist/http_compressors/base.js +9 -0
- package/dist/http_compressors/brotli.d.ts +33 -0
- package/dist/http_compressors/brotli.js +39 -0
- package/dist/http_compressors/gzip.d.ts +33 -0
- package/dist/http_compressors/gzip.js +39 -0
- package/dist/http_compressors/index.d.ts +8 -0
- package/dist/http_compressors/index.js +3 -0
- package/dist/http_compressors/resolve.d.ts +24 -0
- package/dist/http_compressors/resolve.js +30 -0
- package/dist/http_compressors/zstd.d.ts +34 -0
- package/dist/http_compressors/zstd.js +43 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +5 -1
- package/dist/invalid_response_body_error.d.ts +14 -0
- package/dist/invalid_response_body_error.js +18 -0
- package/dist/models.d.ts +177 -240
- package/dist/models.js +6 -4
- package/dist/resource_clients/actor.d.ts +94 -23
- package/dist/resource_clients/actor.js +129 -43
- package/dist/resource_clients/actor_collection.d.ts +15 -11
- package/dist/resource_clients/actor_collection.js +9 -3
- package/dist/resource_clients/actor_env_var.d.ts +11 -4
- package/dist/resource_clients/actor_env_var.js +16 -6
- package/dist/resource_clients/actor_env_var_collection.d.ts +9 -4
- package/dist/resource_clients/actor_env_var_collection.js +11 -4
- package/dist/resource_clients/actor_server.d.ts +149 -0
- package/dist/resource_clients/actor_server.js +195 -0
- package/dist/resource_clients/actor_version.d.ts +19 -6
- package/dist/resource_clients/actor_version.js +19 -8
- package/dist/resource_clients/actor_version_collection.d.ts +10 -4
- package/dist/resource_clients/actor_version_collection.js +12 -4
- package/dist/resource_clients/build.d.ts +18 -7
- package/dist/resource_clients/build.js +33 -15
- package/dist/resource_clients/build_collection.d.ts +7 -5
- package/dist/resource_clients/build_collection.js +4 -1
- package/dist/resource_clients/dataset.d.ts +83 -37
- package/dist/resource_clients/dataset.js +99 -109
- package/dist/resource_clients/dataset_collection.d.ts +10 -6
- package/dist/resource_clients/dataset_collection.js +13 -2
- package/dist/resource_clients/key_value_store.d.ts +108 -33
- package/dist/resource_clients/key_value_store.js +134 -53
- package/dist/resource_clients/key_value_store_collection.d.ts +10 -6
- package/dist/resource_clients/key_value_store_collection.js +13 -2
- package/dist/resource_clients/log.d.ts +41 -25
- package/dist/resource_clients/log.js +142 -65
- package/dist/resource_clients/request_queue.d.ts +77 -31
- package/dist/resource_clients/request_queue.js +178 -93
- package/dist/resource_clients/request_queue_collection.d.ts +9 -5
- package/dist/resource_clients/request_queue_collection.js +9 -3
- package/dist/resource_clients/run.d.ts +119 -29
- package/dist/resource_clients/run.js +188 -49
- package/dist/resource_clients/run_collection.d.ts +5 -3
- package/dist/resource_clients/run_collection.js +4 -1
- package/dist/resource_clients/schedule.d.ts +15 -6
- package/dist/resource_clients/schedule.js +25 -10
- package/dist/resource_clients/schedule_collection.d.ts +6 -2
- package/dist/resource_clients/schedule_collection.js +9 -3
- package/dist/resource_clients/store_collection.d.ts +10 -4
- package/dist/resource_clients/store_collection.js +4 -1
- package/dist/resource_clients/task.d.ts +35 -12
- package/dist/resource_clients/task.js +75 -35
- package/dist/resource_clients/task_collection.d.ts +9 -5
- package/dist/resource_clients/task_collection.js +9 -3
- package/dist/resource_clients/user.d.ts +16 -7
- package/dist/resource_clients/user.js +34 -16
- package/dist/resource_clients/webhook.d.ts +16 -7
- package/dist/resource_clients/webhook.js +25 -10
- package/dist/resource_clients/webhook_collection.d.ts +8 -4
- package/dist/resource_clients/webhook_collection.js +9 -3
- package/dist/resource_clients/webhook_dispatch.d.ts +4 -1
- package/dist/resource_clients/webhook_dispatch.js +7 -2
- package/dist/resource_clients/webhook_dispatch_collection.d.ts +3 -1
- package/dist/resource_clients/webhook_dispatch_collection.js +4 -1
- package/dist/response_validation_error.d.ts +2 -1
- package/dist/response_validation_error.js +2 -1
- package/dist/runtime/node.d.ts +6 -0
- package/dist/runtime/node.js +111 -0
- package/dist/runtime/types.d.ts +82 -0
- package/dist/runtime/types.js +1 -0
- package/dist/runtime/web.d.ts +5 -0
- package/dist/runtime/web.js +60 -0
- package/dist/schemas.d.ts +372 -4
- package/dist/schemas.js +26 -4
- package/dist/statistics.d.ts +1 -6
- package/dist/statistics.js +2 -2
- package/dist/timeouts.d.ts +84 -0
- package/dist/timeouts.js +37 -0
- package/dist/timezones.d.ts +1 -1
- package/dist/utils.d.ts +115 -61
- package/dist/utils.js +220 -161
- package/dist/wait_for_resources.d.ts +8 -0
- package/dist/wait_for_resources.js +39 -0
- package/package.json +53 -38
- package/dist/http_client.d.ts +0 -88
- package/dist/http_client.js +0 -255
- package/dist/interceptors.d.ts +0 -19
- package/dist/interceptors.js +0 -105
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export * from './resource_clients/actor.js';
|
|
|
3
3
|
export * from './resource_clients/actor_collection.js';
|
|
4
4
|
export * from './resource_clients/actor_env_var.js';
|
|
5
5
|
export * from './resource_clients/actor_env_var_collection.js';
|
|
6
|
+
export * from './resource_clients/actor_server.js';
|
|
6
7
|
export * from './resource_clients/actor_version.js';
|
|
7
8
|
export * from './resource_clients/actor_version_collection.js';
|
|
8
9
|
export * from './resource_clients/build.js';
|
|
@@ -26,7 +27,10 @@ export * from './resource_clients/webhook.js';
|
|
|
26
27
|
export * from './resource_clients/webhook_collection.js';
|
|
27
28
|
export * from './resource_clients/webhook_dispatch.js';
|
|
28
29
|
export * from './resource_clients/webhook_dispatch_collection.js';
|
|
30
|
+
export * from './apify_client_error.js';
|
|
29
31
|
export * from './apify_api_error.js';
|
|
30
32
|
export { ArgumentValidationError } from '@apify/validations';
|
|
31
33
|
export * from './response_validation_error.js';
|
|
32
|
-
export
|
|
34
|
+
export * from './invalid_response_body_error.js';
|
|
35
|
+
export * from './http_clients/index.js';
|
|
36
|
+
export * from './http_compressors/index.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ApifyClientError } from './apify_client_error.js';
|
|
2
|
+
import type { HttpResponse } from './http_clients/base.js';
|
|
3
|
+
/**
|
|
4
|
+
* Thrown when the body of a successful response does not parse as its content type claims, for example a non-JSON
|
|
5
|
+
* value stored under `application/json`. The response arrived in full, so the request is not retried. An error
|
|
6
|
+
* status with an unparsable body throws {@link ApifyApiError} for its status code.
|
|
7
|
+
*/
|
|
8
|
+
export declare class InvalidResponseBodyError extends ApifyClientError {
|
|
9
|
+
code: string;
|
|
10
|
+
/** The response whose body did not parse, with the body as the transport returned it. */
|
|
11
|
+
response: HttpResponse;
|
|
12
|
+
cause: Error;
|
|
13
|
+
constructor(response: HttpResponse, cause: Error);
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ApifyClientError } from './apify_client_error.js';
|
|
2
|
+
/**
|
|
3
|
+
* Thrown when the body of a successful response does not parse as its content type claims, for example a non-JSON
|
|
4
|
+
* value stored under `application/json`. The response arrived in full, so the request is not retried. An error
|
|
5
|
+
* status with an unparsable body throws {@link ApifyApiError} for its status code.
|
|
6
|
+
*/
|
|
7
|
+
export class InvalidResponseBodyError extends ApifyClientError {
|
|
8
|
+
code;
|
|
9
|
+
/** The response whose body did not parse, with the body as the transport returned it. */
|
|
10
|
+
response;
|
|
11
|
+
constructor(response, cause) {
|
|
12
|
+
super(`Response body could not be parsed.\nCause:${cause.message}`);
|
|
13
|
+
this.name = this.constructor.name;
|
|
14
|
+
this.code = 'invalid-response-body';
|
|
15
|
+
this.response = response;
|
|
16
|
+
this.cause = cause;
|
|
17
|
+
}
|
|
18
|
+
}
|