UNPKG

@ems-press/content-api-types

Version:

Typescript types for the EMS Press Content API

70 lines (69 loc) 2.58 kB
import { PersonGroups, Books, BookChapterFiles, BookChapterImages } from './index'; import { DateFilter, IsInFilter } from '../filter'; import { DatePrecision } from '../date'; export declare type Type = 'book-chapters'; export declare type BookChapterType = 'front-cover' | 'front-matter' | 'preface' | 'table-of-contents' | 'introduction' | 'chapter' | 'collected-volume-article' | 'title-page' | 'bibliography' | 'index' | 'appendix' | 'back-cover' | 'other'; export declare const bookChapterTypes: BookChapterType[]; export declare type BookChapterOnlineAccessType = 'open' | 'free' | 'subscription'; export declare const bookChapterOnlineAccessType: Books.BookOnlineAccessType[]; export declare type Attributes = { createdAt: Date; updatedAt: Date; chapterType: BookChapterType; position: number; number?: string; level: number; titleTex: string; title?: string; subtitleTex?: string; subtitle?: string; abstractMarkdownTex?: string; abstractMarkdown?: string; doi?: string; submittedAt?: Date; submittedAtPrecision?: DatePrecision; acceptedAt?: Date; acceptedAtPrecision?: DatePrecision; publishedAt?: Date; publishedAtPrecision?: DatePrecision; retractedAt?: Date; retractedAtPrecision?: DatePrecision; keywords?: string[]; mscs?: string[]; pages?: number; pageStart?: string; pageEnd?: string; absolutePageStart?: number; absolutePageEnd?: number; copyright?: string; copyrightUrl?: string; license?: string; licenseCode?: string; licenseUrl?: string; languageCode?: string; onlineAccessType: BookChapterOnlineAccessType; }; export declare type Relationships = { book: { type: Books.Type; cardinality: '1'; }; personGroups: { type: PersonGroups.Type; cardinality: 'N'; }; bookChapterFiles: { type: BookChapterFiles.Type; cardinality: 'N'; }; bookChapterImages: { type: BookChapterImages.Type; cardinality: 'N'; }; }; export declare type SortField = 'createdAt' | 'updatedAt' | 'position' | 'submittedAt' | 'acceptedAt' | 'publishedAt' | 'retractedAt' | 'titleTex' | 'pages' | 'pageStart' | 'pageEnd' | 'absolutePageStart' | 'absolutePageEnd'; export declare type Filter = DateFilter<'created' | 'updated' | 'submitted' | 'accepted' | 'published' | 'retracted'> & IsInFilter<Attributes, 'chapterType' | 'doi' | 'licenseCode' | 'onlineAccessType' | 'languageCode'> & { mscs?: string[]; keywords?: string[]; book?: number[]; };