apify-client 2.23.5-beta.14 → 2.23.5-beta.16

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.
@@ -1,5 +1,5 @@
1
1
  import type { RUN_GENERAL_ACCESS } from '@apify/consts';
2
- import { ACT_JOB_STATUSES, ACTOR_PERMISSION_LEVEL } from '@apify/consts';
2
+ import { ACTOR_JOB_STATUSES, ACTOR_PERMISSION_LEVEL, META_ORIGINS } from '@apify/consts';
3
3
  import { Log } from '@apify/log';
4
4
  import type { ApiClientSubResourceOptions } from '../base/api_client';
5
5
  import { ResourceClient } from '../base/resource_client';
@@ -13,6 +13,7 @@ import { RunClient } from './run';
13
13
  import { RunCollectionClient } from './run_collection';
14
14
  import type { WebhookUpdateData } from './webhook';
15
15
  import { WebhookCollectionClient } from './webhook_collection';
16
+ import type { ValueOf } from 'type-fest';
16
17
  /**
17
18
  * Client for managing a specific Actor.
18
19
  *
@@ -462,7 +463,7 @@ export interface ActorRunListItem {
462
463
  actorTaskId?: string;
463
464
  startedAt: Date;
464
465
  finishedAt: Date;
465
- status: (typeof ACT_JOB_STATUSES)[keyof typeof ACT_JOB_STATUSES];
466
+ status: (typeof ACTOR_JOB_STATUSES)[keyof typeof ACTOR_JOB_STATUSES];
466
467
  meta: ActorRunMeta;
467
468
  buildId: string;
468
469
  buildNumber: string;
@@ -598,7 +599,8 @@ export interface ActorBuildOptions {
598
599
  * Options for filtering the last run of an Actor.
599
600
  */
600
601
  export interface ActorLastRunOptions {
601
- status?: keyof typeof ACT_JOB_STATUSES;
602
+ status?: ValueOf<typeof ACTOR_JOB_STATUSES>;
603
+ origin?: ValueOf<typeof META_ORIGINS>;
602
604
  }
603
605
  /**
604
606
  * Actor definition from the `.actor/actor.json` file.
@@ -326,7 +326,7 @@ class ActorClient extends resource_client_1.ResourceClient {
326
326
  */
327
327
  lastRun(options = {}) {
328
328
  (0, ow_1.default)(options, ow_1.default.object.exactShape({
329
- status: ow_1.default.optional.string.oneOf(Object.values(consts_1.ACT_JOB_STATUSES)),
329
+ status: ow_1.default.optional.string.oneOf(Object.values(consts_1.ACTOR_JOB_STATUSES)),
330
330
  origin: ow_1.default.optional.string.oneOf(Object.values(consts_1.META_ORIGINS)),
331
331
  }));
332
332
  return new run_1.RunClient(this._subResourceOptions({
@@ -1,8 +1,7 @@
1
- import { ACT_JOB_STATUSES } from '@apify/consts';
2
1
  import type { ApiClientSubResourceOptions } from '../base/api_client';
3
2
  import { ResourceClient } from '../base/resource_client';
4
3
  import type { Dictionary } from '../utils';
5
- import type { ActorRun, ActorStandby, ActorStartOptions } from './actor';
4
+ import type { ActorLastRunOptions, ActorRun, ActorStandby, ActorStartOptions } from './actor';
6
5
  import { RunClient } from './run';
7
6
  import { RunCollectionClient } from './run_collection';
8
7
  import { WebhookCollectionClient } from './webhook_collection';
@@ -170,8 +169,7 @@ export type TaskUpdateData = Partial<Pick<Task, 'name' | 'title' | 'description'
170
169
  /**
171
170
  * Options for filtering the last run of a Task.
172
171
  */
173
- export interface TaskLastRunOptions {
174
- status?: keyof typeof ACT_JOB_STATUSES;
172
+ export interface TaskLastRunOptions extends ActorLastRunOptions {
175
173
  }
176
174
  /**
177
175
  * Options for starting a Task.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apify-client",
3
- "version": "2.23.5-beta.14",
3
+ "version": "2.23.5-beta.16",
4
4
  "description": "Apify API client for JavaScript",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -81,7 +81,7 @@
81
81
  "esbuild": "0.28.1",
82
82
  "express": "^5.0.0",
83
83
  "gen-esm-wrapper": "^1.1.2",
84
- "oxfmt": "0.56.0",
84
+ "oxfmt": "0.57.0",
85
85
  "oxlint": "1.71.0",
86
86
  "oxlint-tsgolint": "0.23.0",
87
87
  "puppeteer": "^25.0.0",