UNPKG

@desci-labs/frontend-components

Version:

A library for commonly used components on the DeSci Frontend web apps

451 lines 10.4 kB
export interface NoContentProps { icon: React.ReactNode; text: string; button?: React.ReactNode; user: UserProfile; } export interface UserProfile { email: string; userId: number; isGuest?: boolean; profile: NodesUserProfile; wallets: Wallet[]; } export declare enum NotificationType { PUBLISH = "PUBLISH", COMMENTS = "COMMENTS", CONTRIBUTOR_INVITE = "CONTRIBUTOR_INVITE", DOI_ISSUANCE_STATUS = "DOI_ISSUANCE_STATUS", ATTESTATION_VALIDATION = "ATTESTATION_VALIDATION" } export type Organization = { id: string; name: string; acronyms: string[]; }; export interface NodesUserProfile { name?: string; orcid?: string; googleScholarUrl?: string; userOrganization?: Organization[]; consent?: boolean; notificationSettings?: Partial<Record<NotificationType, boolean>>; } export interface Wallet { address: string; nickname: string; extra: object | null; } export interface NodesConnectResponse { err?: string; code?: number; userFound?: boolean; promptEmail?: boolean; } export interface OrcidDesciData { access_token?: string; refresh_token?: string; expires_in?: number; scope?: string; name?: string; orcid?: string; desci?: NodesConnectResponse; id_token?: string; } export interface OrcidProfileData { id: string; display_name: string; orcid: string; summary_stats: { h_index: number; }; cited_by_count: number; works_count: number; affiliations: { institution: { display_name: string; }; }[]; x_concepts: { display_name: string; }[]; ids: { openalex: string; orcid: string; }; employment: { organisation: { name: string; location: string; department: string | null; }; title: string; startDate: string; endDate: string | null; }[]; education: { organisation: { name: string; location: string; department: string | null; }; title: string; startDate: string; endDate: string | null; }[]; bibliometrics: { contemporary_h_index: number; citation_count: number; firstPubYear: number; m_index: number; }; } export interface Ids { openalex: string; doi?: string; mag?: string; } export interface PrimaryLocation { is_oa?: boolean; landing_page_url?: string; pdf_url?: string | undefined; source: Source; is_accepted?: boolean; is_published?: boolean; } export interface Source { id: string; display_name: string; issn_l?: string; issn?: string[]; is_oa?: boolean; is_in_doaj?: boolean; is_core?: boolean; host_organization?: string; host_organization_name?: string; host_organization_lineage?: string[]; host_organization_lineage_names?: string[]; type?: string; } export interface OpenAccess { is_oa: boolean; oa_status?: string; oa_url: string; any_repository_has_fulltext?: boolean; } export interface Author { id: string; display_name: string; orcid: string | null; } export interface Institution { id: string; display_name: string; ror: string; country_code: string; type: string; lineage: string[]; } export interface Affiliation { raw_affiliation_string: string; institution_ids: string[]; } export interface Authorship { author_position?: string; author: Author; institutions?: Institution[]; countries?: string[]; is_corresponding?: boolean; raw_author_name?: string; raw_affiliation_strings?: string[]; affiliations?: Affiliation[]; } export interface ApcList { value: number; currency: string; value_usd: number; provenance: string; } export interface CitationNormalizedPercentile { value: number; is_in_top_1_percent: boolean; is_in_top_10_percent: boolean; } export interface CitedByPercentileYear { min: number; max: number; } export interface Biblio { volume: string; issue: string; first_page: string; last_page: string; } export interface PrimaryTopic { id: string; display_name: string; score: number; subfield: Subfield; field: Field; domain: Domain; } export interface Subfield { id: string; display_name: string; } export interface Field { id: string; display_name: string; } export interface Domain { id: string; display_name: string; } export interface Topic { id: string; display_name: string; score: number; subfield: Subfield2; field: Field2; domain: Domain2; } export interface Subfield2 { id: string; display_name: string; } export interface Field2 { id: string; display_name: string; } export interface Domain2 { id: string; display_name: string; } export interface Keyword { id: string; display_name: string; score: number; } export interface Concept { id: string; wikidata: string; display_name: string; level: number; score: number; } export interface BestOaLocation { is_oa: boolean; landing_page_url: string; pdf_url: string; source: Source3; version: string; is_accepted: boolean; is_published: boolean; } export interface Source3 { id: string; display_name: string; is_oa: boolean; is_in_doaj: boolean; is_core: boolean; host_organization: string; host_organization_name: string; host_organization_lineage: string[]; host_organization_lineage_names: string[]; type: string; } export interface SustainableDevelopmentGoal { id: string; display_name: string; score: number; } export interface CountsByYear { year: number; cited_by_count: number; } export type OrcidProfilePayload = { meta: { page: number; limit?: number; count: number; nextPage: number | null; perPage: number; }; works: OpenAlexWork[]; }; export type OrcidPublishedNodesPayload = { meta: { page: number; limit: number; }; nodes: OrcidPublishedNodesData[]; }; export type OrcidPublishedNodesData = { dpid: number; title: string; versionIx: number; publishedAt: string; createdAt: string; isPublished: boolean; uuid: string; authors: { name: string; orcid: string; openAlex: string; }[]; }; export interface OpenAlexWork { id?: string; doi?: string; title: string; display_name?: string; relevance_score?: number; publication_year?: number; publication_date: string; ids: Ids; language?: string; primary_location?: PrimaryLocation; type?: string; type_crossref?: string; indexed_in?: string[]; open_access: OpenAccess; authorships: Authorship[]; countries_distinct_count?: number; institutions_distinct_count?: number; apc_list?: ApcList; fwci?: number; has_fulltext?: boolean; fulltext_origin?: string; cited_by_count: number; citation_normalized_percentile?: CitationNormalizedPercentile; cited_by_percentile_year?: CitedByPercentileYear; biblio?: Biblio; is_retracted?: boolean; is_paratext?: boolean; primary_topic?: PrimaryTopic; topics?: Topic[]; keywords?: Keyword[]; concepts?: Concept[]; locations_count?: number; locations?: Location[]; best_oa_location?: BestOaLocation; sustainable_development_goals?: SustainableDevelopmentGoal[]; referenced_works_count?: number; referenced_works?: string[]; related_works?: string[]; abstract_inverted_index?: AbstractInvertedIndex; cited_by_api_url?: string; counts_by_year?: CountsByYear[]; updated_date?: string; created_date: string; } export interface Location { is_oa: boolean; landing_page_url: string; pdf_url?: string; source: Source2; version?: string; is_accepted: boolean; is_published: boolean; } export interface Source2 { id: string; display_name: string; issn_l?: string; issn?: string[]; is_oa: boolean; is_in_doaj: boolean; is_core: boolean; host_organization: string; host_organization_name: string; host_organization_lineage: string[]; host_organization_lineage_names: string[]; type: string; } export interface BestOaLocation { is_oa: boolean; landing_page_url: string; pdf_url: string; source: Source3; version: string; is_accepted: boolean; is_published: boolean; } export interface Source3 { id: string; display_name: string; is_oa: boolean; is_in_doaj: boolean; is_core: boolean; host_organization: string; host_organization_name: string; host_organization_lineage: string[]; host_organization_lineage_names: string[]; type: string; } export interface SustainableDevelopmentGoal { id: string; display_name: string; score: number; } export interface AbstractInvertedIndex { [key: string]: number[]; } export interface CountsByYear { year: number; cited_by_count: number; } export interface NodesUserProfile { email?: string; name?: string; orcid?: string; googleScholarUrl?: string; userOrganization?: Organization[]; consent?: boolean; notificationSettings?: Partial<Record<NotificationType, boolean>>; } export type OrcidCoauthorsPayload = { results: OrcidCoauthorsData[]; meta: { page: string; limit: number; duration: number; count: number; nextPage: number | null; }; }; export type OrcidCoauthorsData = { id: string; name: string; orcid: string | null; workId?: string; }; export type NormalizedWork = { title: string; ids: { openalex: string; }; id: string; authorships: { author: { id: string; display_name: string; orcid: string; }; }[]; primary_location: { source: { display_name: string; id: string; }; }; doi: string; display_name: string; cited_by_count: number; open_access: { oa_url: string; }; publication_date: string; created_date: string; }; //# sourceMappingURL=types.d.ts.map