Skip to main content
Raw TypeScript source · Workflow walkthrough · All examples

Run locally

Requires Node.js 22.18 or later. Run from the cloned repository; this file imports the shared client and contracts in src/. The default uses fictional local fixtures with no credentials, network calls, invitations, or spending.
For live calls, supply USERINTUITION_API_KEY securely in the environment and explicitly select --live. Follow the walkthrough for action-specific arguments and approvals. The B2/C1 adapters are illustrative pending release verification. Passing fixture checks does not establish live contract compatibility.

Inputs

Live mode requires —study YOUR_STUDY_ID. Add —fetch-source to fetch the first supporting interview.

Expected output

JSON containing mode, report, and source_references. With —fetch-source, a second JSON object contains the reference and source_interview, or a source_status explaining why none was fetched.

Side effects

Read-only in live mode; it does not generate a report or start research.

Failures

Missing credentials or study ID, HTTP failures, invalid JSON, and unresolved source interviews are failures, not empty evidence. Stale or unknown freshness is reported separately.

Complete source file

The following is generated from examples/retrieve-study-results/index.ts, not maintained as a separate snippet. SHA-256: a2ba59e78bfd70c227e357788a34ed1ccb6424e5915a99bcb419c6247bdda2a3.