Fork API types.

All tests pass (for now...)  Rebasing this PR is a _pain_
Hrm, that makes it hard to programmatically construct them, and makes them hard to edit in place.

As I said, don't care super strongly, but I'd prefer to switch to Encode vs raw strings.