import type { Context } from "@wrnexus/core";

const apiInput: WRNexusGenerated.ApiContracts["/api/typed-user"]["POST"]["input"] = {
  name: "Ada",
  email: "ada@example.test",
};
const queuePayload: WRNexusGenerated.QueuePayloads["welcome-email"] = {
  userId: 42,
  email: "ada@example.test",
};
const queryArgs: WRNexusGenerated.DatabaseQueries["GetUserByEmail"]["args"] = {
  email: "ada@example.test",
};
const realtimeMessage: WRNexusGenerated.RealtimeMessages["/realtime/chat"] = {
  user: "ada",
  text: "hello",
};
const middlewareContext: WRNexusGenerated.MiddlewareContexts["auth"] = {} as Context;

void [apiInput, queuePayload, queryArgs, realtimeMessage, middlewareContext];

// @ts-expect-error schema-derived input requires an email.
const invalidApiInput: WRNexusGenerated.ApiContracts["/api/typed-user"]["POST"]["input"] = {
  name: "Missing email",
};
void invalidApiInput;

// @ts-expect-error generated SQL query arguments require an email string.
const invalidQuery: WRNexusGenerated.DatabaseQueries["GetUserByEmail"]["args"] = {};
void invalidQuery;
