cd9ee3bd

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Trim the HTTP API to the endpoints the clients use

The intray server now serves only the endpoints that the CLI, the
notification tool and Stripe actually use, so trim the shared API and
client to match:

- Collapse the nested site records into a single IntrayRoutes record with
  the five remaining endpoints: register, login, stripe-hook, add-item and
  sync. Reduce Intray.Client to the matching client functions.
- Move the Stripe checkout-session types (InitiateStripeCheckoutSession,
  InitiatedCheckoutSession) into intray-server, where the web checkout flow
  uses them; no client needs them over the wire anymore.
- Drop the now-unused Permission constructors, keeping only the ones still
  enforced, and merge adminPermissions into userPermissions.
- Remove the JSON (and HttpApiData) instances, and their roundtrip tests,
  for types that are no longer serialised over the wire (access-key types,
  AccountInfo, PaidStatus, AdminStats, ActiveUsers, ChangePassphrase,
  Pricing, Username), keeping the types and their validity tests.

Also bump opt-env-conf to its latest revision (and pre-commit-hooks) so
intray builds against the same opt-env-conf as intray-server, and
regenerate the intray-cli nix options golden to match.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 1m39s 1s 1s 1m41s 1m39s
Eval 1m41s 28s 28s 2m10s 0s
Build 37m01s 1m13s 1m32s 38m34s 35m17s
Suite 1m39s 1m43s 36m54s 38m34s 36m57s

Timeline

0s1m40s1m50s2m2m10s37m10s37m20s37m30s37m40s37m50s38m