Skip to main content

SDK Reference (machine-readable)

The HTML pages under /docs/sdk* are generated from TypeScript sources by TypeDoc. They're great for humans, but they spread the type surface across hundreds of small pages. This page collects the agent-friendly artifacts in one place.

Single-file SDK reference

/sdk-reference.md is the entire SDK API concatenated into one Markdown file (~500 KB). It covers:

  • @myop/sdk — core (host, iframe, web component, messages, helpers, common)
  • @myop/react
  • @myop/react-native
  • @myop/vue
  • @myop/angular

Each section starts with a heading containing the canonical URL on docs.myop.dev, so an agent can cite specific symbols precisely.

Iframe message protocol (JSON)

/message-protocol.json is a generated, agent-readable catalog of the host↔component message protocol used over postMessage. It lists:

  • The envelope shape (myop, messageType, id, direction, route, content)
  • All host → component message keys (e.g. InitMessage, BindClickMessage)
  • All component → host message keys (e.g. ClickReplayMessage, EventListenerCallbackMessage)

The JSON is regenerated on every docs build from myop-sdk/src/common/MyopMessages.ts, so it stays in sync with the SDK.

For the exact payload shapes, read the corresponding class in @myop/sdk (see @myop/sdk/dist/messages/*.d.ts).

TypeScript .d.ts bundles

The published npm packages include hand-authored .d.ts files an agent can consult directly:

PackageTarballType entry
@myop/sdknpm pack @myop/sdkdist/index.d.ts
@myop/reactnpm pack @myop/reactdist/index.d.ts
@myop/react-nativenpm pack @myop/react-nativedist/index.d.ts
@myop/vuenpm pack @myop/vuedist/index.d.ts
@myop/angularnpm pack @myop/angulardist/index.d.ts

CDN access (no install required):

https://unpkg.com/@myop/sdk/dist/index.d.ts
https://unpkg.com/@myop/react/dist/index.d.ts
https://unpkg.com/@myop/react-native/dist/index.d.ts
https://unpkg.com/@myop/vue/dist/index.d.ts
https://unpkg.com/@myop/angular/dist/index.d.ts

Append @<version> to pin (e.g. @myop/sdk@latest).

Page-level Markdown

Most doc pages on docs.myop.dev are available as raw Markdown by appending .md to the URL:

https://docs.myop.dev/docs/intro.md
https://docs.myop.dev/docs/cli/ai-integration.md
https://docs.myop.dev/docs/learnMyop/HTMLComponent.md

Not mirrored individually: the auto-generated SDK API reference pages under /docs/sdk*. Fetch them in bulk via /sdk-reference.md (above).

A JSON index of every page is published at /docs-index.json. Each entry's markdown field is either the mirror URL or null (when no per-page mirror exists).

Suggested fetch order

If you only need to answer a quick question:

  1. Read the relevant page's .md (cheap, scoped).

If you're starting a Myop integration from scratch:

  1. /llms.txt — pick a starting point.
  2. get_myop_guide over MCP — canonical component guide, no auth.
  3. /sdk-reference.md — full SDK API, one fetch.
  4. /message-protocol.json — only if you're working under the SDK (most agents won't need this).