Skip to main content

Function: updateStandardDocument()

updateStandardDocument(agent, input): Promise<CreateRecordResult>

Defined in: web/lib/atproto/record-creator.ts:2092

Update a standard.site document record in the user's PDS.

Parameters

agent

Agent

Authenticated ATProto Agent

input

UpdateStandardDocumentInput

Updated document data

Returns

Promise<CreateRecordResult>

Updated record result with URI and CID

Remarks

Updates an existing site.standard.document record. This is useful when the underlying eprint is updated (new version) or metadata changes.

Throws

Error if agent is not authenticated

Throws

Error if record doesn't belong to user

Throws

Error if record update fails

Example

// Update the standard.site document after eprint changes
await updateStandardDocument(agent, {
uri: existingDocUri,
title: 'Updated Title',
eprintCid: newEprintCid,
});