Function: getSubmissionHandler()
getSubmissionHandler(
c,params):Promise<{abstract:string;author: {avatar:string;did:string;displayName:string;handle:string; };cid:string;coAuthors:object[];createdAt:string;document: {$type:"blob";mimeType:string;ref:string;size:number; };doi:string;fields:object[];indexedAt:string;keywords:string[];license:string;metrics: {downloads:number;endorsements:number;views:number; };source: {blobUrl:string;lastVerifiedAt:string;pdsEndpoint:string;recordUrl:string;stale:boolean; };supplementary:object[];title:string;updatedAt:string;uri:string;versions:object[]; }>
Defined in: src/api/handlers/xrpc/preprint/getSubmission.ts:54
Handler for pub.chive.preprint.getSubmission query.
Parameters
c
Context<ChiveEnv>
Hono context with Chive environment
params
Validated query parameters
uri
string = ...
Returns
Promise<{ abstract: string; author: { avatar: string; did: string; displayName: string; handle: string; }; cid: string; coAuthors: object[]; createdAt: string; document: { $type: "blob"; mimeType: string; ref: string; size: number; }; doi: string; fields: object[]; indexedAt: string; keywords: string[]; license: string; metrics: { downloads: number; endorsements: number; views: number; }; source: { blobUrl: string; lastVerifiedAt: string; pdsEndpoint: string; recordUrl: string; stale: boolean; }; supplementary: object[]; title: string; updatedAt: string; uri: string; versions: object[]; }>
Preprint submission with pdsUrl
Throws
NotFoundError if preprint is not indexed
Example
GET /xrpc/pub.chive.preprint.getSubmission?uri=at://did:plc:abc/pub.chive.preprint.submission/xyz
Response:
{
"uri": "at://did:plc:abc/pub.chive.preprint.submission/xyz",
"title": "Quantum Computing Advances",
"pdsUrl": "https://bsky.social",
...
}