apify-client 2.25.1-beta.26 → 2.25.1-beta.28
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 +6 -3
- package/dist/bundle.js.map +1 -1
- package/dist/resource_clients/run.d.ts +7 -0
- package/dist/resource_clients/run.js +3 -0
- package/package.json +11 -11
|
@@ -173,6 +173,7 @@ export declare class RunClient extends ResourceClient {
|
|
|
173
173
|
* @param options.eventName - **Required.** Name of the event to charge for.
|
|
174
174
|
* @param options.count - Number of times to charge the event. Default is 1.
|
|
175
175
|
* @param options.idempotencyKey - Optional key to ensure the charge is not duplicated. If not provided, one is auto-generated.
|
|
176
|
+
* @param options.requestId - ID of the Server Actor request being charged, from the `X-Actor-Request-ID` header of the incoming request. Required for multi-tenant Server Actor runs.
|
|
176
177
|
* @returns Empty response object.
|
|
177
178
|
* @see https://docs.apify.com/api/v2/post-charge-run
|
|
178
179
|
* @since Added in 2.11.0
|
|
@@ -339,6 +340,12 @@ export interface RunChargeOptions {
|
|
|
339
340
|
count?: number;
|
|
340
341
|
/** Defaults to runId-eventName-timestamp */
|
|
341
342
|
idempotencyKey?: string;
|
|
343
|
+
/**
|
|
344
|
+
* ID of the Server Actor request being charged, taken from the `X-Actor-Request-ID` header of the incoming request.
|
|
345
|
+
* Required for multi-tenant Server Actor runs, where it maps the charge to the caller's account instead of the account that started the run.
|
|
346
|
+
* Ignored elsewhere.
|
|
347
|
+
*/
|
|
348
|
+
requestId?: string;
|
|
342
349
|
}
|
|
343
350
|
/**
|
|
344
351
|
* Options for waiting for a Run to finish.
|
|
@@ -253,6 +253,7 @@ class RunClient extends resource_client_1.ResourceClient {
|
|
|
253
253
|
* @param options.eventName - **Required.** Name of the event to charge for.
|
|
254
254
|
* @param options.count - Number of times to charge the event. Default is 1.
|
|
255
255
|
* @param options.idempotencyKey - Optional key to ensure the charge is not duplicated. If not provided, one is auto-generated.
|
|
256
|
+
* @param options.requestId - ID of the Server Actor request being charged, from the `X-Actor-Request-ID` header of the incoming request. Required for multi-tenant Server Actor runs.
|
|
256
257
|
* @returns Empty response object.
|
|
257
258
|
* @see https://docs.apify.com/api/v2/post-charge-run
|
|
258
259
|
* @since Added in 2.11.0
|
|
@@ -262,6 +263,7 @@ class RunClient extends resource_client_1.ResourceClient {
|
|
|
262
263
|
eventName: ow_1.default.string,
|
|
263
264
|
count: ow_1.default.optional.number,
|
|
264
265
|
idempotencyKey: ow_1.default.optional.string,
|
|
266
|
+
requestId: ow_1.default.optional.string,
|
|
265
267
|
}));
|
|
266
268
|
const count = options.count ?? 1;
|
|
267
269
|
/** To avoid duplicates during the same milisecond, doesn't need to by crypto-secure. */
|
|
@@ -273,6 +275,7 @@ class RunClient extends resource_client_1.ResourceClient {
|
|
|
273
275
|
data: {
|
|
274
276
|
eventName: options.eventName,
|
|
275
277
|
count,
|
|
278
|
+
requestId: options.requestId,
|
|
276
279
|
},
|
|
277
280
|
headers: {
|
|
278
281
|
[RUN_CHARGE_IDEMPOTENCY_HEADER]: idempotencyKey,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apify-client",
|
|
3
|
-
"version": "2.25.1-beta.
|
|
3
|
+
"version": "2.25.1-beta.28",
|
|
4
4
|
"description": "Apify API client for JavaScript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@apify/consts": "^2.58.1",
|
|
53
53
|
"@apify/log": "^2.5.54",
|
|
54
54
|
"@apify/utilities": "^2.35.11",
|
|
55
|
-
"@crawlee/types": "^3.18.
|
|
55
|
+
"@crawlee/types": "^3.18.2",
|
|
56
56
|
"ansi-colors": "^4.1.3",
|
|
57
57
|
"async-retry": "^1.3.3",
|
|
58
58
|
"axios": "^1.20.0",
|
|
@@ -65,16 +65,16 @@
|
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@apify/oxlint-config": "^0.3.0",
|
|
67
67
|
"@apify/tsconfig": "^0.2.0",
|
|
68
|
-
"@crawlee/puppeteer": "^3.18.
|
|
69
|
-
"@rsbuild/core": "^2.2.
|
|
68
|
+
"@crawlee/puppeteer": "^3.18.2",
|
|
69
|
+
"@rsbuild/core": "^2.2.10",
|
|
70
70
|
"@rsbuild/plugin-node-polyfill": "^1.4.6",
|
|
71
|
-
"@rspack/cli": "^2.2.
|
|
72
|
-
"@rspack/core": "^2.2.
|
|
71
|
+
"@rspack/cli": "^2.2.8",
|
|
72
|
+
"@rspack/core": "^2.2.8",
|
|
73
73
|
"@types/async-retry": "^1.4.9",
|
|
74
74
|
"@types/compression": "^1.8.1",
|
|
75
75
|
"@types/content-type": "^1.1.9",
|
|
76
76
|
"@types/express": "^5.0.6",
|
|
77
|
-
"@types/node": "^24.
|
|
77
|
+
"@types/node": "^24.19.0",
|
|
78
78
|
"ajv": "^8.20.0",
|
|
79
79
|
"body-parser": "^2.3.0",
|
|
80
80
|
"compression": "^1.8.2",
|
|
@@ -84,12 +84,12 @@
|
|
|
84
84
|
"oxfmt": "0.71.0",
|
|
85
85
|
"oxlint": "1.85.0",
|
|
86
86
|
"oxlint-tsgolint": "7.0.2003",
|
|
87
|
-
"puppeteer": "^25.
|
|
87
|
+
"puppeteer": "^25.12.0",
|
|
88
88
|
"rimraf": "^6.1.3",
|
|
89
|
-
"rolldown": "^1.2.
|
|
89
|
+
"rolldown": "^1.2.11",
|
|
90
90
|
"typescript": "^6.0.3",
|
|
91
|
-
"vitest": "^5.0.
|
|
92
|
-
"webpack": "^5.111.
|
|
91
|
+
"vitest": "^5.0.2",
|
|
92
|
+
"webpack": "^5.111.1",
|
|
93
93
|
"webpack-cli": "^7.2.3"
|
|
94
94
|
},
|
|
95
95
|
"devEngines": {
|