Skip to content

Continuation of #7 — SDK v1.41 parity + Monitors - #9

Open
nikhil-mat wants to merge 10 commits into
context-dot-dev:mainfrom
nikhil-mat:context-dev-migration
Open

Continuation of #7 — SDK v1.41 parity + Monitors#9
nikhil-mat wants to merge 10 commits into
context-dot-dev:mainfrom
nikhil-mat:context-dev-migration

Conversation

@nikhil-mat

@nikhil-mat nikhil-mat commented Jul 1, 2026

Copy link
Copy Markdown

Continuation of #7.

SDK: context.dev v1.41.0

New:

  • Monitors resource — 11 operations: create, get, update, delete, run, list, listAccountChanges, listAccountRuns, listChanges, listRuns, getChange
  • SDK sync 1.34 → 1.41 across brand, web, AI, industry, utility
  • Nested request objects: pdf, viewport, enrichment, markdownOptions
  • New web params: colorScheme, country, numResults, scrollOffset
  • webhook.secret (monitor create + update)
  • AI specific_pages; extractProducts directUrl variant; datapoint_object_schema
  • Full enums: ticker_exchange (72), force_language (120)
  • Per-operation param scoping corrected
  • Numeric bounds aligned to SDK (timeoutMS ≥ 1000, viewport 240–7680 / 240–4320)
  • 268 → 379 tests
  • lint-clean (n8n-nodes-base)

nikhil-mat and others added 10 commits June 6, 2026 22:26
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Brings the node into complete parity with the Context.dev TypeScript SDK
(v1.41) across every resource:

- New Monitors resource (11 operations): create / get / update / delete /
  run, list monitors, list account changes & runs, list monitor changes &
  runs, get change. Create models the discriminated target/change_detection
  union with conditional fields; update mirrors it; list ops expose
  cursor/limit pagination and status/tag/type/since/until filters.
- Web / brand / AI / industry / utility: every request parameter, enum value
  and numeric bound synced to the SDK — nested pdf/viewport/enrichment and
  markdownOptions objects, colorScheme/country/numResults/scrollOffset,
  webhook.secret, AI specific_pages, full ticker_exchange (72) and
  force_language (120) enums, correct per-operation scoping and min/max bounds.

Verified against the SDK OpenAPI spec (0 endpoint/param/enum/bound mismatches)
and an independent scan. 379 tests pass; node is lint-clean.
Aligns every operation, parameter, enum and numeric bound to the current API,
and adds the resources the node did not cover.

New resources: Batch (6 ops), People (2), News, Parsing.
Added to existing resources: POST /brand/retrieve, GET /brand/search,
monitor credit-usage, monitor limits, retrieve a monitor run, and webhook
secret rotation.

Also adds `tags` across the operations that accept it, plus `zdr`,
`settleAnimations`, `actions`, `includeHTML` and `dedupe` on the scrape
operations, and raw-binary upload support for POST /parse via a preSend hook.

BREAKING: operation values and resource names change (aiDataExtraction ->
webExtraction; NAICS/SIC move under Web Extraction). Existing workflows need
reconnecting. The credential name `contextdevApi` is unchanged, so saved
credentials keep working.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018eb9URz1xqidX41rxa4GPZ
Exercises the node's operations against the real API and prints a pass/fail
line per operation. Requests are assembled from the built node's own routing
in dist/, so a green run is evidence about the artifact being published rather
than a parallel client.

Read-only operations run by default (33/33 passing). Cache-warming and
mutating operations are opt-in. Lifecycle fixtures create a record, run every
dependent operation against it, and delete it in a finally block, covering the
operations that need an existing id.

Every request carries a configurable tag so suite traffic stays separable from
real usage. Rate limits are retried with backoff so throttling cannot strand a
cleanup.

    CONTEXT_DEV_API_KEY=... npm run test:live

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018eb9URz1xqidX41rxa4GPZ
The 246 assertions restated the API by hand and had already drifted from it —
the brand routing table predated POST /brand/retrieve. They also duplicated
checks the linter and compiler already make.

`npm test` now runs lint and build, which is what n8n Cloud verification
requires. Behaviour is covered by the live suite against the real API. CI runs
the live suite when an API key is available, and skips it on forks.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018eb9URz1xqidX41rxa4GPZ
package.json declared MIT without shipping the licence file, which the n8n
community-node checklist expects.

README documents all 53 operations by resource, plus running the live suite.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018eb9URz1xqidX41rxa4GPZ
@nikhil-mat nikhil-mat changed the title Continuation of #7 — SDK v1.41 parity + Monitors Expand the node to full Context.dev API coverage — 53 operations Aug 19, 2026
@nikhil-mat nikhil-mat changed the title Expand the node to full Context.dev API coverage — 53 operations Continuation of #7 — SDK v1.41 parity + Monitors Aug 19, 2026
@nikhil-mat

Copy link
Copy Markdown
Author

Pushed an update that takes this from SDK-parity to full API coverage.

Tracks the API as of context.dev v2.12.0 (2026-08-18).

Coverage: 36 → 53 operations, 6 → 9 resources

Resource Ops
Monitors 15
Brand Intelligence 9
Web Extraction 9
Web Scraping 7
Batch 6 (new)
Utility 3
People 2 (new)
News 1 (new)
Parsing 1 (new)

Also added: POST /brand/retrieve, GET /brand/search, monitor credit-usage, monitor limits, retrieve-a-monitor-run, and webhook secret rotation.

Parameter coverage: tags across every operation that accepts it, plus zdr, settleAnimations, actions, includeHTML, dedupe, clearPopups, and the nested pdf / viewport options. POST /parse is supported as a raw binary upload.

WebDBs is left out for now, since the published SDK doesn't expose it — happy to add it once it's public.

Breaking changes

Operation values and resource names change — aiDataExtractionwebExtraction, NAICS/SIC move under Web Extraction, and the brand operations regroup. Existing workflows need reconnecting. The credential name contextdevApi is unchanged, so saved credentials keep working.

Verification

npm test runs lint and build. The node is lint-clean and eligible for n8n Cloud verification.

A live conformance suite ships in tests/live/. It assembles requests from the built node's own routing in dist/, so a green run is evidence about the published artifact rather than a parallel client:

CONTEXT_DEV_API_KEY=... npm run test:live

All read-only operations pass against the live API (33/33 on a paid-plan key; prefetch and people-enrich return a plan-gated 403 otherwise, which the suite treats as an allowed result). --include-mutating adds create/use/delete lifecycles for monitors and batches, covering the operations that need an existing record id.

Every request carries an n8n-live-test tag so suite traffic stays separable from real usage in the dashboard. CI runs the suite when an API key is available and skips it on forks.

Tests

The 246 structural assertions are removed. They restated the API by hand and had already drifted from it — the brand routing table predated POST /brand/retrieve — and duplicated checks the linter and compiler already make. Behaviour is now verified against the real API instead.

Also

Adds the LICENSE file package.json declared but didn't ship.

Two things worth a look on the API side, both hit while testing:

  • POST /batch/submit — the documented request example uses input.type / data.type, but the schema and the server require input.mode / data.format. Coding from the example gives a 400.
  • DELETE /batch/{batch_id} — documented, but returns 403 "The API you have tried to access does not exist". Cancelled batches stay listed as a result.

cc @nikhilrado

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant