Skip to content

Composables ​

All composables are auto-imported.

ComposablePurpose
useMongocampAdminUser and role CRUD
useMongocampCollectionReactive state for paginated collection queries
useMongocampDocumentDocument-level helpers (metadata stamping, partial updates)
useMongocampSchemaInfers a schema from sampled documents; generates a matching TS interface
useMongocampBucketGridFS bucket detection, file-id resolution, upload/download
useMongocampIndexCreate/list/delete MongoDB indexes (standard, unique, text, expiring)
useMongocampJobsList/register/update/execute/delete scheduled background jobs
useMongocampAccountAccount self-service: profile, password change, API key regeneration
useMongocampSystemRead-only database viewer (list, per-database info, collections)
useMongocampExportrowsToCsv and downloadTextFile for exporting rows already on screen
useMongocampFilterBuilderTurns filter rows (field, operator, value) into one Lucene query; type-aware operators, injection-safe
useMongocampBulkDeleterunBulkDelete: delete many items with limited concurrency (or one request per chunk) and a per-item failure report
useMongocampImportimportRows: insert documents in batches with a per-batch failure report
useMongocampAggregationrunAggregation (server-side paging, deny-listed stages refused), listDistinct, sampleDocuments, readable aggregation errors
useMongocampErrorMaps API errors (network / 401 / 403 / other) to readable messages
useMongocampQueryHigh-level Lucene query helpers (equals, like, inRange, and, or, …)
useMongocampQueryBuilderLow-level Lucene syntax builder used by useMongocampQuery
useMongocampExtendedJsonConverts MongoDB extended-JSON documents to/from the plain values FUAutoForm binds to
useMongocampSessionIs the login still usable? Token-expiry check, rate-limited server probe after a network failure, invalidateSession
useMongocampRolesRole/route-pattern access checks (isAdmin, isManager, isAllowedPathForRoute); powers the global nav guard
useMongocampClientApiMode-switching drop-in for useMongocampApi() — session or server proxy mode
useMongocampProxyApiThe 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.

Released under the MIT License.