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 (also uploadFiles)/download/fetchFileBlob |
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), cluster members and masked server settings |
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 |
useMongocampAdminGate | blocked / message for components that need an administrator: show "administrators only" without a request |
useMongocampFieldTypes | field paths with the types of their values for a collection (fields/detail, cached): filter fields, write hints |
useMongocampBulkByFilter | countDocuments / deleteByFilter / updateByFilter: one request each by the Lucene filter of the list |
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 |
useMongocampConnection | Can the server be reached? online / offline / unreachable, check(), report(error); kept current with the offline option |
useMongocampSession | Is the login still usable? Token-expiry check (no request), optional server check (verify), invalidateSession |
useMongocampRoles | Role/route-pattern access checks (isAdmin, isManager, canSeeAdmin, canSeeManagement, isAllowedPathForRoute); powers the global nav guard |
useMongocampCollectionNames | The collection names, loaded once and shared (sidebar, switcher, panel), split into collections / buckets / mc_* |
useMongocampNavigation | The module's pages as role-aware, translated navigation data (groups, and menu for UNavigationMenu) |
useMongocampBreadcrumbs | The breadcrumb of the current route among the module's pages |
useMongocampPaths | The base routes of the app's MongoCamp pages (module option paths) — what the components' *Path props fall back to |
useMongocampProxyMode | true in server proxy mode (no login, the api key decides) |
useMongocampPermissions | May the user read / write / administer a collection? From GET /auth/permissions (never from the session); UI-level gating that fails open |
useMongocampFetchAll | Reads every page of a document or file list with a cap, progress and abort (fetchAllDocuments, fetchAllFiles) |
useMongocampExportAll | Exports a whole collection or filter as JSON, NDJSON or CSV (cap, progress, abort; exact 64-bit integers) |
useMongocampPersistedState | A ref remembered in localStorage (versioned, size-capped, never throws) |
useMongocampSavedQueries | Saved filters and recent history per collection, browser-only, validated and capped; JSON export/import |
useMongocampAutoRefresh | Interval loads for live views: no overlap, backoff, pauses in a hidden tab, stops on unmount |
useMongocampCollectionStats | Typed storage sizes and per-index usage ($indexStats, host stripped) of one collection |
useMongocampCollectionCopy | Copy a collection into a new one (copyCollection) and a timestamped quick backup (backupCollection) |
useMongocampSavedPipelines | Saved aggregation pipelines per collection, browser-only, re-checked against the deny-list on every read |
useMongocampServerOverview | Databases, per-collection sizes (one request each, capped, progress), cluster and jobs in one call; parts fail independently |
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, systemApi, …) and useMongocampAuth() (login, logout, isLoggedIn) — this module's composables are built on top of those.