method
RiduClient.acquireDocumentLock
RiduClient.acquireDocumentLock<Slug extends CollectionSlug<Config>>(
collection: Slug,
id: string,
takeover?: boolean,
options?: RequestOptions,
): Promise<DocumentLockEnvelope>Acquire or renew a document lock, optionally taking over an eligible lease.
Related types
CollectionSlugThe generated union of collection slugs.
RequestOptionsOptions shared by every request.
DocumentLockEnvelopeThe current lease and whether this request owns or acquired it.