UNPKG

clinicaltrialsgov-ts

Version:

Javascript / Typescript wrapper for Clinicaltrials.gov API

1,072 lines (1,062 loc) 37.9 kB
type FieldNode = { altPieceNames?: Array<string>; children?: Array<FieldNode>; dedLink?: WebLink; description?: string; historicOnly?: boolean; indexedOnly?: boolean; isEnum?: boolean; maxChars?: number; name: string; nested?: boolean; piece: string; rules?: string; sourceType: string; synonyms?: boolean; title?: string; type: string; }; type WebLink = { label: string; url: string; }; type FieldNodeList = Array<FieldNode>; type SearchDocument = { areas: Array<SearchArea>; name: string; }; type SearchArea = { name: string; param?: string; parts: Array<SearchPart>; uiLabel?: string; }; type SearchPart = { isEnum: boolean; isSynonyms: boolean; pieces: Array<string>; type: string; weight: number; }; type SearchDocumentList = Array<SearchDocument>; type EnumInfo = { pieces: Array<string>; type: string; values: Array<EnumItem>; }; type EnumItem = { exceptions?: { [key: string]: unknown; }; legacyValue: string; value: string; }; type EnumInfoList = Array<EnumInfo>; type GzipStats = { averageSizeBytes: number; largestStudies: Array<StudySize>; percentiles: { [key: string]: unknown; }; ranges: Array<DistItem>; totalStudies: number; }; type StudySize = { id: string; sizeBytes: number; }; type DistItem = { sizeRange: string; studiesCount: number; }; type ListSizes = { field: string; maxSize?: number; minSize?: number; piece: string; topSizes?: Array<ListSize>; uniqueSizesCount: number; }; type ListSize = { size: number; studiesCount: number; }; type ListSizesList = Array<ListSizes>; type EnumStats = { field: string; missingStudiesCount: number; piece: string; topValues?: Array<ValueCount>; type: FieldStatsType; uniqueValuesCount: number; }; type ValueCount = { studiesCount: number; value: string; }; type FieldStatsType = 'ENUM' | 'STRING' | 'DATE' | 'INTEGER' | 'NUMBER' | 'BOOLEAN'; type StringStats = { field: string; longest?: LongestString; missingStudiesCount: number; piece: string; topValues?: Array<ValueCount>; type: FieldStatsType; uniqueValuesCount: number; }; type LongestString = { length: number; nctId: string; value: string; }; type DateStats = { field: string; formats: Array<string>; max?: string; min?: string; missingStudiesCount: number; piece: string; type: FieldStatsType; }; type IntegerStats = { avg?: number; field: string; max?: number; min?: number; missingStudiesCount: number; piece: string; type: FieldStatsType; }; type NumberStats = { avg?: number; field: string; max?: number; min?: number; missingStudiesCount: number; piece: string; type: FieldStatsType; }; type BooleanStats = { falseCount: number; field: string; missingStudiesCount: number; piece: string; trueCount: number; type: FieldStatsType; }; type Version = { apiVersion: string; dataTimestamp?: string; }; type PagedStudies = { nextPageToken?: string; studies: StudyList; totalCount?: number; }; type Study = { protocolSection?: ProtocolSection; resultsSection?: ResultsSection; annotationSection?: AnnotationSection; documentSection?: DocumentSection; derivedSection?: DerivedSection; hasResults?: boolean; }; type ProtocolSection = { identificationModule?: IdentificationModule; statusModule?: StatusModule; sponsorCollaboratorsModule?: SponsorCollaboratorsModule; oversightModule?: OversightModule; descriptionModule?: DescriptionModule; conditionsModule?: ConditionsModule; designModule?: DesignModule; armsInterventionsModule?: ArmsInterventionsModule; outcomesModule?: OutcomesModule; eligibilityModule?: EligibilityModule; contactsLocationsModule?: ContactsLocationsModule; referencesModule?: ReferencesModule; ipdSharingStatementModule?: IpdSharingStatementModule; }; type ResultsSection = { participantFlowModule?: ParticipantFlowModule; baselineCharacteristicsModule?: BaselineCharacteristicsModule; outcomeMeasuresModule?: OutcomeMeasuresModule; adverseEventsModule?: AdverseEventsModule; moreInfoModule?: MoreInfoModule; }; type AnnotationSection = { annotationModule?: AnnotationModule; }; type DocumentSection = { largeDocumentModule?: LargeDocumentModule; }; type DerivedSection = { miscInfoModule?: MiscInfoModule; conditionBrowseModule?: BrowseModule; interventionBrowseModule?: BrowseModule; }; type IdentificationModule = { nctId?: string; nctIdAliases?: Array<string>; orgStudyIdInfo?: OrgStudyIdInfo; secondaryIdInfos?: Array<SecondaryIdInfo>; briefTitle?: string; officialTitle?: string; acronym?: string; organization?: Organization; }; type StatusModule = { statusVerifiedDate?: PartialDate; overallStatus?: Status; lastKnownStatus?: Status; delayedPosting?: boolean; whyStopped?: string; expandedAccessInfo?: ExpandedAccessInfo; startDateStruct?: PartialDateStruct; primaryCompletionDateStruct?: PartialDateStruct; completionDateStruct?: PartialDateStruct; studyFirstSubmitDate?: string; studyFirstSubmitQcDate?: string; studyFirstPostDateStruct?: DateStruct; resultsWaived?: boolean; resultsFirstSubmitDate?: string; resultsFirstSubmitQcDate?: string; resultsFirstPostDateStruct?: DateStruct; dispFirstSubmitDate?: string; dispFirstSubmitQcDate?: string; dispFirstPostDateStruct?: DateStruct; lastUpdateSubmitDate?: string; lastUpdatePostDateStruct?: DateStruct; }; type SponsorCollaboratorsModule = { responsibleParty?: ResponsibleParty; leadSponsor?: Sponsor; collaborators?: Array<Sponsor>; }; type OversightModule = { oversightHasDmc?: boolean; isFdaRegulatedDrug?: boolean; isFdaRegulatedDevice?: boolean; isUnapprovedDevice?: boolean; isPpsd?: boolean; isUsExport?: boolean; fdaaa801Violation?: boolean; }; type DescriptionModule = { briefSummary?: string; detailedDescription?: string; }; type ConditionsModule = { conditions?: Array<string>; keywords?: Array<string>; }; type DesignModule = { studyType?: StudyType; nPtrsToThisExpAccNctId?: number; expandedAccessTypes?: ExpandedAccessTypes; patientRegistry?: boolean; targetDuration?: string; phases?: Array<Phase>; designInfo?: DesignInfo; bioSpec?: BioSpec; enrollmentInfo?: EnrollmentInfo; }; type ArmsInterventionsModule = { armGroups?: Array<ArmGroup>; interventions?: Array<Intervention>; }; type OutcomesModule = { primaryOutcomes?: Array<Outcome>; secondaryOutcomes?: Array<Outcome>; otherOutcomes?: Array<Outcome>; }; type EligibilityModule = { eligibilityCriteria?: string; healthyVolunteers?: boolean; sex?: Sex; genderBased?: boolean; genderDescription?: string; minimumAge?: string; maximumAge?: string; stdAges?: Array<StandardAge>; studyPopulation?: string; samplingMethod?: SamplingMethod; }; type ContactsLocationsModule = { centralContacts?: Array<Contact>; overallOfficials?: Array<Official>; locations?: Array<Location>; }; type ReferencesModule = { references?: Array<Reference>; seeAlsoLinks?: Array<SeeAlsoLink>; availIpds?: Array<AvailIpd>; }; type OutcomeMeasuresModule = { outcomeMeasures?: Array<OutcomeMeasure>; }; type MoreInfoModule = { limitationsAndCaveats?: LimitationsAndCaveats; certainAgreement?: CertainAgreement; pointOfContact?: PointOfContact; }; type AnnotationModule = { unpostedAnnotation?: UnpostedAnnotation; violationAnnotation?: ViolationAnnotation; }; type MiscInfoModule = { versionHolder?: string; removedCountries?: Array<string>; submissionTracking?: SubmissionTracking; }; type UnpostedAnnotation = { unpostedResponsibleParty?: string; unpostedEvents?: Array<UnpostedEvent>; }; type ViolationAnnotation = { violationEvents?: Array<ViolationEvent>; }; type SubmissionTracking = { estimatedResultsFirstSubmitDate?: string; firstMcpInfo?: FirstMcpInfo; submissionInfos?: Array<SubmissionInfo>; }; type ModelPredictions = { [key: string]: unknown; }; type BmiLimits = { [key: string]: unknown; }; type EnrollmentInfo = { count?: number; type?: EnrollmentType; }; type BioSpec = { retention?: BioSpecRetention; description?: string; }; type SeeAlsoLink = { label?: string; url?: string; }; type FirstMcpInfo = { postDateStruct?: DateStruct; }; type ExpandedAccessTypes = { individual?: boolean; intermediate?: boolean; treatment?: boolean; }; type Intervention = { type?: InterventionType; name?: string; description?: string; armGroupLabels?: Array<string>; otherNames?: Array<string>; }; type SecondaryIdInfo = { id?: string; type?: SecondaryIdType; domain?: string; link?: string; }; type AvailIpd = { id?: string; type?: string; url?: string; comment?: string; }; type LimitationsAndCaveats = { description?: string; }; type DateStruct = { date?: string; type?: DateType; }; type SubmissionInfo = { releaseDate?: string; unreleaseDate?: string; unreleaseDateUnknown?: boolean; resetDate?: string; mcpReleaseN?: number; }; type ExpandedAccessInfo = { hasExpandedAccess?: boolean; nctId?: string; statusForNctId?: ExpandedAccessStatus; }; type AdverseEventsModule = { frequencyThreshold?: string; timeFrame?: string; description?: string; allCauseMortalityComment?: string; eventGroups?: Array<EventGroup>; seriousEvents?: Array<AdverseEvent>; otherEvents?: Array<AdverseEvent>; }; type ViolationEvent = { type?: ViolationEventType; description?: string; creationDate?: string; issuedDate?: string; releaseDate?: string; postedDate?: string; }; type ArmGroup = { label?: string; type?: ArmGroupType; description?: string; interventionNames?: Array<string>; }; type DesignInfo = { allocation?: DesignAllocation; interventionModel?: InterventionalAssignment; interventionModelDescription?: string; primaryPurpose?: PrimaryPurpose; observationalModel?: ObservationalModel; timePerspective?: DesignTimePerspective; maskingInfo?: MaskingBlock; }; type Organization = { fullName?: string; class?: AgencyClass; }; type PointOfContact = { title?: string; organization?: string; email?: string; phone?: string; phoneExt?: string; }; type IpdSharingStatementModule = { ipdSharing?: IpdSharing; description?: string; infoTypes?: Array<IpdSharingInfoType>; timeFrame?: string; accessCriteria?: string; url?: string; }; type OrgStudyIdInfo = { id?: string; type?: OrgStudyIdType; link?: string; }; type ResponsibleParty = { type?: ResponsiblePartyType; investigatorFullName?: string; investigatorTitle?: string; investigatorAffiliation?: string; oldNameTitle?: string; oldOrganization?: string; }; type CertainAgreement = { piSponsorEmployee?: boolean; restrictionType?: AgreementRestrictionType; restrictiveAgreement?: boolean; otherDetails?: string; }; type UnpostedEvent = { type?: UnpostedEventType; date?: string; dateUnknown?: boolean; }; type Contact = { name?: string; role?: ContactRole; phone?: string; phoneExt?: string; email?: string; }; type PartialDateStruct = { date?: PartialDate; type?: DateType; }; type Outcome = { measure?: string; description?: string; timeFrame?: string; }; type OutcomeMeasure = { type?: OutcomeMeasureType; title?: string; description?: string; populationDescription?: string; reportingStatus?: ReportingStatus; anticipatedPostingDate?: PartialDate; paramType?: MeasureParam; dispersionType?: string; unitOfMeasure?: string; calculatePct?: boolean; timeFrame?: string; typeUnitsAnalyzed?: string; denomUnitsSelected?: string; groups?: Array<MeasureGroup>; denoms?: Array<Denom>; classes?: Array<MeasureClass>; analyses?: Array<MeasureAnalysis>; }; type BaselineCharacteristicsModule = { populationDescription?: string; typeUnitsAnalyzed?: string; groups?: Array<MeasureGroup>; denoms?: Array<Denom>; measures?: Array<BaselineMeasure>; }; type Reference = { pmid?: string; type?: ReferenceType; citation?: string; retractions?: Array<Retraction>; }; type ParticipantFlowModule = { preAssignmentDetails?: string; recruitmentDetails?: string; typeUnitsAnalyzed?: string; groups?: Array<FlowGroup>; periods?: Array<FlowPeriod>; }; type LargeDocumentModule = { noSap?: boolean; largeDocs?: Array<LargeDoc>; }; type Location = { facility?: string; status?: RecruitmentStatus; city?: string; state?: string; zip?: string; country?: string; contacts?: Array<Contact>; countryCode?: string; geoPoint?: GeoPoint; }; type Sponsor = { name?: string; class?: AgencyClass; }; type BrowseModule = { meshes?: Array<Mesh>; ancestors?: Array<Mesh>; browseLeaves?: Array<BrowseLeaf>; browseBranches?: Array<BrowseBranch>; }; type Official = { name?: string; affiliation?: string; role?: OfficialRole; }; type BrowseLeaf = { id?: string; name?: string; asFound?: string; relevance?: BrowseLeafRelevance; }; type MaskingBlock = { masking?: DesignMasking; maskingDescription?: string; whoMasked?: Array<WhoMasked>; }; type EventGroup = { id?: string; title?: string; description?: string; deathsNumAffected?: number; deathsNumAtRisk?: number; seriousNumAffected?: number; seriousNumAtRisk?: number; otherNumAffected?: number; otherNumAtRisk?: number; }; type Mesh = { id?: string; term?: string; }; type FlowGroup = { id?: string; title?: string; description?: string; }; type MeasureAnalysis = { paramType?: string; paramValue?: string; dispersionType?: AnalysisDispersionType; dispersionValue?: string; statisticalMethod?: string; statisticalComment?: string; pValue?: string; pValueComment?: string; ciNumSides?: ConfidenceIntervalNumSides; ciPctValue?: string; ciLowerLimit?: string; ciUpperLimit?: string; ciLowerLimitComment?: string; ciUpperLimitComment?: string; estimateComment?: string; testedNonInferiority?: boolean; nonInferiorityType?: NonInferiorityType; nonInferiorityComment?: string; otherAnalysisDescription?: string; groupDescription?: string; groupIds?: Array<string>; }; type AdverseEvent = { term?: string; organSystem?: string; sourceVocabulary?: string; assessmentType?: EventAssessment; notes?: string; stats?: Array<EventStats>; }; type Retraction = { pmid?: string; source?: string; }; type Denom = { units?: string; counts?: Array<DenomCount>; }; type FlowPeriod = { title?: string; milestones?: Array<FlowMilestone>; dropWithdraws?: Array<DropWithdraw>; }; type MeasureGroup = { id?: string; title?: string; description?: string; }; type MeasureClass = { title?: string; denoms?: Array<Denom>; categories?: Array<MeasureCategory>; }; type BrowseBranch = { abbrev?: string; name?: string; }; type BaselineMeasure = { title?: string; description?: string; populationDescription?: string; paramType?: MeasureParam; dispersionType?: MeasureDispersionType; unitOfMeasure?: string; calculatePct?: boolean; denomUnitsSelected?: string; denoms?: Array<Denom>; classes?: Array<MeasureClass>; }; type LargeDoc = { typeAbbrev?: string; hasProtocol?: boolean; hasSap?: boolean; hasIcf?: boolean; label?: string; date?: string; uploadDate?: DateTimeMinutes; filename?: string; size?: number; }; type DropWithdraw = { type?: string; comment?: string; reasons?: Array<FlowStats>; }; type DenomCount = { groupId?: string; value?: string; }; type EventStats = { groupId?: string; numEvents?: number; numAffected?: number; numAtRisk?: number; }; type MeasureCategory = { title?: string; measurements?: Array<Measurement>; }; type FlowMilestone = { type?: string; comment?: string; achievements?: Array<FlowStats>; }; type FlowStats = { groupId?: string; comment?: string; numSubjects?: string; numUnits?: string; }; type Measurement = { groupId?: string; value?: string; spread?: string; lowerLimit?: string; upperLimit?: string; comment?: string; }; type Status = 'ACTIVE_NOT_RECRUITING' | 'COMPLETED' | 'ENROLLING_BY_INVITATION' | 'NOT_YET_RECRUITING' | 'RECRUITING' | 'SUSPENDED' | 'TERMINATED' | 'WITHDRAWN' | 'AVAILABLE' | 'NO_LONGER_AVAILABLE' | 'TEMPORARILY_NOT_AVAILABLE' | 'APPROVED_FOR_MARKETING' | 'WITHHELD' | 'UNKNOWN'; type StudyType = 'EXPANDED_ACCESS' | 'INTERVENTIONAL' | 'OBSERVATIONAL'; type Phase = 'NA' | 'EARLY_PHASE1' | 'PHASE1' | 'PHASE2' | 'PHASE3' | 'PHASE4'; type Sex = 'FEMALE' | 'MALE' | 'ALL'; type StandardAge = 'CHILD' | 'ADULT' | 'OLDER_ADULT'; type SamplingMethod = 'PROBABILITY_SAMPLE' | 'NON_PROBABILITY_SAMPLE'; type IpdSharing = 'YES' | 'NO' | 'UNDECIDED'; type IpdSharingInfoType = 'STUDY_PROTOCOL' | 'SAP' | 'ICF' | 'CSR' | 'ANALYTIC_CODE'; type OrgStudyIdType = 'NIH' | 'FDA' | 'VA' | 'CDC' | 'AHRQ' | 'SAMHSA'; type SecondaryIdType = 'NIH' | 'FDA' | 'VA' | 'CDC' | 'AHRQ' | 'SAMHSA' | 'OTHER_GRANT' | 'EUDRACT_NUMBER' | 'CTIS' | 'REGISTRY' | 'OTHER'; type AgencyClass = 'NIH' | 'FED' | 'OTHER_GOV' | 'INDIV' | 'INDUSTRY' | 'NETWORK' | 'AMBIG' | 'OTHER' | 'UNKNOWN'; type ExpandedAccessStatus = 'AVAILABLE' | 'NO_LONGER_AVAILABLE' | 'TEMPORARILY_NOT_AVAILABLE' | 'APPROVED_FOR_MARKETING'; type DateType = 'ACTUAL' | 'ESTIMATED'; type ResponsiblePartyType = 'SPONSOR' | 'PRINCIPAL_INVESTIGATOR' | 'SPONSOR_INVESTIGATOR'; type DesignAllocation = 'RANDOMIZED' | 'NON_RANDOMIZED' | 'NA'; type InterventionalAssignment = 'SINGLE_GROUP' | 'PARALLEL' | 'CROSSOVER' | 'FACTORIAL' | 'SEQUENTIAL'; type PrimaryPurpose = 'TREATMENT' | 'PREVENTION' | 'DIAGNOSTIC' | 'ECT' | 'SUPPORTIVE_CARE' | 'SCREENING' | 'HEALTH_SERVICES_RESEARCH' | 'BASIC_SCIENCE' | 'DEVICE_FEASIBILITY' | 'OTHER'; type ObservationalModel = 'COHORT' | 'CASE_CONTROL' | 'CASE_ONLY' | 'CASE_CROSSOVER' | 'ECOLOGIC_OR_COMMUNITY' | 'FAMILY_BASED' | 'DEFINED_POPULATION' | 'NATURAL_HISTORY' | 'OTHER'; type DesignTimePerspective = 'RETROSPECTIVE' | 'PROSPECTIVE' | 'CROSS_SECTIONAL' | 'OTHER'; type BioSpecRetention = 'NONE_RETAINED' | 'SAMPLES_WITH_DNA' | 'SAMPLES_WITHOUT_DNA'; type EnrollmentType = 'ACTUAL' | 'ESTIMATED'; type ArmGroupType = 'EXPERIMENTAL' | 'ACTIVE_COMPARATOR' | 'PLACEBO_COMPARATOR' | 'SHAM_COMPARATOR' | 'NO_INTERVENTION' | 'OTHER'; type InterventionType = 'BEHAVIORAL' | 'BIOLOGICAL' | 'COMBINATION_PRODUCT' | 'DEVICE' | 'DIAGNOSTIC_TEST' | 'DIETARY_SUPPLEMENT' | 'DRUG' | 'GENETIC' | 'PROCEDURE' | 'RADIATION' | 'OTHER'; type ContactRole = 'STUDY_CHAIR' | 'STUDY_DIRECTOR' | 'PRINCIPAL_INVESTIGATOR' | 'SUB_INVESTIGATOR' | 'CONTACT'; type OfficialRole = 'STUDY_CHAIR' | 'STUDY_DIRECTOR' | 'PRINCIPAL_INVESTIGATOR' | 'SUB_INVESTIGATOR'; type RecruitmentStatus = 'ACTIVE_NOT_RECRUITING' | 'COMPLETED' | 'ENROLLING_BY_INVITATION' | 'NOT_YET_RECRUITING' | 'RECRUITING' | 'SUSPENDED' | 'TERMINATED' | 'WITHDRAWN' | 'AVAILABLE'; type ReferenceType = 'BACKGROUND' | 'RESULT' | 'DERIVED'; type MeasureParam = 'GEOMETRIC_MEAN' | 'GEOMETRIC_LEAST_SQUARES_MEAN' | 'LEAST_SQUARES_MEAN' | 'LOG_MEAN' | 'MEAN' | 'MEDIAN' | 'NUMBER' | 'COUNT_OF_PARTICIPANTS' | 'COUNT_OF_UNITS'; type MeasureDispersionType = 'NA' | 'STANDARD_DEVIATION' | 'STANDARD_ERROR' | 'INTER_QUARTILE_RANGE' | 'FULL_RANGE' | 'CONFIDENCE_80' | 'CONFIDENCE_90' | 'CONFIDENCE_95' | 'CONFIDENCE_975' | 'CONFIDENCE_99' | 'CONFIDENCE_OTHER' | 'GEOMETRIC_COEFFICIENT'; type OutcomeMeasureType = 'PRIMARY' | 'SECONDARY' | 'OTHER_PRE_SPECIFIED' | 'POST_HOC'; type ReportingStatus = 'NOT_POSTED' | 'POSTED'; type EventAssessment = 'NON_SYSTEMATIC_ASSESSMENT' | 'SYSTEMATIC_ASSESSMENT'; type AgreementRestrictionType = 'LTE60' | 'GT60' | 'OTHER'; type BrowseLeafRelevance = 'LOW' | 'HIGH'; type DesignMasking = 'NONE' | 'SINGLE' | 'DOUBLE' | 'TRIPLE' | 'QUADRUPLE'; type WhoMasked = 'PARTICIPANT' | 'CARE_PROVIDER' | 'INVESTIGATOR' | 'OUTCOMES_ASSESSOR'; type AnalysisDispersionType = 'STANDARD_DEVIATION' | 'STANDARD_ERROR_OF_MEAN'; type ConfidenceIntervalNumSides = 'ONE_SIDED' | 'TWO_SIDED'; type NonInferiorityType = 'SUPERIORITY' | 'NON_INFERIORITY' | 'EQUIVALENCE' | 'OTHER' | 'NON_INFERIORITY_OR_EQUIVALENCE' | 'SUPERIORITY_OR_OTHER' | 'NON_INFERIORITY_OR_EQUIVALENCE_LEGACY' | 'SUPERIORITY_OR_OTHER_LEGACY'; type UnpostedEventType = 'RESET' | 'RELEASE' | 'UNRELEASE'; type ViolationEventType = 'VIOLATION_IDENTIFIED' | 'CORRECTION_CONFIRMED' | 'PENALTY_IMPOSED' | 'ISSUES_IN_LETTER_ADDRESSED_CONFIRMED'; type GeoPoint = { lat: number; lon: number; }; type FieldValuesStatsList = Array<FieldValuesStats>; type FieldValuesStats = EnumStats | StringStats | DateStats | IntegerStats | NumberStats | BooleanStats; type StudyList = Array<Study>; type StudiesCsv = string; type StudiesZip = string; type StudyFhir = { [key: string]: unknown; }; type PartialDate = string; type DateTimeMinutes = string; type ErrorMessage = string; type ListStudiesData = { body?: never; path?: never; query?: { format?: 'csv' | 'json'; markupFormat?: 'markdown' | 'legacy'; 'query.cond'?: string; 'query.term'?: string; 'query.locn'?: string; 'query.titles'?: string; 'query.intr'?: string; 'query.outc'?: string; 'query.spons'?: string; 'query.lead'?: string; 'query.id'?: string; 'query.patient'?: string; 'filter.overallStatus'?: Array<Status>; 'filter.geo'?: string; 'filter.ids'?: Array<string>; 'filter.advanced'?: string; 'filter.synonyms'?: Array<string>; 'postFilter.overallStatus'?: Array<Status>; 'postFilter.geo'?: string; 'postFilter.ids'?: Array<string>; 'postFilter.advanced'?: string; 'postFilter.synonyms'?: Array<string>; aggFilters?: string; geoDecay?: string; fields?: Array<string>; sort?: Array<string>; countTotal?: boolean; pageSize?: number; pageToken?: string; }; url: '/studies'; }; type ListStudiesErrors = { 400: ErrorMessage; }; type ListStudiesError = ListStudiesErrors[keyof ListStudiesErrors]; type ListStudiesResponses = { 200: PagedStudies; }; type ListStudiesResponse = ListStudiesResponses[keyof ListStudiesResponses]; type FetchStudyData = { body?: never; path: { nctId: string; }; query?: { format?: 'csv' | 'json' | 'json.zip' | 'fhir.json' | 'ris'; markupFormat?: 'markdown' | 'legacy'; fields?: Array<string>; }; url: '/studies/{nctId}'; }; type FetchStudyErrors = { 400: ErrorMessage; 404: ErrorMessage; }; type FetchStudyError = FetchStudyErrors[keyof FetchStudyErrors]; type FetchStudyResponses = { 200: Study; }; type FetchStudyResponse = FetchStudyResponses[keyof FetchStudyResponses]; type StudiesMetadataData = { body?: never; path?: never; query?: { includeIndexedOnly?: boolean; includeHistoricOnly?: boolean; }; url: '/studies/metadata'; }; type StudiesMetadataErrors = { 400: ErrorMessage; }; type StudiesMetadataError = StudiesMetadataErrors[keyof StudiesMetadataErrors]; type StudiesMetadataResponses = { 200: FieldNodeList; }; type StudiesMetadataResponse = StudiesMetadataResponses[keyof StudiesMetadataResponses]; type SearchAreasData = { body?: never; path?: never; query?: never; url: '/studies/search-areas'; }; type SearchAreasErrors = { 400: ErrorMessage; }; type SearchAreasError = SearchAreasErrors[keyof SearchAreasErrors]; type SearchAreasResponses = { 200: SearchDocumentList; }; type SearchAreasResponse = SearchAreasResponses[keyof SearchAreasResponses]; type EnumsData = { body?: never; path?: never; query?: never; url: '/studies/enums'; }; type EnumsErrors = { 400: ErrorMessage; }; type EnumsError = EnumsErrors[keyof EnumsErrors]; type EnumsResponses = { 200: EnumInfoList; }; type EnumsResponse = EnumsResponses[keyof EnumsResponses]; type SizeStatsData = { body?: never; path?: never; query?: never; url: '/stats/size'; }; type SizeStatsErrors = { 400: ErrorMessage; }; type SizeStatsError = SizeStatsErrors[keyof SizeStatsErrors]; type SizeStatsResponses = { 200: GzipStats; }; type SizeStatsResponse = SizeStatsResponses[keyof SizeStatsResponses]; type FieldValuesStatsData = { body?: never; path?: never; query?: { types?: Array<FieldStatsType>; fields?: Array<string>; }; url: '/stats/field/values'; }; type FieldValuesStatsErrors = { 400: ErrorMessage; 404: ErrorMessage; }; type FieldValuesStatsError = FieldValuesStatsErrors[keyof FieldValuesStatsErrors]; type FieldValuesStatsResponses = { 200: FieldValuesStatsList; }; type FieldValuesStatsResponse = FieldValuesStatsResponses[keyof FieldValuesStatsResponses]; type ListFieldSizesStatsData = { body?: never; path?: never; query?: { fields?: Array<string>; }; url: '/stats/field/sizes'; }; type ListFieldSizesStatsErrors = { 400: ErrorMessage; 404: ErrorMessage; }; type ListFieldSizesStatsError = ListFieldSizesStatsErrors[keyof ListFieldSizesStatsErrors]; type ListFieldSizesStatsResponses = { 200: ListSizesList; }; type ListFieldSizesStatsResponse = ListFieldSizesStatsResponses[keyof ListFieldSizesStatsResponses]; type VersionData = { body?: never; path?: never; query?: never; url: '/version'; }; type VersionErrors = { 400: ErrorMessage; }; type VersionError = VersionErrors[keyof VersionErrors]; type VersionResponses = { 200: Version; }; type VersionResponse = VersionResponses[keyof VersionResponses]; type AuthToken = string | undefined; interface Auth { in?: 'header' | 'query' | 'cookie'; name?: string; scheme?: 'basic' | 'bearer'; type: 'apiKey' | 'http'; } interface SerializerOptions<T> { explode: boolean; style: T; } type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; type ObjectStyle = 'form' | 'deepObject'; type QuerySerializer = (query: Record<string, unknown>) => string; type BodySerializer = (body: any) => any; interface QuerySerializerOptions { allowReserved?: boolean; array?: SerializerOptions<ArrayStyle>; object?: SerializerOptions<ObjectStyle>; } interface Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never> { buildUrl: BuildUrlFn; connect: MethodFn; delete: MethodFn; get: MethodFn; getConfig: () => Config; head: MethodFn; options: MethodFn; patch: MethodFn; post: MethodFn; put: MethodFn; request: RequestFn; setConfig: (config: Config) => Config; trace: MethodFn; } interface Config$1 { auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken; bodySerializer?: BodySerializer | null; headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>; method?: 'CONNECT' | 'DELETE' | 'GET' | 'HEAD' | 'OPTIONS' | 'PATCH' | 'POST' | 'PUT' | 'TRACE'; querySerializer?: QuerySerializer | QuerySerializerOptions; requestValidator?: (data: unknown) => Promise<unknown>; responseTransformer?: (data: unknown) => Promise<unknown>; responseValidator?: (data: unknown) => Promise<unknown>; } type ErrInterceptor<Err, Res, Req, Options> = (error: Err, response: Res, request: Req, options: Options) => Err | Promise<Err>; type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>; type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>; declare class Interceptors<Interceptor> { _fns: (Interceptor | null)[]; constructor(); clear(): void; getInterceptorIndex(id: number | Interceptor): number; exists(id: number | Interceptor): boolean; eject(id: number | Interceptor): void; update(id: number | Interceptor, fn: Interceptor): number | false | Interceptor; use(fn: Interceptor): number; } interface Middleware<Req, Res, Err, Options> { error: Pick<Interceptors<ErrInterceptor<Err, Res, Req, Options>>, 'eject' | 'use'>; request: Pick<Interceptors<ReqInterceptor<Req, Options>>, 'eject' | 'use'>; response: Pick<Interceptors<ResInterceptor<Res, Req, Options>>, 'eject' | 'use'>; } type ResponseStyle = 'data' | 'fields'; interface Config<T extends ClientOptions = ClientOptions> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 { baseUrl?: T['baseUrl']; fetch?: (request: Request) => ReturnType<typeof fetch>; next?: never; parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text'; responseStyle?: ResponseStyle; throwOnError?: T['throwOnError']; } interface RequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{ responseStyle: TResponseStyle; throwOnError: ThrowOnError; }> { body?: unknown; path?: Record<string, unknown>; query?: Record<string, unknown>; security?: ReadonlyArray<Auth>; url: Url; } type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : { data: TData extends Record<string, unknown> ? TData[keyof TData] : TData; request: Request; response: Response; }> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData; error: undefined; } | { data: undefined; error: TError extends Record<string, unknown> ? TError[keyof TError] : TError; }) & { request: Request; response: Response; }>; interface ClientOptions { baseUrl?: string; responseStyle?: ResponseStyle; throwOnError?: boolean; } type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>; type BuildUrlFn = <TData extends { body?: unknown; path?: Record<string, unknown>; query?: Record<string, unknown>; url: string; }>(options: Pick<TData, 'url'> & Options$1<TData>) => string; type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn> & { interceptors: Middleware<Request, Response, unknown, RequestOptions>; }; interface TDataShape { body?: unknown; headers?: unknown; path?: unknown; query?: unknown; url: string; } type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>; type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & Omit<TData, 'url'>; type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & { client?: Client; meta?: Record<string, unknown>; }; declare const listStudies: <ThrowOnError extends boolean = false>(options?: Options<ListStudiesData, ThrowOnError>) => RequestResult<ListStudiesResponses, ListStudiesErrors, ThrowOnError, "fields">; declare const fetchStudy: <ThrowOnError extends boolean = false>(options: Options<FetchStudyData, ThrowOnError>) => RequestResult<FetchStudyResponses, FetchStudyErrors, ThrowOnError, "fields">; declare const studiesMetadata: <ThrowOnError extends boolean = false>(options?: Options<StudiesMetadataData, ThrowOnError>) => RequestResult<StudiesMetadataResponses, StudiesMetadataErrors, ThrowOnError, "fields">; declare const searchAreas: <ThrowOnError extends boolean = false>(options?: Options<SearchAreasData, ThrowOnError>) => RequestResult<SearchAreasResponses, SearchAreasErrors, ThrowOnError, "fields">; declare const enums: <ThrowOnError extends boolean = false>(options?: Options<EnumsData, ThrowOnError>) => RequestResult<EnumsResponses, EnumsErrors, ThrowOnError, "fields">; declare const sizeStats: <ThrowOnError extends boolean = false>(options?: Options<SizeStatsData, ThrowOnError>) => RequestResult<SizeStatsResponses, SizeStatsErrors, ThrowOnError, "fields">; declare const fieldValuesStats: <ThrowOnError extends boolean = false>(options?: Options<FieldValuesStatsData, ThrowOnError>) => RequestResult<FieldValuesStatsResponses, FieldValuesStatsErrors, ThrowOnError, "fields">; declare const listFieldSizesStats: <ThrowOnError extends boolean = false>(options?: Options<ListFieldSizesStatsData, ThrowOnError>) => RequestResult<ListFieldSizesStatsResponses, ListFieldSizesStatsErrors, ThrowOnError, "fields">; declare const version: <ThrowOnError extends boolean = false>(options?: Options<VersionData, ThrowOnError>) => RequestResult<VersionResponses, VersionErrors, ThrowOnError, "fields">; declare const client: Client; export { client, enums, fetchStudy, fieldValuesStats, listFieldSizesStats, listStudies, searchAreas, sizeStats, studiesMetadata, version }; export type { AdverseEvent, AdverseEventsModule, AgencyClass, AgreementRestrictionType, AnalysisDispersionType, AnnotationModule, AnnotationSection, ArmGroup, ArmGroupType, ArmsInterventionsModule, AvailIpd, BaselineCharacteristicsModule, BaselineMeasure, BioSpec, BioSpecRetention, BmiLimits, BooleanStats, BrowseBranch, BrowseLeaf, BrowseLeafRelevance, BrowseModule, CertainAgreement, Client, ClientOptions, ConditionsModule, ConfidenceIntervalNumSides, Config, Contact, ContactRole, ContactsLocationsModule, DateStats, DateStruct, DateTimeMinutes, DateType, Denom, DenomCount, DerivedSection, DescriptionModule, DesignAllocation, DesignInfo, DesignMasking, DesignModule, DesignTimePerspective, DistItem, DocumentSection, DropWithdraw, EligibilityModule, EnrollmentInfo, EnrollmentType, EnumInfo, EnumInfoList, EnumItem, EnumStats, EnumsData, EnumsError, EnumsErrors, EnumsResponse, EnumsResponses, ErrorMessage, EventAssessment, EventGroup, EventStats, ExpandedAccessInfo, ExpandedAccessStatus, ExpandedAccessTypes, FetchStudyData, FetchStudyError, FetchStudyErrors, FetchStudyResponse, FetchStudyResponses, FieldNode, FieldNodeList, FieldStatsType, FieldValuesStats, FieldValuesStatsData, FieldValuesStatsError, FieldValuesStatsErrors, FieldValuesStatsList, FieldValuesStatsResponse, FieldValuesStatsResponses, FirstMcpInfo, FlowGroup, FlowMilestone, FlowPeriod, FlowStats, GeoPoint, GzipStats, IdentificationModule, IntegerStats, Intervention, InterventionType, InterventionalAssignment, IpdSharing, IpdSharingInfoType, IpdSharingStatementModule, LargeDoc, LargeDocumentModule, LimitationsAndCaveats, ListFieldSizesStatsData, ListFieldSizesStatsError, ListFieldSizesStatsErrors, ListFieldSizesStatsResponse, ListFieldSizesStatsResponses, ListSize, ListSizes, ListSizesList, ListStudiesData, ListStudiesError, ListStudiesErrors, ListStudiesResponse, ListStudiesResponses, Location, LongestString, MaskingBlock, MeasureAnalysis, MeasureCategory, MeasureClass, MeasureDispersionType, MeasureGroup, MeasureParam, Measurement, Mesh, MiscInfoModule, ModelPredictions, MoreInfoModule, NonInferiorityType, NumberStats, ObservationalModel, Official, OfficialRole, Options$1 as Options, OrgStudyIdInfo, OrgStudyIdType, Organization, Outcome, OutcomeMeasure, OutcomeMeasureType, OutcomeMeasuresModule, OutcomesModule, OversightModule, PagedStudies, PartialDate, PartialDateStruct, ParticipantFlowModule, Phase, PointOfContact, PrimaryPurpose, ProtocolSection, RecruitmentStatus, Reference, ReferenceType, ReferencesModule, ReportingStatus, RequestOptions, RequestResult, ResponsibleParty, ResponsiblePartyType, ResultsSection, Retraction, SamplingMethod, SearchArea, SearchAreasData, SearchAreasError, SearchAreasErrors, SearchAreasResponse, SearchAreasResponses, SearchDocument, SearchDocumentList, SearchPart, SecondaryIdInfo, SecondaryIdType, SeeAlsoLink, Sex, SizeStatsData, SizeStatsError, SizeStatsErrors, SizeStatsResponse, SizeStatsResponses, Sponsor, SponsorCollaboratorsModule, StandardAge, Status, StatusModule, StringStats, StudiesCsv, StudiesMetadataData, StudiesMetadataError, StudiesMetadataErrors, StudiesMetadataResponse, StudiesMetadataResponses, StudiesZip, Study, StudyFhir, StudyList, StudySize, StudyType, SubmissionInfo, SubmissionTracking, UnpostedAnnotation, UnpostedEvent, UnpostedEventType, ValueCount, Version, VersionData, VersionError, VersionErrors, VersionResponse, VersionResponses, ViolationAnnotation, ViolationEvent, ViolationEventType, WebLink, WhoMasked };