// Client-safe scope constants (no server deps) — shared by the auth helper, // the token routes, and the token-management UI. export const KNOWN_SCOPES = [ "plants:read", "plants:write", "plant-types:read", "plant-types:write", "locations:read", "locations:write", "tasks:read", "tasks:write", "items:read", "items:write", "animals:read", "animals:write", ] as const; export type KnownScope = (typeof KNOWN_SCOPES)[number]; // Resources for the token-creation UI (read/write columns). `soon` marks // domains whose endpoints are still being built. export const SCOPE_RESOURCES: { key: string; label: string; soon?: boolean }[] = [ { key: "plants", label: "Plants" }, { key: "plant-types", label: "Plant types" }, { key: "locations", label: "Locations" }, { key: "tasks", label: "Tasks & reminders" }, { key: "items", label: "Inventory" }, { key: "animals", label: "Animals & pets" }, ];