feat(apify): add run task, get dataset items, and get run tools#4851
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview The Apify block gains operation-specific fields ( Existing sync/async actor tools now authenticate with Reviewed by Cursor Bugbot for commit 6282a90. Configure here. |
Greptile SummaryThis PR extends the Apify integration with three new tools (
Confidence Score: 5/5Safe to merge — all three new tools are well-contained additions with proper error handling, and the auth migration is a straightforward header-only change with no regressions. The new tools follow the same patterns as existing Apify tools, the body/input handling in run_task.ts is consistent with run_actor_sync.ts, the dataset-fetch guard and offset null-check from prior review rounds are correctly applied, and the polling URL simplification in run_actor_async.ts is a clean improvement. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User/Agent
participant B as Apify Block
participant T as Tool Dispatcher
participant A as Apify API
Note over U,A: apify_run_task
U->>B: "operation=apify_run_task, taskId, input?"
B->>T: params(taskId, apiKey, input?, itemLimit?)
T->>A: "POST /v2/actor-tasks/{taskId}/run-sync-get-dataset-items"
A-->>T: 200 items[]
T-->>U: "{success, status, items[]}"
Note over U,A: apify_get_dataset_items
U->>B: "operation=apify_get_dataset_items, datasetId"
B->>T: params(datasetId, itemLimit?, offset?, fields?)
T->>A: "GET /v2/datasets/{datasetId}/items?clean=true"
A-->>T: 200 items[]
T-->>U: "{success, datasetId, items[], count}"
Note over U,A: apify_get_run
U->>B: "operation=apify_get_run, runId"
B->>T: params(runId, apiKey)
T->>A: "GET /v2/actor-runs/{runId}"
A-->>T: "200 {data: ApifyRun}"
T-->>U: "{success, runId, status, startedAt, finishedAt, datasetId, stats}"
Reviews (2): Last reviewed commit: "fix(apify): guard undefined dataset id a..." | Re-trigger Greptile |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6282a90. Configure here.
Summary
apify_run_task,apify_get_dataset_items,apify_get_runAuthorization: Bearerauth (drop redundant?token=query param), trim path IDs, and removeanycasts via a typedApifyRuninterfaceauthMode: AuthMode.ApiKeyon the blockType of Change
Testing
Tested manually; biome lint clean.
Checklist