feat(syncs,usage,imports): add syncs, usage, and imports preflight#19
Conversation
|
Warning Review limit reached
Your plan currently allows 1 review/hour. Refill in 52 minutes and 32 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…mmands Closes the rest of the read-only API surface flagged as P2 in #11. - `syncs list` (paged), `syncs latest`, `syncs show <id>` over the upstream `/api/v1/syncs` collection (separate from the existing `sync` command, which POSTs to `/api/v1/sync` to trigger). - `usage show` over the `/api/v1/usage` singleton; returns API key scope + rate-limit info (or OAuth notice). - `imports preflight` validates an import config + content before creating an Import record. Mirrors `imports create` flags (full `Import::Preflight::PARAM_KEYS` set including `rows_to_skip`) but is read-only — no `--apply` gate. Requires `--type` and one of `--file`/`--raw-file-content`. Tests cover command shape and registration; preflight payload builder has dedicated unit tests for the required-field invariants (type missing, content source missing, both sources provided). Refs #11.
b5c09e4 to
4478b25
Compare
Adds the rest of the read-only API surface flagged in #11 (P2):
GET /api/v1/syncssyncs list(paged)GET /api/v1/syncs/latestsyncs latestGET /api/v1/syncs/:idsyncs show <id>GET /api/v1/usageusage showPOST /api/v1/imports/preflightimports preflightNotes
Tests
`go test ./...` green across the suite.
Refs #11.