import { defineService, procedure } from "@wrnexus/rpc"; import { v } from "@wrnexus/validation"; /** * In a real multi-app workspace, put these contracts in a shared package and * import that package from this app and each peer. They live together here so * the example is self-contained. */ export const catalogService = defineService({ name: "catalog", procedures: { getProduct: procedure .input(v.object({ sku: v.string() })) .output<{ sku: string; displayName: string; enabled: boolean }>() .idempotent() .build(), }, }); export const auditService = defineService({ name: "audit", procedures: { recordLookup: procedure .input( v.object({ sku: v.string(), repository: v.string(), stars: v.number(), }), ) .output<{ eventId: string }>() .build(), }, });