Composables
All composables are auto-imported.
| Composable | Purpose |
|---|---|
useMongocampAdmin | User and role CRUD |
useMongocampCollection | Reactive state for paginated collection queries |
useMongocampDocument | Document-level helpers (metadata stamping, partial updates) |
useMongocampSchema | Infers a schema from sampled documents; generates a matching TS interface |
useMongocampBucket | GridFS bucket detection, file-id resolution, upload/download |
useMongocampIndex | Create/list/delete MongoDB indexes (standard, unique, text, expiring) |
useMongocampJobs | List/register/update/execute/delete scheduled background jobs |
useMongocampAccount | Account self-service: profile, password change, API key regeneration |
useMongocampSystem | Read-only database viewer (list, per-database info, collections) |
useMongocampExport | rowsToCsv and downloadTextFile for exporting rows already on screen |
useMongocampFilterBuilder | Turns filter rows (field, operator, value) into one Lucene query; type-aware operators, injection-safe |
useMongocampBulkDelete | runBulkDelete: delete many items with limited concurrency (or one request per chunk) and a per-item failure report |
useMongocampImport | importRows: insert documents in batches with a per-batch failure report |
useMongocampAggregation | runAggregation (server-side paging, deny-listed stages refused), listDistinct, sampleDocuments, readable aggregation errors |
useMongocampError | Maps API errors (network / 401 / 403 / other) to readable messages |
useMongocampQuery | High-level Lucene query helpers (equals, like, inRange, and, or, …) |
useMongocampQueryBuilder | Low-level Lucene syntax builder used by useMongocampQuery |
useMongocampExtendedJson | Converts MongoDB extended-JSON documents to/from the plain values FUAutoForm binds to |
useMongocampSession | Is the login still usable? Token-expiry check, rate-limited server probe after a network failure, invalidateSession |
useMongocampRoles | Role/route-pattern access checks (isAdmin, isManager, isAllowedPathForRoute); powers the global nav guard |
useMongocampClientApi | Mode-switching drop-in for useMongocampApi() — session or server proxy mode |
useMongocampProxyApi | The server-proxy-mode branch useMongocampClientApi switches to |
@sfxcode/nuxt-mongocamp-server additionally provides useMongocampApi() (raw API clients: adminApi, collectionApi, documentApi, fileApi, bucketApi, informationApi, …) and useMongocampAuth() (login, logout, isLoggedIn) — this module's composables are built on top of those.