Terminal
Terminal/Skill
Guides connecting the rstore Vue data layer to Monospace through its REST and OpenAPI helpers, generated collections, and query options.
By Directus
Works with
npx skills add directus/rstore --skill rstore-monospaceUse @rstore/monospace as the shared Monospace adapter layer for OpenAPI-generated rstore collections and REST-backed runtime CRUD behavior.
| Area | API |
|---|---|
| Runtime client | createMonospaceRestClient({ url, project, apiKey?, fetch? }) |
| Runtime plugin | createMonospaceRstorePlugin({ url?, project?, apiKey?, client?, scopeId? }) |
| Query mapping | createMonospaceQuery(findOptions, overrides?) |
| Query serialization | serializeMonospaceQuery(query) |
| Mutation payloads | stripPrimaryKeys(item, primaryKeys) |
| Collection metadata | DEFAULT_MONOSPACE_SCOPE_ID, getMonospacePrimaryKeys, getMonospaceCollectionName |
| Schema loading | loadMonospaceCollections({ url?, project?, schemaApiKey?, input?, metadataInput?, primaryKeys?, scopeId? }) |
| Schema building | buildMonospaceCollections({ document, metadata, primaryKeys?, scopeId }) |
| Code generation | generateCollectionsTemplate, generateItemsTemplate, generateTypedCollectionsTemplate, generateConfigTemplate, generateViteDeclarations |
x-monospace-mappings, *CollectionOutput schemas, primary indexes, and FK constraints.createMonospaceRestClient.createMonospaceRstorePlugin in the store plugins list.MonospaceCollection, MonospacePrimitiveField, MonospaceSingleRelationField, MonospaceSingleConstraintField, MonospaceIndex, MonospaceIndexField).url and project; metadata queries use explicit fields and limit=0 (unlimited).input (OpenAPI JSON) plus metadataInput (metadata snapshot keyed by meta collection name) and can skip remote schema credentials.schemaApiKey is only for build-time schema loading and needs the openApiSchema:read and dataModel:read entitlements.primaryKeys is an override only, and a collection without a primary index and without an override fails generation.on maps target columns to source FK columns)./api/{project}/items/{collection}.fields, filter, sort, limit, offset, and params.pageIndex and pageSize map to offset and limit when explicit pagination is not provided.createMonospaceQuery merges adapter params, top-level find options, and optional overrides.serializeMonospaceQuery converts nested query options into URL search parameters.schemaApiKey build/server-side; it is for OpenAPI loading.runtimeApiKey or apiKey as emitted runtime/client code when configured.rstore-vue for query, live query, form, and cache semantics.rstore-vite-monospace or rstore-nuxt-monospace for framework wiring.