interface
RiduClient
The complete typed REST client for schema, auth, access, content, uploads, versions, globals, preview, and preferences.
Properties
| Property | Type | Description |
|---|---|---|
adminLoad | (key: string, | Compiled admin read for a router-root pathname + search (without the admin basename). |
adminCollectionList | (collection: string, | Framework list read model, also used for initial route preparation. |
schema | (options?: RequestOptions) => Promise< | The schema value. |
request | (path: string, | The request value. |
requestPlugin | < | The requestPlugin value. |
auth | { readonly session: SessionFor< | Authentication, session, and account operations; see RiduAuth. The mapped copy keeps
clients comparable member by member, so an exact generated client still fits a wider
contract such as the admin's. |
baseURL | string | Normalized Ridu origin used for every request and returned upload URL. |
getUploadURL | < | Create a short-lived delivery URL for a private upload. Use it where the browser cannot send
an Authorization header, such as <img src>. The URL never contains the session token and
stops working when the session ends or read access is lost. |
getUploadURLs | < | Create delivery URLs for up to 100 uploads in one request, returned in input order. |
preference | < | The preference value. |
setPreference | < | The setPreference value. |
deletePreference | (key: string, | The deletePreference value. |
resetPreferences | (options?: RequestOptions) => Promise< | The resetPreferences value. |
collectionLiveValidation | < | Evaluate only explicitly opted-in advisory validators, independently of Save. |
globalLiveValidation | < | Evaluate advisory validators for one global's unsaved input. |
collectionAccess | < | The collectionAccess value. |
resolveFilteredSelection | < | The resolveFilteredSelection value. |
documentLock | < | The documentLock value. |
acquireDocumentLock | < | The acquireDocumentLock value. |
releaseDocumentLock | < | The releaseDocumentLock value. |
globalAccess | < | The globalAccess value. |
createPreviewToken | < | The createPreviewToken value. |
revokePreviewToken | (token: string, | The revokePreviewToken value. |
preview | < | The preview value. |
createGlobalPreviewToken | < | The createGlobalPreviewToken value. |
previewGlobal | < | The previewGlobal value. |
list | < | The list value. |
count | < | The count value. |
find | < | The find value. |
create | { < | The create value. |
duplicate | < | The duplicate value. |
copyLocale | < | The copyLocale value. |
update | { < | The update value. |
mutateJoin | < | The mutateJoin value. |
delete | < | The delete value. |
bulkUpdate | < | The bulkUpdate value. |
bulkPublish | < | The bulkPublish value. |
bulkUnpublish | < | The bulkUnpublish value. |
bulkDelete | < | The bulkDelete value. |
bulkRestoreDeleted | < | The bulkRestoreDeleted value. |
bulkDeletePermanent | < | The bulkDeletePermanent value. |
emptyTrash | < | The emptyTrash value. |
restoreDeleted | < | The restoreDeleted value. |
deletePermanent | < | The deletePermanent value. |
upload | { < | The upload value. |
uploadFromURL | { < | The uploadFromURL value. |
updateUpload | { < | The updateUpload value. |
readUploadSource | < | The readUploadSource value. |
previewUploadFromURL | < | The previewUploadFromURL value. |
versions | < | The versions value. |
countVersions | < | Count retained versions visible for one collection document. |
version | < | The version value. |
schedulePublish | < | The schedulePublish value. |
scheduleUnpublish | < | Schedule a versioned collection document to unpublish at a future instant. |
scheduledPublications | < | The scheduledPublications value. |
cancelScheduledPublication | < | The cancelScheduledPublication value. |
publish | < | The publish value. |
publishChanges | < | The publishChanges value. |
unpublish | < | The unpublish value. |
discardDraft | < | Discard staged working changes while retaining the published snapshot. |
restore | < | The restore value. |
global | < | The global value. |
updateGlobal | { < | The updateGlobal value. |
copyGlobalLocale | < | The copyGlobalLocale value. |
globalVersions | < | The globalVersions value. |
countGlobalVersions | < | Count retained versions visible for one global. |
globalVersion | < | The globalVersion value. |
publishGlobal | < | The publishGlobal value. |
publishGlobalChanges | < | The publishGlobalChanges value. |
unpublishGlobal | < | The unpublishGlobal value. |
discardGlobalDraft | < | Discard staged global changes while retaining the published snapshot. |
restoreGlobal | < | The restoreGlobal value. |
How it works
Capability-specific methods only accept generated slugs with the required auth, upload, trash, or version capability.
The SDK validates stable envelopes at runtime; generated document shapes remain TypeScript contracts rather than a second client-side schema validator.
Full signature
interface RiduClient<
Config extends RiduConfigShape = RiduConfigShape,
DefaultAuth extends AuthCollectionSlug<Config> = never,
> { ... }Methods
RiduClient.schema()Read the resolved public schema manifest.
RiduClient.request()Dispatch a raw same-origin request to an application-authored custom endpoint.
RiduClient.requestPlugin()POST to one declared namespaced plugin endpoint through the configured SDK transport.
RiduClient.preference()Read one preference for the authenticated identity.
RiduClient.setPreference()Create or replace one preference.
RiduClient.deletePreference()Delete one preference.
RiduClient.resetPreferences()Delete every preference for the authenticated identity.
RiduClient.getUploadURL()Create a short-lived delivery URL for a private upload. Use it where the browser cannot send an
Authorizationheader, such as<img src>. The URL never contains the session token and stops working when the session ends or read access is lost.RiduClient.getUploadURLs()Create delivery URLs for up to 100 uploads in one request, returned in input order.
RiduClient.collectionAccess()Evaluate operation and field capabilities for a prospective collection operation.
RiduClient.resolveFilteredSelection()Resolve a filter to authorized IDs and per-document capabilities.
RiduClient.globalAccess()Evaluate operation and field capabilities for a global.
RiduClient.documentLock()Read the current document-lock lease.
RiduClient.acquireDocumentLock()Acquire or renew a document lock, optionally taking over an eligible lease.
RiduClient.releaseDocumentLock()Release a document lock owned by the current user.
RiduClient.list()List authorized collection documents with locale-, projection-, and population-dependent results.
RiduClient.count()Count authorized documents matching a typed filter.
RiduClient.find()Find one authorized document with a locale-, projection-, and population-dependent result.
RiduClient.create()Create one collection document with capability-checked draft intent.
RiduClient.duplicate()Duplicate a document with optional typed create-field overrides.
RiduClient.copyLocale()Copy localized values between locales on one document; from and to define the locale scope.
RiduClient.update()Update one document, optionally guarded by its revision.
RiduClient.mutateJoin()Atomically add and remove IDs through a join field.
RiduClient.delete()Delete or trash one document according to collection capabilities.
RiduClient.bulkUpdate()Update an explicit set of document IDs.
RiduClient.bulkPublish()Publish an explicit set of versioned documents.
RiduClient.bulkUnpublish()Unpublish an explicit set of draft-enabled documents.
RiduClient.bulkDelete()Delete or trash an explicit set of document IDs.
RiduClient.bulkRestoreDeleted()Restore an explicit set of trashed document IDs.
RiduClient.bulkDeletePermanent()Permanently delete an explicit set of trashed document IDs.
RiduClient.emptyTrash()Permanently delete every authorized trashed document in a collection.
RiduClient.restoreDeleted()Restore one trashed document.
RiduClient.deletePermanent()Permanently delete one trashed document and its retained state.
RiduClient.upload()Upload a Blob with optional typed metadata.
RiduClient.uploadFromURL()Ask the server to ingest a remote URL with optional typed metadata.
RiduClient.updateUpload()Save file, image, and document edits in one revision-checked mutation.
RiduClient.readUploadSource()Read an immutable original through editor access. Never publicly cache it.
RiduClient.previewUploadFromURL()Fetch a remote file for local editing without creating a document.
RiduClient.versions()List stored versions with locale-dependent snapshot types.
RiduClient.version()Read one stored revision with a locale-dependent snapshot type.
RiduClient.schedulePublish()Schedule a versioned document for publication with an optional revision fence.
RiduClient.scheduledPublications()List scheduled publication jobs for one document.
RiduClient.cancelScheduledPublication()Cancel one scheduled publication job.
RiduClient.publish()Publish the current version of a document.
RiduClient.publishChanges()Atomically apply edited values and publish through publish access and hooks.
RiduClient.unpublish()Return a published draft-enabled document to draft.
RiduClient.restore()Restore a historical revision, optionally as a draft.
RiduClient.global()Read one global with a locale-, projection-, and population-dependent result.
RiduClient.updateGlobal()Update a global, optionally guarded by its revision.
RiduClient.copyGlobalLocale()Copy localized values between locales on a global; from and to define the locale scope.
RiduClient.globalVersions()List stored versions for a versioned global with locale-dependent snapshot types.
RiduClient.globalVersion()Read one stored global revision with a locale-dependent snapshot type.
RiduClient.publishGlobal()Publish a versioned global.
RiduClient.publishGlobalChanges()Atomically apply edited singleton values and publish through global publish access and hooks.
RiduClient.unpublishGlobal()Return a draft-enabled global to draft.
RiduClient.restoreGlobal()Restore a historical global revision, optionally as a draft.
RiduClient.createPreviewToken()Create a short-lived preview token for a draft-enabled collection document.
RiduClient.revokePreviewToken()Revoke a preview token before it expires.
RiduClient.preview()Read preview data using a scoped token.
RiduClient.createGlobalPreviewToken()Create a short-lived preview token for a draft-enabled global.
RiduClient.previewGlobal()Read global preview data using a scoped token.
RiduClient.adminCollectionList()Framework list read model, also used for initial route preparation.
RiduClient.adminLoad()Compiled admin read for a router-root pathname + search (without the admin basename).
RiduClient.collectionLiveValidation()Check unsaved collection fields on the server without saving them.
RiduClient.countGlobalVersions()Count retained versions visible for one global.
RiduClient.countVersions()Count retained versions visible for one collection document.
RiduClient.discardDraft()Discard staged working changes while retaining the published snapshot.
RiduClient.discardGlobalDraft()Discard staged global changes while retaining the published snapshot.
RiduClient.globalLiveValidation()Check unsaved global fields on the server without saving them.
RiduClient.scheduleUnpublish()Schedule a versioned collection document to unpublish at a future instant.