Module
@riducms/sdk
@riducms/sdk — The generated-contract-aware Fetch client for browser and server applications.
Functions 2
createClient()Create a typed client from a Ridu base URL and transport options.
connectLivePreview()Connect a frontend preview window or iframe to authenticated admin updates.
Classes 1
class RiduErrorA structured SDK failure with an error code, HTTP status, request ID, validation issues, and details.
Collections 13
Globals 9
Authentication 18
RiduClient.login()RiduClient.session()RiduClient.refreshSession()RiduClient.logout()RiduClient.logoutAll()RiduClient.sessions()RiduClient.revokeSession()RiduClient.requestPasswordReset()RiduClient.resetPassword()RiduClient.authBootstrap()RiduClient.createAuthUser()RiduClient.requestVerification()RiduClient.verifyEmail()RiduClient.changePassword()RiduClient.createAPIKey()RiduClient.apiKeys()RiduClient.revokeAPIKey()RiduClient.forceUnlock()
Uploads 3
Versions and publishing 9
Trash 5
Schema and preferences 5
Custom endpoints 1
Access and locks 6
Live preview 5
Plugins 1
Interfaces 23
interface RiduClientThe complete typed REST client for schema, auth, access, content, uploads, versions, globals, preview, and preferences.
interface ClientOptionsTransport and middleware options for createClient.
interface RequestOptionsOptions shared by every request.
interface LocaleOptionsLocalized read and write options.
interface MutationLocaleOptionsLocale and transport options shared by mutations without an optimistic-concurrency contract.
interface MutationOptionsLocalized mutation options with optimistic concurrency.
interface RevisionOptionsRevision and transport options for operations without locale query semantics.
interface ListOptionsTyped filtering, projection, population, sorting, pagination, locale, and trash options.
interface FindOptionsProjection, population, depth, and locale options for one document or global.
interface UploadOptionsMetadata and locale options accompanying an upload.
interface UploadImageInputFocal point and optional crop rectangle for regenerating configured image sizes.
interface VersionA stored version snapshot; its wire keys intentionally use capital initials.
interface CollectionContractGenerated types and capability flags for one collection.
interface GlobalContractGenerated types and capability flags for one global.
interface RiduConfigShapeThe minimum generated contract shape consumed by the SDK.
interface GeneratedRiduConfigRegistryA type-only registry augmented by generated application packages.
interface LoginCredentialsEmail and password credentials.
interface CopyLocaleInputSource and destination locale codes for a copy operation.
interface CollectionSelectionOptionsTyped filter, trash, and locale scope for resolving bulk selection.
interface LivePreviewTargetThe collection or global identity accepted by a preview route.
interface LivePreviewConnectionA disposable live-preview channel.
interface RiduLivePreviewReadyMessageThe readiness handshake sent to the admin.
interface RiduLivePreviewUpdateMessageOne sequenced preview update accepted from the admin.
Types 30
type CreateOptionsCreate options, including explicit draft or publish intent for versioned collections.
type RestoreOptionsVersion restore options.
type DefaultRiduConfigThe sole registered config, or the unbound SDK shape when zero or multiple configs are visible.
type CollectionSlugThe generated union of collection slugs.
type GlobalSlugThe generated union of global slugs.
type GlobalContractForResolve the generated contract for one global slug.
type AuthCollectionSlugCollection slugs with the generated auth capability.
type UploadCollectionSlugCollection slugs with the generated upload capability.
type VersionCollectionSlugCollection slugs with the generated versions capability.
type DraftCollectionSlugCollection slugs with the generated drafts capability.
type VersionGlobalSlugGlobal slugs with the generated versions capability.
type DraftGlobalSlugGlobal slugs with the generated drafts capability.
type OutputForResolve a collection document output type.
type AllLocalesOutputForResolve locale-keyed collection output when generated, otherwise ordinary output.
type CreateForResolve a collection create input type.
type UpdateForResolve a collection update input type.
type WhereForResolve a collection filter type.
type SelectForResolve a collection projection type.
type PopulateForResolve a collection population type.
type GlobalOutputForResolve a global output type.
type GlobalAllLocalesOutputForResolve locale-keyed global output when generated, otherwise ordinary output.
type GlobalUpdateForResolve a global update input type.
type GlobalSelectForResolve a global projection type.
type GlobalPopulateForResolve a global population type.
type AuthUserThe union of generated output types for auth-enabled collections.
interface JoinMutationInputIDs to add and remove atomically through a join field.
interface ScheduledPublishA durable scheduled-publication job returned by publishing methods.
type MiddlewareWrap a Request before it reaches Fetch.
type MiddlewareNextDispatch to the next middleware or Fetch.
type Live preview constantsStable message and query-parameter constants.
Methods 3
Constants 3
constant RIDU_LIVE_PREVIEW_CHANNEL_PARAMPublic constant RIDU_LIVE_PREVIEW_CHANNEL_PARAM from @riducms/sdk.
constant RIDU_LIVE_PREVIEW_MESSAGEPublic constant RIDU_LIVE_PREVIEW_MESSAGE from @riducms/sdk.
constant RIDU_PREVIEW_TOKEN_PARAMPublic constant RIDU_PREVIEW_TOKEN_PARAM from @riducms/sdk.