Skip to content

chore(contracts): confirm RealtimeTrafficSchema 30-day fields after the Directory traffic card change #15

Description

@mrgoonie

Follow-up for the AI agent, per the AGENTS.md rule that request/response contracts in packages/contracts/src need a toolkit-side check.

What changed in the web repository

RealtimeTrafficSchema (packages/contracts/src/traffic.ts, re-exported from packages/contracts/src/index.ts) changed shape:

  • Removed: pageViewsToday, visitorsToday
  • Added: pageViews30d, visitors30d, windowDays (literal 30)
  • Unchanged: source ("posthog"), activeVisitors, updatedAt, windowMinutes (literal 5)

This is the payload of the web-only endpoint GET /api/traffic/realtime, which powers the "Directory traffic" card on the Build with Us page. It is not the product traffic API (GET /api/v1/products/{slug}/traffic, TrafficSummarySchema) and it is not the analytics block contract — neither of those changed.

What to verify on the toolkit side

  1. Confirm no CLI command, MCP tool, or exported contracts surface parses RealtimeTrafficSchema or the removed field names. A code search for RealtimeTraffic, pageViewsToday, visitorsToday, and windowMinutes in this repository currently returns no matches.
  2. If the mirror of packages/contracts/src is generated or copied into @nextlevelbuilder/contracts, refresh it so the two do not drift.

If both checks are negative, close this issue with that evidence — no code change is required.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-handleFollow-up for AI agent to sync toolkits with Build with Us API changes

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions