From ea428a50a18960e69536b4b65f58de162d8f4be3 Mon Sep 17 00:00:00 2001 From: Thomas Cottee Meldrum Date: Mon, 13 Jul 2026 13:04:30 +0100 Subject: [PATCH 1/3] add graphql schema file --- graphql.schema | 2805 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2805 insertions(+) create mode 100644 graphql.schema diff --git a/graphql.schema b/graphql.schema new file mode 100644 index 0000000000..36e3399b86 --- /dev/null +++ b/graphql.schema @@ -0,0 +1,2805 @@ +directive @key(fields: _FieldSet!, resolvable: Boolean = true) on OBJECT | INTERFACE + +directive @requires(fields: _FieldSet!) on FIELD_DEFINITION + +directive @provides(fields: _FieldSet!) on FIELD_DEFINITION + +directive @external(reason: String) on OBJECT | FIELD_DEFINITION + +directive @tag(name: String!) on FIELD_DEFINITION | OBJECT | INTERFACE | UNION | ARGUMENT_DEFINITION | SCALAR | ENUM | ENUM_VALUE | INPUT_OBJECT | INPUT_FIELD_DEFINITION + +directive @extends on OBJECT | INTERFACE + +type Query { + allExperiments(filter: ExperimentsFilter, first: Int, offset: Int, sortField: String, sortDirection: PaginationSortDirection, searchText: String): ExperimentsQueryResult + calls(filter: CallsFilter, sortField: String, sortDirection: PaginationSortDirection): [Call!] + callsByInstrumentScientist(scientistId: Int!): [Call!] + callsOfReviewer: [Call!] + emailTemplates(filter: EmailTemplatesFilter): EmailTemplatesQueryResult + experimentSample(experimentPk: Int!, sampleId: Int!): ExperimentHasSample + experimentSafetyPdfTemplates(filter: ExperimentSafetyPdfTemplatesFilter): [ExperimentSafetyPdfTemplate!] + faps(filter: FapsFilter): FapsQueryResult + feedbacks(filter: FeedbacksFilter): [Feedback!]! + genericTemplates(filter: GenericTemplatesFilter): [GenericTemplate!] + genericTemplatesOnCopy: [GenericTemplate!] + internalReviews(filter: InternalReviewsFilter): [InternalReview!] + internalReview(internalReviewId: Int!): InternalReview + predefinedMessages(filter: PredefinedMessagesFilter): [PredefinedMessage!]! + predefinedMessage(predefinedMessageId: Int!): PredefinedMessage + proposalPdfTemplates(filter: ProposalPdfTemplatesFilter): [ProposalPdfTemplate!] + proposals(filter: ProposalsFilter, first: Int, offset: Int): ProposalsQueryResult + reviews(filter: ReviewsFilter, first: Int, offset: Int): ReviewsQueryResult + samples(filter: SamplesFilter): [Sample!] + shipments(filter: ShipmentsFilter): [Shipment!] + statusActionsLogs(filter: StatusActionsLogsFilter, first: Int, offset: Int, sortField: String, sortDirection: PaginationSortDirection, searchText: String): StatusActionsLogQueryResult + technicalReview(technicalReviewId: Int!): TechnicalReview + technicalReviews(filter: TechnicalReviewsFilter, first: Int, offset: Int): TechnicalReviewsQueryResult + questions(filter: QuestionsFilter): [QuestionWithUsage!]! + allQuestions(filter: AllQuestionsFilter, first: Int, offset: Int, sortField: String, sortDirection: PaginationSortDirection, searchText: String): AllQuestionsQueryResult! + templates(filter: TemplatesFilter): [Template!] + users(first: Int, offset: Int, userRole: UserRole, subtractUsers: [Int], sortField: String, sortDirection: PaginationSortDirection, searchText: String): UserQueryResult + previousCollaborators(first: Int, offset: Int, userRole: UserRole, subtractUsers: [Int], sortField: String, sortDirection: PaginationSortDirection, searchText: String): UserQueryResult + visits(filter: VisitsFilter): [Visit!]! + myVisits: [Visit!]! + queriesMutationsAndServices: QueriesMutationsAndServices + activeTemplateId(templateGroupId: TemplateGroupId!): Int + basicUserDetails(userId: Int!): BasicUserDetails + basicUserDetailsByEmail(role: UserRole, email: String!): BasicUserDetails + blankQuestionary(templateId: Int!): Questionary! + blankQuestionaryStepsByCallId(callId: Int!): [QuestionaryStep!] + blankQuestionarySteps(templateId: Int!): [QuestionaryStep!] + call(callId: Int!): Call + getCallByAnswerId(answerId: Int!): Call + checkEmailExist(email: String!): Boolean + countries: [Entry!] + dataAccessUsers(proposalPk: Int!): [BasicUserDetails!]! + getDynamicMultipleChoiceOptions(questionId: String!): [String!] + emailTemplate(emailTemplateId: Int!): EmailTemplate + eventLogs(changedObjectId: String!, eventType: String!): [EventLog!] + experiment(experimentPk: Int!): Experiment! + experimentSafetyPdfTemplate(experimentSafetyPdfTemplateId: Int!): ExperimentSafetyPdfTemplate + experimentSafety(experimentSafetyPk: Int!): ExperimentSafety + fap(id: Int!): Fap + fapMembers(fapId: Int!): [FapReviewer!] + fapReviewers(fapId: Int!): [FapReviewer!] + fapProposals(legacy: Boolean, instrumentId: Int, callId: Int, fapId: Int!): [FapProposal!] + fapProposal(proposalPk: Int!, fapId: Int!): FapProposal + fapProposalsByInstrument(callId: Int!, instrumentId: Int!, fapId: Int!): [FapProposal!] + fapReviewVisibilityOptions: [ReviewVisibility!] + fapReviewTemplates(filter: FapReviewTemplatesFilter): [FapReviewTemplate!] + features: [Feature!]! + feedback(feedbackId: Int!): Feedback + fileMetadata(fileId: String!): FileMetadata + filesMetadata(filter: FilesMetadataFilter!): [FileMetadata!]! + genericTemplate(genericTemplateId: Int!): GenericTemplate + allAccessTokensAndPermissions: [PermissionsWithAccessToken!] + accessTokenAndPermissions(accessTokenId: String!): PermissionsWithAccessToken + institutions(filter: InstitutionsFilter): [Institution!] + instrument(instrumentId: Int!): Instrument + instruments(callIds: [Int!]): InstrumentsQueryResult + instrumentsByFap(callId: Int!, fapId: Int!): [InstrumentWithAvailabilityTime!] + instrumentsByIds(instrumentIds: [Int!]!): [InstrumentWithAvailabilityTime!] + userInstruments: InstrumentsQueryResult + instrumentScientistHasInstrument(instrumentId: Int!): Boolean + instrumentScientistHasAccess(proposalPk: Int!, instrumentId: Int!): Boolean + getInstrumentsOfReviewer: [Instrument!] + isNaturalKeyPresent(naturalKey: String!): Boolean + myShipments: [Shipment!] + pageContent(pageId: PageName!): String + proposalById(proposalId: String!): Proposal + proposalPdfTemplate(proposalPdfTemplateId: Int!): ProposalPdfTemplate + proposal(primaryKey: Int!): Proposal + userHasAccessToProposal(proposalPk: Int!): Boolean + proposalTimeRequested(instrumentId: Int!, proposalPk: Int!): Float! + proposalsView(filter: ProposalsFilter, first: Int, offset: Int, sortField: String, sortDirection: PaginationSortDirection, searchText: String): ProposalsViewQueryResult + instrumentScientistProposals(offset: Int, first: Int, filter: ProposalsFilter): ProposalsViewResult + techniqueScientistProposals(filter: ProposalsFilter, first: Int, offset: Int, sortField: String, sortDirection: PaginationSortDirection, searchText: String): ProposalsViewResult + proposalScientistComment(proposalPk: Int!): ProposalScientistComment + proposalTemplates(filter: ProposalTemplatesFilter): [ProposalTemplate!] + quantities: [Quantity!]! + questionary(questionaryId: Int!): Questionary + questionByNaturalKey(naturalKey: String!): Question! + review(reviewId: Int!): Review + proposalReviews(fapId: Int, proposalPk: Int!): [Review!] + roles: [Role!] + sample(sampleId: Int!): Sample + samplesByCallId(callId: Int!): [Sample!] + settings: [Settings!]! + shipment(shipmentId: Int!): Shipment + statusActions: [StatusAction!] + status(statusId: String!): Status + statuses(entityType: WorkflowType!): [Status!]! + workflowStatus(id: Int!): WorkflowStatus + workflowStatuses(workflowId: Int!): [WorkflowStatus!]! + version: String! + factoryVersion: String! + tags: [Tag!]! + tag(id: Float!): Tag + technicalReviewTemplates(filter: TechnicalReviewTemplatesFilter): [TechnicalReviewTemplate!] + technique(techniqueId: Int!): Technique + techniques: TechniquesQueryResult + techniquesByIds(techniqueIds: [Int!]!): [Technique!] + techniquesByScientist(userNumber: Int!): [Technique!] + templateCategories: [TemplateCategory!] + template(templateId: Int!): Template + checkToken(token: String!): TokenResult! + checkExternalToken(token: String!): ExternalTokenResult! + unitsAsJson: String + units: [Unit!] + userByOIDCSub(oidcSub: String!): User + user(userId: Int!): User + me: User + visitRegistration(userId: Int!, visitId: Int!): VisitRegistration + visit(visitId: Int!): Visit + workflow(workflowId: Int!, entityType: WorkflowType!): Workflow + workflows(entityType: WorkflowType!): [Workflow!] + events(entityType: WorkflowType!): [WorkflowEvent!] + _entities(representations: [_Any!]!): [_Entity]! + _service: _Service! +} + +type ExperimentsQueryResult { + totalCount: Int! + experiments: [Experiment!]! +} + +type Experiment { + experimentPk: Float! + experimentId: String! + startsAt: DateTime! + endsAt: DateTime! + scheduledEventId: Float! + proposalPk: Float! + status: String! + localContactId: Float + instrumentId: Float! + createdAt: DateTime! + updatedAt: DateTime! + referenceNumberSequence: Float + localContact: BasicUserDetails + instrument: Instrument! + proposal: Proposal! + visit: Visit + experimentSafety: ExperimentSafety + feedback: Feedback + feedbackRequests: [FeedbackRequest!]! + shipments: [Shipment!]! +} + +""" +The javascript `Date` as string. Type represents date and time as the ISO Date string. +""" +scalar DateTime + +type BasicUserDetails { + id: Int! + firstname: String! + lastname: String! + preferredname: String + institution: String! + institutionId: Int! + email: String + created: DateTime + country: String + oidcSub: String +} + +type Instrument { + id: Int! + name: String! + shortCode: String! + description: String! + managerUserId: Int! + selectable: Boolean + multipleTechReviewsEnabled: Boolean + scientists: [BasicUserDetails!]! + instrumentContact: BasicUserDetails + tags: [Tag!] +} + +type Tag { + id: Int! + name: String! + shortCode: String! + instruments: [Instrument!]! + calls: [Call!]! +} + +type Call { + id: Int! + shortCode: String! + startCall: DateTime! + endCall: DateTime! + endCallInternal: DateTime + startReview: DateTime! + endReview: DateTime! + startFapReview: DateTime + endFapReview: DateTime + startNotify: DateTime! + endNotify: DateTime! + startCycle: DateTime! + endCycle: DateTime! + referenceNumberFormat: String + proposalSequence: Int + cycleComment: String! + submissionMessage: String + proposalWorkflowId: Int + allocationTimeUnit: AllocationTimeUnits! + templateId: Int! + esiTemplateId: Int + proposalPdfTemplateId: Int + experimentSafetyPdfTemplateId: Int + fapReviewTemplateId: Int + technicalReviewTemplateId: Int + title: String + description: String + isActive: Boolean! + sort_order: Int! + experimentWorkflowId: Int + instruments: [InstrumentWithAvailabilityTime!]! + faps: [Fap!] + proposalWorkflow: Workflow + experimentWorkflow: Workflow + template: Template! + proposalCount: Int! + isActiveInternal: Boolean! + tags: Tag! +} + +enum AllocationTimeUnits { + Day + Hour + Week +} + +type InstrumentWithAvailabilityTime { + id: Int! + name: String! + shortCode: String! + description: String! + managerUserId: Int! + selectable: Boolean + multipleTechReviewsEnabled: Boolean + scientists: [BasicUserDetails!]! + instrumentContact: BasicUserDetails + tags: [Tag!] + availabilityTime: Int + submitted: Boolean + fapId: Int + fap: Fap +} + +type Fap { + id: Int! + code: String! + description: String! + numberRatingsRequired: Float! + gradeGuide: String + customGradeGuide: Boolean + active: Boolean! + reviewVisibility: Int! + files: String + fapChairs: [BasicUserDetails!]! + fapChairsCurrentProposalCounts: [FapProposalCount!]! + fapSecretaries: [BasicUserDetails!]! + fapSecretariesCurrentProposalCounts: [FapProposalCount!]! + proposalCount: Int! + proposalCurrentCount: Int! +} + +type FapProposalCount { + userId: Int! + count: Int! +} + +type Workflow { + id: Int! + name: String! + description: String! + entityType: WorkflowType! + connectionLineType: String! + connections: [WorkflowConnection!]! + statuses: [WorkflowStatus!]! +} + +enum WorkflowType { + PROPOSAL + EXPERIMENT +} + +type WorkflowConnection { + id: Int! + workflowId: Int! + prevWorkflowStatusId: Int! + nextWorkflowStatusId: Int! + sourceHandle: String! + targetHandle: String! + statusChangingEvents: [StatusChangingEvent!] + statusActions: [ConnectionStatusAction!] + prevStatus: WorkflowStatus! + nextStatus: WorkflowStatus! +} + +type StatusChangingEvent { + workflowConnectionId: Int! + statusChangingEvent: String! +} + +type ConnectionStatusAction { + connectionId: Int! + actionId: Int! + workflowId: Int! + config: StatusActionConfig + action: StatusAction! +} + +union StatusActionConfig = EmailActionConfig | RabbitMQActionConfig + +type EmailActionConfig { + recipientsWithEmailTemplate: [EmailStatusActionRecipientsWithTemplate!]! +} + +type EmailStatusActionRecipientsWithTemplate { + recipient: EmailStatusActionRecipient! + emailTemplate: EmailStatusActionEmailTemplate! + otherRecipientEmails: [String!] + combineEmails: Boolean +} + +type EmailStatusActionRecipient { + name: EmailStatusActionRecipients! + description: String +} + +enum EmailStatusActionRecipients { + PI + CO_PROPOSERS + INSTRUMENT_SCIENTISTS + FAP_REVIEWERS + FAP_CHAIR_AND_SECRETARY + USER_OFFICE + TECHNIQUE_SCIENTISTS + EXPERIMENT_SAFETY_REVIEWERS + OTHER +} + +type EmailStatusActionEmailTemplate { + id: String! + name: String! +} + +type RabbitMQActionConfig { + exchanges: [String!] +} + +type StatusAction { + id: Int! + name: String! + description: String! + type: StatusActionType! + defaultConfig: StatusActionDefaultConfig +} + +enum StatusActionType { + EMAIL + RABBITMQ + PROPOSALDOWNLOAD +} + +union StatusActionDefaultConfig = EmailActionDefaultConfig | RabbitMQActionDefaultConfig + +type EmailActionDefaultConfig { + recipients: [EmailStatusActionRecipient!]! + emailTemplates: [EmailStatusActionEmailTemplate!]! +} + +type RabbitMQActionDefaultConfig { + exchanges: [String!] +} + +type WorkflowStatus { + workflowStatusId: Int! + workflowId: Int! + statusId: String! + posX: Int! + posY: Int! + status: Status! +} + +type Status { + id: String! + name: String! + description: String! + isDefault: Boolean! + entityType: WorkflowType! +} + +type Template { + templateId: Int! + groupId: TemplateGroupId! + name: String! + description: String + isArchived: Boolean! + steps: [TemplateStep!]! + complementaryQuestions: [Question!]! + questionaryCount: Int! + proposalPdfCallCount: Int + experimentSafetyPdfCallCount: Int + proposalESICallCount: Int + group: TemplateGroup! + json: String! + proposalPdfTemplate: ProposalPdfTemplate + experimentSafetyPdfTemplate: ExperimentSafetyPdfTemplate +} + +enum TemplateGroupId { + PROPOSAL + PROPOSAL_ESI + SAMPLE + SAMPLE_ESI + SHIPMENT + VISIT_REGISTRATION + GENERIC_TEMPLATE + FEEDBACK + PROPOSAL_PDF + EXPERIMENT_SAFETY_PDF + FAP_REVIEW + TECHNICAL_REVIEW + EXPERIMENT_SAFETY_REVIEW +} + +type TemplateStep { + topic: Topic! + fields: [QuestionTemplateRelation!]! +} + +type Topic { + id: Int! + title: String! + templateId: Int! + sortOrder: Int! + isEnabled: Boolean! +} + +type QuestionTemplateRelation { + question: Question! + sortOrder: Int! + topicId: Int! + config: FieldConfig! + dependencies: [FieldDependency!]! + dependenciesOperator: DependenciesLogicOperator +} + +type Question { + id: String! + categoryId: TemplateCategoryId! + naturalKey: String! + dataType: DataType! + question: String! + config: FieldConfig! +} + +enum TemplateCategoryId { + PROPOSAL_QUESTIONARY + SAMPLE_DECLARATION + SHIPMENT_DECLARATION + VISIT_REGISTRATION + GENERIC_TEMPLATE + FEEDBACK + PROPOSAL_PDF + FAP_REVIEW + TECHNICAL_REVIEW + EXPERIMENT_SAFETY_REVIEW + EXPERIMENT_SAFETY_PDF +} + +enum DataType { + BOOLEAN + DATE + EMBELLISHMENT + FILE_UPLOAD + GENERIC_TEMPLATE + SELECTION_FROM_OPTIONS + TEXT_INPUT + SAMPLE_DECLARATION + SAMPLE_BASIS + PROPOSAL_BASIS + INTERVAL + NUMBER_INPUT + SHIPMENT_BASIS + RICH_TEXT_INPUT + VISIT_BASIS + FAP_REVIEW_BASIS + GENERIC_TEMPLATE_BASIS + PROPOSAL_ESI_BASIS + SAMPLE_ESI_BASIS + FEEDBACK_BASIS + DYNAMIC_MULTIPLE_CHOICE + INSTRUMENT_PICKER + TECHNIQUE_PICKER + TECHNICAL_REVIEW_BASIS + EXPERIMENT_SAFETY_REVIEW_BASIS +} + +union FieldConfig = BooleanConfig | DateConfig | EmbellishmentConfig | FileUploadConfig | SelectionFromOptionsConfig | DynamicMultipleChoiceConfig | TextInputConfig | SampleBasisConfig | SampleDeclarationConfig | SampleEsiBasisConfig | SubTemplateConfig | ProposalBasisConfig | ProposalEsiBasisConfig | IntervalConfig | NumberInputConfig | ShipmentBasisConfig | RichTextInputConfig | VisitBasisConfig | FapReviewBasisConfig | TechnicalReviewBasisConfig | GenericTemplateBasisConfig | FeedbackBasisConfig | ExperimentSafetyReviewBasisConfig | InstrumentPickerConfig | TechniquePickerConfig + +type BooleanConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! +} + +type DateConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! + minDate: String + maxDate: String + defaultDate: String + includeTime: Boolean! +} + +type EmbellishmentConfig { + omitFromPdf: Boolean! + html: String! + plain: String! + readPermissions: [String!]! +} + +type FileUploadConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! + omitFromPdf: Boolean! + file_type: [String!]! + max_files: Int! + pdf_page_limit: Int! +} + +type SelectionFromOptionsConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! + variant: String! + options: [String!]! + isMultipleSelect: Boolean! +} + +type DynamicMultipleChoiceConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! + variant: String! + url: String! + jsonPath: String! + isMultipleSelect: Boolean! + externalApiCall: Boolean! + apiCallRequestHeaders: [ApiCallRequestHeader!]! +} + +type ApiCallRequestHeader { + name: String! + value: String! +} + +type TextInputConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! + min: Int + max: Int + multiline: Boolean! + placeholder: String! + htmlQuestion: String + isHtmlQuestion: Boolean! + isCounterHidden: Boolean! +} + +type SampleBasisConfig { + titlePlaceholder: String! + readPermissions: [String!]! +} + +type SampleDeclarationConfig { + minEntries: Int + maxEntries: Int + templateId: Int + templateCategory: String! + addEntryButtonLabel: String! + small_label: String! + required: Boolean! + readPermissions: [String!]! + esiTemplateId: Int +} + +type SampleEsiBasisConfig { + tooltip: String! + readPermissions: [String!]! +} + +type SubTemplateConfig { + minEntries: Int + maxEntries: Int + templateId: Int + templateCategory: String! + addEntryButtonLabel: String! + small_label: String! + required: Boolean! + readPermissions: [String!]! + canCopy: Boolean! + copyButtonLabel: String + isMultipleCopySelect: Boolean + isCompleteOnCopy: Boolean +} + +type ProposalBasisConfig { + tooltip: String! + readPermissions: [String!]! +} + +type ProposalEsiBasisConfig { + tooltip: String! + readPermissions: [String!]! +} + +type IntervalConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! + units: [Unit!]! + numberValueConstraint: NumberValueConstraint +} + +type Unit { + id: String! + unit: String! + quantity: String! + symbol: String! + siConversionFormula: String! +} + +enum NumberValueConstraint { + NONE + ONLY_POSITIVE + ONLY_NEGATIVE + ONLY_POSITIVE_INTEGER + ONLY_NEGATIVE_INTEGER +} + +type NumberInputConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! + units: [Unit!]! + numberValueConstraint: NumberValueConstraint + numberMin: Float + numberMinInclusive: Boolean + numberMax: Float + numberMaxInclusive: Boolean +} + +type ShipmentBasisConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! +} + +type RichTextInputConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! + max: Int + allowImages: Boolean! +} + +type VisitBasisConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! +} + +type FapReviewBasisConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! + nonNumericOptions: [String!]! + minGrade: Int! + maxGrade: Int! + decimalPoints: Int! +} + +type TechnicalReviewBasisConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! +} + +type GenericTemplateBasisConfig { + titlePlaceholder: String! + questionLabel: String! + readPermissions: [String!]! +} + +type FeedbackBasisConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! +} + +type ExperimentSafetyReviewBasisConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! +} + +type InstrumentPickerConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! + variant: String! + instruments: [InstrumentOption!]! + isMultipleSelect: Boolean! + requestTime: Boolean! +} + +type InstrumentOption { + id: Float! + name: String! +} + +type TechniquePickerConfig { + small_label: String! + required: Boolean! + tooltip: String! + readPermissions: [String!]! + variant: String! + techniques: [TechniqueOption!]! + isMultipleSelect: Boolean! +} + +type TechniqueOption { + id: Float! + name: String! +} + +type FieldDependency { + questionId: String! + dependencyId: String! + dependencyNaturalKey: String! + condition: FieldCondition! +} + +type FieldCondition { + condition: EvaluatorOperator! + params: IntStringDateBoolArray! +} + +enum EvaluatorOperator { + eq + neq +} + +scalar IntStringDateBoolArray + +enum DependenciesLogicOperator { + AND + OR +} + +type TemplateGroup { + groupId: TemplateGroupId! + categoryId: TemplateCategoryId! +} + +type ProposalPdfTemplate { + proposalPdfTemplateId: Int! + templateId: Int! + templateData: String! + templateHeader: String! + templateFooter: String! + templateSampleDeclaration: String! + dummyData: String! + creatorId: Int! + created: DateTime! +} + +type ExperimentSafetyPdfTemplate { + experimentSafetyPdfTemplateId: Int! + templateId: Int! + templateData: String! + templateHeader: String! + templateFooter: String! + templateSampleDeclaration: String! + dummyData: String! + creatorId: Int! + created: DateTime! +} + +type Proposal { + primaryKey: Int! + title: String! + abstract: String! + workflowStatusId: Int! + created: DateTime! + updated: DateTime! + proposalId: String! + finalStatus: ProposalEndStatus + callId: Int! + questionaryId: Int! + commentForUser: String + commentForManagement: String + notified: Boolean! + submitted: Boolean! + managementDecisionSubmitted: Boolean! + proposerId: Int! + submittedDate: DateTime + experimentSequence: Int + fileId: String + users: [BasicUserDetails!]! + coProposerInvites: [Invite!]! + proposer: BasicUserDetails + status: Status + statusId: String! + publicStatus: ProposalPublicStatus! + reviews(fapId: Int): [Review!] + technicalReviews: [TechnicalReview!]! + instruments: [InstrumentWithManagementTime] + techniques: [Technique] + faps: [Fap!] + call: Call + questionary: Questionary! + fapMeetingDecisions(fapId: Int): [FapMeetingDecision!] + samples: [Sample!] + genericTemplates: [GenericTemplate!] + visits: [Visit!] + experiments: [Experiment!] + attachments: ProposalAttachments + dataAccessUsers: [BasicUserDetails!] +} + +enum ProposalEndStatus { + UNSET + ACCEPTED + RESERVED + REJECTED +} + +type Invite { + id: Int! + code: String + email: String! + createdAt: DateTime! + createdByUserId: Int! + claimedAt: DateTime + claimedByUserId: Int + isEmailSent: Boolean! + expiresAt: DateTime + proposal: InvitedProposal +} + +type InvitedProposal { + proposalId: String! + proposerName: String! + title: String! + abstract: String! +} + +enum ProposalPublicStatus { + draft + submitted + accepted + rejected + unknown + reserved +} + +type Review { + id: Int! + userID: Int! + comment: String + grade: String + status: ReviewStatus! + fapID: Int! + questionaryID: Int! + dateAssigned: DateTime! + reassigned: Boolean! + dateReassigned: DateTime + emailSent: Boolean! + rank: Int + reviewer: BasicUserDetails + proposal: Proposal + questionary: Questionary! +} + +enum ReviewStatus { + DRAFT + SUBMITTED +} + +type Questionary { + questionaryId: Int! + templateId: Int! + created: DateTime! + steps: [QuestionaryStep!]! + isCompleted: Boolean! +} + +type QuestionaryStep { + topic: Topic! + isCompleted: Boolean! + fields: [Answer!]! +} + +type Answer { + question: Question! + sortOrder: Int! + topicId: Int! + config: FieldConfig! + dependencies: [FieldDependency!]! + dependenciesOperator: DependenciesLogicOperator + answerId: Int + value: IntStringDateBoolArray +} + +type TechnicalReview { + id: Int! + proposalPk: Int! + comment: String + publicComment: String + timeAllocation: Int + status: TechnicalReviewStatus + submitted: Boolean! + reviewerId: Int! + files: String + technicalReviewAssigneeId: Int + instrumentId: Int! + questionaryId: Int! + proposal: Proposal + reviewer: BasicUserDetails + technicalReviewAssignee: BasicUserDetails + questionary: Questionary! +} + +enum TechnicalReviewStatus { + FEASIBLE + PARTIALLY_FEASIBLE + UNFEASIBLE +} + +type InstrumentWithManagementTime { + id: Int! + name: String! + shortCode: String! + description: String! + managerUserId: Int! + selectable: Boolean + multipleTechReviewsEnabled: Boolean + scientists: [BasicUserDetails!]! + instrumentContact: BasicUserDetails + tags: [Tag!] + managementTimeAllocation: Int +} + +type Technique { + id: Int! + name: String! + shortCode: String! + description: String! + instruments: [Instrument!]! + scientists: [BasicUserDetails!]! +} + +type FapMeetingDecision { + proposalPk: Int! + recommendation: ProposalEndStatus + commentForManagement: String + commentForUser: String + rankOrder: Int + submitted: Boolean! + submittedBy: Int + instrumentId: Int! + fapId: Int! +} + +type Sample { + id: Int! + title: String! + creatorId: Int! + questionaryId: Int! + proposalPk: Int! + questionId: String! + isPostProposalSubmission: Boolean! + safetyStatus: SampleStatus! + safetyComment: String! + created: DateTime! + questionary: Questionary! + proposal: Proposal! +} + +enum SampleStatus { + PENDING_EVALUATION + LOW_RISK + ELEVATED_RISK + HIGH_RISK +} + +type GenericTemplate { + id: Int! + title: String! + creatorId: Int! + questionaryId: Int! + proposalPk: Int! + questionId: String! + created: DateTime! + questionary: Questionary! + proposal: Proposal! +} + +type Visit { + id: Int! + proposalPk: Int! + creatorId: Int! + teamLeadUserId: Int! + experimentPk: Int! + proposal: Proposal! + registrations: [VisitRegistration!]! + registrationInvites: [Invite!]! + teamLead: BasicUserDetails! + samples: [Sample!]! +} + +type VisitRegistration { + id: String! + userId: Int! + visitId: Int! + registrationQuestionaryId: Int + status: VisitRegistrationStatus! + startsAt: DateTime + endsAt: DateTime + user: BasicUserDetails + questionary: Questionary! +} + +enum VisitRegistrationStatus { + DRAFTED + SUBMITTED + APPROVED + CHANGE_REQUESTED + CANCELLED_BY_USER + CANCELLED_BY_FACILITY +} + +type ProposalAttachments { + questions: [Question!] +} + +type ExperimentSafety { + experimentSafetyPk: Float! + experimentPk: Float! + esiQuestionaryId: Float! + esiQuestionarySubmittedAt: DateTime + createdBy: Float! + workflowStatusId: Float! + safetyReviewQuestionaryId: Float + reviewedBy: Float + createdAt: DateTime! + updatedAt: DateTime! + instrumentScientistDecision: InstrumentScientistDecisionEnum + instrumentScientistComment: String + experimentSafetyReviewerDecision: ExperimentSafetyReviewerDecisionEnum + experimentSafetyReviewerComment: String + proposal: Proposal! + questionary: Questionary! + safetyReviewQuestionary: Questionary! + samples: [ExperimentHasSample!]! + status: Status + statusId: String! +} + +enum InstrumentScientistDecisionEnum { + UNSET + ACCEPTED + REJECTED +} + +enum ExperimentSafetyReviewerDecisionEnum { + UNSET + ACCEPTED + REJECTED +} + +type ExperimentHasSample { + experimentPk: Float! + sampleId: Float! + isEsiSubmitted: Boolean! + sampleEsiQuestionaryId: Float! + createdAt: DateTime! + updatedAt: DateTime! + questionary: Questionary! + sample: Sample! +} + +type Feedback { + id: Int! + experimentPk: Int! + status: FeedbackStatus! + questionaryId: Int! + creatorId: Int! + createdAt: DateTime! + submittedAt: DateTime + questionary: Questionary! +} + +enum FeedbackStatus { + DRAFT + SUBMITTED +} + +type FeedbackRequest { + id: Int! + experimentPk: Int! + requestedAt: DateTime! +} + +type Shipment { + id: Int! + title: String! + proposalPk: Int! + status: ShipmentStatus! + externalRef: String + questionaryId: Int! + experimentPk: Int + creatorId: Int! + created: DateTime! + questionary: Questionary! + samples: [Sample!]! + proposal: Proposal! +} + +enum ShipmentStatus { + DRAFT + SUBMITTED +} + +input ExperimentsFilter { + experimentStartDate: DateTime + experimentEndDate: DateTime + callId: Int + instrumentId: Int + overlaps: TimeSpan + experimentSafetyStatusId: Int + instrumentScientistUserId: Int +} + +input TimeSpan { + from: DateTime + to: DateTime +} + +enum PaginationSortDirection { + asc + desc +} + +input CallsFilter { + shortCode: String + proposalStatus: String + templateIds: [Int!] + proposalPdfTemplateIds: [Int!] + experimentSafetyPdfTemplateIds: [Int!] + esiTemplateIds: [Int!] + fapReviewTemplateIds: [Int!] + technicalReviewTemplateIds: [Int!] + fapIds: [Int!] + instrumentIds: [Int!] + isActive: Boolean + isActiveInternal: Boolean + isEnded: Boolean + isEndedInternal: Boolean + isReviewEnded: Boolean + isFapReviewEnded: Boolean + isCallEndedByEvent: Boolean + isCallUpcoming: Boolean +} + +type EmailTemplatesQueryResult { + totalCount: Int! + emailTemplates: [EmailTemplate!]! +} + +type EmailTemplate { + id: Int! + createdByUserId: Int! + name: String! + description: String! + useTemplateFile: Boolean! + subject: String + body: String +} + +input EmailTemplatesFilter { + filter: String + first: Int + offset: Int + emailTemplateIds: [Int!] +} + +input ExperimentSafetyPdfTemplatesFilter { + experimentSafetyPdfTemplateIds: [Int!] + templateIds: [Int!] + pdfTemplateData: String + pdfTemplateHeader: String + pdfTemplateFooter: String + pdfTemplateSampleDeclaration: String + dummyData: String + creatorId: Int +} + +type FapsQueryResult { + totalCount: Int! + faps: [Fap!]! +} + +input FapsFilter { + active: Boolean + filter: String + first: Int + offset: Int + callIds: [Int!] +} + +input FeedbacksFilter { + creatorId: Int + experimentPk: Int +} + +input GenericTemplatesFilter { + title: String + creatorId: Int + questionaryIds: [Int!] + genericTemplateIds: [Int!] + questionId: String + proposalPk: Int +} + +type InternalReview { + id: Int! + title: String! + comment: String + files: String + reviewerId: Int! + technicalReviewId: Int! + createdAt: DateTime! + assignedBy: Int! + reviewer: BasicUserDetails + assignedByUser: BasicUserDetails +} + +input InternalReviewsFilter { + technicalReviewId: Int + reviewerId: Int +} + +type PredefinedMessage { + id: Int! + title: String! + message: String! + dateModified: DateTime! + lastModifiedBy: Int! + modifiedBy: BasicUserDetails! +} + +input PredefinedMessagesFilter { + key: String +} + +input ProposalPdfTemplatesFilter { + proposalPdfTemplateIds: [Int!] + templateIds: [Int!] + pdfTemplateData: String + pdfTemplateHeader: String + pdfTemplateFooter: String + pdfTemplateSampleDeclaration: String + dummyData: String + creatorId: Int +} + +type ProposalsQueryResult { + totalCount: Int! + proposals: [Proposal!]! +} + +input ProposalsFilter { + text: String + questionaryIds: [Int!] + reviewer: ReviewerFilter + callId: Int + callIds: [Int!] + instrumentId: Int + instrumentFilter: InstrumentFilterInput + proposalStatusId: String + excludeProposalStatusIds: [String!] + shortCodes: [String!] + questionFilter: QuestionFilterInput + referenceNumbers: [String!] + templateIds: [Int!] + techniqueFilter: TechniqueFilterInput + dateFilter: DateFilterInput +} + +enum ReviewerFilter { + ME + ALL +} + +input InstrumentFilterInput { + instrumentIds: [Int!] + showMultiInstrumentProposals: Boolean! + showAllProposals: Boolean! +} + +input QuestionFilterInput { + questionId: String! + value: String! + compareOperator: QuestionFilterCompareOperator! + dataType: DataType! +} + +enum QuestionFilterCompareOperator { + GREATER_THAN + LESS_THAN + EQUALS + INCLUDES + EXISTS +} + +input TechniqueFilterInput { + techniqueId: Int + showMultiTechniqueProposals: Boolean! + showAllProposals: Boolean! +} + +input DateFilterInput { + to: String + from: String +} + +type ReviewsQueryResult { + totalCount: Int! + reviews: [Review!]! +} + +input ReviewsFilter { + text: String + questionaryIds: [Int!] + reviewer: ReviewerFilter + callId: Int + shortCodes: [String!] + templateIds: [Int!] +} + +input SamplesFilter { + title: String + creatorId: Int + questionaryIds: [Int!] + sampleIds: [Int!] + status: SampleStatus + questionId: String + proposalPk: Int + visitId: Int +} + +input ShipmentsFilter { + title: String + creatorId: Int + proposalPk: Int + questionaryIds: [Int!] + status: ShipmentStatus + externalRef: String + shipmentIds: [Int!] + experimentPk: Int +} + +type StatusActionsLogQueryResult { + totalCount: Int! + statusActionsLogs: [StatusActionsLog!]! +} + +type StatusActionsLog { + statusActionsLogId: Int! + emailStatusActionRecipient: EmailStatusActionRecipients + statusActionsSuccessful: Boolean! + statusActionsMessage: String! + statusActionsTstamp: DateTime! + connectionStatusAction: ConnectionStatusAction + proposals: [Proposal!]! +} + +input StatusActionsLogsFilter { + statusActionsLogIds: [Int!] + statusActionsMessage: String + statusActionsSuccessful: Boolean + statusActionIds: [Int!] + statusActionType: StatusActionType + connectionIds: [Int!] + emailStatusActionRecipient: [EmailStatusActionRecipients!] + callIds: [Int!] +} + +type TechnicalReviewsQueryResult { + totalCount: Int! + technicalReviews: [TechnicalReview!]! +} + +input TechnicalReviewsFilter { + text: String + questionaryIds: [Int!] + reviewer: ReviewerFilter + callId: Int + shortCodes: [String!] + templateIds: [Int!] +} + +type QuestionWithUsage { + id: String! + categoryId: TemplateCategoryId! + naturalKey: String! + dataType: DataType! + question: String! + config: FieldConfig! + answers: [AnswerBasic!]! + templates: [Template!]! +} + +type AnswerBasic { + answerId: Int + answer: IntStringDateBoolArray! + questionaryId: Int! + questionId: String! + createdAt: DateTime! +} + +input QuestionsFilter { + text: String + category: TemplateCategoryId + dataType: [DataType!] + excludeDataType: [DataType!] + questionIds: [String!] +} + +type AllQuestionsQueryResult { + totalCount: Int! + questions: [QuestionWithUsage!]! +} + +input AllQuestionsFilter { + category: TemplateCategoryId + dataType: [DataType!] + excludeDataType: [DataType!] +} + +input TemplatesFilter { + isArchived: Boolean + group: TemplateGroupId + templateIds: [Int!] +} + +type UserQueryResult { + users: [BasicUserDetails!]! + totalCount: Int! +} + +enum UserRole { + USER + USER_OFFICER + FAP_CHAIR + FAP_SECRETARY + FAP_REVIEWER + INSTRUMENT_SCIENTIST + EXPERIMENT_SAFETY_REVIEWER + INTERNAL_REVIEWER + PROPOSAL_READER +} + +input VisitsFilter { + creatorId: Int + proposalPk: Int + experimentPk: Int +} + +type QueriesMutationsAndServices { + queries: [QueryMutationAndServicesGroup!]! + mutations: [QueryMutationAndServicesGroup!]! + services: [QueryMutationAndServicesGroup!]! +} + +type QueryMutationAndServicesGroup { + groupName: QueryMutationAndServicesGroups! + items: [String!]! +} + +enum QueryMutationAndServicesGroups { + CORE + SCHEDULER +} + +type Entry { + id: Int! + value: String! +} + +type EventLog { + id: Int! + eventType: String! + rowData: String! + eventTStamp: DateTime! + changedObjectId: String! + description: String! + changedBy: User +} + +type User { + id: Int! + userTitle: String! + firstname: String! + lastname: String! + preferredname: String + oidcSub: String + oauthRefreshToken: String + institutionId: Int! + email: String! + created: String! + updated: String! + roles: [Role!]! + reviews(active: Boolean, reviewer: ReviewerFilter, status: ReviewStatus, instrumentId: Int, callId: Int): [Review!]! + proposals(filter: UserProposalsFilter): [Proposal!]! + coProposerInvites: [Invite!]! + experiments(filter: UserExperimentsFilter): [Experiment!]! + faps: [Fap!]! + instruments: [Instrument!]! + institution: Institution! +} + +type Role { + id: Int! + shortCode: String! + title: String! + description: String! + isRootRole: Boolean! + config: RoleConfig + tags: [Tag!] +} + +union RoleConfig = UserRoleConfig | ProposalReaderRoleConfig + +type UserRoleConfig { + note: String! +} + +type ProposalReaderRoleConfig { + hasLogAccess: Boolean! + hasTechnicalReviewAccess: Boolean! + hasFapAccess: Boolean! + hasAdminAccess: Boolean! +} + +input UserProposalsFilter { + instrumentId: Int + managementDecisionSubmitted: Boolean + finalStatus: ProposalEndStatus +} + +input UserExperimentsFilter { + endsAfter: DateTime + instrumentId: Int + status: [ExperimentStatus!] +} + +enum ExperimentStatus { + DRAFT + ACTIVE + COMPLETED +} + +type Institution { + id: Int! + name: String! + rorId: String + country: Entry +} + +type FapReviewer { + userId: Int! + fapId: Int! + role: Role + user: BasicUserDetails! + proposalsCount: Int! + proposalsCountByCall: Int! +} + +type FapProposal { + proposalPk: Int! + fapId: Int! + dateAssigned: DateTime! + fapTimeAllocation: Int + instrumentId: Int! + proposal: Proposal! + assignments: [FapAssignment!] + instrumentSubmitted: Boolean! + instrument: Instrument +} + +type FapAssignment { + proposalPk: Int! + fapMemberUserId: Int + fapId: Int! + dateAssigned: DateTime! + reassigned: Boolean! + dateReassigned: DateTime + emailSent: Boolean! + rank: Int + proposal: Proposal! + role: Role + user: BasicUserDetails + review: Review +} + +type ReviewVisibility { + reviewVisibilityId: Int! + visibility: FapReviewVisibility! + description: String! +} + +enum FapReviewVisibility { + PROPOSAL_REVIEWS_COMPLETE + REVIEWS_VISIBLE + REVIEWS_VISIBLE_FAP_ENDED +} + +type FapReviewTemplate { + templateId: Int! + groupId: TemplateGroupId! + name: String! + description: String + isArchived: Boolean! + steps: [TemplateStep!]! + complementaryQuestions: [Question!]! + questionaryCount: Int! + proposalPdfCallCount: Int + experimentSafetyPdfCallCount: Int + proposalESICallCount: Int + group: TemplateGroup! + json: String! + proposalPdfTemplate: ProposalPdfTemplate + experimentSafetyPdfTemplate: ExperimentSafetyPdfTemplate + callCount: Int! +} + +input FapReviewTemplatesFilter { + isArchived: Boolean + templateIds: [Int!] +} + +type Feature { + id: FeatureId! + isEnabled: Boolean! + description: String! +} + +enum FeatureId { + SHIPPING + SCHEDULER + RISK_ASSESSMENT + EMAIL_INVITE + EMAIL_SEARCH + INSTRUMENT_MANAGEMENT + TECHNICAL_REVIEW + FAP_REVIEW + USER_MANAGEMENT + VISIT_MANAGEMENT + EXPERIMENT_SAFETY_REVIEW + OAUTH + STFC_IDLE_TIMER + USER_SEARCH_FILTER + CONFLICT_OF_INTEREST_WARNING + TAGS + TECHNIQUE_PROPOSALS + PREGENERATED_PROPOSAL_PDF + DATA_ACCESS_USERS +} + +type FileMetadata { + originalFileName: String! + mimeType: String! + sizeInBytes: Int! + createdDate: DateTime! + fileId: String! +} + +input FilesMetadataFilter { + fileIds: [String!]! +} + +type PermissionsWithAccessToken { + id: String! + name: String! + accessToken: String! + accessPermissions: String! +} + +input InstitutionsFilter { + name: String +} + +type InstrumentsQueryResult { + totalCount: Int! + instruments: [Instrument!]! +} + +enum PageName { + HOMEPAGE + HELPPAGE + PRIVACYPAGE + COOKIEPAGE + REVIEWPAGE + FOOTERCONTENT + LOGINHELPPAGE + GRADEGUIDEPAGE + TECHNIQUEPROPOSALMANAGEMENTPAGE +} + +type ProposalsViewQueryResult { + totalCount: Int! + proposalViews: [ProposalView!]! +} + +type ProposalView { + primaryKey: Int! + title: String! + principalInvestigatorId: Int! + workflowStatusId: Int! + statusId: String! + statusName: String! + statusDescription: String! + proposalId: String! + finalStatus: ProposalEndStatus + notified: Boolean! + submitted: Boolean! + instruments: [ProposalViewInstrument!] + technicalReviews: [ProposalViewTechnicalReview!] + faps: [ProposalViewFap!] + fapInstruments: [FapInstrument!] + callShortCode: String + callId: Int! + workflowId: Int! + allocationTimeUnit: AllocationTimeUnits! + submittedDate: DateTime + techniques: [ProposalViewTechnique!] + principalInvestigator: User +} + +type ProposalViewInstrument { + id: Int! + name: String! + managerUserId: Int! + managementTimeAllocation: Int + multipleTechReviewsEnabled: Boolean +} + +type ProposalViewTechnicalReview { + id: Int! + status: TechnicalReviewStatus + submitted: Boolean! + timeAllocation: Int + technicalReviewAssignee: ProposalViewTechnicalReviewAssignee + instrumentId: Int +} + +type ProposalViewTechnicalReviewAssignee { + id: Int! + firstname: String! + lastname: String! +} + +type ProposalViewFap { + id: Int! + code: String! +} + +type FapInstrument { + fapId: Int + instrumentId: Int +} + +type ProposalViewTechnique { + id: Int! + name: String! + shortCode: String! + description: String! +} + +type ProposalsViewResult { + totalCount: Int! + proposals: [ProposalView!]! +} + +type ProposalScientistComment { + commentId: Int! + proposalPk: Int! + comment: String! +} + +type ProposalTemplate { + templateId: Int! + groupId: TemplateGroupId! + name: String! + description: String + isArchived: Boolean! + steps: [TemplateStep!]! + complementaryQuestions: [Question!]! + questionaryCount: Int! + proposalPdfCallCount: Int + experimentSafetyPdfCallCount: Int + proposalESICallCount: Int + group: TemplateGroup! + json: String! + proposalPdfTemplate: ProposalPdfTemplate + experimentSafetyPdfTemplate: ExperimentSafetyPdfTemplate + callCount: Int! +} + +input ProposalTemplatesFilter { + isArchived: Boolean + templateIds: [Int!] +} + +type Quantity { + id: String! +} + +type Settings { + id: SettingsId! + settingsValue: String + description: String +} + +enum SettingsId { + EXTERNAL_AUTH_LOGOUT_URL + EXTERNAL_AUTH_LOGIN_URL + EXTERNAL_AUTH_HOMEPAGE_URL + PROFILE_PAGE_LINK + PALETTE_PRIMARY_DARK + PALETTE_PRIMARY_MAIN + PALETTE_PRIMARY_ACCENT + PALETTE_PRIMARY_LIGHT + PALETTE_PRIMARY_CONTRAST + PALETTE_SECONDARY_DARK + PALETTE_SECONDARY_MAIN + PALETTE_SECONDARY_LIGHT + PALETTE_SECONDARY_CONTRAST + PALETTE_ERROR_MAIN + PALETTE_SUCCESS_MAIN + PALETTE_WARNING_MAIN + PALETTE_INFO_MAIN + HEADER_LOGO_FILENAME + FEEDBACK_MAX_REQUESTS + FEEDBACK_FREQUENCY_DAYS + FEEDBACK_EXHAUST_DAYS + TIMEZONE + DATE_FORMAT + DATE_TIME_FORMAT + DEFAULT_INST_SCI_STATUS_FILTER + DEFAULT_INST_SCI_REVIEWER_FILTER + IDLE_TIMEOUT + USER_OFFICE_EMAIL + SMTP_BCC_EMAIL + TECH_REVIEW_OPTIONAL_WORKFLOW_STATUS + FAP_SECS_EDIT_TECH_REVIEWS + DISPLAY_FAQ_LINK + DISPLAY_PRIVACY_STATEMENT_LINK + EXPERIMENT_SAFETY_REVIEW_EMAIL + ORGANISATION_NAME + INVITE_VALIDITY_PERIOD_DAYS + INVITE_REMINDERS_SEND_DELAY_DAYS +} + +type TechnicalReviewTemplate { + templateId: Int! + groupId: TemplateGroupId! + name: String! + description: String + isArchived: Boolean! + steps: [TemplateStep!]! + complementaryQuestions: [Question!]! + questionaryCount: Int! + proposalPdfCallCount: Int + experimentSafetyPdfCallCount: Int + proposalESICallCount: Int + group: TemplateGroup! + json: String! + proposalPdfTemplate: ProposalPdfTemplate + experimentSafetyPdfTemplate: ExperimentSafetyPdfTemplate + callCount: Int! +} + +input TechnicalReviewTemplatesFilter { + isArchived: Boolean + templateIds: [Int!] +} + +type TechniquesQueryResult { + totalCount: Int! + techniques: [Technique!]! +} + +type TemplateCategory { + categoryId: TemplateCategoryId! + name: String! +} + +type TokenResult { + isValid: Boolean! + payload: TokenPayloadUnion +} + +union TokenPayloadUnion = AuthJwtPayload | AuthJwtApiTokenPayload + +type AuthJwtPayload { + user: UserJWT! + currentRole: Role! + roles: [Role!]! +} + +type UserJWT { + id: Int! + firstname: String! + lastname: String! + preferredname: String + email: String! + oidcSub: String + created: String! + institutionId: Float! +} + +type AuthJwtApiTokenPayload { + accessTokenId: String! +} + +type ExternalTokenResult { + isValid: Boolean! +} + +type WorkflowEvent { + name: Event! + description: String +} + +enum Event { + PROPOSAL_CREATED + PROPOSAL_UPDATED + PROPOSAL_SUBMITTED + PROPOSAL_DELETED + PROPOSAL_FEASIBILITY_REVIEW_FEASIBLE + PROPOSAL_FEASIBILITY_REVIEW_UNFEASIBLE + PROPOSAL_FAPS_SELECTED + PROPOSAL_FAPS_REMOVED + PROPOSAL_INSTRUMENTS_SELECTED + PROPOSAL_FEASIBILITY_REVIEW_UPDATED + PROPOSAL_FEASIBILITY_REVIEW_SUBMITTED + PROPOSAL_ALL_FEASIBILITY_REVIEWS_SUBMITTED + PROPOSAL_ALL_FEASIBILITY_REVIEWS_FEASIBLE + PROPOSAL_SAMPLE_REVIEW_SUBMITTED + PROPOSAL_SAMPLE_SAFE + PROPOSAL_ALL_FAP_REVIEWERS_SELECTED + PROPOSAL_FAP_REVIEW_UPDATED + PROPOSAL_FAP_REVIEW_SUBMITTED + PROPOSAL_ALL_FAP_REVIEWS_SUBMITTED + PROPOSAL_FAP_MEETING_SAVED + PROPOSAL_FAP_MEETING_SUBMITTED + PROPOSAL_ALL_FAP_MEETINGS_SUBMITTED + PROPOSAL_ALL_REVIEWS_SUBMITTED_FOR_ALL_FAPS + PROPOSAL_FAP_MEETING_RANKING_OVERWRITTEN + PROPOSAL_FAP_MEETING_REORDER + PROPOSAL_FAP_MEETING_INSTRUMENT_SUBMITTED + PROPOSAL_FAP_MEETING_INSTRUMENT_UNSUBMITTED + PROPOSAL_ALL_FAP_MEETING_INSTRUMENT_SUBMITTED + PROPOSAL_MANAGEMENT_DECISION_UPDATED + PROPOSAL_MANAGEMENT_DECISION_SUBMITTED + PROPOSAL_ACCEPTED + PROPOSAL_RESERVED + PROPOSAL_REJECTED + CALL_CREATED + CALL_ENDED + CALL_ENDED_INTERNAL + CALL_REVIEW_ENDED + CALL_FAP_REVIEW_ENDED + USER_UPDATED + USER_ROLE_UPDATED + USER_DELETED + USER_PASSWORD_RESET_EMAIL + FAP_CREATED + FAP_UPDATED + FAP_MEMBERS_ASSIGNED + FAP_MEMBER_REMOVED + FAP_MEMBER_ASSIGNED_TO_PROPOSAL + FAP_MEMBER_REMOVED_FROM_PROPOSAL + FAP_REVIEWER_NOTIFIED + FAP_ALL_MEETINGS_SUBMITTED + PROPOSAL_NOTIFIED + PROPOSAL_CLONED + PROPOSAL_STATUS_ACTION_EXECUTED + PROPOSAL_STATUS_CHANGED_BY_WORKFLOW + PROPOSAL_STATUS_CHANGED_BY_USER + TOPIC_ANSWERED + PROPOSAL_BOOKING_TIME_SLOT_ADDED + PROPOSAL_BOOKING_TIME_SLOTS_REMOVED + PROPOSAL_BOOKING_TIME_ACTIVATED + PROPOSAL_BOOKING_TIME_COMPLETED + PROPOSAL_BOOKING_TIME_UPDATED + PROPOSAL_BOOKING_TIME_REOPENED + PROPOSAL_CO_PROPOSER_INVITES_UPDATED + PROPOSAL_CO_PROPOSER_INVITE_SENT + PROPOSAL_CO_PROPOSER_INVITE_ACCEPTED + PROPOSAL_VISIT_REGISTRATION_INVITES_UPDATED + PROPOSAL_VISIT_REGISTRATION_INVITE_SENT + PROPOSAL_VISIT_REGISTRATION_INVITE_ACCEPTED + INSTRUMENT_CREATED + INSTRUMENT_UPDATED + INSTRUMENT_DELETED + INSTRUMENT_ASSIGNED_TO_SCIENTIST + PREDEFINED_MESSAGE_CREATED + PREDEFINED_MESSAGE_UPDATED + PREDEFINED_MESSAGE_DELETED + INTERNAL_REVIEW_CREATED + INTERNAL_REVIEW_UPDATED + INTERNAL_REVIEW_DELETED + TECHNIQUE_CREATED + TECHNIQUE_UPDATED + TECHNIQUE_DELETED + INSTRUMENTS_ASSIGNED_TO_TECHNIQUE + INSTRUMENTS_REMOVED_FROM_TECHNIQUE + PROPOSAL_ASSIGNED_TO_TECHNIQUES + VISIT_REGISTRATION_APPROVED + VISIT_REGISTRATION_UPDATED + VISIT_REGISTRATION_CANCELLED + EXPERIMENT_ESF_SUBMITTED + EXPERIMENT_ESF_APPROVED_BY_IS + EXPERIMENT_ESF_REJECTED_BY_IS + EXPERIMENT_ESF_APPROVED_BY_ESR + EXPERIMENT_ESF_REJECTED_BY_ESR + DATA_ACCESS_USERS_UPDATED + EXPERIMENT_SAFETY_MANAGEMENT_DECISION_SUBMITTED_BY_IS + EXPERIMENT_SAFETY_MANAGEMENT_DECISION_SUBMITTED_BY_ESR + EXPERIMENT_SAFETY_STATUS_CHANGED_BY_USER + EXPERIMENT_SAFETY_STATUS_CHANGED_BY_WORKFLOW + EMAIL_TEMPLATE_CREATED + EMAIL_TEMPLATE_UPDATED + EMAIL_TEMPLATE_DELETED + VISIT_CREATED +} + +type Mutation { + assignChairOrSecretary(assignChairOrSecretaryToFapInput: AssignChairOrSecretaryToFapInput!): Fap! + assignReviewersToFap(memberIds: [Int!]!, fapId: Int!): Fap! + removeMemberFromFap(memberId: Int!, fapId: Int!, roleId: UserRole!): Fap! + assignFapReviewersToProposals(assignments: [FapReviewAssignmentInput!]!, fapId: Int!): Fap! + removeMemberFromFapProposal(memberId: Int!, fapId: Int!, proposalPk: Int!): Fap! + assignProposalsToFaps(proposalPks: [Int!]!, fapInstruments: [FapInstrumentInput!]!): Boolean! + removeProposalsFromFaps(proposalPks: [Int!]!, fapIds: [Int!]!): [FapProposal!]! + createFap(code: String!, description: String!, numberRatingsRequired: Int! = 2, gradeGuide: String, customGradeGuide: Boolean, active: Boolean!, reviewVisibility: Int!): Fap! + saveFapMeetingDecision(saveFapMeetingDecisionInput: SaveFapMeetingDecisionInput!): FapMeetingDecision! + submitFapMeetingDecisions(SubmitFapMeetingDecisionsInput: SubmitFapMeetingDecisionsInput!): [FapProposal!]! + reorderFapMeetingDecisionProposals(reorderFapMeetingDecisionProposalsInput: ReorderFapMeetingDecisionProposalsInput!): FapMeetingDecision! + saveReviewerRank(fapReviewId: Int!, reviewerId: Int!, rank: Int!): Boolean! + updateFap(id: Int!, code: String!, description: String!, numberRatingsRequired: Int! = 2, gradeGuide: String, customGradeGuide: Boolean, active: Boolean!, files: String, reviewVisibility: Int): Fap! + updateFapTimeAllocation(fapId: Int!, proposalPk: Int!, instrumentId: Int!, fapTimeAllocation: Int): FapProposal! + assignProposalsToInstruments(proposalPks: [Int!]!, instrumentIds: [Int!]!): Boolean! + removeProposalsFromInstrument(proposalPks: [Int!]!): Boolean! + assignTechniqueProposalsToInstruments(proposalPks: [Int!]!, instrumentIds: [Int!]!): Boolean! + assignScientistsToInstrument(scientistIds: [Int!]!, instrumentId: Int!): Boolean! + removeScientistFromInstrument(scientistId: Int!, instrumentId: Int!): Boolean! + createInstrument(name: String!, shortCode: String!, description: String!, managerUserId: Int!, selectable: Boolean = true, multipleTechReviewsEnabled: Boolean = false): Instrument! + updateInstrument(id: Int!, name: String!, shortCode: String!, description: String!, managerUserId: Int!, updateTechReview: Boolean!, selectable: Boolean, multipleTechReviewsEnabled: Boolean): Instrument! + setInstrumentAvailabilityTime(instrumentId: Int!, callId: Int!, availabilityTime: Int!): Boolean! + submitInstrumentInFap(instrumentId: Int!, callId: Int!, fapId: Int!): Boolean! + unsubmitInstrumentInFap(instrumentId: Int!, callId: Int!, fapId: Int!): Boolean! + createApiAccessToken(createApiAccessTokenInput: CreateApiAccessTokenInput!): PermissionsWithAccessToken! + deleteApiAccessToken(deleteApiAccessTokenInput: DeleteApiAccessTokenInput!): Boolean! + mergeInstitutions(institutionIdFrom: Int!, institutionIdInto: Int!, newTitle: String!): Institution! + updateFeatures(updatedFeaturesInput: UpdateFeaturesInput!): [Feature!]! + updateSettings(updatedSettingsInput: UpdateSettingsInput!): Settings! + updateApiAccessToken(updateApiAccessTokenInput: UpdateApiAccessTokenInput!): PermissionsWithAccessToken! + updateInstitution(id: Int!, name: String, country: Int, rorId: String): Institution! + createCall(createCallInput: CreateCallInput!): Call! + updateCall(updateCallInput: UpdateCallInput!): Call! + updateCallOrder(callOrderInput: CallOrderInput!): Boolean! + assignInstrumentsToCall(assignInstrumentsToCallInput: AssignInstrumentsToCallInput!): Call! + updateFapToCallInstrument(updateFapToCallInstrumentInput: UpdateFapToCallInstrumentInput!): Call! + removeAssignedInstrumentFromCall(removeAssignedInstrumentFromCallInput: RemoveAssignedInstrumentFromCallInput!): Call! + createEmailTemplate(createEmailTemplateInput: CreateEmailTemplateInput!): EmailTemplate! + updateEmailTemplate(updateEmailTemplateInput: UpdateEmailTemplateInput!): EmailTemplate! + addSampleToExperiment(sampleId: Int!, experimentPk: Int!): ExperimentHasSample! + cloneExperimentSample(experimentPk: Int!, sampleId: Int!, newSampleTitle: String): ExperimentHasSample! + removeSampleFromExperiment(sampleId: Int!, experimentPk: Int!): ExperimentHasSample! + submitExperimentSafety(experimentSafetyPk: Int!, isSubmitted: Boolean): ExperimentSafety! + updateExperimentSample(sampleId: Int!, experimentPk: Int!, isSubmitted: Boolean): ExperimentHasSample! + createExperimentSafetyPdfTemplate(templateId: Int!, templateData: String!, templateHeader: String!, templateFooter: String!, templateSampleDeclaration: String!, dummyData: String!): ExperimentSafetyPdfTemplate! + updateExperimentSafetyPdfTemplate(experimentSafetyPdfTemplateId: Int!, templateData: String, templateHeader: String, templateFooter: String, templateSampleDeclaration: String, dummyData: String): ExperimentSafetyPdfTemplate! + createFeedback(experimentPk: Int!): Feedback! + updateFeedback(feedbackId: Int!, status: FeedbackStatus): Feedback! + createGenericTemplate(title: String!, templateId: Int!, proposalPk: Int!, questionId: String!): GenericTemplate! + createGenericTemplateWithCopiedAnswers(templateId: Int!, proposalPk: Int!, questionId: String!, copyAnswersInput: [CopyAnswerInput!]!): [GenericTemplate!]! + updateGenericTemplate(genericTemplateId: Int!, title: String, safetyComment: String): GenericTemplate! + createInternalReview(createInternalReviewInput: CreateInternalReviewInput!): InternalReview! + deleteInternalReview(deleteInternalReviewInput: DeleteInternalReviewInput!): InternalReview! + updateInternalReview(updateInternalReviewInput: UpdateInternalReviewInput!): InternalReview! + setCoProposerInvites(input: SetCoProposerInvitesInput!): [Invite!]! + createPredefinedMessage(createPredefinedMessageInput: CreatePredefinedMessageInput!): PredefinedMessage! + deletePredefinedMessage(deletePredefinedMessageInput: DeletePredefinedMessageInput!): PredefinedMessage! + updatePredefinedMessage(updatePredefinedMessageInput: UpdatePredefinedMessageInput!): PredefinedMessage! + administrationProposal(proposalPk: Int!, commentForUser: String, commentForManagement: String, finalStatus: ProposalEndStatus!, managementTimeAllocations: [ManagementTimeAllocationsInput!]!, managementDecisionSubmitted: Boolean): Proposal! + changeProposalsStatus(changeProposalsStatusInput: ChangeProposalsStatusInput!): Boolean! + cloneProposals(cloneProposalsInput: CloneProposalsInput!): [Proposal!]! + createProposalScientistComment(proposalPk: Int!, comment: String!): ProposalScientistComment! + importProposal(title: String!, abstract: String!, users: [Int!], proposerId: Int, submitterId: Int!, referenceNumber: Int!, callId: Int!, created: DateTime, submittedDate: DateTime!, techniqueIds: [Int!], instrumentId: Int): Proposal! + notifyProposal(proposalPk: Int!, ignoreNotifiedFlag: Boolean!): Proposal! + updateProposal(proposalPk: Int!, title: String!, abstract: String!, users: [Int!], proposerId: Int, created: DateTime): Proposal! + updateProposalScientistComment(commentId: Int!, comment: String!): ProposalScientistComment! + createProposalPdfTemplate(templateId: Int!, templateData: String!, templateHeader: String!, templateFooter: String!, templateSampleDeclaration: String!, dummyData: String!): ProposalPdfTemplate! + updateProposalPdfTemplate(proposalPdfTemplateId: Int!, templateData: String, templateHeader: String, templateFooter: String, templateSampleDeclaration: String, dummyData: String): ProposalPdfTemplate! + answerTopic(questionaryId: Int!, topicId: Int!, answers: [AnswerInput!]!, isPartialSave: Boolean): [AnswerBasic!]! + createQuestionary(templateId: Int!): Questionary! + updateAnswer(questionaryId: Int!, answer: AnswerInput!): String! + addUserForReview(userID: Int!, proposalPk: Int!, fapID: Int!): Review! + submitProposalsReview(submitProposalsReviewInput: SubmitProposalsReviewInput!): Boolean! + submitSampleReview(sampleId: Int!, safetyComment: String, safetyStatus: SampleStatus!): Sample! + submitTechnicalReviews(submitTechnicalReviewsInput: SubmitTechnicalReviewsInput!): Boolean! + updateReview(reviewID: Int!, comment: String!, grade: String!, status: ReviewStatus!, fapID: Int!, questionaryID: Int!): Review! + updateTechnicalReviewAssignee(userId: Int!, proposalPks: [Int!]!, instrumentId: Int!): [TechnicalReview!]! + createRole(args: CreateRoleArgs!): Role! + updateRole(args: UpdateRoleArgs!): UpdateRoleResponse! + createSample(title: String!, templateId: Int!, proposalPk: Int!, questionId: String!, isPostProposalSubmission: Boolean): Sample! + updateSample(sampleId: Int!, title: String): Sample! + cloneSample(sampleId: Int!, title: String, isPostProposalSubmission: Boolean): Sample! + createShipment(title: String!, proposalPk: Int!, experimentPk: Int!): Shipment! + createStatus(newStatusInput: CreateStatusInput!): Status! + updateStatus(updatedStatusInput: UpdateStatusInput!): Status! + assignCallsToTag(callIds: [Int!]!, tagId: Int!): Boolean! + removeCallFromTag(callId: Int!, tagId: Int!): Boolean! + assignInstrumentsToTag(instrumentIds: [Int!]!, tagId: Int!): Boolean! + removeInstrumentFromTag(instrumentId: Int!, tagId: Int!): Boolean! + assignInstrumentsToTechnique(instrumentIds: [Int!]!, techniqueId: Int!): Boolean! + assignProposalToTechniques(proposalPk: Int!, techniqueIds: [Int!]!): Boolean! + assignScientistsToTechnique(scientistIds: [Int!]!, techniqueId: Int!): Boolean! + removeScientistFromTechnique(scientistId: Int!, techniqueId: Int!): Boolean! + createTechnique(name: String!, shortCode: String!, description: String!): Technique! + removeInstrumentsFromTechnique(instrumentIds: [Int!]!, techniqueId: Int!): Boolean! + updateTechnique(id: Int!, name: String!, shortCode: String!, description: String!): Technique! + createQuestion(categoryId: TemplateCategoryId!, dataType: DataType!): Question! + createQuestionTemplateRelation(templateId: Int!, questionId: String!, sortOrder: Int!, topicId: Int!): Template! + createTemplate(groupId: TemplateGroupId!, name: String!, description: String): Template! + createTopic(templateId: Int!, sortOrder: Int, title: Int): Template! + deleteQuestionTemplateRelation(questionId: String!, templateId: Int!): Template! + setActiveTemplate(templateGroupId: TemplateGroupId!, templateId: Int!): Boolean! + updateQuestion(id: String!, naturalKey: String, question: String, config: String): Question! + updateQuestionTemplateRelation(questionId: String!, templateId: Int!, topicId: Int, sortOrder: Int!, config: String): Template! + updateQuestionTemplateRelationSettings(questionId: String!, templateId: Int!, config: String, dependencies: [FieldDependencyInput!]!, dependenciesOperator: DependenciesLogicOperator): Template! + updateTemplate(templateId: Int!, name: String, description: String, isArchived: Boolean): Template! + updateTopic(id: Int!, templateId: Int, title: String, sortOrder: Int, isEnabled: Boolean): Template! + createUnit(id: String!, unit: String!, quantity: String!, symbol: String!, siConversionFormula: String!): Unit! + importUnits(json: String!, conflictResolutions: [ConflictResolution!]!): [Unit!]! + addUserRole(userID: Int!, roleID: Int!): Boolean! + updateUser(userTitle: String, firstname: String, lastname: String, preferredname: String, institutionId: Int, email: String, roles: [Int!], id: Int!): User! + updateUserRoles(id: Int!, roles: [Int!]): User! + setUserNotPlaceholder(id: Int!): User! + upsertUserByOidcSub(userTitle: String, firstName: String!, lastName: String!, preferredName: String, oidcSub: String!, institution: InstitutionInput!, email: String!): User! + approveVisitRegistration(visitRegistration: ApproveVisitRegistrationInput!): VisitRegistration! + cancelVisitRegistration(visitRegistration: CancelVisitRegistrationInput!): VisitRegistration! + createVisit(experimentPk: Int!, team: [Int!]!, teamLeadUserId: Int!, inviteEmails: [String!]): Visit! + requestVisitRegistrationChanges(visitRegistration: RequestVisitRegistrationChangesInput!): VisitRegistration! + submitVisitRegistration(userId: Int!, visitId: Int!): VisitRegistration! + updateVisit(visitId: Int!, team: [Int!], teamLeadUserId: Int, inviteEmails: [String!]): Visit! + updateVisitRegistration(userId: Int!, visitId: Int!, startsAt: DateTime, endsAt: DateTime): VisitRegistration! + addStatusToWorkflow(newWorkflowStatusInput: AddStatusToWorkflowInput!): WorkflowStatus! + createWorkflowConnection(newWorkflowConnectionInput: CreateWorkflowConnectionInput!): WorkflowConnection! + createWorkflow(newWorkflowInput: CreateWorkflowInput!): Workflow! + deleteWorkflowStatus(deleteWorkflowStatusInput: DeleteWorkflowStatusInput!): Boolean! + setStatusActionsOnConnection(input: SetStatusActionsOnConnectionInput!): [ConnectionStatusAction!] + setStatusChangingEventsOnConnection(setStatusChangingEventsOnConnectionInput: SetStatusChangingEventsOnConnectionInput!): [StatusChangingEvent!]! + updateWorkflow(updatedWorkflowInput: UpdateWorkflowInput!): Workflow! + updateWorkflowStatus(updateWorkflowStatusInput: UpdateWorkflowStatusInput!): WorkflowStatus! + acceptCoProposerInvite(proposalId: String!): Invite! + acceptInviteWithCode(code: String!): Invite! + addClientLog(error: String!): Boolean! + addSamplesToShipment(shipmentId: Int!, sampleIds: [Int!]!): Shipment! + addTechnicalReview(addTechnicalReviewInput: AddTechnicalReviewInput!): TechnicalReview! + applyPatches: [String!]! + changeTechniqueProposalsStatus(changeProposalsStatusInput: ChangeProposalsStatusInput!): Boolean! + externalTokenLogin(iss: String, redirectUri: String!, externalToken: String!): String! + cloneGenericTemplate(title: String, genericTemplateId: Int!): GenericTemplate! + createExperimentSafety(experimentPk: Int!): ExperimentSafety! + createProposal(callId: Int!): Proposal! + createTag(name: String!, shortCode: String!): Tag! + createVisitRegistration(userId: Int!, visitId: Int!): VisitRegistration! + deleteCall(id: Int!): Call! + deleteEmailTemplate(id: Int!): EmailTemplate! + deleteExperimentSafetyPdfTemplate(experimentSafetyPdfTemplateId: Int!): ExperimentSafetyPdfTemplate! + deleteFap(id: Int!): Fap! + deleteFeedback(feedbackId: Int!): Feedback! + deleteGenericTemplate(genericTemplateId: Int!): GenericTemplate! + deleteInstitution(id: Int!): Institution! + deleteInstrument(id: Int!): Instrument! + deleteProposal(proposalPk: Int!): Proposal! + deleteProposalPdfTemplate(proposalPdfTemplateId: Int!): ProposalPdfTemplate! + deleteProposalScientistComment(commentId: Int!): ProposalScientistComment! + deleteRole(roleId: Int!): Role! + deleteSample(sampleId: Int!): Sample! + deleteShipment(shipmentId: Int!): Shipment! + deleteTechnique(id: Int!): Technique! + deleteUnit(id: String!): Unit! + deleteUser(id: Int!): User! + deleteVisit(visitId: Int!): Visit! + getTokenForUser(userId: Int!): String! + logout(token: String!): String! + prepareDB(includeSeeds: Boolean): [String!]! + removeUserForReview(fapId: Int!, reviewId: Int!): Review! + replayStatusActionsLog(statusActionsLogId: Int!): Boolean! + replayStatusActionsLogs(statusActionsLogIds: [Int!]!): ReplayStatusActionsLogsResult! + requestFeedback(experimentPk: Int!): FeedbackRequest! + reviewExperimentSafety(experimentSafetyPk: Int!, isSubmitted: Boolean): ExperimentSafety! + setPageContent(text: String!, id: PageName!): Page! + deleteStatus(id: String!): Status! + deleteWorkflowConnection(connectionId: Int!): WorkflowConnection + deleteWorkflow(id: Int!): Workflow! + submitExperimentSafetyReviewerExperimentSafetyReview(experimentSafetyPk: Int!, decision: ExperimentSafetyReviewerDecisionEnum, comment: String): ExperimentSafety! + submitInstrumentScientistExperimentSafetyReview(experimentSafetyPk: Int!, decision: InstrumentScientistDecisionEnum, comment: String): ExperimentSafety! + submitProposal(proposalPk: Int!): Proposal! + submitShipment(shipmentId: Int!): Shipment! + cloneTemplate(templateId: Int!): Template! + deleteQuestion(questionId: String!): Question! + deleteTemplate(templateId: Int!): Template! + deleteTopic(topicId: Int!): Template! + importTemplate(subTemplatesConflictResolutions: [[ConflictResolution!]!]!, conflictResolutions: [ConflictResolution!]!, templateAsJson: String!): Template! + validateTemplateImport(templateAsJson: String!): TemplateValidation! + token(token: String!): String! + selectRole(token: String!, selectedRoleId: Int): String! + updateDataAccessUsers(proposalPk: Int!, userIds: [Int!]!): [BasicUserDetails!]! + updateShipment(shipmentId: Int!, proposalPk: Int, title: String, status: ShipmentStatus, externalRef: String): Shipment! + updateTag(name: String!, shortCode: String!, id: Int!): Tag! + validateUnitsImport(unitsAsJson: String!): UnitsImportWithValidation! + updateRoleTags(tagIds: [Int!]!, roleId: Int!): Role! +} + +input AssignChairOrSecretaryToFapInput { + userId: Int! + roleId: UserRole! + fapId: Int! +} + +input FapReviewAssignmentInput { + memberId: Int! + proposalPk: Int! + rank: Int +} + +input FapInstrumentInput { + fapId: Int + instrumentId: Int +} + +input SaveFapMeetingDecisionInput { + proposalPk: Int! + commentForUser: String + commentForManagement: String + recommendation: ProposalEndStatus + rankOrder: Int + submitted: Boolean + instrumentId: Int! + fapId: Int! +} + +input SubmitFapMeetingDecisionsInput { + fapId: Int! + callId: Int! +} + +input ReorderFapMeetingDecisionProposalsInput { + proposals: [ProposalPkWithRankOrder!]! +} + +input ProposalPkWithRankOrder { + proposalPk: Int! + rankOrder: Int! + instrumentId: Int! + fapId: Int! +} + +input CreateApiAccessTokenInput { + name: String! + accessPermissions: String! +} + +input DeleteApiAccessTokenInput { + accessTokenId: String! +} + +input UpdateFeaturesInput { + featureIds: [FeatureId!]! + action: FeatureUpdateAction! +} + +enum FeatureUpdateAction { + ENABLE + DISABLE +} + +input UpdateSettingsInput { + settingsId: SettingsId! + description: String + settingsValue: String +} + +input UpdateApiAccessTokenInput { + accessTokenId: String! + name: String! + accessPermissions: String! +} + +input CreateCallInput { + shortCode: String! + sort_order: Int + startCall: DateTime! + endCall: DateTime! + endCallInternal: DateTime + startReview: DateTime! + endReview: DateTime! + startFapReview: DateTime + endFapReview: DateTime + startNotify: DateTime! + endNotify: DateTime! + startCycle: DateTime! + endCycle: DateTime! + referenceNumberFormat: String + proposalSequence: Int + cycleComment: String! + submissionMessage: String + allocationTimeUnit: AllocationTimeUnits! + proposalWorkflowId: Int! + experimentWorkflowId: Int + templateId: Int! + esiTemplateId: Int + title: String + description: String + faps: [Int!] + proposalPdfTemplateId: Int + experimentSafetyPdfTemplateId: Int + fapReviewTemplateId: Int + technicalReviewTemplateId: Int +} + +input UpdateCallInput { + id: Int! + shortCode: String + sort_order: Int + startCall: DateTime + endCall: DateTime + endCallInternal: DateTime + startReview: DateTime + endReview: DateTime + startFapReview: DateTime + endFapReview: DateTime + startNotify: DateTime + endNotify: DateTime + startCycle: DateTime + endCycle: DateTime + referenceNumberFormat: String + proposalSequence: Int + cycleComment: String + submissionMessage: String + allocationTimeUnit: AllocationTimeUnits + proposalWorkflowId: Int + experimentWorkflowId: Int + callEnded: Boolean + callEndedInternal: Boolean + callReviewEnded: Boolean + callFapReviewEnded: Boolean + templateId: Int + esiTemplateId: Int + proposalPdfTemplateId: Int + experimentSafetyPdfTemplateId: Int + fapReviewTemplateId: Int + technicalReviewTemplateId: Int + title: String + description: String + faps: [Int!] + isActive: Boolean +} + +input CallOrderInput { + data: [CallOrderArray!]! +} + +input CallOrderArray { + callId: Int! + sort_order: Int! +} + +input AssignInstrumentsToCallInput { + instrumentFapIds: [InstrumentFapMappingInput!]! + callId: Int! +} + +input InstrumentFapMappingInput { + instrumentId: Int! + fapId: Int +} + +input UpdateFapToCallInstrumentInput { + instrumentId: Int! + callId: Int! + fapId: Int +} + +input RemoveAssignedInstrumentFromCallInput { + instrumentId: Int! + callId: Int! +} + +input CreateEmailTemplateInput { + name: String! + description: String! + useTemplateFile: Boolean! + subject: String + body: String +} + +input UpdateEmailTemplateInput { + id: Int! + name: String! + description: String! + useTemplateFile: Boolean! + subject: String + body: String +} + +input CopyAnswerInput { + title: String! + sourceQuestionaryId: Int! +} + +input CreateInternalReviewInput { + title: String! + comment: String + technicalReviewId: Int! + reviewerId: Int + files: String +} + +input DeleteInternalReviewInput { + id: Int! + technicalReviewId: Int! +} + +input UpdateInternalReviewInput { + id: Int! + title: String! + comment: String + technicalReviewId: Int! + reviewerId: Int + files: String +} + +input SetCoProposerInvitesInput { + proposalPk: Int! + emails: [String!]! +} + +input CreatePredefinedMessageInput { + title: String! + message: String! + key: String! +} + +input DeletePredefinedMessageInput { + id: Int! +} + +input UpdatePredefinedMessageInput { + id: Int! + title: String! + message: String! + key: String! +} + +input ManagementTimeAllocationsInput { + instrumentId: Int! + value: Int! +} + +input ChangeProposalsStatusInput { + workflowStatusId: Int! + proposalPks: [Int!]! +} + +input CloneProposalsInput { + callId: Int! + proposalsToClonePk: [Int!]! +} + +input AnswerInput { + questionId: String! + value: String +} + +input SubmitProposalsReviewInput { + proposals: [ProposalPkWithReviewId!]! +} + +input ProposalPkWithReviewId { + proposalPk: Int! + reviewId: Int! +} + +input SubmitTechnicalReviewsInput { + technicalReviews: [SubmitTechnicalReviewInput!]! +} + +input SubmitTechnicalReviewInput { + proposalPk: Int! + comment: String + publicComment: String + timeAllocation: Int + status: TechnicalReviewStatus + submitted: Boolean! + reviewerId: Int! + files: String + instrumentId: Int! + questionaryId: Int +} + +input CreateRoleArgs { + shortCode: String! + title: String! + description: String! + config: RoleConfigInput +} + +input RoleConfigInput { + user: UserRoleConfigInput + proposalReader: ProposalReaderRoleConfigInput +} + +input UserRoleConfigInput { + note: String! +} + +input ProposalReaderRoleConfigInput { + hasLogAccess: Boolean! + hasTechnicalReviewAccess: Boolean! + hasFapAccess: Boolean! + hasAdminAccess: Boolean! +} + +type UpdateRoleResponse { + success: Boolean! + role: Role +} + +input UpdateRoleArgs { + roleID: Int! + shortCode: String! + title: String! + description: String! + config: RoleConfigInput +} + +input CreateStatusInput { + id: String! + name: String! + description: String! + entityType: WorkflowType! +} + +input UpdateStatusInput { + id: String! + name: String + description: String +} + +input FieldDependencyInput { + dependencyId: String! + condition: FieldConditionInput! +} + +input FieldConditionInput { + condition: EvaluatorOperator! + params: String! +} + +input ConflictResolution { + itemId: String! + strategy: ConflictResolutionStrategy! +} + +enum ConflictResolutionStrategy { + USE_NEW + USE_EXISTING + UNRESOLVED +} + +input InstitutionInput { + rorId: String + institutionData: InstitutionManualInput +} + +input InstitutionManualInput { + name: String! + country: String! +} + +input ApproveVisitRegistrationInput { + visitId: Int! + userId: Int! +} + +input CancelVisitRegistrationInput { + visitId: Int! + userId: Int! +} + +input RequestVisitRegistrationChangesInput { + visitId: Int! + userId: Int! +} + +input AddStatusToWorkflowInput { + workflowId: Int! + statusId: String! + posX: Int! + posY: Int! +} + +input CreateWorkflowConnectionInput { + prevWorkflowStatusId: Int! + nextWorkflowStatusId: Int! + sourceHandle: String! + targetHandle: String! +} + +input CreateWorkflowInput { + name: String! + description: String! + entityType: WorkflowType! +} + +input DeleteWorkflowStatusInput { + workflowStatusId: Int! +} + +input SetStatusActionsOnConnectionInput { + connectionId: Int! + workflowId: Int! + actions: [ConnectionHasActionsInput!]! +} + +input ConnectionHasActionsInput { + actionId: Int! + actionType: StatusActionType! + config: String +} + +input SetStatusChangingEventsOnConnectionInput { + workflowConnectionId: Int! + statusChangingEvents: [String!]! +} + +input UpdateWorkflowInput { + id: Int! + name: String + description: String + connectionLineType: String +} + +input UpdateWorkflowStatusInput { + workflowStatusId: Int! + posX: Int + posY: Int +} + +input AddTechnicalReviewInput { + proposalPk: Int! + comment: String + publicComment: String + timeAllocation: Int + status: TechnicalReviewStatus + submitted: Boolean + reviewerId: Int + files: String + instrumentId: Int! + questionaryId: Int! +} + +type ReplayStatusActionsLogsResult { + totalRequested: Int! + successful: [Int!]! + failed: [ReplayStatusLogFailure!]! +} + +type ReplayStatusLogFailure { + logId: Int! + error: String! +} + +type Page { + id: Int! + content: String +} + +type TemplateValidation { + json: String! + version: String! + exportDate: DateTime! + validationData: TemplateValidationData! +} + +type TemplateValidationData { + isValid: Boolean! + errors: [String!]! + questionComparisons: [QuestionComparison!]! + subTemplateValidationData: [TemplateValidationData!]! +} + +type QuestionComparison { + existingQuestion: Question + newQuestion: Question! + status: QuestionComparisonStatus! + conflictResolutionStrategy: ConflictResolutionStrategy! +} + +enum QuestionComparisonStatus { + NEW + DIFFERENT + SAME +} + +type UnitsImportWithValidation { + json: String! + version: String! + exportDate: DateTime! + isValid: Boolean! + errors: [String!]! + unitComparisons: [UnitComparison!]! +} + +type UnitComparison { + existingUnit: Unit + newUnit: Unit! + status: QuestionComparisonStatus! + conflictResolutionStrategy: ConflictResolutionStrategy! +} + +scalar _FieldSet + +scalar _Any + +type _Service { + sdl: String +} + +union _Entity = BasicUserDetails | Call | Experiment | ExperimentSafety | Instrument | Proposal | StatusActionsLog | Technique | User \ No newline at end of file From 5aba5eac827e18f526ccd815b4ecfbf68eab79e0 Mon Sep 17 00:00:00 2001 From: Thomas Cottee Meldrum Date: Mon, 13 Jul 2026 13:12:18 +0100 Subject: [PATCH 2/3] name --- graphql.schema => schema.graphql | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename graphql.schema => schema.graphql (100%) diff --git a/graphql.schema b/schema.graphql similarity index 100% rename from graphql.schema rename to schema.graphql From 71c329ec98ee89cbcc8364e51e513b9f87fc5497 Mon Sep 17 00:00:00 2001 From: Thomas Cottee Meldrum Date: Mon, 20 Jul 2026 14:57:05 +0100 Subject: [PATCH 3/3] chore: add graphql schema checks to prs --- .github/workflows/graphql-schema-check.yml | 24 + apps/backend/schema.gql | 2790 +++++++++++++++++ .../backend/src/utils/buildFederatedSchema.ts | 2 + 3 files changed, 2816 insertions(+) create mode 100644 .github/workflows/graphql-schema-check.yml create mode 100644 apps/backend/schema.gql diff --git a/.github/workflows/graphql-schema-check.yml b/.github/workflows/graphql-schema-check.yml new file mode 100644 index 0000000000..a09fa16e12 --- /dev/null +++ b/.github/workflows/graphql-schema-check.yml @@ -0,0 +1,24 @@ +name: Graphql Schema Check + +on: + pull_request: + branches: [develop] + +jobs: + test: + name: Check Schema + runs-on: ubuntu-latest + + permissions: + contents: read + checks: write + + steps: + - uses: actions/checkout@v6 + + - uses: graphql-hive/graphql-inspector@master + with: + schema: 'develop:schema.graphql' + annotations: false + approve-label: breaking:change + diff --git a/apps/backend/schema.gql b/apps/backend/schema.gql new file mode 100644 index 0000000000..fc9a508aae --- /dev/null +++ b/apps/backend/schema.gql @@ -0,0 +1,2790 @@ +# ----------------------------------------------- +# !!! THIS FILE WAS GENERATED BY TYPE-GRAPHQL !!! +# !!! DO NOT MODIFY THIS FILE BY YOURSELF !!! +# ----------------------------------------------- + +input AddStatusToWorkflowInput { + posX: Int! + posY: Int! + statusId: String! + workflowId: Int! +} + +input AddTechnicalReviewInput { + comment: String + files: String + instrumentId: Int! + proposalPk: Int! + publicComment: String + questionaryId: Int! + reviewerId: Int + status: TechnicalReviewStatus + submitted: Boolean + timeAllocation: Int +} + +input AllQuestionsFilter { + category: TemplateCategoryId + dataType: [DataType!] + excludeDataType: [DataType!] +} + +type AllQuestionsQueryResult { + questions: [QuestionWithUsage!]! + totalCount: Int! +} + +enum AllocationTimeUnits { + Day + Hour + Shift + Week +} + +type Answer { + answerId: Int + config: FieldConfig! + dependencies: [FieldDependency!]! + dependenciesOperator: DependenciesLogicOperator + question: Question! + sortOrder: Int! + templateId: Int! + topicId: Int! + value: IntStringDateBoolArray +} + +type AnswerBasic { + answer: IntStringDateBoolArray! + answerId: Int + createdAt: DateTime! + questionId: String! + questionaryId: Int! +} + +input AnswerInput { + questionId: String! + value: String +} + +type ApiCallRequestHeader { + name: String! + value: String! +} + +input ApproveVisitRegistrationInput { + userId: Int! + visitId: Int! +} + +input AssignChairOrSecretaryToFapInput { + fapId: Int! + roleId: UserRole! + userId: Int! +} + +input AssignInstrumentsToCallInput { + callId: Int! + instrumentFapIds: [InstrumentFapMappingInput!]! +} + +type AuthJwtApiTokenPayload { + accessTokenId: String! +} + +type AuthJwtPayload { + currentRole: Role! + roles: [Role!]! + user: UserJWT! +} + +type BasicUserDetails { + country: String + created: DateTime + email: String + firstname: String! + id: Int! + institution: String! + institutionId: Int! + lastname: String! + oidcSub: String + preferredname: String +} + +type BooleanConfig { + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! +} + +type Call { + allocationTimeUnit: AllocationTimeUnits! + cycleComment: String! + description: String + endCall: DateTime! + endCallInternal: DateTime + endCycle: DateTime! + endFapReview: DateTime + endNotify: DateTime! + endReview: DateTime! + esiTemplateId: Int + experimentSafetyPdfTemplateId: Int + experimentWorkflow: Workflow + experimentWorkflowId: Int + fapReviewTemplateId: Int + faps: [Fap!] + id: Int! + instruments: [InstrumentWithAvailabilityTime!]! + isActive: Boolean! + isActiveInternal: Boolean! + proposalCount: Int! + proposalPdfTemplateId: Int + proposalSequence: Int + proposalWorkflow: Workflow + proposalWorkflowId: Int + referenceNumberFormat: String + shortCode: String! + sort_order: Int! + startCall: DateTime! + startCycle: DateTime! + startFapReview: DateTime + startNotify: DateTime! + startReview: DateTime! + submissionMessage: String + tags: Tag! + technicalReviewTemplateId: Int + template: Template! + templateId: Int! + title: String +} + +input CallOrderArray { + callId: Int! + sort_order: Int! +} + +input CallOrderInput { + data: [CallOrderArray!]! +} + +input CallsFilter { + esiTemplateIds: [Int!] + experimentSafetyPdfTemplateIds: [Int!] + fapIds: [Int!] + fapReviewTemplateIds: [Int!] + instrumentIds: [Int!] + isActive: Boolean + isActiveInternal: Boolean + isCallEndedByEvent: Boolean + isCallUpcoming: Boolean + isEnded: Boolean + isEndedInternal: Boolean + isFapReviewEnded: Boolean + isReviewEnded: Boolean + proposalPdfTemplateIds: [Int!] + proposalStatus: String + shortCode: String + technicalReviewTemplateIds: [Int!] + templateIds: [Int!] +} + +input CancelVisitRegistrationInput { + userId: Int! + visitId: Int! +} + +input ChangeProposalsStatusInput { + proposalPks: [Int!]! + workflowStatusId: Int! +} + +input CloneProposalsInput { + callId: Int! + proposalsToClonePk: [Int!]! +} + +input ConflictResolution { + itemId: String! + strategy: ConflictResolutionStrategy! +} + +enum ConflictResolutionStrategy { + UNRESOLVED + USE_EXISTING + USE_NEW +} + +input ConnectionHasActionsInput { + actionId: Int! + actionType: StatusActionType! + config: String +} + +type ConnectionStatusAction { + action: StatusAction! + actionId: Int! + config: StatusActionConfig + connectionId: Int! + workflowId: Int! +} + +input CopyAnswerInput { + sourceQuestionaryId: Int! + title: String! +} + +input CreateApiAccessTokenInput { + accessPermissions: String! + name: String! +} + +input CreateCallInput { + allocationTimeUnit: AllocationTimeUnits! + cycleComment: String! + description: String + endCall: DateTime! + endCallInternal: DateTime + endCycle: DateTime! + endFapReview: DateTime + endNotify: DateTime! + endReview: DateTime! + esiTemplateId: Int + experimentSafetyPdfTemplateId: Int + experimentWorkflowId: Int + fapReviewTemplateId: Int + faps: [Int!] + proposalPdfTemplateId: Int + proposalSequence: Int + proposalWorkflowId: Int! + referenceNumberFormat: String + shortCode: String! + sort_order: Int + startCall: DateTime! + startCycle: DateTime! + startFapReview: DateTime + startNotify: DateTime! + startReview: DateTime! + submissionMessage: String + technicalReviewTemplateId: Int + templateId: Int! + title: String +} + +input CreateEmailTemplateInput { + body: String + description: String! + name: String! + subject: String + useTemplateFile: Boolean! +} + +input CreateInternalReviewInput { + comment: String + files: String + reviewerId: Int + technicalReviewId: Int! + title: String! +} + +input CreatePredefinedMessageInput { + key: String! + message: String! + title: String! +} + +input CreateRoleArgs { + config: RoleConfigInput + description: String! + shortCode: String! + title: String! +} + +input CreateStatusInput { + description: String! + entityType: WorkflowType! + id: String! + name: String! +} + +input CreateWorkflowConnectionInput { + nextWorkflowStatusId: Int! + prevWorkflowStatusId: Int! + sourceHandle: String! + targetHandle: String! +} + +input CreateWorkflowInput { + description: String! + entityType: WorkflowType! + name: String! +} + +enum DataType { + BOOLEAN + DATE + DYNAMIC_MULTIPLE_CHOICE + EMBELLISHMENT + EXPERIMENT_SAFETY_REVIEW_BASIS + FAP_REVIEW_BASIS + FEEDBACK_BASIS + FILE_UPLOAD + GENERIC_TEMPLATE + GENERIC_TEMPLATE_BASIS + INSTRUMENT_PICKER + INTERVAL + NUMBER_INPUT + PROPOSAL_BASIS + PROPOSAL_ESI_BASIS + RICH_TEXT_INPUT + SAMPLE_BASIS + SAMPLE_DECLARATION + SAMPLE_ESI_BASIS + SELECTION_FROM_OPTIONS + SHIPMENT_BASIS + TECHNICAL_REVIEW_BASIS + TECHNIQUE_PICKER + TEXT_INPUT + VISIT_BASIS +} + +type DateConfig { + defaultDate: String + includeTime: Boolean! + maxDate: String + minDate: String + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! +} + +input DateFilterInput { + from: String + to: String +} + +""" +The javascript `Date` as string. Type represents date and time as the ISO Date string. +""" +scalar DateTime + +input DeleteApiAccessTokenInput { + accessTokenId: String! +} + +input DeleteInternalReviewInput { + id: Int! + technicalReviewId: Int! +} + +input DeletePredefinedMessageInput { + id: Int! +} + +input DeleteWorkflowStatusInput { + workflowStatusId: Int! +} + +enum DependenciesLogicOperator { + AND + OR +} + +type DynamicMultipleChoiceConfig { + apiCallRequestHeaders: [ApiCallRequestHeader!]! + externalApiCall: Boolean! + isMultipleSelect: Boolean! + jsonPath: String! + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! + url: String! + variant: String! +} + +type EmailActionConfig { + recipientsWithEmailTemplate: [EmailStatusActionRecipientsWithTemplate!]! +} + +type EmailActionDefaultConfig { + emailTemplates: [EmailStatusActionEmailTemplate!]! + recipients: [EmailStatusActionRecipient!]! +} + +type EmailStatusActionEmailTemplate { + id: String! + name: String! +} + +type EmailStatusActionRecipient { + description: String + name: EmailStatusActionRecipients! +} + +enum EmailStatusActionRecipients { + CO_PROPOSERS + EXPERIMENT_SAFETY_REVIEWERS + FAP_CHAIR_AND_SECRETARY + FAP_REVIEWERS + INSTRUMENT_SCIENTISTS + OTHER + PI + TECHNIQUE_SCIENTISTS + USER_OFFICE +} + +type EmailStatusActionRecipientsWithTemplate { + combineEmails: Boolean + emailTemplate: EmailStatusActionEmailTemplate! + otherRecipientEmails: [String!] + recipient: EmailStatusActionRecipient! +} + +type EmailTemplate { + body: String + createdByUserId: Int! + description: String! + id: Int! + name: String! + subject: String + useTemplateFile: Boolean! +} + +input EmailTemplatesFilter { + emailTemplateIds: [Int!] + filter: String + first: Int + offset: Int +} + +type EmailTemplatesQueryResult { + emailTemplates: [EmailTemplate!]! + totalCount: Int! +} + +type EmbellishmentConfig { + html: String! + omitFromPdf: Boolean! + plain: String! + readPermissions: [String!]! +} + +type Entry { + id: Int! + value: String! +} + +enum EvaluatorOperator { + eq + neq +} + +enum Event { + CALL_CREATED + CALL_ENDED + CALL_ENDED_INTERNAL + CALL_FAP_REVIEW_ENDED + CALL_REVIEW_ENDED + DATA_ACCESS_USERS_UPDATED + EMAIL_TEMPLATE_CREATED + EMAIL_TEMPLATE_DELETED + EMAIL_TEMPLATE_UPDATED + EXPERIMENT_ESF_APPROVED_BY_ESR + EXPERIMENT_ESF_APPROVED_BY_IS + EXPERIMENT_ESF_REJECTED_BY_ESR + EXPERIMENT_ESF_REJECTED_BY_IS + EXPERIMENT_ESF_SUBMITTED + EXPERIMENT_SAFETY_MANAGEMENT_DECISION_SUBMITTED_BY_ESR + EXPERIMENT_SAFETY_MANAGEMENT_DECISION_SUBMITTED_BY_IS + EXPERIMENT_SAFETY_STATUS_CHANGED_BY_USER + EXPERIMENT_SAFETY_STATUS_CHANGED_BY_WORKFLOW + FAP_ALL_MEETINGS_SUBMITTED + FAP_CREATED + FAP_MEMBERS_ASSIGNED + FAP_MEMBER_ASSIGNED_TO_PROPOSAL + FAP_MEMBER_REMOVED + FAP_MEMBER_REMOVED_FROM_PROPOSAL + FAP_REVIEWER_NOTIFIED + FAP_UPDATED + INSTRUMENTS_ASSIGNED_TO_TECHNIQUE + INSTRUMENTS_REMOVED_FROM_TECHNIQUE + INSTRUMENT_ASSIGNED_TO_SCIENTIST + INSTRUMENT_CREATED + INSTRUMENT_DELETED + INSTRUMENT_UPDATED + INTERNAL_REVIEW_CREATED + INTERNAL_REVIEW_DELETED + INTERNAL_REVIEW_UPDATED + PREDEFINED_MESSAGE_CREATED + PREDEFINED_MESSAGE_DELETED + PREDEFINED_MESSAGE_UPDATED + PROPOSAL_ACCEPTED + PROPOSAL_ALL_FAP_MEETINGS_SUBMITTED + PROPOSAL_ALL_FAP_MEETING_INSTRUMENT_SUBMITTED + PROPOSAL_ALL_FAP_REVIEWERS_SELECTED + PROPOSAL_ALL_FAP_REVIEWS_SUBMITTED + PROPOSAL_ALL_FEASIBILITY_REVIEWS_FEASIBLE + PROPOSAL_ALL_FEASIBILITY_REVIEWS_SUBMITTED + PROPOSAL_ALL_REVIEWS_SUBMITTED_FOR_ALL_FAPS + PROPOSAL_ASSIGNED_TO_TECHNIQUES + PROPOSAL_BOOKING_TIME_ACTIVATED + PROPOSAL_BOOKING_TIME_COMPLETED + PROPOSAL_BOOKING_TIME_REOPENED + PROPOSAL_BOOKING_TIME_SLOTS_REMOVED + PROPOSAL_BOOKING_TIME_SLOT_ADDED + PROPOSAL_BOOKING_TIME_UPDATED + PROPOSAL_CLONED + PROPOSAL_CO_PROPOSER_INVITES_UPDATED + PROPOSAL_CO_PROPOSER_INVITE_ACCEPTED + PROPOSAL_CO_PROPOSER_INVITE_SENT + PROPOSAL_CREATED + PROPOSAL_DELETED + PROPOSAL_FAPS_REMOVED + PROPOSAL_FAPS_SELECTED + PROPOSAL_FAP_MEETING_INSTRUMENT_SUBMITTED + PROPOSAL_FAP_MEETING_INSTRUMENT_UNSUBMITTED + PROPOSAL_FAP_MEETING_RANKING_OVERWRITTEN + PROPOSAL_FAP_MEETING_REORDER + PROPOSAL_FAP_MEETING_SAVED + PROPOSAL_FAP_MEETING_SUBMITTED + PROPOSAL_FAP_REVIEW_SUBMITTED + PROPOSAL_FAP_REVIEW_UPDATED + PROPOSAL_FEASIBILITY_REVIEW_FEASIBLE + PROPOSAL_FEASIBILITY_REVIEW_SUBMITTED + PROPOSAL_FEASIBILITY_REVIEW_UNFEASIBLE + PROPOSAL_FEASIBILITY_REVIEW_UPDATED + PROPOSAL_INSTRUMENTS_SELECTED + PROPOSAL_MANAGEMENT_DECISION_SUBMITTED + PROPOSAL_MANAGEMENT_DECISION_UPDATED + PROPOSAL_NOTIFIED + PROPOSAL_REJECTED + PROPOSAL_RESERVED + PROPOSAL_SAMPLE_REVIEW_SUBMITTED + PROPOSAL_SAMPLE_SAFE + PROPOSAL_STATUS_ACTION_EXECUTED + PROPOSAL_STATUS_CHANGED_BY_USER + PROPOSAL_STATUS_CHANGED_BY_WORKFLOW + PROPOSAL_SUBMITTED + PROPOSAL_UPDATED + PROPOSAL_VISIT_REGISTRATION_INVITES_UPDATED + PROPOSAL_VISIT_REGISTRATION_INVITE_ACCEPTED + PROPOSAL_VISIT_REGISTRATION_INVITE_SENT + TECHNIQUE_CREATED + TECHNIQUE_DELETED + TECHNIQUE_UPDATED + TOPIC_ANSWERED + USER_DELETED + USER_PASSWORD_RESET_EMAIL + USER_ROLE_UPDATED + USER_UPDATED + VISIT_CREATED + VISIT_REGISTRATION_APPROVED + VISIT_REGISTRATION_CANCELLED + VISIT_REGISTRATION_UPDATED +} + +type EventLog { + changedBy: User + changedObjectId: String! + description: String! + eventTStamp: DateTime! + eventType: String! + id: Int! + rowData: String! +} + +type Experiment { + createdAt: DateTime! + endsAt: DateTime! + experimentId: String! + experimentPk: Float! + experimentSafety: ExperimentSafety + feedback: Feedback + feedbackRequests: [FeedbackRequest!]! + instrument: Instrument! + instrumentId: Float! + localContact: BasicUserDetails + localContactId: Float + proposal: Proposal! + proposalPk: Float! + referenceNumberSequence: Float + scheduledEventId: Float! + shipments: [Shipment!]! + startsAt: DateTime! + status: String! + updatedAt: DateTime! + visit: Visit +} + +type ExperimentHasSample { + createdAt: DateTime! + experimentPk: Float! + isEsiSubmitted: Boolean! + questionary: Questionary! + sample: Sample! + sampleEsiQuestionaryId: Float! + sampleId: Float! + updatedAt: DateTime! +} + +type ExperimentSafety { + createdAt: DateTime! + createdBy: Float! + esiQuestionaryId: Float! + esiQuestionarySubmittedAt: DateTime + experimentPk: Float! + experimentSafetyPk: Float! + experimentSafetyReviewerComment: String + experimentSafetyReviewerDecision: ExperimentSafetyReviewerDecisionEnum + instrumentScientistComment: String + instrumentScientistDecision: InstrumentScientistDecisionEnum + proposal: Proposal! + questionary: Questionary! + reviewedBy: Float + safetyReviewQuestionary: Questionary! + safetyReviewQuestionaryId: Float + samples: [ExperimentHasSample!]! + status: Status + statusId: String! + updatedAt: DateTime! + workflowStatusId: Float! +} + +type ExperimentSafetyPdfTemplate { + created: DateTime! + creatorId: Int! + dummyData: String! + experimentSafetyPdfTemplateId: Int! + templateData: String! + templateFooter: String! + templateHeader: String! + templateId: Int! + templateSampleDeclaration: String! +} + +input ExperimentSafetyPdfTemplatesFilter { + creatorId: Int + dummyData: String + experimentSafetyPdfTemplateIds: [Int!] + pdfTemplateData: String + pdfTemplateFooter: String + pdfTemplateHeader: String + pdfTemplateSampleDeclaration: String + templateIds: [Int!] +} + +type ExperimentSafetyReviewBasisConfig { + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! +} + +enum ExperimentSafetyReviewerDecisionEnum { + ACCEPTED + REJECTED + UNSET +} + +enum ExperimentStatus { + ACTIVE + COMPLETED + DRAFT +} + +input ExperimentsFilter { + callId: Int + experimentEndDate: DateTime + experimentSafetyStatusId: Int + experimentStartDate: DateTime + instrumentId: Int + instrumentScientistUserId: Int + overlaps: TimeSpan +} + +type ExperimentsQueryResult { + experiments: [Experiment!]! + totalCount: Int! +} + +type ExternalTokenResult { + isValid: Boolean! +} + +type Fap { + active: Boolean! + code: String! + customGradeGuide: Boolean + description: String! + fapChairs: [BasicUserDetails!]! + fapChairsCurrentProposalCounts: [FapProposalCount!]! + fapSecretaries: [BasicUserDetails!]! + fapSecretariesCurrentProposalCounts: [FapProposalCount!]! + files: String + gradeGuide: String + id: Int! + numberRatingsRequired: Float! + proposalCount: Int! + proposalCurrentCount: Int! + reviewVisibility: Int! +} + +type FapAssignment { + dateAssigned: DateTime! + dateReassigned: DateTime + emailSent: Boolean! + fapId: Int! + fapMemberUserId: Int + proposal: Proposal! + proposalPk: Int! + rank: Int + reassigned: Boolean! + review: Review + role: Role + user: BasicUserDetails +} + +type FapInstrument { + fapId: Int + instrumentId: Int +} + +input FapInstrumentInput { + fapId: Int + instrumentId: Int +} + +type FapMeetingDecision { + commentForManagement: String + commentForUser: String + fapId: Int! + instrumentId: Int! + proposalPk: Int! + rankOrder: Int + recommendation: ProposalEndStatus + submitted: Boolean! + submittedBy: Int +} + +type FapProposal { + assignments: [FapAssignment!] + dateAssigned: DateTime! + fapId: Int! + fapTimeAllocation: Int + instrument: Instrument + instrumentId: Int! + instrumentSubmitted: Boolean! + proposal: Proposal! + proposalPk: Int! +} + +type FapProposalCount { + count: Int! + userId: Int! +} + +input FapReviewAssignmentInput { + memberId: Int! + proposalPk: Int! + rank: Int +} + +type FapReviewBasisConfig { + decimalPoints: Int! + maxGrade: Int! + minGrade: Int! + nonNumericOptions: [String!]! + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! +} + +type FapReviewTemplate { + callCount: Int! + complementaryQuestions: [Question!]! + description: String + experimentSafetyPdfCallCount: Int + experimentSafetyPdfTemplate: ExperimentSafetyPdfTemplate + group: TemplateGroup! + groupId: TemplateGroupId! + isArchived: Boolean! + json: String! + name: String! + proposalESICallCount: Int + proposalPdfCallCount: Int + proposalPdfTemplate: ProposalPdfTemplate + questionaryCount: Int! + steps: [TemplateStep!]! + templateId: Int! +} + +input FapReviewTemplatesFilter { + isArchived: Boolean + templateIds: [Int!] +} + +enum FapReviewVisibility { + PROPOSAL_REVIEWS_COMPLETE + REVIEWS_VISIBLE + REVIEWS_VISIBLE_FAP_ENDED +} + +type FapReviewer { + fapId: Int! + proposalsCount: Int! + proposalsCountByCall: Int! + role: Role + user: BasicUserDetails! + userId: Int! +} + +input FapsFilter { + active: Boolean + callIds: [Int!] + filter: String + first: Int + offset: Int +} + +type FapsQueryResult { + faps: [Fap!]! + totalCount: Int! +} + +type Feature { + description: String! + id: FeatureId! + isEnabled: Boolean! +} + +enum FeatureId { + CONFLICT_OF_INTEREST_WARNING + DATA_ACCESS_USERS + EMAIL_INVITE + EMAIL_SEARCH + EXPERIMENT_SAFETY_REVIEW + FAP_REVIEW + INSTRUMENT_MANAGEMENT + OAUTH + PREGENERATED_PROPOSAL_PDF + RISK_ASSESSMENT + SCHEDULER + SHIPPING + STFC_IDLE_TIMER + TAGS + TECHNICAL_REVIEW + TECHNIQUE_PROPOSALS + USER_MANAGEMENT + USER_SEARCH_FILTER + VISIT_MANAGEMENT +} + +enum FeatureUpdateAction { + DISABLE + ENABLE +} + +type Feedback { + createdAt: DateTime! + creatorId: Int! + experimentPk: Int! + id: Int! + questionary: Questionary! + questionaryId: Int! + status: FeedbackStatus! + submittedAt: DateTime +} + +type FeedbackBasisConfig { + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! +} + +type FeedbackRequest { + experimentPk: Int! + id: Int! + requestedAt: DateTime! +} + +enum FeedbackStatus { + DRAFT + SUBMITTED +} + +input FeedbacksFilter { + creatorId: Int + experimentPk: Int +} + +type FieldCondition { + condition: EvaluatorOperator! + params: IntStringDateBoolArray! +} + +input FieldConditionInput { + condition: EvaluatorOperator! + params: String! +} + +union FieldConfig = BooleanConfig | DateConfig | DynamicMultipleChoiceConfig | EmbellishmentConfig | ExperimentSafetyReviewBasisConfig | FapReviewBasisConfig | FeedbackBasisConfig | FileUploadConfig | GenericTemplateBasisConfig | InstrumentPickerConfig | IntervalConfig | NumberInputConfig | ProposalBasisConfig | ProposalEsiBasisConfig | RichTextInputConfig | SampleBasisConfig | SampleDeclarationConfig | SampleEsiBasisConfig | SelectionFromOptionsConfig | ShipmentBasisConfig | SubTemplateConfig | TechnicalReviewBasisConfig | TechniquePickerConfig | TextInputConfig | VisitBasisConfig + +type FieldDependency { + condition: FieldCondition! + dependencyId: String! + dependencyNaturalKey: String! + questionId: String! +} + +input FieldDependencyInput { + condition: FieldConditionInput! + dependencyId: String! +} + +type FileMetadata { + createdDate: DateTime! + fileId: String! + mimeType: String! + originalFileName: String! + sizeInBytes: Int! +} + +type FileUploadConfig { + file_type: [String!]! + max_files: Int! + omitFromPdf: Boolean! + pdf_page_limit: Int! + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! +} + +input FilesMetadataFilter { + fileIds: [String!]! +} + +type GenericTemplate { + created: DateTime! + creatorId: Int! + id: Int! + proposal: Proposal! + proposalPk: Int! + questionId: String! + questionary: Questionary! + questionaryId: Int! + title: String! +} + +type GenericTemplateBasisConfig { + questionLabel: String! + readPermissions: [String!]! + titlePlaceholder: String! +} + +input GenericTemplatesFilter { + creatorId: Int + genericTemplateIds: [Int!] + proposalPk: Int + questionId: String + questionaryIds: [Int!] + title: String +} + +type Institution { + country: Entry + id: Int! + name: String! + rorId: String +} + +input InstitutionInput { + institutionData: InstitutionManualInput + rorId: String +} + +input InstitutionManualInput { + country: String! + name: String! +} + +input InstitutionsFilter { + name: String +} + +type Instrument { + description: String! + id: Int! + instrumentContact: BasicUserDetails + managerUserId: Int! + multipleTechReviewsEnabled: Boolean + name: String! + scientists: [BasicUserDetails!]! + selectable: Boolean + shortCode: String! + tags: [Tag!] +} + +input InstrumentFapMappingInput { + fapId: Int + instrumentId: Int! +} + +input InstrumentFilterInput { + instrumentId: Int @deprecated(reason: "Use instrumentIds instead") + instrumentIds: [Int!] + showAllProposals: Boolean! + showMultiInstrumentProposals: Boolean! +} + +type InstrumentOption { + id: Float! + name: String! +} + +type InstrumentPickerConfig { + instruments: [InstrumentOption!]! + isMultipleSelect: Boolean! + readPermissions: [String!]! + requestTime: Boolean! + required: Boolean! + small_label: String! + tooltip: String! + variant: String! +} + +enum InstrumentScientistDecisionEnum { + ACCEPTED + REJECTED + UNSET +} + +type InstrumentWithAvailabilityTime { + availabilityTime: Int + description: String! + fap: Fap + fapId: Int + id: Int! + instrumentContact: BasicUserDetails + managerUserId: Int! + multipleTechReviewsEnabled: Boolean + name: String! + scientists: [BasicUserDetails!]! + selectable: Boolean + shortCode: String! + submitted: Boolean + tags: [Tag!] +} + +type InstrumentWithManagementTime { + description: String! + id: Int! + instrumentContact: BasicUserDetails + managementTimeAllocation: Int + managerUserId: Int! + multipleTechReviewsEnabled: Boolean + name: String! + scientists: [BasicUserDetails!]! + selectable: Boolean + shortCode: String! + tags: [Tag!] +} + +type InstrumentsQueryResult { + instruments: [Instrument!]! + totalCount: Int! +} + +scalar IntStringDateBoolArray + +type InternalReview { + assignedBy: Int! + assignedByUser: BasicUserDetails + comment: String + createdAt: DateTime! + files: String + id: Int! + reviewer: BasicUserDetails + reviewerId: Int! + technicalReviewId: Int! + title: String! +} + +input InternalReviewsFilter { + reviewerId: Int + technicalReviewId: Int +} + +type IntervalConfig { + numberValueConstraint: NumberValueConstraint + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! + units: [Unit!]! +} + +type Invite { + claimedAt: DateTime + claimedByUserId: Int + code: String + createdAt: DateTime! + createdByUserId: Int! + email: String! + expiresAt: DateTime + id: Int! + isEmailSent: Boolean! + proposal: InvitedProposal +} + +type InvitedProposal { + abstract: String! + proposalId: String! + proposerName: String! + title: String! +} + +input ManagementTimeAllocationsInput { + instrumentId: Int! + value: Int! +} + +type Mutation { + acceptCoProposerInvite(proposalId: String!): Invite! + acceptInviteWithCode(code: String!): Invite! + addClientLog(error: String!): Boolean! + addSampleToExperiment(experimentPk: Int!, sampleId: Int!): ExperimentHasSample! + addSamplesToShipment(sampleIds: [Int!]!, shipmentId: Int!): Shipment! + addStatusToWorkflow(newWorkflowStatusInput: AddStatusToWorkflowInput!): WorkflowStatus! + addTechnicalReview(addTechnicalReviewInput: AddTechnicalReviewInput!): TechnicalReview! + addUserForReview(fapID: Int!, proposalPk: Int!, userID: Int!): Review! + addUserRole(roleID: Int!, userID: Int!): Boolean! + administrationProposal(commentForManagement: String, commentForUser: String, finalStatus: ProposalEndStatus!, managementDecisionSubmitted: Boolean, managementTimeAllocations: [ManagementTimeAllocationsInput!]!, proposalPk: Int!): Proposal! + answerTopic(answers: [AnswerInput!]!, isPartialSave: Boolean, questionaryId: Int!, topicId: Int!): [AnswerBasic!]! + applyPatches: [String!]! + approveVisitRegistration(visitRegistration: ApproveVisitRegistrationInput!): VisitRegistration! + assignCallsToTag(callIds: [Int!]!, tagId: Int!): Boolean! + assignChairOrSecretary(assignChairOrSecretaryToFapInput: AssignChairOrSecretaryToFapInput!): Fap! + assignFapReviewersToProposals(assignments: [FapReviewAssignmentInput!]!, fapId: Int!): Fap! + assignInstrumentsToCall(assignInstrumentsToCallInput: AssignInstrumentsToCallInput!): Call! + assignInstrumentsToTag(instrumentIds: [Int!]!, tagId: Int!): Boolean! + assignInstrumentsToTechnique(instrumentIds: [Int!]!, techniqueId: Int!): Boolean! + assignProposalToTechniques(proposalPk: Int!, techniqueIds: [Int!]!): Boolean! + assignProposalsToFaps(fapInstruments: [FapInstrumentInput!]!, proposalPks: [Int!]!): Boolean! + assignProposalsToInstruments(instrumentIds: [Int!]!, proposalPks: [Int!]!): Boolean! + assignReviewersToFap(fapId: Int!, memberIds: [Int!]!): Fap! + assignScientistsToInstrument(instrumentId: Int!, scientistIds: [Int!]!): Boolean! + assignScientistsToTechnique(scientistIds: [Int!]!, techniqueId: Int!): Boolean! + assignTechniqueProposalsToInstruments(instrumentIds: [Int!]!, proposalPks: [Int!]!): Boolean! + cancelVisitRegistration(visitRegistration: CancelVisitRegistrationInput!): VisitRegistration! + changeProposalsStatus(changeProposalsStatusInput: ChangeProposalsStatusInput!): Boolean! + changeTechniqueProposalsStatus(changeProposalsStatusInput: ChangeProposalsStatusInput!): Boolean! + cloneExperimentSample(experimentPk: Int!, newSampleTitle: String, sampleId: Int!): ExperimentHasSample! + cloneGenericTemplate(genericTemplateId: Int!, title: String): GenericTemplate! + cloneProposals(cloneProposalsInput: CloneProposalsInput!): [Proposal!]! + cloneSample(isPostProposalSubmission: Boolean, sampleId: Int!, title: String): Sample! + cloneTemplate(templateId: Int!): Template! + createApiAccessToken(createApiAccessTokenInput: CreateApiAccessTokenInput!): PermissionsWithAccessToken! + createCall(createCallInput: CreateCallInput!): Call! + createEmailTemplate(createEmailTemplateInput: CreateEmailTemplateInput!): EmailTemplate! + createExperimentSafety(experimentPk: Int!): ExperimentSafety! + createExperimentSafetyPdfTemplate(dummyData: String!, templateData: String!, templateFooter: String!, templateHeader: String!, templateId: Int!, templateSampleDeclaration: String!): ExperimentSafetyPdfTemplate! + createFap(active: Boolean!, code: String!, customGradeGuide: Boolean, description: String!, gradeGuide: String, numberRatingsRequired: Int! = 2, reviewVisibility: Int!): Fap! + createFeedback(experimentPk: Int!): Feedback! + createGenericTemplate(proposalPk: Int!, questionId: String!, templateId: Int!, title: String!): GenericTemplate! + createGenericTemplateWithCopiedAnswers(copyAnswersInput: [CopyAnswerInput!]!, proposalPk: Int!, questionId: String!, templateId: Int!): [GenericTemplate!]! + createInstrument(description: String!, managerUserId: Int!, multipleTechReviewsEnabled: Boolean = false, name: String!, selectable: Boolean = true, shortCode: String!): Instrument! + createInternalReview(createInternalReviewInput: CreateInternalReviewInput!): InternalReview! + createPredefinedMessage(createPredefinedMessageInput: CreatePredefinedMessageInput!): PredefinedMessage! + createProposal(callId: Int!): Proposal! + createProposalPdfTemplate(dummyData: String!, templateData: String!, templateFooter: String!, templateHeader: String!, templateId: Int!, templateSampleDeclaration: String!): ProposalPdfTemplate! + createProposalScientistComment(comment: String!, proposalPk: Int!): ProposalScientistComment! + createQuestion(categoryId: TemplateCategoryId!, dataType: DataType!): Question! + createQuestionTemplateRelation(questionId: String!, sortOrder: Int!, templateId: Int!, topicId: Int!): Template! + createQuestionary(templateId: Int!): Questionary! + createRole(args: CreateRoleArgs!): Role! + createSample(isPostProposalSubmission: Boolean, proposalPk: Int!, questionId: String!, templateId: Int!, title: String!): Sample! + createShipment(experimentPk: Int!, proposalPk: Int!, title: String!): Shipment! + createStatus(newStatusInput: CreateStatusInput!): Status! + createTag(name: String!, shortCode: String!): Tag! + createTechnique(description: String!, name: String!, shortCode: String!): Technique! + createTemplate(description: String, groupId: TemplateGroupId!, name: String!): Template! + createTopic(sortOrder: Int, templateId: Int!, title: Int): Template! + createUnit(id: String!, quantity: String!, siConversionFormula: String!, symbol: String!, unit: String!): Unit! + createVisit(experimentPk: Int!, inviteEmails: [String!], team: [Int!]!, teamLeadUserId: Int!): Visit! + createVisitRegistration(userId: Int!, visitId: Int!): VisitRegistration! + createWorkflow(newWorkflowInput: CreateWorkflowInput!): Workflow! + createWorkflowConnection(newWorkflowConnectionInput: CreateWorkflowConnectionInput!): WorkflowConnection! + deleteApiAccessToken(deleteApiAccessTokenInput: DeleteApiAccessTokenInput!): Boolean! + deleteCall(id: Int!): Call! + deleteEmailTemplate(id: Int!): EmailTemplate! + deleteExperimentSafetyPdfTemplate(experimentSafetyPdfTemplateId: Int!): ExperimentSafetyPdfTemplate! + deleteFap(id: Int!): Fap! + deleteFeedback(feedbackId: Int!): Feedback! + deleteGenericTemplate(genericTemplateId: Int!): GenericTemplate! + deleteInstitution(id: Int!): Institution! + deleteInstrument(id: Int!): Instrument! + deleteInternalReview(deleteInternalReviewInput: DeleteInternalReviewInput!): InternalReview! + deletePredefinedMessage(deletePredefinedMessageInput: DeletePredefinedMessageInput!): PredefinedMessage! + deleteProposal(proposalPk: Int!): Proposal! + deleteProposalPdfTemplate(proposalPdfTemplateId: Int!): ProposalPdfTemplate! + deleteProposalScientistComment(commentId: Int!): ProposalScientistComment! + deleteQuestion(questionId: String!): Question! + deleteQuestionTemplateRelation(questionId: String!, templateId: Int!): Template! + deleteRole(roleId: Int!): Role! + deleteSample(sampleId: Int!): Sample! + deleteShipment(shipmentId: Int!): Shipment! + deleteStatus(id: String!): Status! + deleteTechnique(id: Int!): Technique! + deleteTemplate(templateId: Int!): Template! + deleteTopic(topicId: Int!): Template! + deleteUnit(id: String!): Unit! + deleteUser(id: Int!): User! + deleteVisit(visitId: Int!): Visit! + deleteWorkflow(id: Int!): Workflow! + deleteWorkflowConnection(connectionId: Int!): WorkflowConnection + deleteWorkflowStatus(deleteWorkflowStatusInput: DeleteWorkflowStatusInput!): Boolean! + externalTokenLogin(externalToken: String!, iss: String, redirectUri: String!): String! + getTokenForUser(userId: Int!): String! + importProposal(abstract: String!, callId: Int!, created: DateTime, instrumentId: Int, proposerId: Int, referenceNumber: Int!, submittedDate: DateTime!, submitterId: Int!, techniqueIds: [Int!], title: String!, users: [Int!]): Proposal! + importTemplate(conflictResolutions: [ConflictResolution!]!, subTemplatesConflictResolutions: [[ConflictResolution!]!]!, templateAsJson: String!): Template! + importUnits(conflictResolutions: [ConflictResolution!]!, json: String!): [Unit!]! + logout(token: String!): String! + mergeInstitutions(institutionIdFrom: Int!, institutionIdInto: Int!, newTitle: String!): Institution! + notifyProposal(ignoreNotifiedFlag: Boolean!, proposalPk: Int!): Proposal! + prepareDB(includeSeeds: Boolean): [String!]! + removeAssignedInstrumentFromCall(removeAssignedInstrumentFromCallInput: RemoveAssignedInstrumentFromCallInput!): Call! + removeCallFromTag(callId: Int!, tagId: Int!): Boolean! + removeInstrumentFromTag(instrumentId: Int!, tagId: Int!): Boolean! + removeInstrumentsFromTechnique(instrumentIds: [Int!]!, techniqueId: Int!): Boolean! + removeMemberFromFap(fapId: Int!, memberId: Int!, roleId: UserRole!): Fap! + removeMemberFromFapProposal(fapId: Int!, memberId: Int!, proposalPk: Int!): Fap! + removeProposalsFromFaps(fapIds: [Int!]!, proposalPks: [Int!]!): [FapProposal!]! + removeProposalsFromInstrument(proposalPks: [Int!]!): Boolean! + removeSampleFromExperiment(experimentPk: Int!, sampleId: Int!): ExperimentHasSample! + removeScientistFromInstrument(instrumentId: Int!, scientistId: Int!): Boolean! + removeScientistFromTechnique(scientistId: Int!, techniqueId: Int!): Boolean! + removeUserForReview(fapId: Int!, reviewId: Int!): Review! + reorderFapMeetingDecisionProposals(reorderFapMeetingDecisionProposalsInput: ReorderFapMeetingDecisionProposalsInput!): FapMeetingDecision! + replayStatusActionsLog(statusActionsLogId: Int!): Boolean! + replayStatusActionsLogs(statusActionsLogIds: [Int!]!): ReplayStatusActionsLogsResult! + requestFeedback(experimentPk: Int!): FeedbackRequest! + requestVisitRegistrationChanges(visitRegistration: RequestVisitRegistrationChangesInput!): VisitRegistration! + reviewExperimentSafety(experimentSafetyPk: Int!, isSubmitted: Boolean): ExperimentSafety! + saveFapMeetingDecision(saveFapMeetingDecisionInput: SaveFapMeetingDecisionInput!): FapMeetingDecision! + saveReviewerRank(fapReviewId: Int!, rank: Int!, reviewerId: Int!): Boolean! + selectRole(selectedRoleId: Int, token: String!): String! + setActiveTemplate(templateGroupId: TemplateGroupId!, templateId: Int!): Boolean! + setCoProposerInvites(input: SetCoProposerInvitesInput!): [Invite!]! + setInstrumentAvailabilityTime(availabilityTime: Int!, callId: Int!, instrumentId: Int!): Boolean! + setPageContent(id: PageName!, text: String!): Page! + setStatusActionsOnConnection(input: SetStatusActionsOnConnectionInput!): [ConnectionStatusAction!] + setStatusChangingEventsOnConnection(setStatusChangingEventsOnConnectionInput: SetStatusChangingEventsOnConnectionInput!): [StatusChangingEvent!]! + setUserNotPlaceholder(id: Int!): User! + submitExperimentSafety(experimentSafetyPk: Int!, isSubmitted: Boolean): ExperimentSafety! + submitExperimentSafetyReviewerExperimentSafetyReview(comment: String, decision: ExperimentSafetyReviewerDecisionEnum, experimentSafetyPk: Int!): ExperimentSafety! + submitFapMeetingDecisions(SubmitFapMeetingDecisionsInput: SubmitFapMeetingDecisionsInput!): [FapProposal!]! + submitInstrumentInFap(callId: Int!, fapId: Int!, instrumentId: Int!): Boolean! + submitInstrumentScientistExperimentSafetyReview(comment: String, decision: InstrumentScientistDecisionEnum, experimentSafetyPk: Int!): ExperimentSafety! + submitProposal(proposalPk: Int!): Proposal! + submitProposalsReview(submitProposalsReviewInput: SubmitProposalsReviewInput!): Boolean! + submitSampleReview(safetyComment: String, safetyStatus: SampleStatus!, sampleId: Int!): Sample! + submitShipment(shipmentId: Int!): Shipment! + submitTechnicalReviews(submitTechnicalReviewsInput: SubmitTechnicalReviewsInput!): Boolean! + submitVisitRegistration(userId: Int!, visitId: Int!): VisitRegistration! + token(token: String!): String! + unsubmitInstrumentInFap(callId: Int!, fapId: Int!, instrumentId: Int!): Boolean! + updateAnswer(answer: AnswerInput!, questionaryId: Int!): String! + updateApiAccessToken(updateApiAccessTokenInput: UpdateApiAccessTokenInput!): PermissionsWithAccessToken! + updateCall(updateCallInput: UpdateCallInput!): Call! + updateCallOrder(callOrderInput: CallOrderInput!): Boolean! + updateDataAccessUsers(proposalPk: Int!, userIds: [Int!]!): [BasicUserDetails!]! + updateEmailTemplate(updateEmailTemplateInput: UpdateEmailTemplateInput!): EmailTemplate! + updateExperimentSafetyPdfTemplate(dummyData: String, experimentSafetyPdfTemplateId: Int!, templateData: String, templateFooter: String, templateHeader: String, templateSampleDeclaration: String): ExperimentSafetyPdfTemplate! + updateExperimentSample(experimentPk: Int!, isSubmitted: Boolean, sampleId: Int!): ExperimentHasSample! + updateFap(active: Boolean!, code: String!, customGradeGuide: Boolean, description: String!, files: String, gradeGuide: String, id: Int!, numberRatingsRequired: Int! = 2, reviewVisibility: Int): Fap! + updateFapTimeAllocation(fapId: Int!, fapTimeAllocation: Int, instrumentId: Int!, proposalPk: Int!): FapProposal! + updateFapToCallInstrument(updateFapToCallInstrumentInput: UpdateFapToCallInstrumentInput!): Call! + updateFeatures(updatedFeaturesInput: UpdateFeaturesInput!): [Feature!]! + updateFeedback(feedbackId: Int!, status: FeedbackStatus): Feedback! + updateGenericTemplate(genericTemplateId: Int!, safetyComment: String, title: String): GenericTemplate! + updateInstitution(country: Int, id: Int!, name: String, rorId: String): Institution! + updateInstrument(description: String!, id: Int!, managerUserId: Int!, multipleTechReviewsEnabled: Boolean, name: String!, selectable: Boolean, shortCode: String!, updateTechReview: Boolean!): Instrument! + updateInternalReview(updateInternalReviewInput: UpdateInternalReviewInput!): InternalReview! + updatePredefinedMessage(updatePredefinedMessageInput: UpdatePredefinedMessageInput!): PredefinedMessage! + updateProposal(abstract: String!, created: DateTime, proposalPk: Int!, proposerId: Int, title: String!, users: [Int!]): Proposal! + updateProposalPdfTemplate(dummyData: String, proposalPdfTemplateId: Int!, templateData: String, templateFooter: String, templateHeader: String, templateSampleDeclaration: String): ProposalPdfTemplate! + updateProposalScientistComment(comment: String!, commentId: Int!): ProposalScientistComment! + updateQuestion(config: String, id: String!, naturalKey: String, question: String): Question! + updateQuestionTemplateRelation(config: String, questionId: String!, sortOrder: Int!, templateId: Int!, topicId: Int): Template! + updateQuestionTemplateRelationSettings(config: String, dependencies: [FieldDependencyInput!]!, dependenciesOperator: DependenciesLogicOperator, questionId: String!, templateId: Int!): Template! + updateReview(comment: String!, fapID: Int!, grade: String!, questionaryID: Int!, reviewID: Int!, status: ReviewStatus!): Review! + updateRole(args: UpdateRoleArgs!): UpdateRoleResponse! + updateRoleTags(roleId: Int!, tagIds: [Int!]!): Role! + updateSample(sampleId: Int!, title: String): Sample! + updateSettings(updatedSettingsInput: UpdateSettingsInput!): Settings! + updateShipment(externalRef: String, proposalPk: Int, shipmentId: Int!, status: ShipmentStatus, title: String): Shipment! + updateStatus(updatedStatusInput: UpdateStatusInput!): Status! + updateTag(id: Int!, name: String!, shortCode: String!): Tag! + updateTechnicalReviewAssignee(instrumentId: Int!, proposalPks: [Int!]!, userId: Int!): [TechnicalReview!]! + updateTechnique(description: String!, id: Int!, name: String!, shortCode: String!): Technique! + updateTemplate(description: String, isArchived: Boolean, name: String, templateId: Int!): Template! + updateTopic(id: Int!, isEnabled: Boolean, sortOrder: Int, templateId: Int, title: String): Template! + updateUser(email: String, firstname: String, id: Int!, institutionId: Int, lastname: String, preferredname: String, roles: [Int!], userTitle: String): User! + updateUserRoles(id: Int!, roles: [Int!]): User! + updateVisit(inviteEmails: [String!], team: [Int!], teamLeadUserId: Int, visitId: Int!): Visit! + updateVisitRegistration(endsAt: DateTime, startsAt: DateTime, userId: Int!, visitId: Int!): VisitRegistration! + updateWorkflow(updatedWorkflowInput: UpdateWorkflowInput!): Workflow! + updateWorkflowStatus(updateWorkflowStatusInput: UpdateWorkflowStatusInput!): WorkflowStatus! + upsertUserByOidcSub(email: String!, firstName: String!, institution: InstitutionInput!, lastName: String!, oidcSub: String!, preferredName: String, userTitle: String): User! + validateTemplateImport(templateAsJson: String!): TemplateValidation! + validateUnitsImport(unitsAsJson: String!): UnitsImportWithValidation! +} + +type NumberInputConfig { + numberMax: Float + numberMaxInclusive: Boolean + numberMin: Float + numberMinInclusive: Boolean + numberValueConstraint: NumberValueConstraint + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! + units: [Unit!]! +} + +enum NumberValueConstraint { + NONE + ONLY_NEGATIVE + ONLY_NEGATIVE_INTEGER + ONLY_POSITIVE + ONLY_POSITIVE_INTEGER +} + +type Page { + content: String + id: Int! +} + +enum PageName { + COOKIEPAGE + FOOTERCONTENT + GRADEGUIDEPAGE + HELPPAGE + HOMEPAGE + LOGINHELPPAGE + PRIVACYPAGE + REVIEWPAGE + TECHNIQUEPROPOSALMANAGEMENTPAGE +} + +enum PaginationSortDirection { + asc + desc +} + +type PermissionsWithAccessToken { + accessPermissions: String! + accessToken: String! + id: String! + name: String! +} + +type PredefinedMessage { + dateModified: DateTime! + id: Int! + lastModifiedBy: Int! + message: String! + modifiedBy: BasicUserDetails! + title: String! +} + +input PredefinedMessagesFilter { + key: String +} + +type Proposal { + abstract: String! + attachments: ProposalAttachments + call: Call + callId: Int! + coProposerInvites: [Invite!]! + commentForManagement: String + commentForUser: String + created: DateTime! + dataAccessUsers: [BasicUserDetails!] + experimentSequence: Int + experiments: [Experiment!] + fapMeetingDecisions(fapId: Int): [FapMeetingDecision!] + faps: [Fap!] + fileId: String + finalStatus: ProposalEndStatus + genericTemplates: [GenericTemplate!] + instruments: [InstrumentWithManagementTime] + managementDecisionSubmitted: Boolean! + notified: Boolean! + primaryKey: Int! + proposalId: String! + proposer: BasicUserDetails + proposerId: Int! + publicStatus: ProposalPublicStatus! + questionary: Questionary! + questionaryId: Int! + reviews(fapId: Int): [Review!] + samples: [Sample!] + status: Status + statusId: String! + submitted: Boolean! + submittedDate: DateTime + technicalReviews: [TechnicalReview!]! + techniques: [Technique] + title: String! + updated: DateTime! + users: [BasicUserDetails!]! + visits: [Visit!] + workflowStatusId: Int! +} + +type ProposalAttachments { + questions: [Question!] +} + +type ProposalBasisConfig { + readPermissions: [String!]! + tooltip: String! +} + +enum ProposalEndStatus { + ACCEPTED + REJECTED + RESERVED + UNSET +} + +type ProposalEsiBasisConfig { + readPermissions: [String!]! + tooltip: String! +} + +type ProposalPdfTemplate { + created: DateTime! + creatorId: Int! + dummyData: String! + proposalPdfTemplateId: Int! + templateData: String! + templateFooter: String! + templateHeader: String! + templateId: Int! + templateSampleDeclaration: String! +} + +input ProposalPdfTemplatesFilter { + creatorId: Int + dummyData: String + pdfTemplateData: String + pdfTemplateFooter: String + pdfTemplateHeader: String + pdfTemplateSampleDeclaration: String + proposalPdfTemplateIds: [Int!] + templateIds: [Int!] +} + +input ProposalPkWithRankOrder { + fapId: Int! + instrumentId: Int! + proposalPk: Int! + rankOrder: Int! +} + +input ProposalPkWithReviewId { + proposalPk: Int! + reviewId: Int! +} + +enum ProposalPublicStatus { + accepted + draft + rejected + reserved + submitted + unknown +} + +type ProposalReaderRoleConfig { + hasAdminAccess: Boolean! + hasFapAccess: Boolean! + hasLogAccess: Boolean! + hasTechnicalReviewAccess: Boolean! +} + +input ProposalReaderRoleConfigInput { + hasAdminAccess: Boolean! + hasFapAccess: Boolean! + hasLogAccess: Boolean! + hasTechnicalReviewAccess: Boolean! +} + +type ProposalScientistComment { + comment: String! + commentId: Int! + proposalPk: Int! +} + +type ProposalTemplate { + callCount: Int! + complementaryQuestions: [Question!]! + description: String + experimentSafetyPdfCallCount: Int + experimentSafetyPdfTemplate: ExperimentSafetyPdfTemplate + group: TemplateGroup! + groupId: TemplateGroupId! + isArchived: Boolean! + json: String! + name: String! + proposalESICallCount: Int + proposalPdfCallCount: Int + proposalPdfTemplate: ProposalPdfTemplate + questionaryCount: Int! + steps: [TemplateStep!]! + templateId: Int! +} + +input ProposalTemplatesFilter { + isArchived: Boolean + templateIds: [Int!] +} + +type ProposalView { + allocationTimeUnit: AllocationTimeUnits! + callId: Int! + callShortCode: String + fapInstruments: [FapInstrument!] + faps: [ProposalViewFap!] + finalStatus: ProposalEndStatus + instruments: [ProposalViewInstrument!] + notified: Boolean! + primaryKey: Int! + principalInvestigator: User + principalInvestigatorId: Int! + proposalId: String! + statusDescription: String! + statusId: String! + statusName: String! + submitted: Boolean! + submittedDate: DateTime + technicalReviews: [ProposalViewTechnicalReview!] + techniques: [ProposalViewTechnique!] + title: String! + workflowId: Int! + workflowStatusId: Int! +} + +type ProposalViewFap { + code: String! + id: Int! +} + +type ProposalViewInstrument { + id: Int! + managementTimeAllocation: Int + managerUserId: Int! + multipleTechReviewsEnabled: Boolean + name: String! +} + +type ProposalViewTechnicalReview { + id: Int! + instrumentId: Int + status: TechnicalReviewStatus + submitted: Boolean! + technicalReviewAssignee: ProposalViewTechnicalReviewAssignee + timeAllocation: Int +} + +type ProposalViewTechnicalReviewAssignee { + firstname: String! + id: Int! + lastname: String! +} + +type ProposalViewTechnique { + description: String! + id: Int! + name: String! + shortCode: String! +} + +input ProposalsFilter { + callId: Int + callIds: [Int!] + dateFilter: DateFilterInput + excludeProposalStatusIds: [String!] + instrumentFilter: InstrumentFilterInput + instrumentId: Int + proposalStatusId: String + questionFilter: QuestionFilterInput + questionaryIds: [Int!] + referenceNumbers: [String!] + reviewer: ReviewerFilter + shortCodes: [String!] + techniqueFilter: TechniqueFilterInput + templateIds: [Int!] + text: String +} + +type ProposalsQueryResult { + proposals: [Proposal!]! + totalCount: Int! +} + +type ProposalsViewQueryResult { + proposalViews: [ProposalView!]! + totalCount: Int! +} + +type ProposalsViewResult { + proposals: [ProposalView!]! + totalCount: Int! +} + +type Quantity { + id: String! +} + +type QueriesMutationsAndServices { + mutations: [QueryMutationAndServicesGroup!]! + queries: [QueryMutationAndServicesGroup!]! + services: [QueryMutationAndServicesGroup!]! +} + +type Query { + accessTokenAndPermissions(accessTokenId: String!): PermissionsWithAccessToken + activeTemplateId(templateGroupId: TemplateGroupId!): Int + allAccessTokensAndPermissions: [PermissionsWithAccessToken!] + allExperiments(filter: ExperimentsFilter, first: Int, offset: Int, searchText: String, sortDirection: PaginationSortDirection, sortField: String): ExperimentsQueryResult + allQuestions(filter: AllQuestionsFilter, first: Int, offset: Int, searchText: String, sortDirection: PaginationSortDirection, sortField: String): AllQuestionsQueryResult! + basicUserDetails(userId: Int!): BasicUserDetails + basicUserDetailsByEmail(email: String!, role: UserRole): BasicUserDetails + blankQuestionary(templateId: Int!): Questionary! + blankQuestionarySteps(templateId: Int!): [QuestionaryStep!] + blankQuestionaryStepsByCallId(callId: Int!): [QuestionaryStep!] + call(callId: Int!): Call + calls(filter: CallsFilter, sortDirection: PaginationSortDirection, sortField: String): [Call!] + callsByInstrumentScientist(scientistId: Int!): [Call!] + callsOfReviewer: [Call!] + checkEmailExist(email: String!): Boolean + checkExternalToken(token: String!): ExternalTokenResult! + checkToken(token: String!): TokenResult! + countries: [Entry!] + dataAccessUsers(proposalPk: Int!): [BasicUserDetails!]! + emailTemplate(emailTemplateId: Int!): EmailTemplate + emailTemplates(filter: EmailTemplatesFilter): EmailTemplatesQueryResult + eventLogs(changedObjectId: String!, eventType: String!): [EventLog!] + events(entityType: WorkflowType!): [WorkflowEvent!] + experiment(experimentPk: Int!): Experiment! + experimentSafety(experimentSafetyPk: Int!): ExperimentSafety + experimentSafetyPdfTemplate(experimentSafetyPdfTemplateId: Int!): ExperimentSafetyPdfTemplate + experimentSafetyPdfTemplates(filter: ExperimentSafetyPdfTemplatesFilter): [ExperimentSafetyPdfTemplate!] + experimentSample(experimentPk: Int!, sampleId: Int!): ExperimentHasSample + factoryVersion: String! + fap(id: Int!): Fap + fapMembers(fapId: Int!): [FapReviewer!] + fapProposal(fapId: Int!, proposalPk: Int!): FapProposal + fapProposals(callId: Int, fapId: Int!, instrumentId: Int, legacy: Boolean): [FapProposal!] + fapProposalsByInstrument(callId: Int!, fapId: Int!, instrumentId: Int!): [FapProposal!] + fapReviewTemplates(filter: FapReviewTemplatesFilter): [FapReviewTemplate!] + fapReviewVisibilityOptions: [ReviewVisibility!] + fapReviewers(fapId: Int!): [FapReviewer!] + faps(filter: FapsFilter): FapsQueryResult + features: [Feature!]! + feedback(feedbackId: Int!): Feedback + feedbacks(filter: FeedbacksFilter): [Feedback!]! + fileMetadata(fileId: String!): FileMetadata + filesMetadata(filter: FilesMetadataFilter!): [FileMetadata!]! + genericTemplate(genericTemplateId: Int!): GenericTemplate + genericTemplates(filter: GenericTemplatesFilter): [GenericTemplate!] + genericTemplatesOnCopy: [GenericTemplate!] + getCallByAnswerId(answerId: Int!): Call + getDynamicMultipleChoiceOptions(questionId: String!, templateId: Int): [String!] + getInstrumentsOfReviewer: [Instrument!] + institutions(filter: InstitutionsFilter): [Institution!] + instrument(instrumentId: Int!): Instrument + instrumentScientistHasAccess(instrumentId: Int!, proposalPk: Int!): Boolean + instrumentScientistHasInstrument(instrumentId: Int!): Boolean + instrumentScientistProposals(filter: ProposalsFilter, first: Int, offset: Int): ProposalsViewResult + instruments(callIds: [Int!]): InstrumentsQueryResult + instrumentsByFap(callId: Int!, fapId: Int!): [InstrumentWithAvailabilityTime!] + instrumentsByIds(instrumentIds: [Int!]!): [InstrumentWithAvailabilityTime!] + internalReview(internalReviewId: Int!): InternalReview + internalReviews(filter: InternalReviewsFilter): [InternalReview!] + isNaturalKeyPresent(naturalKey: String!): Boolean + me: User + myShipments: [Shipment!] + myVisits: [Visit!]! + pageContent(pageId: PageName!): String + predefinedMessage(predefinedMessageId: Int!): PredefinedMessage + predefinedMessages(filter: PredefinedMessagesFilter): [PredefinedMessage!]! + previousCollaborators(first: Int, offset: Int, searchText: String, sortDirection: PaginationSortDirection, sortField: String, subtractUsers: [Int], userRole: UserRole): UserQueryResult + proposal(primaryKey: Int!): Proposal + proposalById(proposalId: String!): Proposal + proposalPdfTemplate(proposalPdfTemplateId: Int!): ProposalPdfTemplate + proposalPdfTemplates(filter: ProposalPdfTemplatesFilter): [ProposalPdfTemplate!] + proposalReviews(fapId: Int, proposalPk: Int!): [Review!] + proposalScientistComment(proposalPk: Int!): ProposalScientistComment + proposalTemplates(filter: ProposalTemplatesFilter): [ProposalTemplate!] + proposalTimeRequested(instrumentId: Int!, proposalPk: Int!): Float! + proposals(filter: ProposalsFilter, first: Int, offset: Int): ProposalsQueryResult + proposalsView(filter: ProposalsFilter, first: Int, offset: Int, searchText: String, sortDirection: PaginationSortDirection, sortField: String): ProposalsViewQueryResult + quantities: [Quantity!]! + queriesMutationsAndServices: QueriesMutationsAndServices + questionByNaturalKey(naturalKey: String!): Question! + questionary(questionaryId: Int!): Questionary + questions(filter: QuestionsFilter): [QuestionWithUsage!]! + review(reviewId: Int!): Review + reviews(filter: ReviewsFilter, first: Int, offset: Int): ReviewsQueryResult + roles: [Role!] + sample(sampleId: Int!): Sample + samples(filter: SamplesFilter): [Sample!] + samplesByCallId(callId: Int!): [Sample!] + settings: [Settings!]! + shipment(shipmentId: Int!): Shipment + shipments(filter: ShipmentsFilter): [Shipment!] + status(statusId: String!): Status + statusActions: [StatusAction!] + statusActionsLogs(filter: StatusActionsLogsFilter, first: Int, offset: Int, searchText: String, sortDirection: PaginationSortDirection, sortField: String): StatusActionsLogQueryResult + statuses(entityType: WorkflowType!): [Status!]! + tag(id: Float!): Tag + tags: [Tag!]! + technicalReview(technicalReviewId: Int!): TechnicalReview + technicalReviewTemplates(filter: TechnicalReviewTemplatesFilter): [TechnicalReviewTemplate!] + technicalReviews(filter: TechnicalReviewsFilter, first: Int, offset: Int): TechnicalReviewsQueryResult + technique(techniqueId: Int!): Technique + techniqueScientistProposals(filter: ProposalsFilter, first: Int, offset: Int, searchText: String, sortDirection: PaginationSortDirection, sortField: String): ProposalsViewResult + techniques: TechniquesQueryResult + techniquesByIds(techniqueIds: [Int!]!): [Technique!] + techniquesByScientist(userNumber: Int!): [Technique!] + template(templateId: Int!): Template + templateCategories: [TemplateCategory!] + templates(filter: TemplatesFilter): [Template!] + units: [Unit!] + unitsAsJson: String + user(userId: Int!): User + userByOIDCSub(oidcSub: String!): User + userHasAccessToProposal(proposalPk: Int!): Boolean + userInstruments: InstrumentsQueryResult + users(first: Int, offset: Int, searchText: String, sortDirection: PaginationSortDirection, sortField: String, subtractUsers: [Int], userRole: UserRole): UserQueryResult + version: String! + visit(visitId: Int!): Visit + visitRegistration(userId: Int!, visitId: Int!): VisitRegistration + visits(filter: VisitsFilter): [Visit!]! + workflow(entityType: WorkflowType!, workflowId: Int!): Workflow + workflowStatus(id: Int!): WorkflowStatus + workflowStatuses(workflowId: Int!): [WorkflowStatus!]! + workflows(entityType: WorkflowType!): [Workflow!] +} + +type QueryMutationAndServicesGroup { + groupName: QueryMutationAndServicesGroups! + items: [String!]! +} + +enum QueryMutationAndServicesGroups { + CORE + SCHEDULER +} + +type Question { + categoryId: TemplateCategoryId! + config: FieldConfig! + dataType: DataType! + id: String! + naturalKey: String! + question: String! +} + +type QuestionComparison { + conflictResolutionStrategy: ConflictResolutionStrategy! + existingQuestion: Question + newQuestion: Question! + status: QuestionComparisonStatus! +} + +enum QuestionComparisonStatus { + DIFFERENT + NEW + SAME +} + +enum QuestionFilterCompareOperator { + EQUALS + EXISTS + GREATER_THAN + INCLUDES + LESS_THAN +} + +input QuestionFilterInput { + compareOperator: QuestionFilterCompareOperator! + dataType: DataType! + questionId: String! + value: String! +} + +type QuestionTemplateRelation { + config: FieldConfig! + dependencies: [FieldDependency!]! + dependenciesOperator: DependenciesLogicOperator + question: Question! + sortOrder: Int! + templateId: Int! + topicId: Int! +} + +type QuestionWithUsage { + answers: [AnswerBasic!]! + categoryId: TemplateCategoryId! + config: FieldConfig! + dataType: DataType! + id: String! + naturalKey: String! + question: String! + templates: [Template!]! +} + +type Questionary { + created: DateTime! + isCompleted: Boolean! + questionaryId: Int! + steps: [QuestionaryStep!]! + templateId: Int! +} + +type QuestionaryStep { + fields: [Answer!]! + isCompleted: Boolean! + topic: Topic! +} + +input QuestionsFilter { + category: TemplateCategoryId + dataType: [DataType!] + excludeDataType: [DataType!] + questionIds: [String!] + text: String +} + +type RabbitMQActionConfig { + exchanges: [String!] +} + +type RabbitMQActionDefaultConfig { + exchanges: [String!] +} + +input RemoveAssignedInstrumentFromCallInput { + callId: Int! + instrumentId: Int! +} + +input ReorderFapMeetingDecisionProposalsInput { + proposals: [ProposalPkWithRankOrder!]! +} + +type ReplayStatusActionsLogsResult { + failed: [ReplayStatusLogFailure!]! + successful: [Int!]! + totalRequested: Int! +} + +type ReplayStatusLogFailure { + error: String! + logId: Int! +} + +input RequestVisitRegistrationChangesInput { + userId: Int! + visitId: Int! +} + +type Review { + comment: String + dateAssigned: DateTime! + dateReassigned: DateTime + emailSent: Boolean! + fapID: Int! + grade: String + id: Int! + proposal: Proposal + questionary: Questionary! + questionaryID: Int! + rank: Int + reassigned: Boolean! + reviewer: BasicUserDetails + status: ReviewStatus! + userID: Int! +} + +enum ReviewStatus { + DRAFT + SUBMITTED +} + +type ReviewVisibility { + description: String! + reviewVisibilityId: Int! + visibility: FapReviewVisibility! +} + +enum ReviewerFilter { + ALL + ME +} + +input ReviewsFilter { + callId: Int + questionaryIds: [Int!] + reviewer: ReviewerFilter + shortCodes: [String!] + templateIds: [Int!] + text: String +} + +type ReviewsQueryResult { + reviews: [Review!]! + totalCount: Int! +} + +type RichTextInputConfig { + allowImages: Boolean! + max: Int + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! +} + +type Role { + config: RoleConfig + description: String! + id: Int! + isRootRole: Boolean! + shortCode: String! + tags: [Tag!] + title: String! +} + +union RoleConfig = ProposalReaderRoleConfig | UserRoleConfig + +input RoleConfigInput { + proposalReader: ProposalReaderRoleConfigInput + user: UserRoleConfigInput +} + +type Sample { + created: DateTime! + creatorId: Int! + id: Int! + isPostProposalSubmission: Boolean! + proposal: Proposal! + proposalPk: Int! + questionId: String! + questionary: Questionary! + questionaryId: Int! + safetyComment: String! + safetyStatus: SampleStatus! + title: String! +} + +type SampleBasisConfig { + readPermissions: [String!]! + titlePlaceholder: String! +} + +type SampleDeclarationConfig { + addEntryButtonLabel: String! + esiTemplateId: Int + maxEntries: Int + minEntries: Int + readPermissions: [String!]! + required: Boolean! + small_label: String! + templateCategory: String! + templateId: Int +} + +type SampleEsiBasisConfig { + readPermissions: [String!]! + tooltip: String! +} + +enum SampleStatus { + ELEVATED_RISK + HIGH_RISK + LOW_RISK + PENDING_EVALUATION +} + +input SamplesFilter { + creatorId: Int + proposalPk: Int + questionId: String + questionaryIds: [Int!] + sampleIds: [Int!] + status: SampleStatus + title: String + visitId: Int +} + +input SaveFapMeetingDecisionInput { + commentForManagement: String + commentForUser: String + fapId: Int! + instrumentId: Int! + proposalPk: Int! + rankOrder: Int + recommendation: ProposalEndStatus + submitted: Boolean +} + +type SelectionFromOptionsConfig { + isMultipleSelect: Boolean! + options: [String!]! + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! + variant: String! +} + +input SetCoProposerInvitesInput { + emails: [String!]! + proposalPk: Int! +} + +input SetStatusActionsOnConnectionInput { + actions: [ConnectionHasActionsInput!]! + connectionId: Int! + workflowId: Int! +} + +input SetStatusChangingEventsOnConnectionInput { + statusChangingEvents: [String!]! + workflowConnectionId: Int! +} + +type Settings { + description: String + id: SettingsId! + settingsValue: String +} + +enum SettingsId { + DATE_FORMAT + DATE_TIME_FORMAT + DEFAULT_INST_SCI_REVIEWER_FILTER + DEFAULT_INST_SCI_STATUS_FILTER + DISPLAY_FAQ_LINK + DISPLAY_PRIVACY_STATEMENT_LINK + EXPERIMENT_SAFETY_REVIEW_EMAIL + EXTERNAL_AUTH_HOMEPAGE_URL + EXTERNAL_AUTH_LOGIN_URL + EXTERNAL_AUTH_LOGOUT_URL + FAP_SECS_EDIT_TECH_REVIEWS + FEEDBACK_EXHAUST_DAYS + FEEDBACK_FREQUENCY_DAYS + FEEDBACK_MAX_REQUESTS + HEADER_LOGO_FILENAME + IDLE_TIMEOUT + INVITE_REMINDERS_SEND_DELAY_DAYS + INVITE_VALIDITY_PERIOD_DAYS + ORGANISATION_NAME + PALETTE_ERROR_MAIN + PALETTE_INFO_MAIN + PALETTE_PRIMARY_ACCENT + PALETTE_PRIMARY_CONTRAST + PALETTE_PRIMARY_DARK + PALETTE_PRIMARY_LIGHT + PALETTE_PRIMARY_MAIN + PALETTE_SECONDARY_CONTRAST + PALETTE_SECONDARY_DARK + PALETTE_SECONDARY_LIGHT + PALETTE_SECONDARY_MAIN + PALETTE_SUCCESS_MAIN + PALETTE_WARNING_MAIN + PROFILE_PAGE_LINK + SMTP_BCC_EMAIL + TECH_REVIEW_OPTIONAL_WORKFLOW_STATUS + TIMEZONE + USER_OFFICE_EMAIL +} + +type Shipment { + created: DateTime! + creatorId: Int! + experimentPk: Int + externalRef: String + id: Int! + proposal: Proposal! + proposalPk: Int! + questionary: Questionary! + questionaryId: Int! + samples: [Sample!]! + status: ShipmentStatus! + title: String! +} + +type ShipmentBasisConfig { + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! +} + +enum ShipmentStatus { + DRAFT + SUBMITTED +} + +input ShipmentsFilter { + creatorId: Int + experimentPk: Int + externalRef: String + proposalPk: Int + questionaryIds: [Int!] + shipmentIds: [Int!] + status: ShipmentStatus + title: String +} + +type Status { + description: String! + entityType: WorkflowType! + id: String! + isDefault: Boolean! + name: String! +} + +type StatusAction { + defaultConfig: StatusActionDefaultConfig + description: String! + id: Int! + name: String! + type: StatusActionType! +} + +union StatusActionConfig = EmailActionConfig | RabbitMQActionConfig + +union StatusActionDefaultConfig = EmailActionDefaultConfig | RabbitMQActionDefaultConfig + +enum StatusActionType { + EMAIL + PROPOSALDOWNLOAD + RABBITMQ +} + +type StatusActionsLog { + connectionStatusAction: ConnectionStatusAction + emailStatusActionRecipient: EmailStatusActionRecipients + proposals: [Proposal!]! + statusActionsLogId: Int! + statusActionsMessage: String! + statusActionsSuccessful: Boolean! + statusActionsTstamp: DateTime! +} + +type StatusActionsLogQueryResult { + statusActionsLogs: [StatusActionsLog!]! + totalCount: Int! +} + +input StatusActionsLogsFilter { + callIds: [Int!] + connectionIds: [Int!] + emailStatusActionRecipient: [EmailStatusActionRecipients!] + statusActionIds: [Int!] + statusActionType: StatusActionType + statusActionsLogIds: [Int!] + statusActionsMessage: String + statusActionsSuccessful: Boolean +} + +type StatusChangingEvent { + statusChangingEvent: String! + workflowConnectionId: Int! +} + +type SubTemplateConfig { + addEntryButtonLabel: String! + canCopy: Boolean! + copyButtonLabel: String + isCompleteOnCopy: Boolean + isMultipleCopySelect: Boolean + maxEntries: Int + minEntries: Int + readPermissions: [String!]! + required: Boolean! + small_label: String! + templateCategory: String! + templateId: Int +} + +input SubmitFapMeetingDecisionsInput { + callId: Int! + fapId: Int! +} + +input SubmitProposalsReviewInput { + proposals: [ProposalPkWithReviewId!]! +} + +input SubmitTechnicalReviewInput { + comment: String + files: String + instrumentId: Int! + proposalPk: Int! + publicComment: String + questionaryId: Int + reviewerId: Int! + status: TechnicalReviewStatus + submitted: Boolean! + timeAllocation: Int +} + +input SubmitTechnicalReviewsInput { + technicalReviews: [SubmitTechnicalReviewInput!]! +} + +type Tag { + calls: [Call!]! + id: Int! + instruments: [Instrument!]! + name: String! + shortCode: String! +} + +type TechnicalReview { + comment: String + files: String + id: Int! + instrumentId: Int! + proposal: Proposal + proposalPk: Int! + publicComment: String + questionary: Questionary! + questionaryId: Int! + reviewer: BasicUserDetails + reviewerId: Int! + status: TechnicalReviewStatus + submitted: Boolean! + technicalReviewAssignee: BasicUserDetails + technicalReviewAssigneeId: Int + timeAllocation: Int +} + +type TechnicalReviewBasisConfig { + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! +} + +enum TechnicalReviewStatus { + FEASIBLE + PARTIALLY_FEASIBLE + UNFEASIBLE +} + +type TechnicalReviewTemplate { + callCount: Int! + complementaryQuestions: [Question!]! + description: String + experimentSafetyPdfCallCount: Int + experimentSafetyPdfTemplate: ExperimentSafetyPdfTemplate + group: TemplateGroup! + groupId: TemplateGroupId! + isArchived: Boolean! + json: String! + name: String! + proposalESICallCount: Int + proposalPdfCallCount: Int + proposalPdfTemplate: ProposalPdfTemplate + questionaryCount: Int! + steps: [TemplateStep!]! + templateId: Int! +} + +input TechnicalReviewTemplatesFilter { + isArchived: Boolean + templateIds: [Int!] +} + +input TechnicalReviewsFilter { + callId: Int + questionaryIds: [Int!] + reviewer: ReviewerFilter + shortCodes: [String!] + templateIds: [Int!] + text: String +} + +type TechnicalReviewsQueryResult { + technicalReviews: [TechnicalReview!]! + totalCount: Int! +} + +type Technique { + description: String! + id: Int! + instruments: [Instrument!]! + name: String! + scientists: [BasicUserDetails!]! + shortCode: String! +} + +input TechniqueFilterInput { + showAllProposals: Boolean! + showMultiTechniqueProposals: Boolean! + techniqueId: Int +} + +type TechniqueOption { + id: Float! + name: String! +} + +type TechniquePickerConfig { + isMultipleSelect: Boolean! + readPermissions: [String!]! + required: Boolean! + small_label: String! + techniques: [TechniqueOption!]! + tooltip: String! + variant: String! +} + +type TechniquesQueryResult { + techniques: [Technique!]! + totalCount: Int! +} + +type Template { + complementaryQuestions: [Question!]! + description: String + experimentSafetyPdfCallCount: Int + experimentSafetyPdfTemplate: ExperimentSafetyPdfTemplate + group: TemplateGroup! + groupId: TemplateGroupId! + isArchived: Boolean! + json: String! + name: String! + proposalESICallCount: Int + proposalPdfCallCount: Int + proposalPdfTemplate: ProposalPdfTemplate + questionaryCount: Int! + steps: [TemplateStep!]! + templateId: Int! +} + +type TemplateCategory { + categoryId: TemplateCategoryId! + name: String! +} + +enum TemplateCategoryId { + EXPERIMENT_SAFETY_PDF + EXPERIMENT_SAFETY_REVIEW + FAP_REVIEW + FEEDBACK + GENERIC_TEMPLATE + PROPOSAL_PDF + PROPOSAL_QUESTIONARY + SAMPLE_DECLARATION + SHIPMENT_DECLARATION + TECHNICAL_REVIEW + VISIT_REGISTRATION +} + +type TemplateGroup { + categoryId: TemplateCategoryId! + groupId: TemplateGroupId! +} + +enum TemplateGroupId { + EXPERIMENT_SAFETY_PDF + EXPERIMENT_SAFETY_REVIEW + FAP_REVIEW + FEEDBACK + GENERIC_TEMPLATE + PROPOSAL + PROPOSAL_ESI + PROPOSAL_PDF + SAMPLE + SAMPLE_ESI + SHIPMENT + TECHNICAL_REVIEW + VISIT_REGISTRATION +} + +type TemplateStep { + fields: [QuestionTemplateRelation!]! + topic: Topic! +} + +type TemplateValidation { + exportDate: DateTime! + json: String! + validationData: TemplateValidationData! + version: String! +} + +type TemplateValidationData { + errors: [String!]! + isValid: Boolean! + questionComparisons: [QuestionComparison!]! + subTemplateValidationData: [TemplateValidationData!]! +} + +input TemplatesFilter { + group: TemplateGroupId + isArchived: Boolean + templateIds: [Int!] +} + +type TextInputConfig { + htmlQuestion: String + isCounterHidden: Boolean! + isHtmlQuestion: Boolean! + max: Int + min: Int + multiline: Boolean! + placeholder: String! + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! +} + +input TimeSpan { + from: DateTime + to: DateTime +} + +union TokenPayloadUnion = AuthJwtApiTokenPayload | AuthJwtPayload + +type TokenResult { + isValid: Boolean! + payload: TokenPayloadUnion +} + +type Topic { + id: Int! + isEnabled: Boolean! + sortOrder: Int! + templateId: Int! + title: String! +} + +type Unit { + id: String! + quantity: String! + siConversionFormula: String! + symbol: String! + unit: String! +} + +type UnitComparison { + conflictResolutionStrategy: ConflictResolutionStrategy! + existingUnit: Unit + newUnit: Unit! + status: QuestionComparisonStatus! +} + +type UnitsImportWithValidation { + errors: [String!]! + exportDate: DateTime! + isValid: Boolean! + json: String! + unitComparisons: [UnitComparison!]! + version: String! +} + +input UpdateApiAccessTokenInput { + accessPermissions: String! + accessTokenId: String! + name: String! +} + +input UpdateCallInput { + allocationTimeUnit: AllocationTimeUnits + callEnded: Boolean + callEndedInternal: Boolean + callFapReviewEnded: Boolean + callReviewEnded: Boolean + cycleComment: String + description: String + endCall: DateTime + endCallInternal: DateTime + endCycle: DateTime + endFapReview: DateTime + endNotify: DateTime + endReview: DateTime + esiTemplateId: Int + experimentSafetyPdfTemplateId: Int + experimentWorkflowId: Int + fapReviewTemplateId: Int + faps: [Int!] + id: Int! + isActive: Boolean + proposalPdfTemplateId: Int + proposalSequence: Int + proposalWorkflowId: Int + referenceNumberFormat: String + shortCode: String + sort_order: Int + startCall: DateTime + startCycle: DateTime + startFapReview: DateTime + startNotify: DateTime + startReview: DateTime + submissionMessage: String + technicalReviewTemplateId: Int + templateId: Int + title: String +} + +input UpdateEmailTemplateInput { + body: String + description: String! + id: Int! + name: String! + subject: String + useTemplateFile: Boolean! +} + +input UpdateFapToCallInstrumentInput { + callId: Int! + fapId: Int + instrumentId: Int! +} + +input UpdateFeaturesInput { + action: FeatureUpdateAction! + featureIds: [FeatureId!]! +} + +input UpdateInternalReviewInput { + comment: String + files: String + id: Int! + reviewerId: Int + technicalReviewId: Int! + title: String! +} + +input UpdatePredefinedMessageInput { + id: Int! + key: String! + message: String! + title: String! +} + +input UpdateRoleArgs { + config: RoleConfigInput + description: String! + roleID: Int! + shortCode: String! + title: String! +} + +type UpdateRoleResponse { + role: Role + success: Boolean! +} + +input UpdateSettingsInput { + description: String + settingsId: SettingsId! + settingsValue: String +} + +input UpdateStatusInput { + description: String + id: String! + name: String +} + +input UpdateWorkflowInput { + connectionLineType: String + description: String + id: Int! + name: String +} + +input UpdateWorkflowStatusInput { + posX: Int + posY: Int + workflowStatusId: Int! +} + +type User { + coProposerInvites: [Invite!]! + created: String! + email: String! + experiments(filter: UserExperimentsFilter): [Experiment!]! + faps: [Fap!]! + firstname: String! + id: Int! + institution: Institution! + institutionId: Int! + instruments: [Instrument!]! + lastname: String! + oauthRefreshToken: String + oidcSub: String + preferredname: String + proposals(filter: UserProposalsFilter): [Proposal!]! + reviews(active: Boolean, callId: Int, instrumentId: Int, reviewer: ReviewerFilter, status: ReviewStatus): [Review!]! + roles: [Role!]! + updated: String! + userTitle: String! +} + +input UserExperimentsFilter { + endsAfter: DateTime + instrumentId: Int + status: [ExperimentStatus!] +} + +type UserJWT { + created: String! + email: String! + firstname: String! + id: Int! + institutionId: Float! + lastname: String! + oidcSub: String + preferredname: String +} + +input UserProposalsFilter { + finalStatus: ProposalEndStatus + instrumentId: Int + managementDecisionSubmitted: Boolean +} + +type UserQueryResult { + totalCount: Int! + users: [BasicUserDetails!]! +} + +enum UserRole { + EXPERIMENT_SAFETY_REVIEWER + FAP_CHAIR + FAP_REVIEWER + FAP_SECRETARY + INSTRUMENT_SCIENTIST + INTERNAL_REVIEWER + PROPOSAL_READER + USER + USER_OFFICER +} + +type UserRoleConfig { + note: String! +} + +input UserRoleConfigInput { + note: String! +} + +type Visit { + creatorId: Int! + experimentPk: Int! + id: Int! + proposal: Proposal! + proposalPk: Int! + registrationInvites: [Invite!]! + registrations: [VisitRegistration!]! + samples: [Sample!]! + teamLead: BasicUserDetails! + teamLeadUserId: Int! +} + +type VisitBasisConfig { + readPermissions: [String!]! + required: Boolean! + small_label: String! + tooltip: String! +} + +type VisitRegistration { + endsAt: DateTime + id: String! + questionary: Questionary! + registrationQuestionaryId: Int + startsAt: DateTime + status: VisitRegistrationStatus! + user: BasicUserDetails + userId: Int! + visitId: Int! +} + +enum VisitRegistrationStatus { + APPROVED + CANCELLED_BY_FACILITY + CANCELLED_BY_USER + CHANGE_REQUESTED + DRAFTED + SUBMITTED +} + +input VisitsFilter { + creatorId: Int + experimentPk: Int + proposalPk: Int +} + +type Workflow { + connectionLineType: String! + connections: [WorkflowConnection!]! + description: String! + entityType: WorkflowType! + id: Int! + name: String! + statuses: [WorkflowStatus!]! +} + +type WorkflowConnection { + id: Int! + nextStatus: WorkflowStatus! + nextWorkflowStatusId: Int! + prevStatus: WorkflowStatus! + prevWorkflowStatusId: Int! + sourceHandle: String! + statusActions: [ConnectionStatusAction!] + statusChangingEvents: [StatusChangingEvent!] + targetHandle: String! + workflowId: Int! +} + +type WorkflowEvent { + description: String + name: Event! +} + +type WorkflowStatus { + posX: Int! + posY: Int! + status: Status! + statusId: String! + workflowId: Int! + workflowStatusId: Int! +} + +enum WorkflowType { + EXPERIMENT + PROPOSAL +} \ No newline at end of file diff --git a/apps/backend/src/utils/buildFederatedSchema.ts b/apps/backend/src/utils/buildFederatedSchema.ts index a16402dfb9..a32d58fd6f 100644 --- a/apps/backend/src/utils/buildFederatedSchema.ts +++ b/apps/backend/src/utils/buildFederatedSchema.ts @@ -10,6 +10,7 @@ import { } from 'type-graphql'; import { customAuthChecker } from './custom-auth-checker'; +import { isDevelopment } from './helperFunctions'; export async function buildFederatedSchema( options: Omit, @@ -20,6 +21,7 @@ export async function buildFederatedSchema( skipCheck: true, authChecker: customAuthChecker, authMode: 'null', + emitSchemaFile: isDevelopment, }); const federatedSchema = buildSubgraphSchema({