Skip to main content

Variable: preprintSubmissionSchema

const preprintSubmissionSchema: ZodObject<{ abstract: ZodString; authors: ZodArray<ZodObject<{ affiliation: ZodOptional<ZodString>; affiliationRor: ZodOptional<ZodString>; corresponding: ZodOptional<ZodBoolean>; did: ZodString; equalContribution: ZodOptional<ZodBoolean>; externalProfiles: ZodOptional<ZodArray<ZodObject<{ identifier: ZodOptional<ZodString>; platform: ZodString; url: ZodString; }, $strip>>>; googleScholarId: ZodOptional<ZodString>; isni: ZodOptional<ZodString>; name: ZodOptional<ZodString>; openAlexId: ZodOptional<ZodString>; orcid: ZodOptional<ZodString>; order: ZodNumber; reconciliationStatus: ZodOptional<ZodEnum<{ disputed: "disputed"; suggested: "suggested"; unreconciled: "unreconciled"; verified: "verified"; }>>; researcherId: ZodOptional<ZodString>; scopusAuthorId: ZodOptional<ZodString>; semanticScholarId: ZodOptional<ZodString>; }, $strip>>; conflictOfInterest: ZodOptional<ZodString>; createdAt: ZodOptional<ZodString>; document: ZodOptional<ZodAny>; doi: ZodOptional<ZodString>; externalIdentifiers: ZodOptional<ZodArray<ZodObject<{ scheme: ZodString; url: ZodOptional<ZodString>; value: ZodString; }, $strip>>>; externalLinks: ZodOptional<ZodArray<ZodObject<{ description: ZodOptional<ZodString>; type: ZodEnum<{ dataverse: "dataverse"; dryad: "dryad"; figshare: "figshare"; github: "github"; gitlab: "gitlab"; osf: "osf"; other: "other"; zenodo: "zenodo"; }>; url: ZodString; }, $strip>>>; facets: ZodOptional<ZodArray<ZodObject<{ label: ZodOptional<ZodString>; type: ZodEnum<{ energy: "energy"; event: "event"; form-genre: "form-genre"; matter: "matter"; organization: "organization"; person: "person"; personality: "personality"; space: "space"; time: "time"; work: "work"; }>; value: ZodString; }, $strip>>>; fieldNodes: ZodArray<ZodObject<{ uri: ZodString; weight: ZodOptional<ZodNumber>; }, $strip>>; fundingInfo: ZodOptional<ZodArray<ZodObject<{ funder: ZodString; funderId: ZodOptional<ZodString>; grantNumber: ZodOptional<ZodString>; }, $strip>>>; keywords: ZodOptional<ZodArray<ZodString>>; license: ZodOptional<ZodEnum<{ arxiv-perpetual: "arxiv-perpetual"; cc-by-4.0: "cc-by-4.0"; cc-by-nc-4.0: "cc-by-nc-4.0"; cc-by-nc-sa-4.0: "cc-by-nc-sa-4.0"; cc-by-sa-4.0: "cc-by-sa-4.0"; cc0-1.0: "cc0-1.0"; }>>; preregistration: ZodOptional<ZodString>; previousVersion: ZodOptional<ZodObject<{ cid: ZodString; uri: ZodString; }, $strip>>; supplementaryMaterials: ZodOptional<ZodArray<ZodObject<{ description: ZodString; file: ZodOptional<ZodAny>; filename: ZodOptional<ZodString>; type: ZodOptional<ZodEnum<{ appendix: "appendix"; code: "code"; data: "data"; figure: "figure"; other: "other"; }>>; }, $strip>>>; title: ZodString; }, $strip>

Defined in: web/lib/schemas/preprint.ts:327

Complete preprint submission schema.

Remarks

Matches the pub.chive.preprint.submission lexicon specification. Required fields: title, abstract, authors, document, fieldNodes, createdAt.

Example

const result = preprintSubmissionSchema.safeParse(formData);
if (result.success) {
// Create ATProto record
await agent.com.atproto.repo.createRecord({
repo: agent.session.did,
collection: 'pub.chive.preprint.submission',
record: { $type: 'pub.chive.preprint.submission', ...result.data }
});
}