@postwave/schema
v0.1.0
Published
Shared canonical schema (TypeScript + Go via codegen) for Postwave migration, voice, and automation pillars. Single source of truth for cross-service contracts.
Maintainers
Readme
@postwave/schema
Shared canonical schema for Postwave migration, voice, and automation pillars. Single source of truth for cross-service contract types.
MIT licensed (Layer 2 of Postwave's open-core architecture).
Install
npm install @postwave/schema
# or
pnpm add @postwave/schemaUse
import { Subscriber, Campaign, Sequence } from "@postwave/schema";
function shouldEnroll(s: Subscriber, seq: Sequence): boolean {
return s.status === "subscribed" && seq.status === "active";
}The same shapes are codegen'd into Go for the Postwave gateway and services — that's why this package exists separately from @postwave/sdk. Use @postwave/sdk for HTTP calls; use @postwave/schema when you need just the types (e.g. building tools that read Postwave data without making API calls).
What's in here
| Module | Exports |
|---|---|
| subscribers | Subscriber, SubscriberStatus, SubscriberCreateInput |
| campaigns | Campaign, CampaignStatus, CampaignReport |
| sequences | Sequence, SequenceStep, SequenceTrigger |
| voice | VoiceProfile, Tonal, Persona, Vocabulary |
| migration | MigrationJob, MigrationStatus, MigrationProgress |
| automation | Automation, AutomationNode, AutomationTrigger |
Versioning
Semver. Major bumps when type shapes change in breaking ways. Minor bumps when fields are added (additive — won't break existing consumers because TypeScript widens). Patch bumps for doc/comment-only changes.
Related
@postwave/sdk— TypeScript SDK that uses these types@postwave/openapi— OpenAPI 3.1 spec for the same surface@postwave/mcp-server— Model Context Protocol server
License
MIT. © Postwave.
