diff --git a/client/package.json b/client/package.json index 8491a3a99..99c75d1d8 100644 --- a/client/package.json +++ b/client/package.json @@ -35,8 +35,8 @@ "@apollo/client": "^3.7.17", "@ngneat/until-destroy": "^9.1.2", "@ngrx/component": "^16.1.0", - "@ngx-formly/core": "^6.1.8", - "@ngx-formly/ng-zorro-antd": "^6.1.8", + "@ngx-formly/core": "^6.2.2", + "@ngx-formly/ng-zorro-antd": "^6.2.2", "apollo-angular": "^5.0.0", "ng-zorro-antd": "^16.1.0", "ngx-cookie-service": "^16.0.0", @@ -79,4 +79,4 @@ "error-stack-parser": "2.0.6" } } -} +} \ No newline at end of file diff --git a/client/src/app/components/activities/activity-card/activity-card.component.html b/client/src/app/components/activities/activity-card/activity-card.component.html new file mode 100644 index 000000000..8f50b17a8 --- /dev/null +++ b/client/src/app/components/activities/activity-card/activity-card.component.html @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/client/src/app/forms/types/checkbox/checkbox.type.less b/client/src/app/components/activities/activity-card/activity-card.component.less similarity index 100% rename from client/src/app/forms/types/checkbox/checkbox.type.less rename to client/src/app/components/activities/activity-card/activity-card.component.less diff --git a/client/src/app/components/activities/activity-card/activity-card.component.ts b/client/src/app/components/activities/activity-card/activity-card.component.ts new file mode 100644 index 000000000..e9b0bff65 --- /dev/null +++ b/client/src/app/components/activities/activity-card/activity-card.component.ts @@ -0,0 +1,27 @@ +import { Component, Input, OnDestroy } from "@angular/core"; +import { OnInit } from "@angular/core"; +import { ActivityCardFragment, ActivityCardGQL, Maybe } from "@app/generated/civic.apollo"; +import { Observable, pluck } from "rxjs"; + + +@Component({ + selector: 'cvc-activity-card', + templateUrl: './activity-card.component.html', + styleUrls: ['./activity-card.component.less'], + }) +export class CvcActivityCardComponent implements OnInit { + @Input() activityId!: number + + activity$?: Observable> + + constructor(private gql: ActivityCardGQL) {} + + ngOnInit() { + if (this.activityId == undefined) { + throw new Error('cvc-activity-card requires valid activityId input.') + } + this.activity$ = this.gql + .watch({ activityId: this.activityId }) + .valueChanges.pipe(pluck('data', 'activity')) + } +} \ No newline at end of file diff --git a/client/src/app/components/activities/activity-card/activity-card.gql b/client/src/app/components/activities/activity-card/activity-card.gql new file mode 100644 index 000000000..5cfdeed88 --- /dev/null +++ b/client/src/app/components/activities/activity-card/activity-card.gql @@ -0,0 +1,15 @@ +query ActivityCard($activityId: Int!) { + activity(id: $activityId) { + ...ActivityCard + } +} + +fragment ActivityCard on ActivityInterface { + id + verbiage + #... on FlagEntityActivity { + #comment { + #...commentListNode + #} + #} +} diff --git a/client/src/app/components/activities/activity-card/activity-card.module.ts b/client/src/app/components/activities/activity-card/activity-card.module.ts new file mode 100644 index 000000000..d4d5e1daa --- /dev/null +++ b/client/src/app/components/activities/activity-card/activity-card.module.ts @@ -0,0 +1,20 @@ +import { CommonModule } from "@angular/common"; +import { NgModule } from "@angular/core"; +import { PushModule } from "@ngrx/component"; +import { NzCardModule } from "ng-zorro-antd/card"; +import { CvcActivityCardComponent } from "./activity-card.component"; +import { CvcCommentBodyModule } from "@app/components/comments/comment-body/comment-body.module"; +import { NzDividerModule } from "ng-zorro-antd/divider"; + +@NgModule({ + declarations: [CvcActivityCardComponent], + imports: [ + CommonModule, + PushModule, + NzCardModule, + NzDividerModule, + CvcCommentBodyModule + ], + exports: [CvcActivityCardComponent], +}) +export class CvcActivityCardModule {} \ No newline at end of file diff --git a/client/src/app/components/activities/activity-feed/activity-feed.component.html b/client/src/app/components/activities/activity-feed/activity-feed.component.html new file mode 100644 index 000000000..cb9d132ba --- /dev/null +++ b/client/src/app/components/activities/activity-feed/activity-feed.component.html @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + {{ activity.verbiage }} + + + + + + + + + + {{ activity.subject.name }} + + ยท + + {{ activity.createdAt | timeAgo }} + + + + + + + + + + + + diff --git a/client/src/app/components/activities/activity-feed/activity-feed.component.less b/client/src/app/components/activities/activity-feed/activity-feed.component.less new file mode 100644 index 000000000..0ef5aa348 --- /dev/null +++ b/client/src/app/components/activities/activity-feed/activity-feed.component.less @@ -0,0 +1,25 @@ +:host { + display: block; +} + +.timeline { + // timeline's base styles pull it up and left of its container, + // this padding adds them back b/c in the event feed card it looks to cramped + padding-top: 6px; + padding-left: 6px; +} + +#event-filters { + // all form items get a right margin which creates an unsightly gap on the right :( + // so we remove that here + nz-form-item:last-child { + margin-right: 0; + } + // need to specify selector widths or else item names clipped + #participant-filter { + width: 200px; + } + #organization-filter { + width: 250px; + } +} diff --git a/client/src/app/components/activities/activity-feed/activity-feed.component.ts b/client/src/app/components/activities/activity-feed/activity-feed.component.ts new file mode 100644 index 000000000..95dedff74 --- /dev/null +++ b/client/src/app/components/activities/activity-feed/activity-feed.component.ts @@ -0,0 +1,219 @@ +import { Component, Input, OnDestroy, OnInit } from '@angular/core' +import { + ActivityFeedGQL, + ActivityFeedNodeFragment, + ActivityFeedQuery, + ActivityFeedQueryVariables, + EventAction, + Maybe, + NotificationOrganizationFragment, + NotificationOriginatingUsersFragment, + PageInfo, + SubscribableQueryInput, +} from '@app/generated/civic.apollo' +import { QueryRef } from 'apollo-angular' +import { ApolloQueryResult } from '@apollo/client/core' +import { Observable, Subject } from 'rxjs' +import { + distinctUntilChanged, + filter, + map, + pluck, + startWith, + take, + takeUntil, +} from 'rxjs/operators' +import { TagLinkableOrganization } from '@app/components/organizations/organization-tag/organization-tag.component' +import { TagLinkableUser } from '@app/components/users/user-tag/user-tag.component' +import { environment } from 'environments/environment' +import { isNonNulled } from 'rxjs-etc' +import { tag } from 'rxjs-spy/cjs/operators' +import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy' + +// interface SelectableAction { +// id: EventAction +// } + +// export type EventDisplayOption = +// | 'hideSubject' +// | 'hideUser' +// | 'hideOrg' +// | 'displayAll' + +@UntilDestroy() +@Component({ + selector: 'cvc-activity-feed', + templateUrl: './activity-feed.component.html', + styleUrls: ['./activity-feed.component.less'], +}) +export class CvcActivityFeedComponent implements OnInit, OnDestroy { + // @Input() subscribable?: SubscribableQueryInput + // @Input() subscribableName?: string + // @Input() organizationId: Maybe + @Input() userId: Maybe + // @Input() tagDisplay: EventDisplayOption = 'displayAll' + // @Input() mode: EventFeedMode = EventFeedMode.Subject + // @Input() showFilters: boolean = true + @Input() pageSize = 15 + // @Input() pollForNewEvents: boolean = true + // @Input() includeAutomatedEvents: boolean = true + + private queryRef!: QueryRef + private results$!: Observable> + + private initialQueryVars?: ActivityFeedQueryVariables + + activities$?: Observable[]> + pageInfo$?: Observable + //participants$?: Observable> + //organizations$?: Observable> + //actions$?: Observable + //unfilteredCount$?: Observable + loading$?: Observable + + //newEventCount$?: Observable + //originalEventCount?: number + destroy$ = new Subject() + + showChildren: boolean = false + + constructor( + private gql: ActivityFeedGQL, + //private eventCountGql: ActivityFeedCountGQL + ) {} + + ngOnInit() { + this.initialQueryVars = { + //subject: this.subscribable, + //organizationId: this.organizationId, + userId: this.userId, + first: this.pageSize, + //mode: this.mode, + //showFilters: this.showFilters, + //includeAutomatedEvents: this.includeAutomatedEvents, + } + + this.queryRef = this.gql.watch(this.initialQueryVars) + + //if (this.pollForNewEvents && environment.production) { + // this.newEventCount$ = this.eventCountGql + // .watch(this.initialQueryVars, { fetchPolicy: 'no-cache', pollInterval: 30000 }) + // .valueChanges + // .pipe( + // filter(isNonNulled), + // map(({ data }) => data?.events?.unfilteredCount), + // takeUntil(this.destroy$) + // ) + //} + + this.results$ = this.queryRef.valueChanges + // .pipe(tag('event-feed results$')) + + this.pageInfo$ = this.results$.pipe(map(({ data }) => data.activities.pageInfo)) + + this.activities$ = this.results$ + .pipe(pluck('data', 'activities', 'edges'), + filter(isNonNulled), + map((edges) => edges.map( e => e.node)), + ) + + this.loading$ = this.results$.pipe( + map(({ loading }) => loading), + distinctUntilChanged() + ) + + //this.unfilteredCount$ = this.results$.pipe( + // map((r) => r.data), + // filter(isNonNulled), + // map(({ events }) => events.unfilteredCount) + //) + + // this.unfilteredCount$ + // .pipe( + // take(1), + // untilDestroyed(this)) + // .subscribe(value => this.originalEventCount = value) + + // if (this.showFilters) { + // this.participants$ = this.results$.pipe( + // filter(isNonNulled), + // map(({ data }) => data.events.uniqueParticipants) + // ) + + // this.organizations$ = this.results$.pipe( + // filter(isNonNulled), + // map(({ data }) => data.events.participatingOrganizations) + // ) + + // this.actions$ = this.results$.pipe( + // filter(isNonNulled), + // map(({ data }) => data.events?.eventTypes?.map((et) => { return { id: et } }) || []) + // ) + // } + } + + fetchMore(endCursor: string) { + this.queryRef.fetchMore({ + variables: { + first: this.pageSize, + after: endCursor, + }, + }) + } + + //onOrganizationSelected(s: Maybe) { + // this.queryRef.refetch({ + // organizationId: s?.id, + // showFilters: this.showFilters, + // }) + //} + + //onActionSelected(a: Maybe) { + // this.queryRef.refetch({ + // eventType: a ? a.id : undefined, + // showFilters: this.showFilters, + // }) + //} + + onUserSelected(s: Maybe) { + this.queryRef.refetch({ + userId: s?.id, + //showFilters: this.showFilters, + }) + } + + //refresh() { + // this.queryRef.refetch().then(({ data }) => { + // this.originalEventCount = data.events.unfilteredCount + // }) + //} + + // onShowChildrenToggle() { + // let newSubscribable: Maybe + // if (this.subscribable) { + // newSubscribable = { + // id: this.subscribable.id, + // entityType: this.subscribable.entityType, + // includeChildren: this.showChildren, + // } + // if (this.showChildren) { + // this.tagDisplay = 'displayAll' + // } else { + // this.tagDisplay = 'hideSubject' + // } + // } else { + // newSubscribable = undefined + // } + + // this.queryRef.refetch({ + // ...this.initialQueryVars, + // subject: newSubscribable, + // showFilters: this.showFilters, + // }) + // } + + ngOnDestroy(): void { + this.destroy$.next() + this.destroy$.unsubscribe() + } +} diff --git a/client/src/app/components/activities/activity-feed/activity-feed.gql b/client/src/app/components/activities/activity-feed/activity-feed.gql new file mode 100644 index 000000000..7de04098f --- /dev/null +++ b/client/src/app/components/activities/activity-feed/activity-feed.gql @@ -0,0 +1,133 @@ +# query ActivityFeedCount( +# #$subject: SubscribableQueryInput +# $first: Int +# $last: Int +# $before: String +# $after: String +# $userId: Int +# #$organizationId: Int +# #$eventType: EventAction +# #$includeAutomatedEvents: Boolean +# #$mode: EventFeedMode +# ) { +# activities( +# #subject: $subject +# first: $first +# last: $last +# before: $before +# after: $after +# userId: $userId +# #organizationId: $organizationId +# #eventType: $eventType +# #mode: $mode +# #includeAutomatedEvents: $includeAutomatedEvents +# ) { +# unfilteredCount +# } +# } + +query ActivityFeed( + #$subject: SubscribableQueryInput + $first: Int + $last: Int + $before: String + $after: String + $userId: Int + #$organizationId: Int + #$eventType: EventAction + #$mode: EventFeedMode + #$includeAutomatedEvents: Boolean = true + #$showFilters: Boolean! +) { + activities( + #subject: $subject + first: $first + last: $last + before: $before + after: $after + userId: $userId + #organizationId: $organizationId + #eventType: $eventType + #includeAutomatedEvents: $includeAutomatedEvents + #mode: $mode + ) { + ...activityFeed + } +} +fragment activityFeed on ActivityInterfaceConnection { + pageInfo { + startCursor + endCursor + hasNextPage + hasPreviousPage + } + #eventTypes @include(if: $showFilters) + #unfilteredCount + #uniqueParticipants @include(if: $showFilters) { + # id + # displayName + # role + # profileImagePath(size: 32) + #} + #participatingOrganizations @include(if: $showFilters) { + # id + # name + # profileImagePath(size: 32) + #} + edges { + cursor + node { + ...activityFeedNode + } + } +} + +fragment activityFeedNode on ActivityInterface { + id + verbiage + createdAt + organization { + id + name + profileImagePath(size: 32) + } + user { + id + username + displayName + role + profileImagePath(size: 32) + } + subject { + name + id + link + ... on Source { + citation + sourceType + } + ... on EvidenceItem { + status + } + ... on Assertion { + status + } + ... on Revision { + revisionSetId + } + ... on Variant { + deprecated + } + ... on MolecularProfile { + deprecated + } + __typename + } + ... on FlagEntityActivity { + flag { + id + name + link + } + } +} diff --git a/client/src/app/components/activities/activity-feed/activity-feed.module.ts b/client/src/app/components/activities/activity-feed/activity-feed.module.ts new file mode 100644 index 000000000..990dd8e92 --- /dev/null +++ b/client/src/app/components/activities/activity-feed/activity-feed.module.ts @@ -0,0 +1,76 @@ +import { NgModule } from '@angular/core' +import { CommonModule } from '@angular/common' +import { CvcActivityFeedComponent } from './activity-feed.component' +import { LetModule, PushModule } from '@ngrx/component' +import { NzCardModule } from 'ng-zorro-antd/card' +import { NzIconModule } from 'ng-zorro-antd/icon' +import { NzFormModule } from 'ng-zorro-antd/form' +import { FormsModule } from '@angular/forms' +import { NzSwitchModule } from 'ng-zorro-antd/switch' +import { NzGridModule } from 'ng-zorro-antd/grid' +import { NzSelectModule } from 'ng-zorro-antd/select' +import { CvcEventTimelineModule } from '../../events/event-timeline/event-timeline.module' +import { NzButtonModule } from 'ng-zorro-antd/button' +import { CvcPipesModule } from '@app/core/pipes/pipes.module' +import { NzSpaceModule } from 'ng-zorro-antd/space' +import { CvcParticipantListModule } from '@app/components/shared/participant-list/participant-list.module' +import { NzAvatarModule } from 'ng-zorro-antd/avatar' +import { NzEmptyModule } from 'ng-zorro-antd/empty' +import { NzSpinModule } from 'ng-zorro-antd/spin' +import { NzBadgeModule } from 'ng-zorro-antd/badge' +import { NzToolTipModule } from 'ng-zorro-antd/tooltip' +import { NzTimelineModule } from 'ng-zorro-antd/timeline' +import { CvcUserTagModule } from '@app/components/users/user-tag/user-tag.module' +import { CvcGeneTagModule } from '@app/components/genes/gene-tag/gene-tag.module' +import { CvcAssertionsTagModule } from '@app/components/assertions/assertions-tag/assertions-tag.module' +import { CvcEvidenceTagModule } from '@app/components/evidence/evidence-tag/evidence-tag.module' +import { CvcVariantTagModule } from '@app/components/variants/variant-tag/variant-tag.module' +import { CvcVariantGroupTagModule } from '@app/components/variant-groups/variant-group-tag/variant-group-tag.module' +import { CvcSourceTagModule } from '@app/components/sources/source-tag/source-tag.module' +import { CvcMolecularProfileTagModule } from '@app/components/molecular-profiles/molecular-profile-tag/molecular-profile-tag.module' +import { CvcRevisionTagModule } from '@app/components/revisions/revision-tag/revision-tag.module' +import { NzCollapseModule } from 'ng-zorro-antd/collapse' +import { CvcActivityCardModule } from '../activity-card/activity-card.module' +import { CvcCollapsibleCardModule } from '../collapsible-card/collapsible-card.module' + +@NgModule({ + declarations: [CvcActivityFeedComponent], + imports: [ + CommonModule, + FormsModule, + LetModule, + PushModule, + NzButtonModule, + NzCardModule, + NzIconModule, + NzFormModule, + NzSelectModule, + NzSwitchModule, + NzGridModule, + NzSpaceModule, + NzEmptyModule, + NzAvatarModule, + NzSpinModule, + NzBadgeModule, + NzToolTipModule, + NzTimelineModule, + NzCollapseModule, + CvcEventTimelineModule, + CvcPipesModule, + CvcParticipantListModule, + CvcPipesModule, + CvcUserTagModule, + CvcGeneTagModule, + CvcAssertionsTagModule, + CvcEvidenceTagModule, + CvcVariantTagModule, + CvcVariantGroupTagModule, + CvcSourceTagModule, + CvcMolecularProfileTagModule, + CvcRevisionTagModule, + CvcActivityCardModule, + CvcCollapsibleCardModule + ], + exports: [CvcActivityFeedComponent], +}) +export class CvcActivityFeedModule {} diff --git a/client/src/app/components/activities/collapsible-card/collapsible-card.component.html b/client/src/app/components/activities/collapsible-card/collapsible-card.component.html new file mode 100644 index 000000000..4fcfb3e05 --- /dev/null +++ b/client/src/app/components/activities/collapsible-card/collapsible-card.component.html @@ -0,0 +1,16 @@ + + + +
+ +
+
+
+ + + + +
\ No newline at end of file diff --git a/client/src/app/components/activities/collapsible-card/collapsible-card.component.less b/client/src/app/components/activities/collapsible-card/collapsible-card.component.less new file mode 100644 index 000000000..b5ae7e31a --- /dev/null +++ b/client/src/app/components/activities/collapsible-card/collapsible-card.component.less @@ -0,0 +1,9 @@ +.animate-slide-in { + animation: fade-in 0.25s ease-out, + slide-in 0.25s ease-out; +} + +@keyframes slide-in { + from { transform: translateY(-2rem); } + to { transform: translateY(0); } +} diff --git a/client/src/app/components/activities/collapsible-card/collapsible-card.component.ts b/client/src/app/components/activities/collapsible-card/collapsible-card.component.ts new file mode 100644 index 000000000..287b76cc0 --- /dev/null +++ b/client/src/app/components/activities/collapsible-card/collapsible-card.component.ts @@ -0,0 +1,21 @@ +import { ChangeDetectionStrategy, Component, Input, TemplateRef } from "@angular/core"; +import { Observable, Subject, Subscription, pipe, scan, startWith } from "rxjs"; + + +@Component({ + selector: 'cvc-collapsible-card', + templateUrl: './collapsible-card.component.html', + styleUrls: ['./collapsible-card.component.less'], + changeDetection: ChangeDetectionStrategy.OnPush + }) +export class CvcCollapsibleCardComponent { + @Input() header?: TemplateRef + @Input() contents?: TemplateRef + + toggle$ = new Subject() + + isOpen$ = this.toggle$.pipe( + scan((state, _) => !state, false), + startWith(false) + ) +} \ No newline at end of file diff --git a/client/src/app/components/activities/collapsible-card/collapsible-card.module.ts b/client/src/app/components/activities/collapsible-card/collapsible-card.module.ts new file mode 100644 index 000000000..8014871c6 --- /dev/null +++ b/client/src/app/components/activities/collapsible-card/collapsible-card.module.ts @@ -0,0 +1,21 @@ +import { CommonModule } from "@angular/common"; +import { NgModule } from "@angular/core"; +import { LetModule, PushModule } from "@ngrx/component"; +import { NzCardModule } from "ng-zorro-antd/card"; +import { CvcCollapsibleCardComponent } from "./collapsible-card.component"; +import { NzButtonModule } from "ng-zorro-antd/button"; +import { NzIconModule } from "ng-zorro-antd/icon"; + +@NgModule({ + declarations: [CvcCollapsibleCardComponent], + imports: [ + CommonModule, + PushModule, + LetModule, + NzCardModule, + NzButtonModule, + NzIconModule + ], + exports: [CvcCollapsibleCardComponent], +}) +export class CvcCollapsibleCardModule {} \ No newline at end of file diff --git a/client/src/app/components/comments/comment-body/comment-body.component.html b/client/src/app/components/comments/comment-body/comment-body.component.html index 78b13446d..6585baab5 100644 --- a/client/src/app/components/comments/comment-body/comment-body.component.html +++ b/client/src/app/components/comments/comment-body/comment-body.component.html @@ -8,13 +8,21 @@ - + + + + + + + + + + {{ c.displayName }} + +} + +export interface CommentInterface { + createdAt: string | number, + parsedComment: CommentBodySegment[], + commenter: CommenterInterface +} @Component({ selector: 'cvc-comment-display', templateUrl: './comment-display.component.html', }) export class CvcCommentDisplayComponent implements OnInit { - @Input() comment!: Comment + @Input() comment!: CommentInterface ngOnInit() { if (this.comment === undefined) { diff --git a/client/src/app/components/comments/comment-list/comment-list.component.html b/client/src/app/components/comments/comment-list/comment-list.component.html index 46834a991..d8e3d2ebb 100644 --- a/client/src/app/components/comments/comment-list/comment-list.component.html +++ b/client/src/app/components/comments/comment-list/comment-list.component.html @@ -1,3 +1,18 @@ + + + + + + + + + + + @@ -45,70 +60,72 @@ - - - - - + + + + [nzSrc]="user.profileImagePath"> + + + + + {{ user.displayName }} - {{ user.displayName }} - - - - - - - + + + + [nzSrc]="user.profileImagePath"> + + + + + {{ user.displayName }} + + + + + + {{ role.tag.displayName }}s - {{ user.displayName }} - - - - - - {{ role.tag.displayName }}s - - - - - - {{ entity.tag.displayName }} - - + + + + + {{ entity.tag.displayName }} + + + diff --git a/client/src/app/components/comments/comment-list/comment-list.component.ts b/client/src/app/components/comments/comment-list/comment-list.component.ts index a32c455a7..aa7890fcc 100644 --- a/client/src/app/components/comments/comment-list/comment-list.component.ts +++ b/client/src/app/components/comments/comment-list/comment-list.component.ts @@ -6,12 +6,10 @@ import { CommentListQuery, CommentListQueryVariables, CommentTagSegment, - DateSort, DateSortColumns, Maybe, PageInfo, SortDirection, - TaggableEntity, UserRole, } from '@app/generated/civic.apollo' @@ -21,6 +19,7 @@ import { Observable } from 'rxjs' import { map } from 'rxjs/operators' import { pluck } from 'rxjs-etc/operators' import { TagLinkableUser } from '@app/components/users/user-tag/user-tag.component' +import { CommentInterface } from '../comment-display/comment-display.component' interface CommentTagSegmentWithId { id: string @@ -34,6 +33,7 @@ interface CommentTagSegmentWithId { }) export class CvcCommentListComponent implements OnInit { @Input() commentable!: CommentableInput + @Input() creationComment?: CommentInterface loading$?: Observable pageInfo$?: Observable diff --git a/client/src/app/components/comments/comment-list/comment-list.query.gql b/client/src/app/components/comments/comment-list/comment-list.query.gql index 04a2bb725..b923eeb4b 100644 --- a/client/src/app/components/comments/comment-list/comment-list.query.gql +++ b/client/src/app/components/comments/comment-list/comment-list.query.gql @@ -82,6 +82,11 @@ fragment commentListNode on Comment { } } parsedComment { + ...parsedCommentFragment + } +} + +fragment parsedCommentFragment on CommentBodySegment{ __typename ... on CommentTagSegment { entityId @@ -101,5 +106,4 @@ fragment commentListNode on Comment { displayName role } - } } diff --git a/client/src/app/components/flags/flag-list-and-filter/flag-list-and-filter.component.html b/client/src/app/components/flags/flag-list-and-filter/flag-list-and-filter.component.html index bc39905de..60c5c6baa 100644 --- a/client/src/app/components/flags/flag-list-and-filter/flag-list-and-filter.component.html +++ b/client/src/app/components/flags/flag-list-and-filter/flag-list-and-filter.component.html @@ -27,57 +27,59 @@ - - - {{ state.displayName }} - - - - - - - + + + + {{ state.displayName }} + + + + + [nzSrc]="user.profileImagePath"> + + + + + {{ user.username }} - {{ user.username }} - - - - - - - + + + + [nzSrc]="user.profileImagePath"> + + + + + {{ user.username }} - {{ user.username }} - - + + diff --git a/client/src/app/components/flags/flag-list-and-filter/flag-list-and-filter.gql b/client/src/app/components/flags/flag-list-and-filter/flag-list-and-filter.gql index 584ab8d71..c8184c980 100644 --- a/client/src/app/components/flags/flag-list-and-filter/flag-list-and-filter.gql +++ b/client/src/app/components/flags/flag-list-and-filter/flag-list-and-filter.gql @@ -53,65 +53,35 @@ fragment flagList on FlagConnection { fragment flag on Flag { id state - createdAt - resolvedAt flaggable { id name link } - flaggingUser { + openActivity { id - displayName - role - profileImagePath(size: 32) + createdAt + parsedNote { + ...parsedCommentFragment + } + user { + id + displayName + role + profileImagePath(size: 32) + } } - resolvingUser { + resolutionActivity { id - displayName - role - profileImagePath(size: 32) - } - openComment { - __typename - parsedComment { - __typename - ... on CommentTagSegment { - entityId - displayName - tagType - link - __typename - } - ... on CommentTextSegment { - text - } - ... on User { - id - displayName - role - } + createdAt + parsedNote { + ...parsedCommentFragment } - } - resolutionComment { - __typename - parsedComment { - __typename - ... on CommentTagSegment { - entityId - displayName - tagType - link - __typename - } - ... on CommentTextSegment { - text - } - ... on User { - id - displayName - role - } + user { + id + displayName + role + profileImagePath(size: 32) } } } diff --git a/client/src/app/components/flags/flag-list/flag-list.component.html b/client/src/app/components/flags/flag-list/flag-list.component.html index 500fe0c61..e6f6f8b0d 100644 --- a/client/src/app/components/flags/flag-list/flag-list.component.html +++ b/client/src/app/components/flags/flag-list/flag-list.component.html @@ -24,9 +24,9 @@ nzType="inner" *nzSpaceItem> @@ -39,10 +39,10 @@ - + @@ -53,9 +53,9 @@ style="text-align: right"> Resolved By - {{ flag.resolvedAt | timeAgo }} + *ngIf="flag.resolutionActivity !== undefined" + [user]="flag.resolutionActivity.user"> + {{ flag.resolutionActivity?.createdAt | timeAgo }} @@ -79,11 +79,11 @@ nzType="secondary" >Flagged By - + {{ flag.createdAt | timeAgo }}{{ flag.openActivity.createdAt | timeAgo }} - {{ f.openComment.comment }} + diff --git a/client/src/app/components/flags/flag-popover/flag-popover.module.ts b/client/src/app/components/flags/flag-popover/flag-popover.module.ts index 0cab17c06..c0804b59f 100644 --- a/client/src/app/components/flags/flag-popover/flag-popover.module.ts +++ b/client/src/app/components/flags/flag-popover/flag-popover.module.ts @@ -15,6 +15,7 @@ import { NzSpaceModule } from 'ng-zorro-antd/space' import { NzDescriptionsModule } from 'ng-zorro-antd/descriptions' import { CvcFlagPopoverComponent } from './flag-popover.component' import { CvcPipesModule } from '@app/core/pipes/pipes.module' +import { CvcCommentBodyModule } from '@app/components/comments/comment-body/comment-body.module' @NgModule({ declarations: [CvcFlagPopoverComponent], @@ -35,6 +36,7 @@ import { CvcPipesModule } from '@app/core/pipes/pipes.module' CvcVariantTagModule, CvcVariantGroupTagModule, CvcStatusTagModule, + CvcCommentBodyModule ], exports: [CvcFlagPopoverComponent], }) diff --git a/client/src/app/components/flags/flag-popover/flag-popover.query.gql b/client/src/app/components/flags/flag-popover/flag-popover.query.gql index a06018888..ddfccfdf9 100644 --- a/client/src/app/components/flags/flag-popover/flag-popover.query.gql +++ b/client/src/app/components/flags/flag-popover/flag-popover.query.gql @@ -19,7 +19,9 @@ fragment flagPopover on Flag { name } createdAt - openComment { - comment + openActivity { + parsedNote { + ...parsedCommentFragment + } } } diff --git a/client/src/app/components/layout/viewer-button/viewer-button.component.ts b/client/src/app/components/layout/viewer-button/viewer-button.component.ts index f136fc059..af20480c4 100644 --- a/client/src/app/components/layout/viewer-button/viewer-button.component.ts +++ b/client/src/app/components/layout/viewer-button/viewer-button.component.ts @@ -51,9 +51,6 @@ export class CvcViewerButtonComponent implements OnInit { ) } this.addVariantModalVisible$ = new BehaviorSubject(false) - this.addVariantModalVisible$ - .pipe(tag('addVariantModalVisible$')) - .subscribe() } ngOnInit(): void { diff --git a/client/src/app/components/molecular-profiles/molecular-profile-table/molecular-profile-table.component.html b/client/src/app/components/molecular-profiles/molecular-profile-table/molecular-profile-table.component.html index 424a6ded3..755fbe52b 100644 --- a/client/src/app/components/molecular-profiles/molecular-profile-table/molecular-profile-table.component.html +++ b/client/src/app/components/molecular-profiles/molecular-profile-table/molecular-profile-table.component.html @@ -227,7 +227,7 @@ {{ mp.molecularProfileScore | number }} diff --git a/client/src/app/components/revisions/revision-list/revision-list.component.html b/client/src/app/components/revisions/revision-list/revision-list.component.html index 56ac1bdfb..1c5370bdb 100644 --- a/client/src/app/components/revisions/revision-list/revision-list.component.html +++ b/client/src/app/components/revisions/revision-list/revision-list.component.html @@ -317,11 +317,9 @@ - + + [commentBodySegments]="revision.resolutionActivity!.parsedNote"> {{ revision.status | enumToTitle }} By - {{ revision.resolvedAt | timeAgo }} + *ngIf="revision.resolutionActivity?.user !== undefined" + [user]="revision.resolutionActivity!.user"> + {{ revision.resolutionActivity?.createdAt | timeAgo }} @@ -350,7 +348,7 @@ RID{{ revision.id }} {{ revision.linkoutData.name }} Updated - + @@ -375,13 +373,13 @@ nzSize="small" (click)="$event.stopPropagation()"> - + Submitted By - + @@ -211,6 +212,7 @@ + {{ suggestion.status | lowercase }} @@ -218,15 +220,26 @@ - + {{ suggestion.status | lowercase }} + + + + + + + @@ -236,14 +249,21 @@ + nz-popover + [nzPopoverContent]="!isScrolling ? creationCommentTemplate : ''" + [nzPopoverOverlayStyle]="{'width': '300px'}"> + + + + ([ ['Event', '#1db8a9'], ['EvidenceItem', '#2a63b6'], ['Gene', '#07aff0'], - ['Therapy', '#ac3996'], ['MolecularProfile', '#33b358'], + ['NccnGuideline', '#49566D'], ['Phenotype', '#1db8a9'], ['Source', '#f9ba45'], + ['Therapy', '#ac3996'], ['Variant', '#74d34c'], ['VariantGroup', '#74d34c'], ['VariantType', '#74d34c'], diff --git a/client/src/app/forms/components/complex-molecular-profile-deprecate/complex-molecular-profile-deprecate.form.html b/client/src/app/forms/components/complex-molecular-profile-deprecate/complex-molecular-profile-deprecate.form.html new file mode 100644 index 000000000..8adeba1a4 --- /dev/null +++ b/client/src/app/forms/components/complex-molecular-profile-deprecate/complex-molecular-profile-deprecate.form.html @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + +
    +
  • {{ error }}
  • +
+
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + +
+
diff --git a/client/src/app/forms/components/complex-molecular-profile-deprecate/complex-molecular-profile-deprecate.form.ts b/client/src/app/forms/components/complex-molecular-profile-deprecate/complex-molecular-profile-deprecate.form.ts new file mode 100644 index 000000000..e36297028 --- /dev/null +++ b/client/src/app/forms/components/complex-molecular-profile-deprecate/complex-molecular-profile-deprecate.form.ts @@ -0,0 +1,141 @@ +import { + ChangeDetectionStrategy, + Component, + Input, + OnDestroy, + OnInit, +} from '@angular/core' +import { + DeprecateComplexMolecularProfileGQL, + DeprecateComplexMolecularProfileMutation, + DeprecateComplexMolecularProfileMutationVariables, + MolecularProfileDeprecationReasonMutationInput, + Maybe, + MolecularProfileDetailGQL, + EvidenceCountsForMolecularProfileGQL, + Organization, +} from '@app/generated/civic.apollo' +import { BehaviorSubject, Observable, Subject } from 'rxjs' +import { NetworkErrorsService } from '@app/core/services/network-errors.service' +import { MutatorWithState } from '@app/core/utilities/mutation-state-wrapper' +import { ActivatedRoute } from '@angular/router' +import { map, takeUntil} from 'rxjs/operators' +import { Viewer, ViewerService } from '@app/core/services/viewer/viewer.service' +import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy' + +@UntilDestroy() +@Component({ + selector: 'cvc-complex-molecular-profile-deprecate-form', + templateUrl: './complex-molecular-profile-deprecate.form.html', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class ComplexMolecularProfileDeprecateForm implements OnDestroy, OnInit { + @Input() molecularProfileId!: number + + private destroy$ = new Subject() + + deprecateComplexMolecularProfileMutator: MutatorWithState< + DeprecateComplexMolecularProfileGQL, + DeprecateComplexMolecularProfileMutation, + DeprecateComplexMolecularProfileMutationVariables + > + + success: boolean = false + errorMessages: string[] = [] + mutationLoading$ = new BehaviorSubject(false) + + viewer$: Observable + + comment: string = '' + reason: Maybe + selectedOrg: Maybe + + hasEvidence$?: Observable + isLoading$?: Observable + + constructor( + private deprecateComplexMolecularProfileGQL: DeprecateComplexMolecularProfileGQL, + private molecularProfileDetailGQL: MolecularProfileDetailGQL, + private evidenceCountsForMolecularProfileGQL: EvidenceCountsForMolecularProfileGQL, + private networkErrorService: NetworkErrorsService, + private route: ActivatedRoute, + private viewerService: ViewerService + ) { + this.deprecateComplexMolecularProfileMutator = new MutatorWithState(networkErrorService) + this.viewer$ = this.viewerService.viewer$ + } + + ngOnInit() { + this.viewerService.viewer$ + .pipe(untilDestroyed(this)) + .subscribe((v: Viewer) => { + this.selectedOrg = v.mostRecentOrg + }) + + if (this.molecularProfileId === undefined) { + throw new Error('Must pass a molecular profile id into deprecate complex molecular profile component') + } + + let queryRef = this.evidenceCountsForMolecularProfileGQL.fetch({ molecularProfileId: this.molecularProfileId }) + + this.hasEvidence$ = queryRef.pipe( + map(({ data }) => + data.molecularProfile!.evidenceCountsByStatus.submittedCount + data.molecularProfile!.evidenceCountsByStatus.acceptedCount > 0 + ), + ) + + this.isLoading$ = queryRef.pipe(map(({ loading }) => loading)) + } + + deprecateMolecularProfile(): void { + this.errorMessages = [] + + if (this.reason && this.comment && this.molecularProfileId) { + let input = { + deprecationReason: this.reason, + comment: this.comment, + molecularProfileId: this.molecularProfileId, + organizationId: this.selectedOrg?.id, + } + + this.mutationLoading$.next(true) + + let state = this.deprecateComplexMolecularProfileMutator.mutate( + this.deprecateComplexMolecularProfileGQL, + input, + { + refetchQueries: [ + { + query: this.molecularProfileDetailGQL.document, + variables: { molecularProfileId: this.molecularProfileId }, + }, + ], + } + ) + + state.submitSuccess$.pipe(takeUntil(this.destroy$)).subscribe((res) => { + if (res) { + this.success = true + this.comment = '' + this.mutationLoading$.next(false) + } + }) + + state.submitError$.pipe(takeUntil(this.destroy$)).subscribe((res) => { + if (res.length > 0) { + this.errorMessages = res + this.mutationLoading$.next(false) + } + }) + } + } + + onSuccessBannerClose() { + this.success = false + } + + ngOnDestroy(): void { + this.destroy$.next() + this.destroy$.complete() + } +} diff --git a/client/src/app/forms/components/complex-molecular-profile-deprecate/complex-molecular-profile-deprecate.module.ts b/client/src/app/forms/components/complex-molecular-profile-deprecate/complex-molecular-profile-deprecate.module.ts new file mode 100644 index 000000000..cfc4882dd --- /dev/null +++ b/client/src/app/forms/components/complex-molecular-profile-deprecate/complex-molecular-profile-deprecate.module.ts @@ -0,0 +1,52 @@ +import { CommonModule } from '@angular/common' +import { NgModule } from '@angular/core' +import { FormsModule, ReactiveFormsModule } from '@angular/forms' +import { RouterModule } from '@angular/router' +import { CvcMolecularProfileTagModule } from '@app/components/molecular-profiles/molecular-profile-tag/molecular-profile-tag.module' +import { CvcCommentInputFormModule } from '@app/forms/components/comment-input/comment-input.module' +import { CvcFormButtonsModule } from '@app/forms/components/form-buttons/form-buttons.module' +import { CvcFormErrorsAlertModule } from '@app/forms/components/form-errors-alert/form-errors-alert.module' +import { CvcSubmitButtonTypeModule } from '@app/forms/types/submit-button/submit-button.module' +import { LetDirective, PushPipe } from '@ngrx/component' +import { NzAlertModule } from 'ng-zorro-antd/alert' +import { NzButtonModule } from 'ng-zorro-antd/button' +import { NzCardModule } from 'ng-zorro-antd/card' +import { NzFormModule } from 'ng-zorro-antd/form' +import { NzGridModule } from 'ng-zorro-antd/grid' +import { NzSelectModule } from 'ng-zorro-antd/select' +import { NzSpaceModule } from 'ng-zorro-antd/space' +import { NzSpinModule } from 'ng-zorro-antd/spin' +import { NzToolTipModule } from 'ng-zorro-antd/tooltip' +import { NzTypographyModule } from 'ng-zorro-antd/typography' +import { ComplexMolecularProfileDeprecateForm } from './complex-molecular-profile-deprecate.form' + +@NgModule({ + declarations: [ComplexMolecularProfileDeprecateForm], + imports: [ + CommonModule, + RouterModule, + FormsModule, + ReactiveFormsModule, + LetDirective, + PushPipe, + + NzFormModule, + NzAlertModule, + NzGridModule, + NzButtonModule, + NzSpinModule, + NzCardModule, + NzSpaceModule, + NzTypographyModule, + NzToolTipModule, + NzSelectModule, + + CvcFormErrorsAlertModule, + CvcFormButtonsModule, + CvcSubmitButtonTypeModule, + CvcCommentInputFormModule, + CvcMolecularProfileTagModule, + ], + exports: [ComplexMolecularProfileDeprecateForm], +}) +export class ComplexMolecularProfileDeprecateFormModule {} diff --git a/client/src/app/forms/components/complex-molecular-profile-deprecate/complex-molecular-profile-deprecate.query.gql b/client/src/app/forms/components/complex-molecular-profile-deprecate/complex-molecular-profile-deprecate.query.gql new file mode 100644 index 000000000..9e21497ef --- /dev/null +++ b/client/src/app/forms/components/complex-molecular-profile-deprecate/complex-molecular-profile-deprecate.query.gql @@ -0,0 +1,31 @@ +mutation DeprecateComplexMolecularProfile( + $molecularProfileId: Int! + $deprecationReason: MolecularProfileDeprecationReasonMutationInput! + $comment: String! + $organizationId: Int +) { + deprecateComplexMolecularProfile( + input: { + molecularProfileId: $molecularProfileId + deprecationReason: $deprecationReason + comment: $comment + organizationId: $organizationId + } + ) { + molecularProfile { + id + name + } + } +} +query EvidenceCountsForMolecularProfile($molecularProfileId: Int!) { + molecularProfile(id: $molecularProfileId) { + id + name + link + evidenceCountsByStatus { + submittedCount + acceptedCount + } + } +} diff --git a/client/src/app/forms/components/entity-tag/entity-tag.component.html b/client/src/app/forms/components/entity-tag/entity-tag.component.html index 35d75774a..142091899 100644 --- a/client/src/app/forms/components/entity-tag/entity-tag.component.html +++ b/client/src/app/forms/components/entity-tag/entity-tag.component.html @@ -26,9 +26,11 @@ - - + + @@ -39,9 +41,11 @@ - - + + @@ -55,7 +59,9 @@ - + @@ -71,7 +77,7 @@ CACHE-MISS ({{ cvcCacheId }}) + - + diff --git a/client/src/app/forms/components/entity-tag/entity-tag.component.less b/client/src/app/forms/components/entity-tag/entity-tag.component.less index cced71f9c..d1765e6a8 100644 --- a/client/src/app/forms/components/entity-tag/entity-tag.component.less +++ b/client/src/app/forms/components/entity-tag/entity-tag.component.less @@ -100,6 +100,10 @@ nz-tag { padding: 3px 2px 3px 4px; margin: -3px 0 -3px 0; } + .tag-no-icon { + display: inline-block; + width: 4px; + } .tag-label { display: inline-block; font-weight: normal; diff --git a/client/src/app/forms/components/entity-tag/entity-tag.component.ts b/client/src/app/forms/components/entity-tag/entity-tag.component.ts index b52c39808..e644c203e 100644 --- a/client/src/app/forms/components/entity-tag/entity-tag.component.ts +++ b/client/src/app/forms/components/entity-tag/entity-tag.component.ts @@ -32,7 +32,10 @@ export type LinkableEntity = { export const isLinkableEntity: TypeGuard = ( entity: any ): entity is LinkableEntity => - entity !== undefined && entity.__typename && entity.id && entity.name !== undefined + entity !== undefined && + entity.__typename && + entity.id && + entity.name !== undefined export type CvcTagLabelMax = | '50px' @@ -100,6 +103,7 @@ export class CvcEntityTagComponent implements OnChanges { @Input() cvcHasTooltip: boolean = false @Input() cvcFullWidth: boolean = false @Input() cvcShowPopover: boolean = false + @Input() cvcShowIcon: boolean = true @Input() cvcTruncateLabel?: CvcTagLabelMax @Output() cvcTagCheckedChange: EventEmitter = @@ -143,7 +147,7 @@ export class CvcEntityTagComponent implements OnChanges { } // get linkable entity let fragment = undefined - if(!this.cvcDisableLink) { + if (!this.cvcDisableLink) { fragment = { id: `${typename}:${id}`, fragment: gql` @@ -154,7 +158,7 @@ export class CvcEntityTagComponent implements OnChanges { } `, } - } else if(this.cvcHasTooltip) { + } else if (this.cvcHasTooltip) { fragment = { id: `${typename}:${id}`, fragment: gql` @@ -165,8 +169,7 @@ export class CvcEntityTagComponent implements OnChanges { } `, } - } - else{ + } else { fragment = { id: `${typename}:${id}`, fragment: gql` @@ -176,8 +179,6 @@ export class CvcEntityTagComponent implements OnChanges { } `, } - - } const entity = this.apollo.client.readFragment(fragment) if (!isLinkableEntity(entity)) { diff --git a/client/src/app/forms/components/enum-select/enum-select.module.ts b/client/src/app/forms/components/enum-select/enum-select.module.ts index c30e18045..269fa86d5 100644 --- a/client/src/app/forms/components/enum-select/enum-select.module.ts +++ b/client/src/app/forms/components/enum-select/enum-select.module.ts @@ -3,7 +3,6 @@ import { NgModule } from '@angular/core'; import { ReactiveFormsModule } from '@angular/forms'; import { CvcPipesModule } from '@app/core/pipes/pipes.module'; import { FormlyModule } from '@ngx-formly/core'; -import { FormlyNzFormFieldModule } from '@ngx-formly/ng-zorro-antd/form-field'; import { NzFormModule } from 'ng-zorro-antd/form'; import { NzIconModule } from 'ng-zorro-antd/icon'; import { NzInputModule } from 'ng-zorro-antd/input'; @@ -18,7 +17,6 @@ import { CvcEnumSelectComponent } from './enum-select.component'; CommonModule, ReactiveFormsModule, FormlyModule.forChild(), - FormlyNzFormFieldModule, NzIconModule, NzFormModule, NzSelectModule, diff --git a/client/src/app/forms/components/flag-resolve/flag-resolve.form.html b/client/src/app/forms/components/flag-resolve/flag-resolve.form.html index 45d3f0099..787b1c1a3 100644 --- a/client/src/app/forms/components/flag-resolve/flag-resolve.form.html +++ b/client/src/app/forms/components/flag-resolve/flag-resolve.form.html @@ -8,7 +8,7 @@ + *ngIf="viewer.isEditor || viewer.isAdmin || this.flag.openActivity.user.id === viewer.id; else noPermissions"> @@ -38,7 +38,7 @@ [nzPopoverContent]="flagResolvePopoverContentTemplate" [nzPopoverTrigger]="undefined " nzPopoverPlacement="bottom" - [disabled]="!viewer.signedIn || (viewer.isCurator && this.flag.flaggingUser.id != viewer.id)"> + [disabled]="!viewer.signedIn || (viewer.isCurator && this.flag.openActivity.user.id != viewer.id)"> Resolve Flag comment: string = '' - reason: Maybe + reason: Maybe selectedOrg: Maybe mpsToDeprecate$?: Observable diff --git a/client/src/app/forms/components/variant-deprecate/variant-deprecate.query.gql b/client/src/app/forms/components/variant-deprecate/variant-deprecate.query.gql index cd6684bdd..3c25c3fb0 100644 --- a/client/src/app/forms/components/variant-deprecate/variant-deprecate.query.gql +++ b/client/src/app/forms/components/variant-deprecate/variant-deprecate.query.gql @@ -1,6 +1,6 @@ mutation DeprecateVariant( $variantId: Int! - $deprecationReason: DeprecationReason! + $deprecationReason: VariantDeprecationReason! $comment: String! $organizationId: Int ) { diff --git a/client/src/app/forms/config/assertion-revise/assertion-revise.form.config.ts b/client/src/app/forms/config/assertion-revise/assertion-revise.form.config.ts index fd12ec1e4..01c099a6b 100644 --- a/client/src/app/forms/config/assertion-revise/assertion-revise.form.config.ts +++ b/client/src/app/forms/config/assertion-revise/assertion-revise.form.config.ts @@ -15,13 +15,13 @@ import { CvcEntityTypeSelectFieldConfig } from '@app/forms/types/type-select/typ import assignFieldConfigDefaultValues from '@app/forms/utilities/assign-field-default-values' import { CvcFormCardWrapperProps } from '@app/forms/wrappers/form-card/form-card.wrapper' import { CvcFormLayoutWrapperProps } from '@app/forms/wrappers/form-layout/form-layout.wrapper' +import { CvcFormRowWrapperProps } from '@app/forms/wrappers/form-row/form-row.wrapper' import { FormlyFieldConfig } from '@ngx-formly/core' const formFieldConfig: FormlyFieldConfig[] = [ { wrappers: ['form-layout'], props: { - submitLabel: 'Submit Revisions', showDevPanel: false, }, fieldGroup: [ @@ -35,152 +35,183 @@ const formFieldConfig: FormlyFieldConfig[] = [ key: 'fields', wrappers: ['form-card'], props: { - title: 'Revise Assertion', + formCardOptions: { title: 'Revise Assertion' }, }, fieldGroup: [ { - key: 'molecularProfileId', - type: 'molecular-profile-select', - props: { - required: true, - watchVariantMolecularProfileId: true, - }, - }, - { - key: 'assertionType', - type: 'type-select', - props: { - required: true, - }, - }, - { - key: 'assertionDirection', - type: 'direction-select', - props: { - required: true, - colSpan: 8, - formMode: 'revise' - }, - }, - { - key: 'significance', - type: 'significance-select', - props: { - required: true, - colSpan: 8, - formMode: 'revise' + wrappers: ['form-row'], + props: { + formRowOptions: { + span: 24, + }, }, + fieldGroup: [ + { + key: 'molecularProfileId', + type: 'molecular-profile-select', + props: { + required: true, + watchVariantMolecularProfileId: true, + }, + }, + ], }, { - key: 'diseaseId', - type: 'disease-select', - props: { - colSpan: 8, - }, - }, - { - key: 'therapyIds', - type: 'therapy-multi-select', - props: {}, - }, - { - key: 'therapyInteractionType', - type: 'interaction-select', - props: {}, - }, - { - key: 'variantOrigin', - type: 'origin-select', - props: { - required: true, + wrappers: ['form-row'], + props: { + formRowOptions: { + responsive: { xs: 24, lg: 12, xl: 8, xxl: 6 }, + }, }, - }, - { - key: 'phenotypeIds', - type: 'phenotype-multi-select', - props: {}, + fieldGroup: [ + { + key: 'assertionType', + type: 'type-select', + props: { + required: true, + }, + }, + { + key: 'assertionDirection', + type: 'direction-select', + props: { + required: true, + formMode: 'revise', + }, + }, + { + key: 'significance', + type: 'significance-select', + props: { + required: true, + formMode: 'revise', + }, + }, + { + key: 'diseaseId', + type: 'disease-select', + props: {}, + }, + { + key: 'therapyIds', + type: 'therapy-multi-select', + props: {}, + }, + { + key: 'therapyInteractionType', + type: 'interaction-select', + props: {}, + }, + { + key: 'variantOrigin', + type: 'origin-select', + props: { + required: true, + }, + }, + { + key: 'phenotypeIds', + type: 'phenotype-multi-select', + props: {}, + }, + { + key: 'ampLevel', + type: 'amp-category-select', + props: {}, + }, + { + key: 'acmgCodeIds', + type: 'acmg-code-multi-select', + props: {}, + }, + { + key: 'clingenCodeIds', + type: 'clingen-code-multi-select', + props: {}, + }, + { + key: 'nccnGuidelineId', + type: 'nccn-guideline-select', + props: {}, + }, + { + key: 'nccnGuidelineVersion', + type: 'nccn-guideline-version-input', + props: {}, + }, + { + key: 'fdaRegulatoryApproval', + type: 'fda-regulatory-approval-checkbox', + props: {}, + }, + { + key: 'fdaCompanionTest', + type: 'fda-companion-test-checkbox', + props: {}, + }, + ], }, { - key: 'ampLevel', - type: 'amp-category-select', - props: { - colSpan: 8, - } - }, - { - key: 'acmgCodeIds', - type: 'acmg-code-multi-select', - props: { - colSpan: 8, - }, - }, - { - key: 'clingenCodeIds', - type: 'clingen-code-multi-select', - props: { - colSpan: 8, - }, - }, - { - key: 'nccnGuidelineId', - type: 'nccn-guideline-select', - props: {}, - }, - { - key: 'nccnGuidelineVersion', - type: 'nccn-guideline-version-input', - props: {} - }, - { - key: 'fdaRegulatoryApproval', - type: 'fda-regulatory-approval-checkbox', - props: {} - }, - { - key: 'fdaCompanionTest', - type: 'fda-companion-test-checkbox', - props: {} - }, - { - key: 'evidenceItemIds', - type: 'evidence-multi-select', - props: { - required: true, - isMultiSelect: true, - colSpan: 24 - }, - }, - { - key: 'summary', - type: 'textarea', - wrappers: ['form-field'], - props: { - tooltip: - 'A short, one sentence summary of the Assertion', - placeholder: 'Enter an Assertion Summary', - label: 'Assertion Summary', - required: true, - colSpan: 24 - }, - }, - { - key: 'description', - type: 'textarea', - wrappers: ['form-field'], - props: { - tooltip: - 'A complete, original description of this Assertion. Limited to one paragraph.', - placeholder: 'Enter an Assertion Statement', - label: 'Assertion Statement', - required: true, - rows: 5 , - colSpan: 24 + wrappers: ['form-row'], + props: { + formRowOptions: { + responsiveIndexed: [ + { + xs: 24, + }, + { + md: 24, + lg: 8, + }, + { + md: 24, + lg: 16, + }, + ], + }, }, + fieldGroup: [ + { + key: 'evidenceItemIds', + type: 'evidence-multi-select', + props: { + required: true, + isMultiSelect: true, + }, + }, + { + key: 'summary', + type: 'base-textarea', + props: { + tooltip: 'A short, one sentence summary of the Assertion', + placeholder: 'Enter an Assertion Summary', + label: 'Assertion Summary', + required: true, + }, + }, + { + key: 'description', + type: 'base-textarea', + props: { + tooltip: + 'A complete, original description of this Assertion. Limited to one paragraph.', + placeholder: 'Enter an Assertion Statement', + label: 'Assertion Statement', + required: true, + rows: 5, + }, + }, + ], }, ], }, { - wrappers: ['form-footer'], + wrappers: ['form-row'], + props: { + formRowOptions: { + spanIndexed: [24, 12, 12], + }, + }, fieldGroup: [ { key: 'comment', @@ -191,13 +222,14 @@ const formFieldConfig: FormlyFieldConfig[] = [ }, }, { - type: 'cvc-cancel-button' + type: 'cvc-cancel-button', }, { key: 'organizationId', type: 'org-submit-button', props: { submitLabel: 'Submit Revisions', + align: 'right', }, }, ], diff --git a/client/src/app/forms/config/assertion-submit/assertion-submit.form.config.ts b/client/src/app/forms/config/assertion-submit/assertion-submit.form.config.ts index 48c52b24b..df4fdc2dd 100644 --- a/client/src/app/forms/config/assertion-submit/assertion-submit.form.config.ts +++ b/client/src/app/forms/config/assertion-submit/assertion-submit.form.config.ts @@ -1,9 +1,4 @@ import { assertionSubmitFormInitialModel } from '@app/forms/models/assertion-submit.model' -import { CvcAcmgCodeSelectFieldOptions } from '@app/forms/types/acmg-code-select/acmg-code-select.type' -import { CvcAmpCategorySelectFieldOptions } from '@app/forms/types/amp-category-select/amp-category-select.type' -import { CvcClingenCodeSelectFieldOptions } from '@app/forms/types/clingen-code-select/clingen-code-select.type' -import { CvcDirectionSelectFieldOptions } from '@app/forms/types/direction-select/direction-select.type' -import { CvcDiseaseSelectFieldOptions } from '@app/forms/types/disease-select/disease-select.type' import { CvcFdaCompanionTestCheckboxFieldOptions } from '@app/forms/types/fda-companion-test-checkbox/fda-companion-test-checkbox.type' import { CvcFdaRegulatoryApprovalCheckboxFieldOptions } from '@app/forms/types/fda-regulatory-approval-checkbox/fda-regulatory-approval-checkbox.type' import { CvcInteractionSelectFieldOptions } from '@app/forms/types/interaction-select/interaction-select.type' @@ -16,13 +11,13 @@ import { CvcTherapySelectFieldOptions } from '@app/forms/types/therapy-select/th import assignFieldConfigDefaultValues from '@app/forms/utilities/assign-field-default-values' import { CvcFormCardWrapperProps } from '@app/forms/wrappers/form-card/form-card.wrapper' import { CvcFormLayoutWrapperProps } from '@app/forms/wrappers/form-layout/form-layout.wrapper' +import { CvcFormRowWrapperProps } from '@app/forms/wrappers/form-row/form-row.wrapper' import { FormlyFieldConfig } from '@ngx-formly/core' const formFieldConfig: FormlyFieldConfig[] = [ { wrappers: ['form-layout'], props: { - submitLabel: 'Submit Assertion', showDevPanel: false, }, fieldGroup: [ @@ -36,160 +31,196 @@ const formFieldConfig: FormlyFieldConfig[] = [ key: 'fields', wrappers: ['form-card'], props: { - title: 'New Assertion', + formCardOptions: { title: 'New Assertion' }, }, fieldGroup: [ { - key: 'molecularProfileId', - type: 'molecular-profile-select', - props: { - required: true, - tooltip: - 'A single variant (Simple Molecular Profile) or a combination of variants (Complex Molecular Profile) relevant to the curated assertion.', - watchVariantMolecularProfileId: true, - colSpan: 16, - }, - }, - { - key: 'assertionType', - type: 'type-select', - props: { - required: true, - colSpan: 8, - }, - }, - { - key: 'assertionDirection', - type: 'direction-select', - props: { - required: true, - colSpan: 8, - }, - }, - { - key: 'significance', - type: 'significance-select', - props: { - required: true, - colSpan: 8, - }, - }, - { - key: 'diseaseId', - type: 'disease-select', - props: { - colSpan: 8, - }, - }, - { - key: 'therapyIds', - type: 'therapy-multi-select', - props: {}, - }, - { - key: 'therapyInteractionType', - type: 'interaction-select', - props: {}, - }, - { - key: 'variantOrigin', - type: 'origin-select', - props: { - required: true, - }, - }, - { - key: 'phenotypeIds', - type: 'phenotype-multi-select', - props: {}, - }, - { - key: 'ampLevel', - type: 'amp-category-select', - props: { - colSpan: 8, - }, - }, - { - key: 'acmgCodeIds', - type: 'acmg-code-multi-select', - props: { - colSpan: 8, - }, - }, - { - key: 'clingenCodeIds', - type: 'clingen-code-multi-select', - props: { - colSpan: 8, - }, - }, - { - key: 'nccnGuidelineId', - type: 'nccn-guideline-select', - props: {}, - }, - { - key: 'nccnGuidelineVersion', - type: 'nccn-guideline-version-input', - props: {}, - }, - { - key: 'fdaRegulatoryApproval', - type: 'fda-regulatory-approval-checkbox', - props: {}, - }, - { - key: 'fdaCompanionTest', - type: 'fda-companion-test-checkbox', - props: {}, - }, - { - key: 'evidenceItemIds', - type: 'evidence-multi-select', - props: { - required: true, - isMultiSelect: true, - colSpan: 24, + wrappers: ['form-row'], + props: { + formRowOptions: { + span: 24, + }, }, + fieldGroup: [ + { + key: 'molecularProfileId', + type: 'molecular-profile-select', + props: { + required: true, + watchVariantMolecularProfileId: true, + }, + }, + ], }, { - key: 'summary', - type: 'textarea', - wrappers: ['form-field'], - props: { - tooltip: 'A short, one sentence summary of the Assertion', - placeholder: 'Enter an Assertion Summary', - label: 'Assertion Summary', - required: true, - colSpan: 24, + wrappers: ['form-row'], + props: { + formRowOptions: { + responsive: { xs: 24, lg: 12, xl: 8, xxl: 6 }, + }, }, + fieldGroup: [ + { + key: 'assertionType', + type: 'type-select', + props: { + required: true, + }, + }, + { + key: 'assertionDirection', + type: 'direction-select', + props: { + required: true, + }, + }, + { + key: 'significance', + type: 'significance-select', + props: { + required: true, + }, + }, + { + key: 'diseaseId', + type: 'disease-select', + props: {}, + }, + { + key: 'therapyIds', + type: 'therapy-multi-select', + props: {}, + }, + { + key: 'therapyInteractionType', + type: 'interaction-select', + props: {}, + }, + { + key: 'variantOrigin', + type: 'origin-select', + props: { + required: true, + }, + }, + { + key: 'phenotypeIds', + type: 'phenotype-multi-select', + props: {}, + }, + { + key: 'ampLevel', + type: 'amp-category-select', + props: { + colSpan: 8, + }, + }, + { + key: 'acmgCodeIds', + type: 'acmg-code-multi-select', + props: { + colSpan: 8, + }, + }, + { + key: 'clingenCodeIds', + type: 'clingen-code-multi-select', + props: { + colSpan: 8, + }, + }, + { + key: 'nccnGuidelineId', + type: 'nccn-guideline-select', + props: {}, + }, + { + key: 'nccnGuidelineVersion', + type: 'nccn-guideline-version-input', + props: {}, + }, + { + key: 'fdaRegulatoryApproval', + type: 'fda-regulatory-approval-checkbox', + props: {}, + }, + { + key: 'fdaCompanionTest', + type: 'fda-companion-test-checkbox', + props: {}, + }, + ], }, { - key: 'description', - type: 'textarea', - wrappers: ['form-field'], - props: { - tooltip: - 'A complete, original description of this Assertion. Limited to one paragraph.', - placeholder: 'Enter an Assertion Statement', - label: 'Assertion Statement', - required: true, - rows: 5, - colSpan: 24, + wrappers: ['form-row'], + props: { + formRowOptions: { + responsiveIndexed: [ + { + xs: 24, + }, + { + md: 24, + lg: 8, + }, + { + md: 24, + lg: 16, + }, + ], + }, }, + fieldGroup: [ + { + key: 'evidenceItemIds', + type: 'evidence-multi-select', + props: { + required: true, + isMultiSelect: true, + }, + }, + { + key: 'summary', + type: 'textarea', + wrappers: ['form-field'], + props: { + tooltip: 'A short, one sentence summary of the Assertion', + placeholder: 'Enter an Assertion Summary', + label: 'Assertion Summary', + required: true, + }, + }, + { + key: 'description', + type: 'base-textarea', + wrappers: ['form-field'], + props: { + tooltip: + 'A complete, original description of this Assertion. Limited to one paragraph.', + placeholder: 'Enter an Assertion Statement', + label: 'Assertion Statement', + required: true, + rows: 5, + }, + }, + ], }, ], }, { - wrappers: ['form-footer'], + wrappers: ['form-row'], + props: { + formRowOptions: { + spanIndexed: [24, 12, 12], + }, + }, fieldGroup: [ { key: 'comment', - type: 'textarea', + type: 'base-textarea', props: { label: 'Comment', - // required: true, + required: true, }, }, { @@ -200,6 +231,7 @@ const formFieldConfig: FormlyFieldConfig[] = [ type: 'org-submit-button', props: { submitLabel: 'Submit Assertion', + align: 'right', }, }, ], diff --git a/client/src/app/forms/config/evidence-revise/evidence-revise.form.config.ts b/client/src/app/forms/config/evidence-revise/evidence-revise.form.config.ts index 2c079b701..b6c09719d 100644 --- a/client/src/app/forms/config/evidence-revise/evidence-revise.form.config.ts +++ b/client/src/app/forms/config/evidence-revise/evidence-revise.form.config.ts @@ -4,17 +4,21 @@ import { CvcDiseaseSelectFieldOptions } from '@app/forms/types/disease-select/di import { CvcInteractionSelectFieldOptions } from '@app/forms/types/interaction-select/interaction-select.type' import { CvcLevelSelectFieldOptions } from '@app/forms/types/level-select/level-select.type' import { CvcMolecularProfileSelectFieldConfig } from '@app/forms/types/molecular-profile-select/molecular-profile-select.type' +import { CvcOrgSubmitButtonFieldConfig } from '@app/forms/types/org-submit-button/org-submit-button.type' import { CvcOriginSelectFieldOptions } from '@app/forms/types/origin-select/origin-select.type' import { CvcPhenotypeSelectFieldOptions } from '@app/forms/types/phenotype-select/phenotype-select.type' import { CvcRatingFieldOptions } from '@app/forms/types/rating/rating.type' import { CvcSignificanceSelectFieldOptions } from '@app/forms/types/significance-select/significance-select.type' -import { CvcSourceSelectFieldOptions } from '@app/forms/types/source-select/source-select.type' +import { + CvcSourceSelectFieldConfig, + CvcSourceSelectFieldOptions, +} from '@app/forms/types/source-select/source-select.type' import { CvcTherapySelectFieldOptions } from '@app/forms/types/therapy-select/therapy-select.type' import { CvcEntityTypeSelectFieldConfig } from '@app/forms/types/type-select/type-select.type' import assignFieldConfigDefaultValues from '@app/forms/utilities/assign-field-default-values' -import { CvcFieldGridWrapperConfig } from '@app/forms/wrappers/field-grid/field-grid.wrapper' import { CvcFormCardWrapperProps } from '@app/forms/wrappers/form-card/form-card.wrapper' import { CvcFormLayoutWrapperProps } from '@app/forms/wrappers/form-layout/form-layout.wrapper' +import { CvcFormRowWrapperProps } from '@app/forms/wrappers/form-row/form-row.wrapper' import { FormlyFieldConfig } from '@ngx-formly/core' const formFieldConfig: FormlyFieldConfig[] = [ @@ -22,7 +26,6 @@ const formFieldConfig: FormlyFieldConfig[] = [ { wrappers: ['form-layout'], props: { - submitLabel: 'Revise Evidence Item', showDevPanel: false, }, fieldGroup: [ @@ -32,114 +35,150 @@ const formFieldConfig: FormlyFieldConfig[] = [ hidden: true, }, }, - // form-card wraps the form fields in a card, providing a place to put a title, and other controls e.g. form options, status { key: 'fields', wrappers: ['form-card'], props: { - title: 'Revise Evidence Item', + formCardOptions: { title: 'Revise Evidence Item' }, }, fieldGroup: [ - { - key: 'molecularProfileId', - type: 'molecular-profile-select', - props: { - required: true, - }, - }, - { - key: 'sourceId', - type: 'source-select', - props: { required: true }, - }, - { - key: 'evidenceType', - type: 'type-select', - props: { - required: true, - }, - }, - { - key: 'evidenceDirection', - type: 'direction-select', - props: { - required: true, - formMode: 'revise', - }, - }, - { - key: 'significance', - type: 'significance-select', - props: { - required: true, - formMode: 'revise', - }, - }, - { - key: 'diseaseId', - type: 'disease-select', - props: {}, - }, - { - key: 'therapyIds', - type: 'therapy-multi-select', - props: {}, - }, - { - key: 'therapyInteractionType', - type: 'interaction-select', - props: {}, - }, - { - key: 'evidenceLevel', - type: 'level-select', - props: { - required: true, - }, - }, - { - key: 'rating', - type: 'rating', - props: { - required: true, + { + wrappers: ['form-row'], + props: { + formRowOptions: { + span: 24, + }, }, + fieldGroup: [ + { + key: 'molecularProfileId', + type: 'molecular-profile-select', + props: { + required: true, + tooltip: + 'A single variant (Simple Molecular Profile) or a combination of variants (Complex Molecular Profile) relevant to the curated evidence.', + watchVariantMolecularProfileId: true, + }, + }, + { + key: 'sourceId', + type: 'source-select', + props: { required: true }, + }, + ], }, - { - key: 'variantOrigin', - type: 'origin-select', - props: { - required: true, + { + wrappers: ['form-row'], + props: { + formRowOptions: { + responsive: { xs: 24, lg: 12, xl: 8, xxl: 6 }, + }, }, - }, - { - key: 'phenotypeIds', - type: 'phenotype-multi-select', - props: {}, + fieldGroup: [ + { + key: 'evidenceType', + type: 'type-select', + props: { + required: true, + }, + }, + { + key: 'evidenceDirection', + type: 'direction-select', + props: { + required: true, + formMode: 'revise', + }, + }, + { + key: 'significance', + type: 'significance-select', + props: { + required: true, + formMode: 'revise', + }, + }, + { + key: 'diseaseId', + type: 'disease-select', + props: {}, + }, + { + key: 'therapyIds', + type: 'therapy-multi-select', + props: {}, + }, + { + key: 'therapyInteractionType', + type: 'interaction-select', + props: {}, + }, + { + key: 'evidenceLevel', + type: 'level-select', + props: { + required: true, + }, + }, + { + key: 'rating', + type: 'rating', + props: { + required: true, + }, + }, + { + key: 'variantOrigin', + type: 'origin-select', + props: { + required: true, + }, + }, + { + key: 'phenotypeIds', + type: 'phenotype-multi-select', + props: {}, + }, + ], }, { - key: 'description', - type: 'textarea', - wrappers: ['form-field'], - props: { - tooltip: - 'Your original description of evidence from published literature detailing the association or lack of association between a variant and its predictive, prognostic, diagnostic, predisposing, functional or oncogenic value. ', - placeholder: 'Enter an Evidence Statement', - extraType: 'description', - description: - 'Data constituting personal or identifying information should not be entered (e.g. protected health information (PHI) as defined by HIPAA in the U.S. and/or comparable laws in your jurisdiction).', - label: 'Evidence Statement', - required: true, - colSpan: 24, + wrappers: ['form-row'], + props: { + formRowOptions: { + span: 24, + }, }, + fieldGroup: [ + { + key: 'description', + type: 'base-textarea', + props: { + tooltip: + 'Your original description of evidence from published literature detailing the association or lack of association between a variant and its predictive, prognostic, diagnostic, predisposing, functional or oncogenic value. ', + placeholder: 'Enter an Evidence Statement', + extraType: 'description', + description: + 'Data constituting personal or identifying information should not be entered (e.g. protected health information (PHI) as defined by HIPAA in the U.S. and/or comparable laws in your jurisdiction).', + label: 'Evidence Statement', + required: true, + colSpan: 24, + }, + }, + ], }, ], }, { - wrappers: ['form-footer'], + wrappers: ['form-row'], + props: { + formRowOptions: { + spanIndexed: [24, 12, 12], + }, + }, fieldGroup: [ { key: 'comment', - type: 'textarea', + type: 'base-textarea', props: { label: 'Comment', required: true, @@ -149,11 +188,12 @@ const formFieldConfig: FormlyFieldConfig[] = [ { type: 'cvc-cancel-button', }, - { + { key: 'organizationId', type: 'org-submit-button', props: { submitLabel: 'Submit Evidence Item Revisions', + align: 'right', }, }, ], diff --git a/client/src/app/forms/config/evidence-submit/evidence-submit.form.config.ts b/client/src/app/forms/config/evidence-submit/evidence-submit.form.config.ts index 8f356d83c..f4b0aa41c 100644 --- a/client/src/app/forms/config/evidence-submit/evidence-submit.form.config.ts +++ b/client/src/app/forms/config/evidence-submit/evidence-submit.form.config.ts @@ -3,16 +3,22 @@ import { CvcDirectionSelectFieldOptions } from '@app/forms/types/direction-selec import { CvcDiseaseSelectFieldOptions } from '@app/forms/types/disease-select/disease-select.type' import { CvcInteractionSelectFieldOptions } from '@app/forms/types/interaction-select/interaction-select.type' import { CvcLevelSelectFieldOptions } from '@app/forms/types/level-select/level-select.type' +import { CvcMolecularProfileSelectFieldConfig } from '@app/forms/types/molecular-profile-select/molecular-profile-select.type' +import { CvcOrgSubmitButtonFieldConfig } from '@app/forms/types/org-submit-button/org-submit-button.type' import { CvcOriginSelectFieldOptions } from '@app/forms/types/origin-select/origin-select.type' import { CvcPhenotypeSelectFieldOptions } from '@app/forms/types/phenotype-select/phenotype-select.type' import { CvcRatingFieldOptions } from '@app/forms/types/rating/rating.type' import { CvcSignificanceSelectFieldOptions } from '@app/forms/types/significance-select/significance-select.type' -import { CvcSourceSelectFieldOptions } from '@app/forms/types/source-select/source-select.type' +import { + CvcSourceSelectFieldConfig, + CvcSourceSelectFieldOptions, +} from '@app/forms/types/source-select/source-select.type' import { CvcTherapySelectFieldOptions } from '@app/forms/types/therapy-select/therapy-select.type' import { CvcEntityTypeSelectFieldConfig } from '@app/forms/types/type-select/type-select.type' import assignFieldConfigDefaultValues from '@app/forms/utilities/assign-field-default-values' import { CvcFormCardWrapperProps } from '@app/forms/wrappers/form-card/form-card.wrapper' import { CvcFormLayoutWrapperProps } from '@app/forms/wrappers/form-layout/form-layout.wrapper' +import { CvcFormRowWrapperProps } from '@app/forms/wrappers/form-row/form-row.wrapper' import { FormlyFieldConfig } from '@ngx-formly/core' const formFieldConfig: FormlyFieldConfig[] = [ @@ -20,7 +26,6 @@ const formFieldConfig: FormlyFieldConfig[] = [ // form-layout contains the form itself and and a hideable dev panel wrappers: ['form-layout'], props: { - submitLabel: 'Submit Evidence Item', showDevPanel: false, }, fieldGroup: [ @@ -30,130 +35,163 @@ const formFieldConfig: FormlyFieldConfig[] = [ hidden: true, }, }, - - // form-card wraps the form fields in a card, providing a - // place to put a title, and other controls e.g. form options, status { key: 'fields', wrappers: ['form-card'], props: { - title: 'New Evidence Item', + formCardOptions: { + title: 'New Evidence Item', + }, }, fieldGroup: [ { - key: 'molecularProfileId', - type: 'molecular-profile-select', - props: { - required: true, - tooltip: 'A single variant (Simple Molecular Profile) or a combination of variants (Complex Molecular Profile) relevant to the curated evidence.', - watchVariantMolecularProfileId: true, - }, - }, - { - key: 'sourceId', - type: 'source-select', - props: { required: true }, - }, - { - key: 'evidenceType', - type: 'type-select', - props: { - required: true, + wrappers: ['form-row'], + props: { + formRowOptions: { + span: 24, + }, }, + fieldGroup: [ + { + key: 'molecularProfileId', + type: 'molecular-profile-select', + props: { + required: true, + tooltip: + 'A single variant (Simple Molecular Profile) or a combination of variants (Complex Molecular Profile) relevant to the curated evidence.', + watchVariantMolecularProfileId: true, + }, + }, + { + key: 'sourceId', + type: 'source-select', + props: { required: true }, + }, + ], }, - { - key: 'evidenceDirection', - type: 'direction-select', - props: { - required: true, - }, - }, - { - key: 'significance', - type: 'significance-select', - props: { - required: true, - }, - }, - { - key: 'diseaseId', - type: 'disease-select', - props: {}, - }, - { - key: 'therapyIds', - type: 'therapy-multi-select', - props: {}, - }, - { - key: 'therapyInteractionType', - type: 'interaction-select', - props: {}, - }, - { - key: 'evidenceLevel', - type: 'level-select', - props: { - required: true, - }, - }, - { - key: 'rating', - type: 'rating', - props: { - required: true, - }, - }, - { - key: 'variantOrigin', - type: 'origin-select', - props: { - required: true, + { + wrappers: ['form-row'], + props: { + formRowOptions: { + responsive: { xs: 24, lg: 12, xl: 8, xxl: 6 }, + }, }, - }, - { - key: 'phenotypeIds', - type: 'phenotype-multi-select', - props: {}, + fieldGroup: [ + { + key: 'evidenceType', + type: 'type-select', + props: { + required: true, + }, + }, + { + key: 'evidenceDirection', + type: 'direction-select', + props: { + required: true, + }, + }, + { + key: 'significance', + type: 'significance-select', + props: { + required: true, + }, + }, + { + key: 'diseaseId', + type: 'disease-select', + props: {}, + }, + { + key: 'therapyIds', + type: 'therapy-multi-select', + props: {}, + }, + { + key: 'therapyInteractionType', + type: 'interaction-select', + props: {}, + }, + { + key: 'evidenceLevel', + type: 'level-select', + props: { + required: true, + }, + }, + { + key: 'rating', + type: 'rating', + props: { + required: true, + }, + }, + { + key: 'variantOrigin', + type: 'origin-select', + props: { + required: true, + }, + }, + { + key: 'phenotypeIds', + type: 'phenotype-multi-select', + props: {}, + }, + ], }, { - key: 'description', - type: 'textarea', - wrappers: ['form-field'], - props: { - tooltip: - 'Your original description of evidence from published literature detailing the association or lack of association between a variant and its predictive, prognostic, diagnostic, predisposing, functional or oncogenic value. ', - placeholder: 'Enter an Evidence Statement', - extraType: 'description', - description: - 'Data constituting personal or identifying information should not be entered (e.g. protected health information (PHI) as defined by HIPAA in the U.S. and/or comparable laws in your jurisdiction).', - label: 'Evidence Statement', - required: true, - colSpan: 24, + wrappers: ['form-row'], + props: { + formRowOptions: { + span: 24, + }, }, + fieldGroup: [ + { + key: 'description', + type: 'base-textarea', + props: { + tooltip: + 'Your original description of evidence from published literature detailing the association or lack of association between a variant and its predictive, prognostic, diagnostic, predisposing, functional or oncogenic value. ', + placeholder: 'Enter an Evidence Statement', + description: + 'Data constituting personal or identifying information should not be entered (e.g. protected health information (PHI) as defined by HIPAA in the U.S. and/or comparable laws in your jurisdiction).', + label: 'Evidence Statement', + required: true, + }, + }, + ], }, ], }, { - wrappers: ['form-footer'], + wrappers: ['form-row'], + props: { + formRowOptions: { + spanIndexed: [24, 12, 12], + }, + }, fieldGroup: [ { key: 'comment', - type: 'textarea', + type: 'base-textarea', props: { label: 'Comment', required: false, - minLength: 10 + minLength: 10, }, }, { - type: 'cvc-cancel-button' + type: 'cvc-cancel-button', }, - { + { key: 'organizationId', type: 'org-submit-button', props: { submitLabel: 'Submit Evidence Item', + align: 'right', }, }, ], diff --git a/client/src/app/forms/config/gene-revise/gene-revise.form.config.ts b/client/src/app/forms/config/gene-revise/gene-revise.form.config.ts index 521c28fcf..e65376d04 100644 --- a/client/src/app/forms/config/gene-revise/gene-revise.form.config.ts +++ b/client/src/app/forms/config/gene-revise/gene-revise.form.config.ts @@ -2,6 +2,7 @@ import { geneReviseFormInitialModel } from '@app/forms/models/gene-revise.model' import assignFieldConfigDefaultValues from '@app/forms/utilities/assign-field-default-values' import { CvcFormCardWrapperProps } from '@app/forms/wrappers/form-card/form-card.wrapper' import { CvcFormLayoutWrapperProps } from '@app/forms/wrappers/form-layout/form-layout.wrapper' +import { CvcFormRowWrapperProps } from '@app/forms/wrappers/form-row/form-row.wrapper' import { FormlyFieldConfig } from '@ngx-formly/core' const formFieldConfig: FormlyFieldConfig[] = [ @@ -9,7 +10,6 @@ const formFieldConfig: FormlyFieldConfig[] = [ { wrappers: ['form-layout'], props: { - submitLabel: 'Revise Gene', showDevPanel: false, }, fieldGroup: [ @@ -24,51 +24,67 @@ const formFieldConfig: FormlyFieldConfig[] = [ key: 'fields', wrappers: ['form-card'], props: { - title: 'Revise Evidence Item', + formCardOptions: { title: 'Revise Gene' }, }, fieldGroup: [ { - key: 'description', - type: 'textarea', - wrappers: ['form-field'], - props: { - tooltip: - 'User-defined summary of the clinical relevance of this Gene.', - placeholder: 'Enter a Gene Summary', - label: 'Gene Summary', - required: false, - rows: 5 + wrappers: ['form-row'], + props: { + formRowOptions: { + span: 24, + }, }, - }, - { - key: 'sourceIds', - type: 'source-multi-select', - wrappers: ['form-field'], - props: {}, + fieldGroup: [ + { + key: 'description', + type: 'base-textarea', + wrappers: ['form-field'], + props: { + tooltip: + 'User-defined summary of the clinical relevance of this Gene.', + placeholder: 'Enter a Gene Summary', + label: 'Gene Summary', + required: false, + rows: 5, + }, + }, + { + key: 'sourceIds', + type: 'source-multi-select', + wrappers: ['form-field'], + props: {}, + }, + ], }, ], }, { - wrappers: ['form-footer'], + wrappers: ['form-row'], + props: { + formRowOptions: { + spanIndexed: [24, 12, 12], + }, + }, fieldGroup: [ { key: 'comment', - type: 'textarea', + type: 'base-textarea', props: { label: 'Comment', placeholder: 'Please enter a comment describing your revisions.', required: true, - minLength: 10 + minLength: 10, }, }, { - type: 'cvc-cancel-button' + type: 'cvc-cancel-button', }, { key: 'organizationId', type: 'org-submit-button', props: { submitLabel: 'Submit Gene Revisions', + align: 'right', }, }, ], @@ -77,7 +93,4 @@ const formFieldConfig: FormlyFieldConfig[] = [ }, ] export const geneReviseFields: FormlyFieldConfig[] = - assignFieldConfigDefaultValues( - formFieldConfig, - geneReviseFormInitialModel - ) + assignFieldConfigDefaultValues(formFieldConfig, geneReviseFormInitialModel) diff --git a/client/src/app/forms/config/molecular-profile-revise/molecular-profile-revise.form.config.ts b/client/src/app/forms/config/molecular-profile-revise/molecular-profile-revise.form.config.ts index 84a50c1e3..e5edbb9d7 100644 --- a/client/src/app/forms/config/molecular-profile-revise/molecular-profile-revise.form.config.ts +++ b/client/src/app/forms/config/molecular-profile-revise/molecular-profile-revise.form.config.ts @@ -1,7 +1,9 @@ import { molecularProfileReviseFormInitialModel } from '@app/forms/models/molecular-profile-revise.model' +import { CvcOrgSubmitButtonFieldConfig } from '@app/forms/types/org-submit-button/org-submit-button.type' import assignFieldConfigDefaultValues from '@app/forms/utilities/assign-field-default-values' import { CvcFormCardWrapperProps } from '@app/forms/wrappers/form-card/form-card.wrapper' import { CvcFormLayoutWrapperProps } from '@app/forms/wrappers/form-layout/form-layout.wrapper' +import { CvcFormRowWrapperProps } from '@app/forms/wrappers/form-row/form-row.wrapper' import { FormlyFieldConfig } from '@ngx-formly/core' const formFieldConfig: FormlyFieldConfig[] = [ @@ -9,7 +11,6 @@ const formFieldConfig: FormlyFieldConfig[] = [ { wrappers: ['form-layout'], props: { - submitLabel: 'Revise Molecular Profile', showDevPanel: false, }, fieldGroup: [ @@ -24,62 +25,79 @@ const formFieldConfig: FormlyFieldConfig[] = [ key: 'fields', wrappers: ['form-card'], props: { - title: 'Revise Evidence Item', + formCardOptions: { title: 'Revise Molecular Profile' }, }, fieldGroup: [ { - key: 'description', - type: 'textarea', - wrappers: ['form-field'], - props: { - placeholder: 'Enter a Molecular Profile Description', - label: 'Molecular Profile Description', - description: 'Provide a summary of the clinical relevance of this Molecular Profile. The Molecular Profile Summary should be a synthesis of the existing Evidence Statements for this profile. Basic information on recurrence rates and biological/functional impact of the variants may be included, but the focus should be on the clinical impact (i.e. predictive, prognostic, diagnostic, or predisposing relevance).', - extraType: 'prompt', - required: false, - rows: 5, - colSpan: 24 + wrappers: ['form-row'], + props: { + formRowOptions: { + responsiveIndexed: [ + { md: 24, lg: 16 }, + { md: 24, lg: 8 }, + { xs: 24 }, + ], + }, }, - }, - { - key: 'aliases', - type: 'tag-multi-input', - wrappers: ['form-field'], - props: { - label: 'Aliases', - description: 'List any aliases commonly used to refer to this Molecular Profile', - extraType: 'prompt' - } - }, - { - key: 'sourceIds', - type: 'source-multi-select', - wrappers: ['form-field'], - props: {}, + fieldGroup: [ + { + key: 'description', + type: 'textarea', + wrappers: ['form-field'], + props: { + placeholder: 'Enter a Molecular Profile Description', + label: 'Molecular Profile Description', + description: + 'Provide a summary of the clinical relevance of this Molecular Profile. The Molecular Profile Summary should be a synthesis of the existing Evidence Statements for this profile. Basic information on recurrence rates and biological/functional impact of the variants may be included, but the focus should be on the clinical impact (i.e. predictive, prognostic, diagnostic, or predisposing relevance).', + required: false, + rows: 5, + }, + }, + { + key: 'aliases', + type: 'tag-multi-input', + wrappers: ['form-field'], + props: { + label: 'Aliases', + description: + 'List any aliases commonly used to refer to this Molecular Profile', + }, + }, + { + key: 'sourceIds', + type: 'source-multi-select', + wrappers: ['form-field'], + props: {}, + }, + ], }, ], }, { - wrappers: ['form-footer'], + wrappers: ['form-row'], + props: { + formRowOptions: { + spanIndexed: [24, 12, 12], + }, + }, fieldGroup: [ { key: 'comment', - type: 'textarea', + type: 'base-textarea', props: { label: 'Comment', - placeholder: 'Please enter a comment describing your revisions.', required: true, - minLength: 10 }, }, { - type: 'cvc-cancel-button' + type: 'cvc-cancel-button', }, - { + { key: 'organizationId', type: 'org-submit-button', props: { - submitLabel: 'Submit Molecular Profile Revisions', + submitLabel: 'Submit Revisions', + align: 'right', }, }, ], diff --git a/client/src/app/forms/config/source-submit/source-submit.form.config.ts b/client/src/app/forms/config/source-submit/source-submit.form.config.ts index 37f353bdb..c1eef69b5 100644 --- a/client/src/app/forms/config/source-submit/source-submit.form.config.ts +++ b/client/src/app/forms/config/source-submit/source-submit.form.config.ts @@ -4,7 +4,6 @@ const formFieldConfig: FormlyFieldConfig[] = [ { wrappers: ['form-layout'], props: { - submitLabel: 'Submit Source Suggestion', showDevPanel: false, }, fieldGroup: [ @@ -19,7 +18,7 @@ const formFieldConfig: FormlyFieldConfig[] = [ key: 'fields', wrappers: ['form-card'], props: { - title: 'Submit Source Suggestion', + formCardOptions: { title: 'Submit Source Suggestion' }, }, fieldGroup: [ { @@ -27,7 +26,8 @@ const formFieldConfig: FormlyFieldConfig[] = [ type: 'molecular-profile-select', props: { required: false, - description: 'Select a Molecular Profile for this Source Suggestion, if applicable.', + description: + 'Select a Molecular Profile for this Source Suggestion, if applicable.', watchVariantMolecularProfileId: true, }, }, @@ -53,11 +53,11 @@ const formFieldConfig: FormlyFieldConfig[] = [ props: { label: 'Comment', required: true, - minLength: 10 + minLength: 10, }, }, { - type: 'cvc-cancel-button' + type: 'cvc-cancel-button', }, { key: 'organizationId', diff --git a/client/src/app/forms/config/variant-revise/variant-revise.form.config.ts b/client/src/app/forms/config/variant-revise/variant-revise.form.config.ts index 4f2a69d83..8a99f1b38 100644 --- a/client/src/app/forms/config/variant-revise/variant-revise.form.config.ts +++ b/client/src/app/forms/config/variant-revise/variant-revise.form.config.ts @@ -5,13 +5,13 @@ import assignFieldConfigDefaultValues from '@app/forms/utilities/assign-field-de import { CvcFormCardWrapperProps } from '@app/forms/wrappers/form-card/form-card.wrapper' import { CvcFormLayoutWrapperProps } from '@app/forms/wrappers/form-layout/form-layout.wrapper' import { FormlyFieldConfig } from '@ngx-formly/core' +import { CvcFormRowWrapperProps } from '@app/forms/wrappers/form-row/form-row.wrapper' +import { CvcOrgSubmitButtonFieldConfig } from '@app/forms/types/org-submit-button/org-submit-button.type' const formFieldConfig: FormlyFieldConfig[] = [ - // form-layout wrapper embeds the form in an nz-grid row, allowing the form to be placed adjacent to other controls or page elements. Currently, it provides a toggleable dev panel. Could be used to add a preview of the entity being added/edited, or more extensive feedback like lists of similar entities, etc. { wrappers: ['form-layout'], props: { - submitLabel: 'Revise Variant', showDevPanel: false, }, fieldGroup: [ @@ -21,239 +21,321 @@ const formFieldConfig: FormlyFieldConfig[] = [ hidden: true, }, }, - // form-card wraps the form fields in a card, providing a place to put a title, and other controls e.g. form options, status { key: 'fields', wrappers: ['form-card'], props: { - title: 'Revise Variant', + formCardOptions: { title: 'Revise Variant' }, }, fieldGroup: [ { - key: 'geneId', - type: 'gene-select', - props: { - description: 'Enter an Entrez Gene for this Variant', - }, - }, - { - key: 'name', - type: 'input', - wrappers: ['form-field'], - props: { - placeholder: 'Enter a name for this Variant', - description: - "Enter the name of the Variant according to the Variant Curation SOP", - extraType: 'prompt', - label: 'Name', - required: true, - rows: 1, - }, - }, - { - key: 'aliases', - type: 'tag-multi-input', - wrappers: ['form-field'], - props: { - label: 'Aliases', - description: - 'List any aliases commonly used to refer to this Variant', - extraType: 'prompt', - placeholder: 'Enter Alias and hit return', - }, - }, - { - key: 'hgvsDescriptions', - type: 'tag-multi-input', - wrappers: ['form-field'], - props: { - label: 'HGVS Descriptions', - description: 'HGVS Descriptions', - extraType: 'prompt', - placeholder: 'Enter HGVS and hit return', - }, - }, - { - key: 'clinvarIds', - type: 'clinvar-multi-input', - wrappers: ['form-field'], - props: { - label: "ClinVar IDs", - description: 'Specify if Clinvar IDs exist, or if they are not applicable for this variant.' - } - }, - { - key: 'variantTypeIds', - type: 'variant-type-multi-select', - wrappers: ['form-field'] - }, - { - template: "

Primary (5') Coordinates

", - props: { - colSpan: 24 - } - }, - { - key: 'referenceBuild', - type: 'reference-build-select', - }, - { - key: 'ensemblVersion', - type: 'input', - wrappers: ['form-field'], - validators: { - nccnVersionNumber: { - expression: (c: AbstractControl) => c.value ? /^\d{2,3}$/.test(c.value) : true, - message: (_: any, field: FormlyFieldConfig) => `"${field.formControl?.value}" does not appear to be an Ensembl version number`, + wrappers: ['form-row'], + props: { + formRowOptions: { + responsiveIndexed: [ + { xs: 24, md: 12, lg: 8 }, + { xs: 24, md: 12, lg: 8 }, + { xs: 24, lg: 8 }, + ], }, }, - props: { - label: 'Ensembl Version', - description: "Enter a valid Ensembl database version (e.g. 75)" - }, - }, - { - key: 'referenceBases', - type: 'input', - wrappers: ['form-field'], - validators: { - nccnVersionNumber: { - expression: (c: AbstractControl) => c.value ? /^[ACTG\\]+$/.test(c.value) : true, - message: (_: any, field: FormlyFieldConfig) => `"${field.formControl?.value}" contains invalid characters.`, + fieldGroup: [ + { + key: 'geneId', + type: 'gene-select', + props: { + description: 'Enter an Entrez Gene for this Variant', + required: true, + }, }, - }, - props: { - label: 'Reference Bases', - description: "The nucleotide(s) of the reference genome affected by the variant. Only used for SNVs and Indels (otherwise leave blank)" - }, - }, - { - key: 'variantBases', - type: 'input', - wrappers: ['form-field'], - validators: { - nccnVersionNumber: { - expression: (c: AbstractControl) => c.value ? /^[ACTG\\]+$/.test(c.value) : true, - message: (_: any, field: FormlyFieldConfig) => `"${field.formControl?.value}" contains invalid characters.`, + { + key: 'name', + type: 'base-input', + props: { + placeholder: 'Enter a name for this Variant', + description: + "Enter the name of the Variant according to the Variant Curation SOP", + label: 'Name', + required: true, + rows: 1, + }, }, - }, - props: { - label: 'Variant Bases', - description: "The nucleotide(s) of the variant allele. Only used for SNVs and Indels (otherwise leave blank)" - }, - }, - { - key: 'chromosome', - type: 'select', - wrappers: ['form-field'], - props: { - label: 'Chromosome', - options: Chromosomes, - description: 'Specify the chromosome in which this variant occurs (e.g. 17).' - } - }, - { - key: 'start', - type: 'input', - wrappers: ['form-field'], - validators: { - isNumeric: { - expression: (c: AbstractControl) => c.value ? /^\d+$/.test(c.value) : true, - message: (_: any, field: FormlyFieldConfig) => 'Start coordinate must be numeric', + { + key: 'aliases', + type: 'tag-multi-input', + props: { + label: 'Aliases', + description: + 'List any aliases commonly used to refer to this Variant', + placeholder: 'Enter Alias and hit return', + }, }, - }, - props: { - label: 'Start', - description: "Enter the left/first coordinate of this variant. Must be โ‰ค the Stop coordinate. Coordinate must be compatible with the selected reference build." - }, + ], }, { - key: 'stop', - type: 'input', - wrappers: ['form-field'], - validators: { - isNumeric: { - expression: (c: AbstractControl) => c.value ? /^\d+$/.test(c.value) : true, - message: (_: any, field: FormlyFieldConfig) => 'Stop coordinate must be numeric', + wrappers: ['form-row'], + props: { + formRowOptions: { + responsiveIndexed: [ + { xs: 24, lg: 12, xl: 6, xxl: 8 }, + { xs: 24, lg: 12, xl: 6, xxl: 8 }, + { xs: 24, xl: 12, xxl: 8 }, + ], }, }, - props: { - label: 'Stop', - description: "Provide the right/second coordinate of this variant. Must be โ‰ฅ the Start coordinate. Coordinate must be compatible with the selected reference build." - }, - }, - { - key: 'representativeTranscript', - type: 'input', - wrappers: ['form-field'], - props: { - label: 'Representative Transcript', - description: "Specify a transcript ID, including version number (e.g. ENST00000348159.4, the canonical transcript defined by Ensembl)." - }, - }, - { - template: "

Secondary (3') Coordinates

", - props: { - colSpan: 24 - } - }, - { - key: 'chromosome2', - type: 'select', - wrappers: ['form-field'], - props: { - label: 'Chromosome', - options: Chromosomes, - description: 'If this variant is a fusion (e.g. BCR-ABL1), specify the chromosome name, coordinates, and representative transcript for the 3-prime partner.' - } - }, - { - key: 'start2', - type: 'input', - wrappers: ['form-field'], - validators: { - isNumeric: { - expression: (c: AbstractControl) => c.value ? /^\d+$/.test(c.value) : true, - message: (_: any, field: FormlyFieldConfig) => 'Start coordinate must be numeric', + fieldGroup: [ + { + key: 'hgvsDescriptions', + type: 'tag-multi-input', + props: { + label: 'HGVS Descriptions', + description: + 'Enter any HGVS nomenclature descriptions of this Variant', + tooltip: + 'Human Genome Variation Society nomenclature descriptions', + placeholder: 'Enter HGVS and hit return', + }, }, - }, - props: { - label: 'Start', - description: "Enter the left/first coordinate of this 3-prime partner fusion variant. Must be โ‰ค the Stop coordinate. Coordinate must be compatible with the selected reference build." - }, - }, - { - key: 'stop2', - type: 'input', - wrappers: ['form-field'], - validators: { - isNumeric: { - expression: (c: AbstractControl) => c.value ? /^\d+$/.test(c.value) : true, - message: (_: any, field: FormlyFieldConfig) => 'Stop coordinate must be numeric', + { + key: 'variantTypeIds', + type: 'variant-type-multi-select', }, - }, - props: { - label: 'Stop', - description: "Provide the right/second coordinate of this 3-prime partner fusion variant. Must be โ‰ฅ the Start coordinate. Coordinate must be compatible with the selected reference build." - }, + { + key: 'clinvarIds', + type: 'clinvar-multi-input', + wrappers: ['form-field'], + props: { + label: 'ClinVar IDs', + }, + }, + ], }, { - key: 'representativeTranscript2', - type: 'input', - wrappers: ['form-field'], - props: { - label: 'Representative Transcript', - description: "Specify a transcript ID, including version number (e.g. ENST00000348159.4, the canonical transcript defined by Ensembl)." + wrappers: ['form-row'], + props: { + formRowOptions: { + span: 24, + }, }, + fieldGroup: [ + { + wrappers: ['form-card'], + props: { + formCardOptions: { + title: `Primary (5') Coordinates`, + size: 'small', + }, + }, + fieldGroup: [ + { + wrappers: ['form-row'], + props: { + formRowOptions: { + responsive: { xs: 24, md: 12, lg: 8, xxl: 6 }, + }, + }, + fieldGroup: [ + { + key: 'referenceBuild', + type: 'reference-build-select', + }, + { + key: 'ensemblVersion', + type: 'base-input', + validators: { + nccnVersionNumber: { + expression: (c: AbstractControl) => + c.value ? /^\d{2,3}$/.test(c.value) : true, + message: (_: any, field: FormlyFieldConfig) => + `"${field.formControl?.value}" does not appear to be an Ensembl version number`, + }, + }, + props: { + label: 'Ensembl Version', + description: + 'Enter a valid Ensembl database version (e.g. 75)', + }, + }, + { + key: 'referenceBases', + type: 'base-input', + validators: { + nccnVersionNumber: { + expression: (c: AbstractControl) => + c.value ? /^[ACTG\\]+$/.test(c.value) : true, + message: (_: any, field: FormlyFieldConfig) => + `"${field.formControl?.value}" contains invalid characters.`, + }, + }, + props: { + label: 'Reference Bases', + description: + 'The nucleotide(s) of the reference genome affected by the variant. Only used for SNVs and Indels (otherwise leave blank)', + }, + }, + { + key: 'variantBases', + type: 'base-input', + validators: { + nccnVersionNumber: { + expression: (c: AbstractControl) => + c.value ? /^[ACTG\\]+$/.test(c.value) : true, + message: (_: any, field: FormlyFieldConfig) => + `"${field.formControl?.value}" contains invalid characters.`, + }, + }, + props: { + label: 'Variant Bases', + description: + 'The nucleotide(s) of the variant allele. Only used for SNVs and Indels (otherwise leave blank)', + }, + }, + { + key: 'chromosome', + type: 'base-select', + props: { + label: 'Chromosome', + options: Chromosomes, + description: + 'Specify the chromosome in which this variant occurs (e.g. 17).', + }, + }, + { + key: 'start', + type: 'base-input', + validators: { + isNumeric: { + expression: (c: AbstractControl) => + c.value ? /^\d+$/.test(c.value) : true, + message: (_: any, field: FormlyFieldConfig) => + 'Start coordinate must be numeric', + }, + }, + props: { + label: 'Start', + description: + 'Enter the left/first coordinate of this variant. Must be โ‰ค the Stop coordinate. Coordinate must be compatible with the selected reference build.', + }, + }, + { + key: 'stop', + type: 'base-input', + validators: { + isNumeric: { + expression: (c: AbstractControl) => + c.value ? /^\d+$/.test(c.value) : true, + message: (_: any, field: FormlyFieldConfig) => + 'Stop coordinate must be numeric', + }, + }, + props: { + label: 'Stop', + description: + 'Provide the right/second coordinate of this variant. Must be โ‰ฅ the Start coordinate. Coordinate must be compatible with the selected reference build.', + }, + }, + { + key: 'representativeTranscript', + type: 'base-input', + props: { + label: 'Representative Transcript', + description: + 'Specify a transcript ID, including version number (e.g. ENST00000348159.4, the canonical transcript defined by Ensembl).', + }, + }, + ], + }, + ], + }, + { + wrappers: ['form-card'], + props: { + formCardOptions: { + title: `Secondary (3') Coordinates`, + size: 'small', + }, + }, + fieldGroup: [ + { + wrappers: ['form-row'], + props: { + formRowOptions: { + responsive: { xs: 24, md: 12, lg: 8, xxl: 6 }, + }, + }, + fieldGroup: [ + { + key: 'chromosome2', + type: 'base-select', + props: { + label: 'Chromosome', + options: Chromosomes, + description: + 'If this variant is a fusion (e.g. BCR-ABL1), specify the chromosome name, coordinates, and representative transcript for the 3-prime partner.', + }, + }, + { + key: 'start2', + type: 'base-input', + validators: { + isNumeric: { + expression: (c: AbstractControl) => + c.value ? /^\d+$/.test(c.value) : true, + message: (_: any, field: FormlyFieldConfig) => + 'Start coordinate must be numeric', + }, + }, + props: { + label: 'Start', + description: + 'Enter the left/first coordinate of this 3-prime partner fusion variant. Must be โ‰ค the Stop coordinate. Coordinate must be compatible with the selected reference build.', + }, + }, + { + key: 'stop2', + type: 'base-input', + validators: { + isNumeric: { + expression: (c: AbstractControl) => + c.value ? /^\d+$/.test(c.value) : true, + message: (_: any, field: FormlyFieldConfig) => + 'Stop coordinate must be numeric', + }, + }, + props: { + label: 'Stop', + description: + 'Provide the right/second coordinate of this 3-prime partner fusion variant. Must be โ‰ฅ the Start coordinate. Coordinate must be compatible with the selected reference build.', + }, + }, + { + key: 'representativeTranscript2', + type: 'base-input', + props: { + label: 'Representative Transcript', + description: + 'Specify a transcript ID, including version number (e.g. ENST00000348159.4, the canonical transcript defined by Ensembl).', + }, + }, + ], + }, + ], + }, + ], }, ], }, { - wrappers: ['form-footer'], + wrappers: ['form-row'], + props: { + formRowOptions: { + spanIndexed: [24, 12, 12], + }, + }, fieldGroup: [ { key: 'comment', - type: 'textarea', + type: 'base-textarea', props: { label: 'Comment', placeholder: 'Please enter a comment describing your revisions.', @@ -262,13 +344,14 @@ const formFieldConfig: FormlyFieldConfig[] = [ }, }, { - type: 'cvc-cancel-button' + type: 'cvc-cancel-button', }, - { + { key: 'organizationId', type: 'org-submit-button', props: { submitLabel: 'Submit Variant Revisions', + align: 'right', }, }, ], @@ -277,7 +360,4 @@ const formFieldConfig: FormlyFieldConfig[] = [ }, ] export const variantReviseFields: FormlyFieldConfig[] = - assignFieldConfigDefaultValues( - formFieldConfig, - variantReviseFormInitialModel - ) + assignFieldConfigDefaultValues(formFieldConfig, variantReviseFormInitialModel) diff --git a/client/src/app/forms/config/variant-submit/variant-submit.form.html b/client/src/app/forms/config/variant-submit/variant-submit.form.html index 554bee066..25336f5ec 100644 --- a/client/src/app/forms/config/variant-submit/variant-submit.form.html +++ b/client/src/app/forms/config/variant-submit/variant-submit.form.html @@ -15,16 +15,26 @@ + [nzDescription]="variantLink"> New Variant {{ variant.name }} added. - + View its details here. + + + Variant {{ variant.name }} already exists. + diff --git a/client/src/app/forms/config/variant-submit/variant-submit.form.ts b/client/src/app/forms/config/variant-submit/variant-submit.form.ts index 0d79b2ed0..ab69985c6 100644 --- a/client/src/app/forms/config/variant-submit/variant-submit.form.ts +++ b/client/src/app/forms/config/variant-submit/variant-submit.form.ts @@ -2,24 +2,17 @@ import { ChangeDetectionStrategy, Component, EventEmitter, - OnDestroy, - OnInit, Output, } from '@angular/core' import { UntypedFormGroup } from '@angular/forms' -import { CvcFieldGridWrapperConfig } from '@app/forms/wrappers/field-grid/field-grid.wrapper' import { CvcVariantSelectFieldOption } from '@app/forms/types/variant-select/variant-select.type' import { Maybe, Variant } from '@app/generated/civic.apollo' import { FormlyFieldConfig, FormlyFormOptions } from '@ngx-formly/core' -import { BehaviorSubject, Subject } from 'rxjs' -import { - FormGene, - FormMolecularProfile, - FormVariant, -} from '@app/forms/forms.interfaces' +import { BehaviorSubject } from 'rxjs' import { NzFormLayoutType } from 'ng-zorro-antd/form' import { EntityFieldSubjectMap } from '@app/forms/states/base.state' import { Apollo, gql } from 'apollo-angular' +import { CvcFormRowWrapperProps } from '@app/forms/wrappers/form-row/form-row.wrapper' type VariantSubmitModel = { geneId?: number @@ -31,18 +24,6 @@ type VariantSubmitState = { fields: EntityFieldSubjectMap } -// interface FormModel { -// fields: { -// gene: FormGene[] -// variant: FormVariant[] -// } -// } - -// export interface SelectedVariant { -// variantId: number -// molecularProfile: FormMolecularProfile -// } - @Component({ selector: 'cvc-variant-submit-form', templateUrl: './variant-submit.form.html', @@ -58,6 +39,7 @@ export class VariantSubmitForm { form: UntypedFormGroup config: FormlyFieldConfig[] layout: NzFormLayoutType = 'horizontal' + newlyCreated?: boolean finderState: VariantSubmitState = { formLayout: this.layout, @@ -75,10 +57,10 @@ export class VariantSubmitForm { this.config = [ { - wrappers: ['field-grid'], - props: { - grid: { - cols: 2, + wrappers: ['form-row'], + props: { + formRowOptions: { + span: 12, }, }, fieldGroup: [ @@ -103,6 +85,7 @@ export class VariantSubmitForm { showExtra: false, }, hideLabel: true, + isNewlyCreatedCallback: (isNew: boolean): void => {this.newlyCreated = isNew}, }, }, ], diff --git a/client/src/app/forms/config/variantgroup-revise/variantgroup-revise.form.config.ts b/client/src/app/forms/config/variantgroup-revise/variantgroup-revise.form.config.ts index b84973f6c..20e155615 100644 --- a/client/src/app/forms/config/variantgroup-revise/variantgroup-revise.form.config.ts +++ b/client/src/app/forms/config/variantgroup-revise/variantgroup-revise.form.config.ts @@ -1,10 +1,10 @@ +import { CvcFormRowWrapperProps } from '@app/forms/wrappers/form-row/form-row.wrapper' import { FormlyFieldConfig } from '@ngx-formly/core' const formFieldConfig: FormlyFieldConfig[] = [ { wrappers: ['form-layout'], props: { - submitLabel: 'Revise Variant Group', showDevPanel: false, }, fieldGroup: [ @@ -14,27 +14,24 @@ const formFieldConfig: FormlyFieldConfig[] = [ hidden: true, }, }, - // form-card wraps the form fields in a card, providing a place to put a title, and other controls e.g. form options, status { key: 'fields', wrappers: ['form-card'], props: { - title: 'Revise Variant Group', + formCardOptions: { title: 'Revise Variant Group' }, }, fieldGroup: [ { key: 'name', - type: 'input', + type: 'base-input', props: { label: 'Variant Group Name', required: true, - colSpan: 24, }, }, { key: 'description', - type: 'textarea', - wrappers: ['form-field'], + type: 'base-textarea', props: { tooltip: 'User-defined summary of the clinical relevance of this Variant Group.', @@ -56,7 +53,6 @@ const formFieldConfig: FormlyFieldConfig[] = [ props: { label: 'Variants', required: true, - colSpan: 24, requireGene: false, showManagerBtn: true, }, @@ -64,7 +60,12 @@ const formFieldConfig: FormlyFieldConfig[] = [ ], }, { - wrappers: ['form-footer'], + wrappers: ['form-row'], + props: { + formRowOptions: { + spanIndexed: [24, 12, 12], + }, + }, fieldGroup: [ { key: 'comment', @@ -82,6 +83,7 @@ const formFieldConfig: FormlyFieldConfig[] = [ type: 'org-submit-button', props: { submitLabel: 'Submit Variant Group Revision', + align: 'right', }, }, ], diff --git a/client/src/app/forms/config/variantgroup-submit/variantgroup-submit.form.config.ts b/client/src/app/forms/config/variantgroup-submit/variantgroup-submit.form.config.ts index dea4049b3..d6c524eb6 100644 --- a/client/src/app/forms/config/variantgroup-submit/variantgroup-submit.form.config.ts +++ b/client/src/app/forms/config/variantgroup-submit/variantgroup-submit.form.config.ts @@ -4,7 +4,6 @@ const formFieldConfig: FormlyFieldConfig[] = [ { wrappers: ['form-layout'], props: { - submitLabel: 'Submit Variant Group', showDevPanel: false, }, fieldGroup: [ @@ -19,12 +18,12 @@ const formFieldConfig: FormlyFieldConfig[] = [ key: 'fields', wrappers: ['form-card'], props: { - title: 'Submit Variant Group', + formCardOptions: { title: 'Submit Variant Group' }, }, fieldGroup: [ { key: 'name', - type: 'input', + type: 'base-input', props: { label: 'Variant Group Name', required: true, @@ -41,7 +40,7 @@ const formFieldConfig: FormlyFieldConfig[] = [ placeholder: 'Enter a Variant Group Summary', label: 'Variant Group Summary', required: true, - rows: 5 + rows: 5, }, }, { @@ -75,7 +74,7 @@ const formFieldConfig: FormlyFieldConfig[] = [ }, }, { - type: 'cvc-cancel-button' + type: 'cvc-cancel-button', }, { key: 'organizationId', diff --git a/client/src/app/forms/mixins/base/base-field.ts b/client/src/app/forms/mixins/base/base-field.ts index 2d7d2b65d..ca163c12a 100644 --- a/client/src/app/forms/mixins/base/base-field.ts +++ b/client/src/app/forms/mixins/base/base-field.ts @@ -3,7 +3,7 @@ import { BaseState } from '@app/forms/states/base.state' import { Maybe } from '@app/generated/civic.apollo' import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy' import { FieldType, FieldTypeConfig } from '@ngx-formly/core' -import { BehaviorSubject, filter, map, Observable } from 'rxjs' +import { BehaviorSubject, filter, first, map, Observable } from 'rxjs' import { pluck } from 'rxjs-etc/operators' import { tag } from 'rxjs-spy/operators' @@ -52,13 +52,25 @@ export function BaseFieldType< this.onValueChange$ = new BehaviorSubject>( this.formControl.value ) + + if (Array.isArray(this.formControl.value)) { + // only mark array type fields as touched if value contains elements + if (this.field.formControl.value.length > 0) { + this.formControl.markAsTouched() + } + } else { + this.formControl.markAsTouched() + } } else { this.onValueChange$ = new BehaviorSubject>(undefined) } - // this.onValueChange$ - // .pipe(tag(`${this.field.key} base-field onValueChange$`)) - // .subscribe() + // // DEBUG + // // uncomment next line to limit logging to a single field + // if (this.field.key === 'evidenceItemIds') + // this.onValueChange$ + // .pipe(tag(`${this.field.key} base-field onValueChange$`)) + // .subscribe() // emit value from onValueChange$ for every model change this.onModelChange$.pipe(untilDestroyed(this)).subscribe((v) => { @@ -81,6 +93,7 @@ export function BaseFieldType< this.field.key ) } + // it is assumed entity state field names are // field key string + '$', e.g. field key 'geneId' // will emit value changes from state.field.geneId$ diff --git a/client/src/app/forms/mixins/entity-select-field.mixin.ts b/client/src/app/forms/mixins/entity-select-field.mixin.ts index 98f6edee2..cf5f2bbb7 100644 --- a/client/src/app/forms/mixins/entity-select-field.mixin.ts +++ b/client/src/app/forms/mixins/entity-select-field.mixin.ts @@ -237,10 +237,9 @@ export function EntitySelectField< }) ) // end this.response$ - this.onOpenChange$ - .subscribe((change: boolean) => { - if (change) this.onSearch$.next('') - }) + this.onOpenChange$.subscribe((change: boolean) => { + if (change) this.onSearch$.next('') + }) this.response$ .pipe( diff --git a/client/src/app/forms/mixins/string-input-field.mixin.ts b/client/src/app/forms/mixins/string-input-field.mixin.ts index 8a94ff4fa..ead9eee32 100644 --- a/client/src/app/forms/mixins/string-input-field.mixin.ts +++ b/client/src/app/forms/mixins/string-input-field.mixin.ts @@ -11,9 +11,6 @@ export function StringTagField>( ) { @Injectable() abstract class StringTagFieldMixin extends Base { - // BASE FIELD TYPE SOURCE STREAMS - onValueChange$?: Subject> - // LOCAL SOURCE STREAMS onTagClose$!: Subject // emits on entity tag closed btn click @@ -21,19 +18,7 @@ export function StringTagField>( tagLabel$!: Subject> // emits label for tag configureStringTagField(): void { - if (!this.onValueChange$) { - console.error( - `${this.field.id} cannot find onValueChange$ Subject, ensure configureBaseField() has been called before configureDisplayStringTag in its AfterViewInit hook.` - ) - return - } - this.tagLabel$ = new Subject>() - this.onValueChange$ - .pipe(untilDestroyed(this)) - .subscribe((str: Maybe) => { - this.tagLabel$.next(str ? str.toString() : undefined) - }) this.onTagClose$ = new Subject() diff --git a/client/src/app/forms/test-pages/layout-tests/horizontal-form/horizontal-form.page.html b/client/src/app/forms/test-pages/layout-tests/horizontal-form/horizontal-form.page.html index c99d63631..2b0626ca8 100644 --- a/client/src/app/forms/test-pages/layout-tests/horizontal-form/horizontal-form.page.html +++ b/client/src/app/forms/test-pages/layout-tests/horizontal-form/horizontal-form.page.html @@ -1,6 +1,6 @@
{ - title: 'Horizontal Field Layout, No State', + formCardOptions: { title: 'Horizontal Field Layout, No State' }, }, fieldGroup: noStateFormsFieldConfig, }, diff --git a/client/src/app/forms/test-pages/layout-tests/inline-form/inline-form.page.html b/client/src/app/forms/test-pages/layout-tests/inline-form/inline-form.page.html index c99d63631..3bd23c216 100644 --- a/client/src/app/forms/test-pages/layout-tests/inline-form/inline-form.page.html +++ b/client/src/app/forms/test-pages/layout-tests/inline-form/inline-form.page.html @@ -1,6 +1,6 @@ { - grid: { - cols: 2, - }, - }, - fieldGroup: [ - { - key: 'evidenceType', - type: 'type-select', - props: {}, - }, - { - key: 'evidenceTypes', - type: 'type-multi-select', - props: {}, - }, - ], + { + key: 'evidenceType', + type: 'type-select', + props: {}, + }, + { + key: 'evidenceTypes', + type: 'type-multi-select', + props: {}, }, - { - wrappers: ['field-grid'], - props: { - grid: { - cols: 2, - }, - }, - fieldGroup: [ - { - key: 'geneId', - type: 'gene-select', - }, - { - key: 'geneIds', - type: 'gene-multi-select', - props: {}, - }, - ], - }, - { - wrappers: ['field-grid'], - props: { - grid: { - cols: 2, - }, - }, - fieldGroup: [ - { - key: 'variantId', - type: 'variant-select', - props: { - requireGene: false, - }, - }, - { - key: 'variantIds', - type: 'variant-multi-select', - props: { - requireGene: false, - }, - }, - ], - }, - { - wrappers: ['field-grid'], - props: { - grid: { - cols: 2, - }, - }, - fieldGroup: [ - { - key: 'sourceId', - type: 'source-select', - props: {}, - }, - { - key: 'sourceIds', - type: 'source-multi-select', - props: {}, - }, - ], - }, - { - wrappers: ['field-grid'], - props: { - grid: { - cols: 2, - }, + { + key: 'geneId', + type: 'gene-select', + }, + { + key: 'geneIds', + type: 'gene-multi-select', + props: {}, + }, + { + key: 'variantId', + type: 'variant-select', + props: { + requireGene: false, }, - fieldGroup: [ - { - key: 'diseaseId', - type: 'disease-select', - props: {}, - }, - { - key: 'diseaseIds', - type: 'disease-multi-select', - props: {}, - }, - ], - }, - { - wrappers: ['field-grid'], - props: { - grid: { - cols: 2, - }, + }, + { + key: 'variantIds', + type: 'variant-multi-select', + props: { + requireGene: false, }, - fieldGroup: [ - { - key: 'drugId', - type: 'therapy-select', - props: {}, - }, - { - key: 'drugIds', - type: 'therapy-multi-select', - props: {}, - }, - ], - }, - { - wrappers: ['field-grid'], - props: { - grid: { - cols: 2, - }, + }, + { + key: 'sourceId', + type: 'source-select', + props: {}, + }, + { + key: 'sourceIds', + type: 'source-multi-select', + props: {}, + }, + { + key: 'diseaseId', + type: 'disease-select', + props: {}, + }, + { + key: 'diseaseIds', + type: 'disease-multi-select', + props: {}, + }, + { + key: 'drugId', + type: 'therapy-select', + props: {}, + }, + { + key: 'drugIds', + type: 'therapy-multi-select', + props: {}, + }, + { + key: 'evidenceLevel', + type: 'level-select', + props: {}, + }, + { + key: 'evidenceLevel', + type: 'level-multi-select', + props: {}, + }, + { + key: 'variantOrigin', + type: 'origin-select', + props: {}, + }, + { + key: 'variantOrigins', + type: 'origin-multi-select', + props: {}, + }, + { + key: 'tag', + type: 'tag-input', + props: { + label: 'Input Test', }, - fieldGroup: [ - { - key: 'evidenceLevel', - type: 'level-select', - props: {}, - }, - { - key: 'evidenceLevel', - type: 'level-multi-select', - props: {}, - }, - ], - }, - { - wrappers: ['field-grid'], - props: { - grid: { - cols: 2, - }, + }, + { + key: 'tags', + type: 'tag-multi-input', + props: { + label: 'Input Multi Test', }, - fieldGroup: [ - { - key: 'variantOrigin', - type: 'origin-select', - props: {}, - }, - { - key: 'variantOrigins', - type: 'origin-multi-select', - props: {}, - }, - ], - }, - // { - // wrappers: ['field-grid'], - // props: { - // grid: { - // cols: 2, - // }, - // }, - // fieldGroup: [ - // { - // key: 'tag', - // type: 'tag-input', - // props: { - // label: 'Input Test', - // }, - // }, - // { - // key: 'tags', - // type: 'tag-multi-input', - // props: { - // label: 'Input Multi Test', - // }, - // }, - // ], - // }, + }, ] diff --git a/client/src/app/forms/test-pages/layout-tests/vertical-form/vertical-form.page.ts b/client/src/app/forms/test-pages/layout-tests/vertical-form/vertical-form.page.ts index 45303055f..cae646107 100644 --- a/client/src/app/forms/test-pages/layout-tests/vertical-form/vertical-form.page.ts +++ b/client/src/app/forms/test-pages/layout-tests/vertical-form/vertical-form.page.ts @@ -31,7 +31,7 @@ export class VerticalFormPage implements OnInit { key: 'fields', wrappers: ['form-card'], props: { - title: 'Vertical Field Layout, No State', + formCardOptions: { title: 'Vertical Field Layout, No State' }, }, fieldGroup: noStateFormsFieldConfig, }, diff --git a/client/src/app/forms/test-pages/test-pages-routing.module.ts b/client/src/app/forms/test-pages/test-pages-routing.module.ts index 17e011946..7a48141d5 100644 --- a/client/src/app/forms/test-pages/test-pages-routing.module.ts +++ b/client/src/app/forms/test-pages/test-pages-routing.module.ts @@ -14,6 +14,7 @@ import { VariantgroupReviseTestPage } from './variantgroup-revise-test/variantgr import { GeneReviseTestPage } from './gene-revise-test/gene-revise-test.page' import { MolecularProfileReviseTestPage } from './molecular-profile-revise-test/molecular-profile-revise-test.page' import { VariantReviseTestPage } from './variant-revise-test/variant-revise-test.page' +import { VariantSubmitTestPage } from './variant-submit-test/variant-submit-test.page' const routes: Routes = [ { @@ -25,77 +26,84 @@ const routes: Routes = [ path: 'evidence-submit-test', component: EvidenceSubmitTestPage, data: { - breadcrumb: 'Evidence Submit Test', + breadcrumb: 'Evidence Submit Form', }, }, { path: 'evidence-revise-test', component: EvidenceReviseTestPage, data: { - breadcrumb: 'Evidence Revise Test', + breadcrumb: 'Evidence Revise Form', }, }, { path: 'assertion-submit-test', component: AssertionSubmitTestPage, data: { - breadcrumb: 'Assertion Submit Test', + breadcrumb: 'Assertion Submit Form', }, }, { path: 'assertion-revise-test', component: AssertionReviseTestPage, data: { - breadcrumb: 'Assertion Revise Test', + breadcrumb: 'Assertion Revise Form', }, }, { path: 'variantgroup-revise-test', component: VariantgroupReviseTestPage, data: { - breadcrumb: 'Variant Group Revise Test', + breadcrumb: 'Variant Group Revise Form', }, }, { path: 'gene-revise-test', component: GeneReviseTestPage, data: { - breadcrumb: 'Gene Revise Test', + breadcrumb: 'Gene Revise Form', }, }, { path: 'mp-revise-test', component: MolecularProfileReviseTestPage, data: { - breadcrumb: 'MP Revise Test', + breadcrumb: 'MP Revise Form', + }, + }, + { + path: 'variant-submit-test', + component: VariantSubmitTestPage, + data: { + breadcrumb: 'Variant Submit Form', }, }, { path: 'variant-revise-test', component: VariantReviseTestPage, data: { - breadcrumb: 'Variant Revise Test', + breadcrumb: 'Variant Revise Form', }, }, { path: 'vertical-form', component: VerticalFormPage, data: { - breadcrumb: 'Nonstate', + breadcrumb: 'Vertical Layout Test', }, }, { path: 'inline-form', component: InlineFormPage, data: { - breadcrumb: 'Inline', + breadcrumb: 'Inline Layout Test', }, }, { path: 'horizontal-form', component: HorizontalFormPage, data: { - breadcrumb: 'Horizontal', + breadcrumb: 'Horizontal Layout Test', }, }, { diff --git a/client/src/app/forms/test-pages/test-pages.module.ts b/client/src/app/forms/test-pages/test-pages.module.ts index 12f2f13d3..11d4746ed 100644 --- a/client/src/app/forms/test-pages/test-pages.module.ts +++ b/client/src/app/forms/test-pages/test-pages.module.ts @@ -23,6 +23,7 @@ import { VariantgroupReviseTestModule } from './variantgroup-revise-test/variant import { GeneReviseTestModule } from './gene-revise-test/gene-revise-test.module' import { MolecularProfileReviseTestModule } from './molecular-profile-revise-test/molecular-profile-revise-test.module' import { VariantReviseTestModule } from './variant-revise-test/variant-revise-test.module' +import { VariantSubmitTestModule } from './variant-submit-test/variant-submit-test.module' @NgModule({ declarations: [TestPagesView], @@ -34,21 +35,22 @@ import { VariantReviseTestModule } from './variant-revise-test/variant-revise-te NzIconModule, NzTypographyModule, NzTabsModule, - EvidenceSubmitTestModule, + CvcPipesModule, + CvcTabNavigationModule, + CvcSectionNavigationModule, + AssertionReviseTestModule, + AssertionSubmitTestModule, EvidenceReviseTestModule, + EvidenceSubmitTestModule, GeneReviseTestModule, - MolecularProfileReviseTestModule, - AssertionSubmitTestModule, - AssertionReviseTestModule, - VariantReviseTestModule, HorizontalFormTestModule, InlineFormTestModule, - VerticalFormTestModule, + MolecularProfileReviseTestModule, TagsTestModule, - CvcPipesModule, - CvcTabNavigationModule, - CvcSectionNavigationModule, + VariantReviseTestModule, + VariantSubmitTestModule, VariantgroupReviseTestModule, + VerticalFormTestModule, ], exports: [TestPagesView], }) diff --git a/client/src/app/forms/test-pages/test-pages.view.html b/client/src/app/forms/test-pages/test-pages.view.html index 3aed49873..0845ae1ad 100644 --- a/client/src/app/forms/test-pages/test-pages.view.html +++ b/client/src/app/forms/test-pages/test-pages.view.html @@ -1,7 +1,7 @@ - Forms2 Test Pages + Form Dev Pages @@ -18,6 +18,9 @@ *nzTabLink nz-tab-link [routerLink]="tab.routeName"> + {{ tab.tabLabel }} diff --git a/client/src/app/forms/test-pages/test-pages.view.ts b/client/src/app/forms/test-pages/test-pages.view.ts index 5acfbcbdf..2fa281613 100644 --- a/client/src/app/forms/test-pages/test-pages.view.ts +++ b/client/src/app/forms/test-pages/test-pages.view.ts @@ -18,62 +18,66 @@ export class TestPagesView { { routeName: 'evidence-submit-test', iconName: 'civic-evidence', - tabLabel: 'Evidence Submit', + tabLabel: 'Submit', }, { routeName: 'evidence-revise-test', - iconName: '', - tabLabel: 'Evidence Revise', + iconName: 'civic-evidence', + tabLabel: 'Revise', }, { routeName: 'assertion-submit-test', - iconName: '', - tabLabel: 'Assertion Submit', + iconName: 'civic-assertion', + tabLabel: 'Submit', }, { routeName: 'assertion-revise-test', - iconName: '', - tabLabel: 'Assertion Revise', + iconName: 'civic-assertion', + tabLabel: 'Revise', }, { routeName: 'variantgroup-revise-test', - iconName: '', - tabLabel: 'VG Revise', + iconName: 'civic-variantgroup', + tabLabel: 'Revise', }, { routeName: 'gene-revise-test', - iconName: '', - tabLabel: 'Gene Revise', + iconName: 'civic-gene', + tabLabel: 'Revise', }, { routeName: 'mp-revise-test', - iconName: '', - tabLabel: 'MP Revise', + iconName: 'civic-molecularprofile', + tabLabel: 'Revise', + }, + { + routeName: 'variant-submit-test', + iconName: 'civic-variant', + tabLabel: 'Submit', }, { routeName: 'variant-revise-test', - iconName: '', - tabLabel: 'Variant Revise', - + iconName: 'civic-variant', + tabLabel: 'Revise', }, { routeName: 'vertical-form', - iconName: '', + iconName: 'layout', tabLabel: 'Vertical', }, { routeName: 'inline-form', - iconName: '', + iconName: 'layout', tabLabel: 'Inline', }, { routeName: 'horizontal-form', - iconName: '', + iconName: 'layout', tabLabel: 'Horizontal', }, { routeName: 'tags-test', - iconName: '', + iconName: 'tag', tabLabel: 'Tags', }, ] diff --git a/client/src/app/forms/test-pages/variant-submit-test/variant-submit-test.module.ts b/client/src/app/forms/test-pages/variant-submit-test/variant-submit-test.module.ts new file mode 100644 index 000000000..661bbb196 --- /dev/null +++ b/client/src/app/forms/test-pages/variant-submit-test/variant-submit-test.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core' +import { CommonModule } from '@angular/common' +import { VariantSubmitFormModule } from '@app/forms/config/variant-submit/variant-submit.module' +import { VariantSubmitTestPage } from './variant-submit-test.page' + +@NgModule({ + declarations: [VariantSubmitTestPage], + imports: [CommonModule, VariantSubmitFormModule], +}) +export class VariantSubmitTestModule {} diff --git a/client/src/app/forms/test-pages/variant-submit-test/variant-submit-test.page.html b/client/src/app/forms/test-pages/variant-submit-test/variant-submit-test.page.html new file mode 100644 index 000000000..ff0decd00 --- /dev/null +++ b/client/src/app/forms/test-pages/variant-submit-test/variant-submit-test.page.html @@ -0,0 +1,3 @@ +
+ +
diff --git a/client/src/app/forms/test-pages/variant-submit-test/variant-submit-test.page.ts b/client/src/app/forms/test-pages/variant-submit-test/variant-submit-test.page.ts new file mode 100644 index 000000000..711e0e6a0 --- /dev/null +++ b/client/src/app/forms/test-pages/variant-submit-test/variant-submit-test.page.ts @@ -0,0 +1,8 @@ +import { ChangeDetectionStrategy, Component } from '@angular/core' + +@Component({ + selector: 'cvc-variant-submit-test', + templateUrl: './variant-submit-test.page.html', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class VariantSubmitTestPage {} diff --git a/client/src/app/forms/test-pages/variantgroup-revise-test/variantgroup-revise-test.page.html b/client/src/app/forms/test-pages/variantgroup-revise-test/variantgroup-revise-test.page.html index 76c364fef..ed765de8a 100644 --- a/client/src/app/forms/test-pages/variantgroup-revise-test/variantgroup-revise-test.page.html +++ b/client/src/app/forms/test-pages/variantgroup-revise-test/variantgroup-revise-test.page.html @@ -1 +1,2 @@ - + diff --git a/client/src/app/forms/types/acmg-code-select/acmg-code-select.type.ts b/client/src/app/forms/types/acmg-code-select/acmg-code-select.type.ts index df5fb52c8..88a53a934 100644 --- a/client/src/app/forms/types/acmg-code-select/acmg-code-select.type.ts +++ b/client/src/app/forms/types/acmg-code-select/acmg-code-select.type.ts @@ -1,38 +1,42 @@ import { - AfterViewInit, - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, - QueryList, - TemplateRef, - Type, - ViewChildren + AfterViewInit, + ChangeDetectionStrategy, + ChangeDetectorRef, + Component, + QueryList, + TemplateRef, + Type, + ViewChildren, } from '@angular/core' import { ApolloQueryResult } from '@apollo/client/core' import { formatEvidenceEnum } from '@app/core/utilities/enum-formatters/format-evidence-enum' import { CvcSelectEntityName } from '@app/forms/components/entity-select/entity-select.component' import { BaseFieldType } from '@app/forms/mixins/base/base-field' import { EntitySelectField } from '@app/forms/mixins/entity-select-field.mixin' -import { StringSelectField } from '@app/forms/mixins/string-select-field.mixin' import { EntityType } from '@app/forms/states/base.state' import { AcmgCodeSelectTagGQL, AcmgCodeSelectTagQuery, - AcmgCodeSelectTagQueryVariables, - AcmgCodeSelectTypeaheadFieldsFragment, - AcmgCodeSelectTypeaheadGQL, - AcmgCodeSelectTypeaheadQuery, - AcmgCodeSelectTypeaheadQueryVariables, - Maybe, + AcmgCodeSelectTagQueryVariables, + AcmgCodeSelectTypeaheadFieldsFragment, + AcmgCodeSelectTypeaheadGQL, + AcmgCodeSelectTypeaheadQuery, + AcmgCodeSelectTypeaheadQueryVariables, + Maybe, } from '@app/generated/civic.apollo' import { untilDestroyed } from '@ngneat/until-destroy' import { - FieldTypeConfig, - FormlyFieldConfig, - FormlyFieldProps + FieldTypeConfig, + FormlyFieldConfig, + FormlyFieldProps, } from '@ngx-formly/core' import { NzSelectOptionInterface } from 'ng-zorro-antd/select' -import { BehaviorSubject, combineLatest, distinctUntilChanged, Subject } from 'rxjs' +import { + BehaviorSubject, + combineLatest, + distinctUntilChanged, + Subject, +} from 'rxjs' import { tag } from 'rxjs-spy/operators' import mixin from 'ts-mixin-extended' @@ -60,7 +64,10 @@ export interface CvcAcmgCodeSelectFieldProps extends FormlyFieldProps { // field types in some expressions export interface CvcAcmgCodeSelectFieldConfig extends FormlyFieldConfig { - type: 'acmg-code-select' | 'acmg-code-multi-select' | Type + type: + | 'acmg-code-select' + | 'acmg-code-multi-select' + | Type } const AcmgCodeSelectMixin = mixin( @@ -100,7 +107,8 @@ export class CvcAcmgCodeSelectField entityName: { singular: 'ACMG/AMP Code', plural: 'ACMG/AMP Codes' }, isMultiSelect: false, requireType: true, - tooltip: 'If applicable, please provide evidence criteria from the standards and guidelines for interpretation of sequence variants from ACMG/AMP.', + tooltip: + 'If applicable, please provide evidence criteria from the standards and guidelines for interpretation of sequence variants from ACMG/AMP.', // TODO: implement labels/placeholders w/ string replacement using typescript // template strings: https://www.codevscolor.com/typescript-template-string placeholder: 'Search ACMG/AMP Codes', @@ -173,52 +181,50 @@ export class CvcAcmgCodeSelectField this.placeholder$.next(this.props.placeholders) if (!this.onRequiresAcmgCode$ || !this.onEntityType$) return // update field placeholders & required status on state input events - combineLatest([ - this.onRequiresAcmgCode$, - this.onEntityType$ - ]).pipe( - distinctUntilChanged(), - untilDestroyed(this) - ) - .subscribe(([requiresAcmgCode, entityType]: [boolean, Maybe]) => { - // ACMG Codes are not associated with this entity type - if (!requiresAcmgCode && entityType) { - this.props.required = false - this.props.disabled = true - // no ACMG Code required, entity type specified - this.props.description = `${formatEvidenceEnum(entityType)} ${ - this.state!.entityName - } does not include associated ACMG/AMP Code(s)` - this.props.extraType = 'prompt' - this.resetField() - this.cdr.markForCheck() - } - // if type required, toggle field required property off and show a 'Select Type..' prompt - else if (this.props.requireType && !entityType) { - this.props.required = false - this.props.disabled = true - // no ACMG Code required, entity type not specified - this.props.description = this.props.requireTypePromptFn( - this.state!.entityName, - this.props.isMultiSelect - ) - this.props.extraType = 'prompt' - } - // state indicates ACMG Code is required, set required, unset disabled, and show the placeholder (state will only return true from requiresAcmgCode$ if entityType provided) - else if (requiresAcmgCode) { - this.props.required = true - this.props.disabled = false - this.props.description = 'Please provide evidence criteria from the standards and guidelines for interpretation of sequence variants from ACMG/AMP in Richards et. al. 2015. Review all codes and select each one that applies. If a code is not applied, it is inferred to not be met.', - this.props.extraType = 'description' + combineLatest([this.onRequiresAcmgCode$, this.onEntityType$]) + .pipe(distinctUntilChanged(), untilDestroyed(this)) + .subscribe( + ([requiresAcmgCode, entityType]: [boolean, Maybe]) => { + // ACMG Codes are not associated with this entity type + if (!requiresAcmgCode && entityType) { + this.props.required = false + this.props.disabled = true + // no ACMG Code required, entity type specified + this.props.description = `${formatEvidenceEnum(entityType)} ${ + this.state!.entityName + } does not include associated ACMG/AMP Code(s)` + this.props.extraType = 'prompt' + this.resetField() + this.cdr.markForCheck() + } + // if type required, toggle field required property off and show a 'Select Type..' prompt + else if (this.props.requireType && !entityType) { + this.props.required = false + this.props.disabled = true + // no ACMG Code required, entity type not specified + this.props.description = this.props.requireTypePromptFn( + this.state!.entityName, + this.props.isMultiSelect + ) + this.props.extraType = 'prompt' + } + // state indicates ACMG Code is required, set required, unset disabled, and show the placeholder (state will only return true from requiresAcmgCode$ if entityType provided) + else if (requiresAcmgCode) { + this.props.required = true + this.props.disabled = false + ;(this.props.description = + 'Please provide evidence criteria from the standards and guidelines for interpretation of sequence variants from ACMG/AMP in Richards et. al. 2015. Review all codes and select each one that applies. If a code is not applied, it is inferred to not be met.'), + (this.props.extraType = 'description') + } + // field currently has a value, but state indicates no ACMG Code is required, or no type is provided && type is required, so reset field + else if ( + (!requiresAcmgCode && this.formControl.value) || + (this.props.requireType && !entityType && this.formControl.value) + ) { + this.resetField() + } } - // field currently has a value, but state indicates no ACMG Code is required, or no type is provided && type is required, so reset field - else if ( - (!requiresAcmgCode && this.formControl.value) || - (this.props.requireType && !entityType && this.formControl.value) - ) { - this.resetField() - } - }) + ) } getTypeaheadVarsFn(str: string): AcmgCodeSelectTypeaheadQueryVariables { diff --git a/client/src/app/forms/types/checkbox/checkbox.module.ts b/client/src/app/forms/types/base/checkbox/checkbox.module.ts similarity index 78% rename from client/src/app/forms/types/checkbox/checkbox.module.ts rename to client/src/app/forms/types/base/checkbox/checkbox.module.ts index 0ae918481..9bdc26f98 100644 --- a/client/src/app/forms/types/checkbox/checkbox.module.ts +++ b/client/src/app/forms/types/base/checkbox/checkbox.module.ts @@ -4,20 +4,20 @@ import { ReactiveFormsModule } from '@angular/forms' import { CvcFormFieldWrapperModule } from '@app/forms/wrappers/form-field/form-field.module' import { ConfigOption, FormlyModule } from '@ngx-formly/core' import { NzCheckboxModule } from 'ng-zorro-antd/checkbox' -import { CvcCheckboxField } from './checkbox.type' +import { CvcBaseCheckboxField } from './checkbox.type' const typeConfig: ConfigOption = { types: [ { name: 'checkbox', wrappers: ['form-field'], - component: CvcCheckboxField, + component: CvcBaseCheckboxField, }, ], } @NgModule({ - declarations: [CvcCheckboxField], + declarations: [CvcBaseCheckboxField], imports: [ CommonModule, ReactiveFormsModule, @@ -26,4 +26,4 @@ const typeConfig: ConfigOption = { CvcFormFieldWrapperModule, ], }) -export class CvcCheckboxModule {} +export class CvcBaseCheckboxModule {} diff --git a/client/src/app/forms/types/checkbox/checkbox.type.html b/client/src/app/forms/types/base/checkbox/checkbox.type.html similarity index 100% rename from client/src/app/forms/types/checkbox/checkbox.type.html rename to client/src/app/forms/types/base/checkbox/checkbox.type.html diff --git a/client/src/app/forms/types/textarea/textarea.type.less b/client/src/app/forms/types/base/checkbox/checkbox.type.less similarity index 100% rename from client/src/app/forms/types/textarea/textarea.type.less rename to client/src/app/forms/types/base/checkbox/checkbox.type.less diff --git a/client/src/app/forms/types/base/checkbox/checkbox.type.ts b/client/src/app/forms/types/base/checkbox/checkbox.type.ts new file mode 100644 index 000000000..2299624e5 --- /dev/null +++ b/client/src/app/forms/types/base/checkbox/checkbox.type.ts @@ -0,0 +1,48 @@ +import { + Component, + ChangeDetectionStrategy, + Type, + AfterViewInit, +} from '@angular/core' +import { BaseFieldType } from '@app/forms/mixins/base/base-field' +import { Maybe } from '@app/generated/civic.apollo' +import { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core' +import { FormlyFieldProps } from '@ngx-formly/ng-zorro-antd/form-field' +import mixin from 'ts-mixin-extended' + +export type CvcBaseCheckboxFieldOptions = Partial< + FieldTypeConfig +> +export interface CvcBaseCheckboxFieldProps extends FormlyFieldProps { + indeterminate?: boolean +} + +export interface FormlyCheckboxFieldConfig + extends FormlyFieldConfig { + type: 'checkbox' | Type +} + +const BaseCheckboxMixin = mixin( + BaseFieldType, Maybe>() +) +@Component({ + selector: 'cvc-checkbox', + templateUrl: './checkbox.type.html', + styleUrls: ['./checkbox.type.less'], + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class CvcBaseCheckboxField + extends BaseCheckboxMixin + implements AfterViewInit +{ + override defaultOptions = { + props: { + indeterminate: true, + hideLabel: true, + }, + } + + ngAfterViewInit(): void { + console.log(this.props) + } +} diff --git a/client/src/app/forms/types/base/input/input.module.ts b/client/src/app/forms/types/base/input/input.module.ts new file mode 100644 index 000000000..d66b35ff0 --- /dev/null +++ b/client/src/app/forms/types/base/input/input.module.ts @@ -0,0 +1,48 @@ +import { NgModule } from '@angular/core' +import { CommonModule } from '@angular/common' +import { FormlyModule } from '@ngx-formly/core' +import { ReactiveFormsModule } from '@angular/forms' + +import { NzInputModule } from 'ng-zorro-antd/input' +import { NzInputNumberModule } from 'ng-zorro-antd/input-number' +import { CvcBaseInputField } from './input.type' + +@NgModule({ + declarations: [CvcBaseInputField], + imports: [ + CommonModule, + ReactiveFormsModule, + NzInputModule, + NzInputNumberModule, + + FormlyModule.forChild({ + types: [ + { + name: 'base-input', + component: CvcBaseInputField, + wrappers: ['form-field'], + }, + { name: 'base-string', extends: 'base-input' }, + { + name: 'base-number', + extends: 'base-input', + defaultOptions: { + props: { + type: 'number', + }, + }, + }, + { + name: 'base-integer', + extends: 'base-input', + defaultOptions: { + props: { + type: 'number', + }, + }, + }, + ], + }), + ], +}) +export class CvcBaseInputModule {} diff --git a/client/src/app/forms/types/base/input/input.type.html b/client/src/app/forms/types/base/input/input.type.html new file mode 100644 index 000000000..1829959b1 --- /dev/null +++ b/client/src/app/forms/types/base/input/input.type.html @@ -0,0 +1,13 @@ + + + + diff --git a/client/src/app/forms/types/base/input/input.type.less b/client/src/app/forms/types/base/input/input.type.less new file mode 100644 index 000000000..e69de29bb diff --git a/client/src/app/forms/types/base/input/input.type.ts b/client/src/app/forms/types/base/input/input.type.ts new file mode 100644 index 000000000..8ab7b7398 --- /dev/null +++ b/client/src/app/forms/types/base/input/input.type.ts @@ -0,0 +1,38 @@ +import { + Component, + ChangeDetectionStrategy, + Type, + AfterViewInit, +} from '@angular/core' +import { BaseFieldType } from '@app/forms/mixins/base/base-field' +import { Maybe } from '@app/generated/civic.apollo' +import { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core' +import { FormlyFieldProps } from '@ngx-formly/ng-zorro-antd/form-field' +import mixin from 'ts-mixin-extended' + +export interface CvcBaseInputFieldProps extends FormlyFieldProps {} + +export interface CvcBaseInputFieldConfig + extends FormlyFieldConfig { + type: 'base-input' | Type +} + +const BaseInputMixin = mixin( + BaseFieldType< + FieldTypeConfig, + Maybe + >() +) +@Component({ + selector: 'cvc-base-input', + templateUrl: './input.type.html', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class CvcBaseInputField extends BaseInputMixin implements AfterViewInit { + constructor() { + super() + } + ngAfterViewInit(): void { + this.configureBaseField() + } +} diff --git a/client/src/app/forms/types/base/radio/radio.module.ts b/client/src/app/forms/types/base/radio/radio.module.ts new file mode 100644 index 000000000..94f8e7059 --- /dev/null +++ b/client/src/app/forms/types/base/radio/radio.module.ts @@ -0,0 +1,28 @@ +import { NgModule } from '@angular/core' +import { CommonModule } from '@angular/common' +import { FormlyModule } from '@ngx-formly/core' +import { ReactiveFormsModule } from '@angular/forms' +import { FormlySelectModule } from '@ngx-formly/core/select' + +import { NzRadioModule } from 'ng-zorro-antd/radio' +import { CvcBaseRadioField } from './radio.type' + +@NgModule({ + declarations: [CvcBaseRadioField], + imports: [ + CommonModule, + ReactiveFormsModule, + NzRadioModule, + FormlySelectModule, + FormlyModule.forChild({ + types: [ + { + name: 'radio', + component: CvcBaseRadioField, + wrappers: ['form-field'], + }, + ], + }), + ], +}) +export class CvcBaseRadioFieldModule {} diff --git a/client/src/app/forms/types/base/radio/radio.type.html b/client/src/app/forms/types/base/radio/radio.type.html new file mode 100644 index 000000000..da2c7bc33 --- /dev/null +++ b/client/src/app/forms/types/base/radio/radio.type.html @@ -0,0 +1,11 @@ + + + diff --git a/client/src/app/forms/types/base/radio/radio.type.less b/client/src/app/forms/types/base/radio/radio.type.less new file mode 100644 index 000000000..e69de29bb diff --git a/client/src/app/forms/types/base/radio/radio.type.ts b/client/src/app/forms/types/base/radio/radio.type.ts new file mode 100644 index 000000000..10ea7df52 --- /dev/null +++ b/client/src/app/forms/types/base/radio/radio.type.ts @@ -0,0 +1,38 @@ +import { + Component, + ChangeDetectionStrategy, + Type, + AfterViewInit, +} from '@angular/core' +import { BaseFieldType } from '@app/forms/mixins/base/base-field' +import { Maybe } from '@app/generated/civic.apollo' +import { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core' +import { FormlyFieldProps } from '@ngx-formly/ng-zorro-antd/form-field' +import mixin from 'ts-mixin-extended' + +export interface CvcBaseRadioFieldProps extends FormlyFieldProps {} + +export interface CvcBaseRadioFieldConfig + extends FormlyFieldConfig { + type: 'base-radio' | Type +} + +const BaseRadioMixin = mixin( + BaseFieldType< + FieldTypeConfig, + Maybe + >() +) +@Component({ + selector: 'cvc-base-radio', + templateUrl: './radio.type.html', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class CvcBaseRadioField extends BaseRadioMixin implements AfterViewInit { + constructor() { + super() + } + ngAfterViewInit(): void { + this.configureBaseField() + } +} diff --git a/client/src/app/forms/types/base/select/select.module.ts b/client/src/app/forms/types/base/select/select.module.ts new file mode 100644 index 000000000..a852a82d2 --- /dev/null +++ b/client/src/app/forms/types/base/select/select.module.ts @@ -0,0 +1,56 @@ +import { NgModule } from '@angular/core' +import { CommonModule } from '@angular/common' +import { ReactiveFormsModule } from '@angular/forms' +import { FieldTypeConfig, FormlyModule } from '@ngx-formly/core' +import { FormlySelectModule } from '@ngx-formly/core/select' + +import { FormlyNzFormFieldModule } from '@ngx-formly/ng-zorro-antd/form-field' +import { NzSelectModule } from 'ng-zorro-antd/select' + +import { CvcBaseSelectField, CvcBaseSelectFieldProps } from './select.type' + +@NgModule({ + declarations: [CvcBaseSelectField], + imports: [ + CommonModule, + ReactiveFormsModule, + NzSelectModule, + + FormlyNzFormFieldModule, + FormlySelectModule, + FormlyModule.forChild({ + types: [ + { + name: 'base-select', + component: CvcBaseSelectField, + wrappers: ['form-field'], + }, + { name: 'enum', extends: 'select' }, + { + name: 'base-multi-select', + extends: 'level-select', + defaultOptions: >>{ + props: { + isMultiSelect: true, + }, + }, + }, + ], + }), + ], +}) +export class CvcBaseSelectModule {} + +// import { NgModule } from '@angular/core'; +// import { CommonModule } from '@angular/common'; +// import { CvcBaseSelectField } from './select.type'; + +// @NgModule({ +// declarations: [ +// CvcBaseSelectField +// ], +// imports: [ +// CommonModule +// ] +// }) +// export class SelectModule { } diff --git a/client/src/app/forms/types/base/select/select.type.html b/client/src/app/forms/types/base/select/select.type.html new file mode 100644 index 000000000..1542c67d7 --- /dev/null +++ b/client/src/app/forms/types/base/select/select.type.html @@ -0,0 +1,26 @@ + + + + + + + + + diff --git a/client/src/app/forms/types/base/select/select.type.less b/client/src/app/forms/types/base/select/select.type.less new file mode 100644 index 000000000..e69de29bb diff --git a/client/src/app/forms/types/base/select/select.type.ts b/client/src/app/forms/types/base/select/select.type.ts new file mode 100644 index 000000000..8d064c106 --- /dev/null +++ b/client/src/app/forms/types/base/select/select.type.ts @@ -0,0 +1,48 @@ +import { + Component, + ChangeDetectionStrategy, + Type, + AfterViewInit, +} from '@angular/core' +import { BaseFieldType } from '@app/forms/mixins/base/base-field' +import { Maybe } from '@app/generated/civic.apollo' +import { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core' +import { FormlyFieldProps } from '@ngx-formly/ng-zorro-antd/form-field' +import mixin from 'ts-mixin-extended' + +export interface CvcBaseSelectFieldProps extends FormlyFieldProps { + isMultiSelect: boolean +} + +export interface CvcBaseSelectFieldConfig + extends FormlyFieldConfig { + type: 'base-select' | Type +} + +const BaseSelectMixin = mixin( + BaseFieldType< + FieldTypeConfig, + Maybe + >() +) +@Component({ + selector: 'cvc-base-select', + templateUrl: './select.type.html', + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class CvcBaseSelectField + extends BaseSelectMixin + implements AfterViewInit +{ + defaultOptions: Partial> = { + props: { + isMultiSelect: false, + }, + } + constructor() { + super() + } + ngAfterViewInit(): void { + this.configureBaseField() + } +} diff --git a/client/src/app/forms/types/textarea/textarea.module.ts b/client/src/app/forms/types/base/textarea/textarea.module.ts similarity index 91% rename from client/src/app/forms/types/textarea/textarea.module.ts rename to client/src/app/forms/types/base/textarea/textarea.module.ts index 0f3c5e15e..0f8b371db 100644 --- a/client/src/app/forms/types/textarea/textarea.module.ts +++ b/client/src/app/forms/types/base/textarea/textarea.module.ts @@ -9,7 +9,7 @@ import { CvcTextareaField } from './textarea.type' const typeConfig: ConfigOption = { types: [ { - name: 'textarea', + name: 'base-textarea', component: CvcTextareaField, wrappers: ['form-field'], }, @@ -27,4 +27,4 @@ const typeConfig: ConfigOption = { ], exports: [CvcTextareaField], }) -export class CvcTextareaFieldModule {} +export class CvcBaseTextareaFieldModule {} diff --git a/client/src/app/forms/types/base/textarea/textarea.type.html b/client/src/app/forms/types/base/textarea/textarea.type.html new file mode 100644 index 000000000..ea3bff5db --- /dev/null +++ b/client/src/app/forms/types/base/textarea/textarea.type.html @@ -0,0 +1,7 @@ + diff --git a/client/src/app/forms/types/base/textarea/textarea.type.less b/client/src/app/forms/types/base/textarea/textarea.type.less new file mode 100644 index 000000000..e69de29bb diff --git a/client/src/app/forms/types/textarea/textarea.type.ts b/client/src/app/forms/types/base/textarea/textarea.type.ts similarity index 52% rename from client/src/app/forms/types/textarea/textarea.type.ts rename to client/src/app/forms/types/base/textarea/textarea.type.ts index ce0ffdff8..5c2dbf7d5 100644 --- a/client/src/app/forms/types/textarea/textarea.type.ts +++ b/client/src/app/forms/types/base/textarea/textarea.type.ts @@ -1,19 +1,28 @@ -import { Component, ChangeDetectionStrategy, Type } from '@angular/core' +import { + Component, + ChangeDetectionStrategy, + Type, + AfterViewInit, +} from '@angular/core' import { BaseFieldType } from '@app/forms/mixins/base/base-field' import { Maybe } from '@app/generated/civic.apollo' -import { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core' +import { FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core' import { FormlyFieldProps } from '@ngx-formly/ng-zorro-antd/form-field' +import { AutoSizeType } from 'ng-zorro-antd/input' import mixin from 'ts-mixin-extended' export type CvcTextareaFieldOptions = Partial< FieldTypeConfig > -export interface CvcTextAreaFieldProps extends FormlyFieldProps {} +export interface CvcTextAreaFieldProps extends FormlyFieldProps { + rows?: number + autosize: string | boolean | AutoSizeType +} export interface FormlyTextAreaFieldConfig extends FormlyFieldConfig { - type: 'textarea' | Type + type: 'base-textarea' | Type } const TextareaMixin = mixin( @@ -22,20 +31,19 @@ const TextareaMixin = mixin( @Component({ selector: 'formly-field-nz-textarea', - template: ` - - `, + templateUrl: './textarea.type.html', changeDetection: ChangeDetectionStrategy.OnPush, }) -export class CvcTextareaField extends TextareaMixin { - defaultOptions: CvcTextareaFieldOptions = { - props: { - label: 'TEXTAREA!' - } - }; - +export class CvcTextareaField extends TextareaMixin implements AfterViewInit { + defaultOptions: CvcTextareaFieldOptions = { + props: { + autosize: false, + }, + } + constructor() { + super() + } + ngAfterViewInit(): void { + this.configureBaseField() + } } diff --git a/client/src/app/forms/types/checkbox/checkbox.type.ts b/client/src/app/forms/types/checkbox/checkbox.type.ts deleted file mode 100644 index eae336e36..000000000 --- a/client/src/app/forms/types/checkbox/checkbox.type.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Component, ChangeDetectionStrategy, Type, AfterViewInit } from '@angular/core'; -import { FieldType, FieldTypeConfig, FormlyFieldConfig } from '@ngx-formly/core'; -import { FormlyFieldProps } from '@ngx-formly/ng-zorro-antd/form-field'; - -export type CvcCheckboxFieldOptions = Partial< - FieldTypeConfig -> -export interface CvcCheckboxFieldProps extends FormlyFieldProps { - indeterminate?: boolean; -} - -export interface FormlyCheckboxFieldConfig extends FormlyFieldConfig { - type: 'checkbox' | Type; -} - -@Component({ - selector: 'cvc-checkbox', - templateUrl: './checkbox.type.html', - styleUrls: ['./checkbox.type.less'], - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class CvcCheckboxField extends FieldType> implements AfterViewInit { - override defaultOptions = { - props: { - indeterminate: true, - hideLabel: true, - }, - }; - - ngAfterViewInit(): void { - console.log(this.props) - } -} diff --git a/client/src/app/forms/types/clingen-code-select/clingen-code-select.type.ts b/client/src/app/forms/types/clingen-code-select/clingen-code-select.type.ts index 8bcdbc7cc..9a18bdba3 100644 --- a/client/src/app/forms/types/clingen-code-select/clingen-code-select.type.ts +++ b/client/src/app/forms/types/clingen-code-select/clingen-code-select.type.ts @@ -1,19 +1,18 @@ import { - AfterViewInit, - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, - QueryList, - TemplateRef, - Type, - ViewChildren + AfterViewInit, + ChangeDetectionStrategy, + ChangeDetectorRef, + Component, + QueryList, + TemplateRef, + Type, + ViewChildren, } from '@angular/core' import { ApolloQueryResult } from '@apollo/client/core' import { formatEvidenceEnum } from '@app/core/utilities/enum-formatters/format-evidence-enum' import { CvcSelectEntityName } from '@app/forms/components/entity-select/entity-select.component' import { BaseFieldType } from '@app/forms/mixins/base/base-field' import { EntitySelectField } from '@app/forms/mixins/entity-select-field.mixin' -import { StringSelectField } from '@app/forms/mixins/string-select-field.mixin' import { EntityType } from '@app/forms/states/base.state' import { ClingenCodeSelectTagGQL, @@ -27,12 +26,17 @@ import { } from '@app/generated/civic.apollo' import { untilDestroyed } from '@ngneat/until-destroy' import { - FieldTypeConfig, - FormlyFieldConfig, - FormlyFieldProps + FieldTypeConfig, + FormlyFieldConfig, + FormlyFieldProps, } from '@ngx-formly/core' import { NzSelectOptionInterface } from 'ng-zorro-antd/select' -import { BehaviorSubject, combineLatest, distinctUntilChanged, Subject } from 'rxjs' +import { + BehaviorSubject, + combineLatest, + distinctUntilChanged, + Subject, +} from 'rxjs' import { tag } from 'rxjs-spy/operators' import mixin from 'ts-mixin-extended' @@ -60,7 +64,10 @@ export interface CvcClingenCodeSelectFieldProps extends FormlyFieldProps { // field types in some expressions export interface CvcClingenCodeSelectFieldConfig extends FormlyFieldConfig { - type: 'clingen-code-select' | 'clingen-code-multi-select' | Type + type: + | 'clingen-code-select' + | 'clingen-code-multi-select' + | Type } const ClingenCodeSelectMixin = mixin( @@ -94,7 +101,7 @@ export class CvcClingenCodeSelectField placeholder$: BehaviorSubject> - exclusiveCodes = new Set(); + exclusiveCodes = new Set() previousDescription?: string previousDescriptionType?: string exclusiveSelected = false @@ -102,10 +109,14 @@ export class CvcClingenCodeSelectField // FieldTypeConfig defaults defaultOptions: CvcClingenCodeSelectFieldOptions = { props: { - entityName: { singular: 'ClinGen/CGC/VICC Code', plural: 'ClinGen/CGC/VICC Codes' }, + entityName: { + singular: 'ClinGen/CGC/VICC Code', + plural: 'ClinGen/CGC/VICC Codes', + }, isMultiSelect: false, requireType: true, - tooltip: 'If applicable, please provide evidence classifications from the Standards for the classification of pathogenicity of somatic variants in cancer (oncogenicity).', + tooltip: + 'If applicable, please provide evidence classifications from the Standards for the classification of pathogenicity of somatic variants in cancer (oncogenicity).', // TODO: implement labels/placeholders w/ string replacement using typescript // template strings: https://www.codevscolor.com/typescript-template-string placeholder: 'Search ClinGen/CGC/VICC Codes', @@ -147,24 +158,25 @@ export class CvcClingenCodeSelectField }) this.configurePlaceholders() - this.onValueChange$.pipe( - untilDestroyed(this) - ).subscribe(codes => { + this.onValueChange$.pipe(untilDestroyed(this)).subscribe((codes) => { if (codes && Array.isArray(codes) && codes.length > 1) { - const selectedExclusiveCode = codes.find(c => this.exclusiveCodes.has(c)) + const selectedExclusiveCode = codes.find((c) => + this.exclusiveCodes.has(c) + ) if (selectedExclusiveCode) { this.previousDescription = this.props.description this.previousDescriptionType = this.props.extraType - this.props.description = 'You have selected N/A which precludes selecting any other codes. Please remove it if you wish to select additional codes.' + this.props.description = + 'You have selected N/A which precludes selecting any other codes. Please remove it if you wish to select additional codes.' this.exclusiveSelected = true this.formControl.setValue([selectedExclusiveCode]) } else { this.exclusiveSelected = false } } - if(this.previousDescription && !this.exclusiveSelected) { - this.props.description = this.previousDescription - this.props.extraType = this.previousDescriptionType + if (this.previousDescription && !this.exclusiveSelected) { + this.props.description = this.previousDescription + this.props.extraType = this.previousDescriptionType } this.cdr.detectChanges() }) @@ -200,52 +212,50 @@ export class CvcClingenCodeSelectField this.placeholder$.next(this.props.placeholders) if (!this.onRequiresClingenCode$ || !this.onEntityType$) return // update field placeholders & required status on state input events - combineLatest([ - this.onRequiresClingenCode$, - this.onEntityType$ - ]).pipe( - distinctUntilChanged(), - untilDestroyed(this) - ) - .subscribe(([requiresClingenCode, entityType]: [boolean, Maybe]) => { - // ClinGen Codes are not associated with this entity type - if (!requiresClingenCode && entityType) { - this.props.required = false - this.props.disabled = true - // no ClinGen Code required, entity type specified - this.props.description = `${formatEvidenceEnum(entityType)} ${ - this.state!.entityName - } does not include associated ClinGen/CGC/VICC Code(s)` - this.props.extraType = 'prompt' - this.resetField() - this.cdr.markForCheck() - } - // if type required, toggle field required property off and show a 'Select Type..' prompt - else if (this.props.requireType && !entityType) { - this.props.required = false - this.props.disabled = true - // no ClinGen Code required, entity type not specified - this.props.description = this.props.requireTypePromptFn( - this.state!.entityName, - this.props.isMultiSelect - ) - this.props.extraType = 'prompt' + combineLatest([this.onRequiresClingenCode$, this.onEntityType$]) + .pipe(distinctUntilChanged(), untilDestroyed(this)) + .subscribe( + ([requiresClingenCode, entityType]: [boolean, Maybe]) => { + // ClinGen Codes are not associated with this entity type + if (!requiresClingenCode && entityType) { + this.props.required = false + this.props.disabled = true + // no ClinGen Code required, entity type specified + this.props.description = `${formatEvidenceEnum(entityType)} ${ + this.state!.entityName + } does not include associated ClinGen/CGC/VICC Code(s)` + this.props.extraType = 'prompt' + this.resetField() + this.cdr.markForCheck() + } + // if type required, toggle field required property off and show a 'Select Type..' prompt + else if (this.props.requireType && !entityType) { + this.props.required = false + this.props.disabled = true + // no ClinGen Code required, entity type not specified + this.props.description = this.props.requireTypePromptFn( + this.state!.entityName, + this.props.isMultiSelect + ) + this.props.extraType = 'prompt' + } + // state indicates ClinGen Code is required, set required, unset disabled, and show the placeholder (state will only return true from requiresClinGenCode$ if entityType provided) + else if (requiresClingenCode) { + this.props.required = true + this.props.disabled = false + this.props.description = + 'Please provide the evidence classifications from the Standards for the classification of pathogenicity of somatic variants in cancer (oncogenicity) in Horak et. al. 2022.. Review all codes and select each one that applies. If a code is not applied, it is inferred to not be met.' + this.props.extraType = 'description' + } + // field currently has a value, but state indicates no ClinGen Code is required, or no type is provided && type is required, so reset field + else if ( + (!requiresClingenCode && this.formControl.value) || + (this.props.requireType && !entityType && this.formControl.value) + ) { + this.resetField() + } } - // state indicates ClinGen Code is required, set required, unset disabled, and show the placeholder (state will only return true from requiresClinGenCode$ if entityType provided) - else if (requiresClingenCode) { - this.props.required = true - this.props.disabled = false - this.props.description = 'Please provide the evidence classifications from the Standards for the classification of pathogenicity of somatic variants in cancer (oncogenicity) in Horak et. al. 2022.. Review all codes and select each one that applies. If a code is not applied, it is inferred to not be met.' - this.props.extraType = 'description' - } - // field currently has a value, but state indicates no ClinGen Code is required, or no type is provided && type is required, so reset field - else if ( - (!requiresClingenCode && this.formControl.value) || - (this.props.requireType && !entityType && this.formControl.value) - ) { - this.resetField() - } - }) + ) } getTypeaheadVarsFn(str: string): ClingenCodeSelectTypeaheadQueryVariables { @@ -253,7 +263,7 @@ export class CvcClingenCodeSelectField } getTypeaheadResultsFn(r: ApolloQueryResult) { - r.data.clingenCodesTypeahead.forEach(c => { + r.data.clingenCodesTypeahead.forEach((c) => { if (c.exclusive) { this.exclusiveCodes.add(c.id) } @@ -282,7 +292,10 @@ export class CvcClingenCodeSelectField tplRefs: QueryList> ): NzSelectOptionInterface[] { return results.map( - (clingenCode: ClingenCodeSelectTypeaheadFieldsFragment, index: number) => { + ( + clingenCode: ClingenCodeSelectTypeaheadFieldsFragment, + index: number + ) => { return { label: tplRefs.get(index) || clingenCode.code, value: clingenCode.id, diff --git a/client/src/app/forms/types/clinvar-input/clinvar-input.module.ts b/client/src/app/forms/types/clinvar-input/clinvar-input.module.ts index 4ff27f3c6..485c13de8 100644 --- a/client/src/app/forms/types/clinvar-input/clinvar-input.module.ts +++ b/client/src/app/forms/types/clinvar-input/clinvar-input.module.ts @@ -3,12 +3,17 @@ import { CommonModule } from '@angular/common' import { ConfigOption, FormlyModule } from '@ngx-formly/core' import { FormsModule, ReactiveFormsModule } from '@angular/forms' import { LetDirective, PushPipe } from '@ngrx/component' -import { FormlyNzFormFieldModule } from '@ngx-formly/ng-zorro-antd/form-field' import { NzInputModule } from 'ng-zorro-antd/input' import { NzFormModule } from 'ng-zorro-antd/form' -import { CvcStringTagModule } from '@app/forms/components/string-tag/string-tag.module' -import { CvcClinvarInputField, CvcClinvarInputFieldProps } from './clinvar-input.type' +import { + CvcClinvarInputField, + CvcClinvarInputFieldProps, +} from './clinvar-input.type' import { NzSelectModule } from 'ng-zorro-antd/select' +import { NzRadioModule } from 'ng-zorro-antd/radio' +import { NzGridModule } from 'ng-zorro-antd/grid' +import { NzToolTipModule } from 'ng-zorro-antd/tooltip' +import { CvcPipesModule } from '@app/core/pipes/pipes.module' const typeConfig: ConfigOption = { types: [ @@ -16,6 +21,12 @@ const typeConfig: ConfigOption = { name: 'clinvar-input', wrappers: ['form-field'], component: CvcClinvarInputField, + defaultOptions: { + props: { + isRepeatItem: false, + showExistenceOptions: false, + }, + }, }, { // for use in repeat-field types @@ -25,6 +36,7 @@ const typeConfig: ConfigOption = { defaultOptions: { props: { isRepeatItem: true, + showExistenceOptions: true, }, }, }, @@ -35,15 +47,18 @@ const typeConfig: ConfigOption = { declarations: [CvcClinvarInputField], imports: [ CommonModule, - ReactiveFormsModule, FormsModule, - LetDirective, PushPipe, + ReactiveFormsModule, + LetDirective, + PushPipe, FormlyModule.forChild(typeConfig), - FormlyNzFormFieldModule, // for form-field wrapper - NzInputModule, NzFormModule, + NzGridModule, + NzInputModule, + NzRadioModule, NzSelectModule, - CvcStringTagModule, + NzToolTipModule, + CvcPipesModule, ], exports: [CvcClinvarInputField], }) diff --git a/client/src/app/forms/types/clinvar-input/clinvar-input.type.html b/client/src/app/forms/types/clinvar-input/clinvar-input.type.html index aed2ab163..41e101686 100644 --- a/client/src/app/forms/types/clinvar-input/clinvar-input.type.html +++ b/client/src/app/forms/types/clinvar-input/clinvar-input.type.html @@ -1,17 +1,37 @@ - - - -
- - - -
- - - \ No newline at end of file + + + + + + + + + + + + diff --git a/client/src/app/forms/types/clinvar-input/clinvar-input.type.ts b/client/src/app/forms/types/clinvar-input/clinvar-input.type.ts index a2c68159b..ff24dcb3e 100644 --- a/client/src/app/forms/types/clinvar-input/clinvar-input.type.ts +++ b/client/src/app/forms/types/clinvar-input/clinvar-input.type.ts @@ -9,18 +9,28 @@ import { BaseFieldType } from '@app/forms/mixins/base/base-field' import { StringTagField } from '@app/forms/mixins/string-input-field.mixin' import { ClinvarOptions } from '@app/forms/utilities/input-formatters' import { Maybe } from '@app/generated/civic.apollo' +import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy' import { FieldTypeConfig, FormlyFieldConfig, FormlyFieldProps, } from '@ngx-formly/core' -import { BehaviorSubject, Subject } from 'rxjs' +import { + BehaviorSubject, + Subject, + map, + Observable, + withLatestFrom, + combineLatest, + tap, +} from 'rxjs' import mixin from 'ts-mixin-extended' export type CvcBaseInputFieldOptions = Partial< FieldTypeConfig > export interface CvcClinvarInputFieldProps extends FormlyFieldProps { + description?: string } export interface CvcBaseInputFieldConfig @@ -29,20 +39,21 @@ export interface CvcBaseInputFieldConfig } const BaseInputMixin = mixin( - BaseFieldType< - FieldTypeConfig, - Maybe - >(), + BaseFieldType, string[]>(), StringTagField ) +@UntilDestroy() @Component({ selector: 'cvc-clinvar-input', templateUrl: './clinvar-input.type.html', styleUrls: ['./clinvar-input.type.less'], changeDetection: ChangeDetectionStrategy.OnPush, }) -export class CvcClinvarInputField extends BaseInputMixin implements AfterViewInit { +export class CvcClinvarInputField + extends BaseInputMixin + implements AfterViewInit +{ defaultOptions: Partial> = { modelOptions: { // update model when focus leaves field @@ -51,7 +62,9 @@ export class CvcClinvarInputField extends BaseInputMixin implements AfterViewIni }, props: { label: 'Enter value', - placeholder: 'Enter value and hit Return' + placeholder: 'Enter value and hit Return', + description: + 'Specify if Clinvar IDs exist, or if they are not applicable for this variant.', }, } @@ -61,87 +74,101 @@ export class CvcClinvarInputField extends BaseInputMixin implements AfterViewIni showClinvarIdEntry$ = new BehaviorSubject(false) selectModel: Maybe = undefined + existenceChange$: Subject> + existenceModel$: BehaviorSubject> + showTagSelect$: BehaviorSubject + selectOptions = [ + { + value: undefined, + label: 'Unspecified', + tooltip: 'Existence of ClinVar IDs for this variant is unspecified.', + }, { value: ClinvarOptions.NotApplicable, - label: 'Clinvar IDs not applicable for this variant', + label: 'Not Applicable', + tooltip: 'ClinVar IDs are not applicable to this variant.', }, { value: ClinvarOptions.NoneFound, - label: 'Clinvar IDs do not exist for this variant', + label: 'Were Not Found', + tooltip: 'A search was performed, and no ClinVar IDs were found.', }, { value: ClinvarOptions.Found, - label: 'Clinvar IDs were found for this variant', - }, - { - value: undefined, - label: '', + label: 'Were Found', + tooltip: + 'A search was performed, and ClinVar IDs were found (enter IDs below).', }, ] constructor(private cdr: ChangeDetectorRef) { super() - } - - optionSelected(e: number) { - const selectedOption = (e as ClinvarOptions) - this.values.clear() - this.clinvarIds$.next([]) - if (selectedOption !== undefined && selectedOption !== null) { - if(selectedOption == ClinvarOptions.Found) { - this.showClinvarIdEntry$.next(true) - this.formControl.setValue([]) - } else if (selectedOption == ClinvarOptions.NoneFound) { - this.showClinvarIdEntry$.next(false) - this.formControl.setValue(['NONE FOUND']) - } else if (selectedOption == ClinvarOptions.NotApplicable) { - console.log("HERE") - this.showClinvarIdEntry$.next(false) - this.formControl.setValue(['NA']) - } - } else { - this.showClinvarIdEntry$.next(false) - this.formControl.setValue([]) - this.clinvarIds$.next([]) - } - } + this.existenceChange$ = new Subject>() + this.existenceModel$ = new BehaviorSubject>(undefined) + this.showTagSelect$ = new BehaviorSubject(false) - onEnter(e: Event) { - let target = (e.target as HTMLInputElement) - if(target.value) { - this.values.add(target.value) - target.value = '' - } - let arr = Array.from(this.values) - this.clinvarIds$.next(arr) - this.formControl.setValue(arr) - } - - tagClosed(tag: string) { - this.values.delete(tag) - let arr = Array.from(this.values) - this.clinvarIds$.next(arr) - this.formControl.setValue(arr) - this.clinvarIds$.next(arr) + // this.existenceChange$.pipe( + // withLatestFrom(this.formControl.valueChanges), + // map(([opts, value]: [Maybe, Maybe]) => { + // return opts === ClinvarOptions.Found || this.formControl.value + // }) + // ) } ngAfterViewInit(): void { this.configureBaseField() this.configureStringTagField() - const val = this.formControl.value - if(val && Array.isArray(val)) { - if(val[0] == "NONE FOUND") { - this.selectModel = ClinvarOptions.NoneFound - } else if(val[0] == 'N/A') { - this.selectModel = ClinvarOptions.NotApplicable + + // show id select based on form field value + // if undefined or array contains NOT FOUND or NA set false + // else set true + this.onValueChange$.pipe(untilDestroyed(this)).subscribe((value) => { + if (value === undefined) { + this.existenceModel$.next(undefined) + this.showTagSelect$.next(false) + } else if (value.includes('NONE FOUND') || value.includes('NA')) { + if (value.includes('NONE FOUND')) { + this.existenceModel$.next(ClinvarOptions.NoneFound) + } else if (value.includes('NA')) { + this.existenceModel$.next(ClinvarOptions.NotApplicable) + } + this.showTagSelect$.next(false) } else { - this.selectModel = ClinvarOptions.Found - val.forEach(v => this.values.add(v)) - this.showClinvarIdEntry$.next(true) + this.existenceModel$.next(ClinvarOptions.Found) + this.showTagSelect$.next(true) } - this.clinvarIds$.next(val) - this.cdr.detectChanges() - } + }) + + // set form control value when existenceChange$ updates + this.existenceChange$ + .pipe( + map((option) => { + const value = this.formControl.value + if (option === undefined && this.formControl.value !== undefined) { + this.formControl.setValue(undefined) + } else if ( + option === ClinvarOptions.NoneFound && + !value.includes('NONE FOUND') + ) { + this.formControl.setValue(['NONE FOUND']) + } else if ( + option === ClinvarOptions.NotApplicable && + !value.includes('NA') + ) { + this.formControl.setValue(['NA']) + } else if (option === ClinvarOptions.Found) { + if ( + value === undefined || + value.includes('NONE FOUND') || + value.includes('NA') + ) { + this.formControl.setValue([]) + } + } + }), + untilDestroyed(this) + ) + .subscribe() } } diff --git a/client/src/app/forms/types/comment-textarea/comment-textarea.module.ts b/client/src/app/forms/types/comment-textarea/comment-textarea.module.ts index 00ae78d3b..2189f2edd 100644 --- a/client/src/app/forms/types/comment-textarea/comment-textarea.module.ts +++ b/client/src/app/forms/types/comment-textarea/comment-textarea.module.ts @@ -8,7 +8,6 @@ import { FormlyModule } from '@ngx-formly/core' import { NzFormModule } from 'ng-zorro-antd/form' import { NzInputModule } from 'ng-zorro-antd/input' import { ReactiveFormsModule } from '@angular/forms' -import { FormlyNgZorroAntdModule } from '@ngx-formly/ng-zorro-antd' @NgModule({ declarations: [CommentTextareaType], @@ -16,7 +15,6 @@ import { FormlyNgZorroAntdModule } from '@ngx-formly/ng-zorro-antd' CommonModule, ReactiveFormsModule, FormlyModule.forChild({ types: [CommentTextareaTypeOption] }), - FormlyNgZorroAntdModule, NzFormModule, NzInputModule, ], diff --git a/client/src/app/forms/types/direction-select/direction-select.type.ts b/client/src/app/forms/types/direction-select/direction-select.type.ts index d10779d68..8428a7471 100644 --- a/client/src/app/forms/types/direction-select/direction-select.type.ts +++ b/client/src/app/forms/types/direction-select/direction-select.type.ts @@ -67,7 +67,7 @@ const optionText: any = { }, Assertion: { PREDICTIVE: { - SUPPORTS: "Support the variant's response to a drug", + SUPPORTS: "Supports the variant's response to a drug", DOES_NOT_SUPPORT: 'Does not support, or was inconclusive of an interaction between the variant and a drug', }, @@ -115,7 +115,7 @@ export interface CvcDirectionSelectFieldProps extends FormlyFieldProps { isMultiSelect: boolean requireTypePromptFn: (entityName: string) => string tooltip?: string - extraType?: CvcFormFieldExtraType, + extraType?: CvcFormFieldExtraType formMode: 'revise' | 'add' | 'clone' } @@ -164,7 +164,7 @@ export class CvcDirectionSelectField `Select ${entityType ? entityType + ' ' : ''}${entityName} Direction`, requireTypePromptFn: (entityName: string) => `Select ${entityName} Type to select its Direction`, - formMode: 'add' + formMode: 'add', }, } @@ -274,6 +274,7 @@ export class CvcDirectionSelectField if (!et || !ed || !this.state) return this.props.extraType = 'description' this.props.description = optionText[this.state.entityName][et][ed] + this.field.formControl.markAsTouched() }) } } diff --git a/client/src/app/forms/types/disease-select/disease-quick-add/disease-quick-add.form.ts b/client/src/app/forms/types/disease-select/disease-quick-add/disease-quick-add.form.ts index 267a7d305..062d0a88f 100644 --- a/client/src/app/forms/types/disease-select/disease-quick-add/disease-quick-add.form.ts +++ b/client/src/app/forms/types/disease-select/disease-quick-add/disease-quick-add.form.ts @@ -81,7 +81,7 @@ export class CvcDiseaseQuickAddForm { this.fields = [ { key: 'doid', - type: 'input', + type: 'base-input', props: { label: 'DOID', keydown: (k, e) => { @@ -93,9 +93,7 @@ export class CvcDiseaseQuickAddForm { }, { key: 'name', - // type: 'input', props: { - // label: 'Disease Name', hidden: true, required: true, }, diff --git a/client/src/app/forms/types/disease-select/disease-select.module.ts b/client/src/app/forms/types/disease-select/disease-select.module.ts index 7f65c2b4f..2614c830d 100644 --- a/client/src/app/forms/types/disease-select/disease-select.module.ts +++ b/client/src/app/forms/types/disease-select/disease-select.module.ts @@ -8,7 +8,6 @@ import { CvcFormSubmissionStatusDisplayModule } from '@app/forms/components/form import { CvcFormFieldWrapperModule } from '@app/forms/wrappers/form-field/form-field.module' import { LetDirective, PushPipe } from '@ngrx/component' import { ConfigOption, FormlyModule } from '@ngx-formly/core' -import { FormlyNzFormFieldModule } from '@ngx-formly/ng-zorro-antd/form-field' import { NzAlertModule } from 'ng-zorro-antd/alert' import { NzAutocompleteModule } from 'ng-zorro-antd/auto-complete' import { NzButtonModule } from 'ng-zorro-antd/button' diff --git a/client/src/app/forms/types/disease-select/disease-select.type.ts b/client/src/app/forms/types/disease-select/disease-select.type.ts index a88e2dbab..5b513ca04 100644 --- a/client/src/app/forms/types/disease-select/disease-select.type.ts +++ b/client/src/app/forms/types/disease-select/disease-select.type.ts @@ -95,10 +95,6 @@ export class CvcDiseaseSelectField extends DiseaseSelectMixin implements AfterViewInit { - // get template reference to quick-add form for add-entity-form wrapper props - @ViewChild('addDisease', { static: true }) - addForm!: TemplateRef - // get option template query list to populate entity-select @ViewChildren('optionTemplates', { read: TemplateRef }) optionTemplates?: QueryList> @@ -174,11 +170,6 @@ export class CvcDiseaseSelectField } else { this.configureField() } - - // configure add form props - if (this.addForm) { - this.field.props.addFormContent = this.addForm - } } // ngAfterViewInit() configureField(): void { diff --git a/client/src/app/forms/types/evidence-select/evidence-manager/evidence-manager.component.ts b/client/src/app/forms/types/evidence-select/evidence-manager/evidence-manager.component.ts index 9ed913c84..aff74ee92 100644 --- a/client/src/app/forms/types/evidence-select/evidence-manager/evidence-manager.component.ts +++ b/client/src/app/forms/types/evidence-select/evidence-manager/evidence-manager.component.ts @@ -41,6 +41,7 @@ import { } from 'rxjs' import { isNonNulled } from 'rxjs-etc' import { pluck } from 'rxjs-etc/operators' +import { tag } from 'rxjs-spy/operators' import { columnKeyToQueryVariableMap, columnKeyToSortColumnMap, diff --git a/client/src/app/forms/types/evidence-select/evidence-select.type.ts b/client/src/app/forms/types/evidence-select/evidence-select.type.ts index f66844156..30d82c38f 100644 --- a/client/src/app/forms/types/evidence-select/evidence-select.type.ts +++ b/client/src/app/forms/types/evidence-select/evidence-select.type.ts @@ -202,10 +202,19 @@ export class CvcEvidenceSelectField selectOpen$: this.selectOpen$, selectComponent: this.selectComponent, }) - this.onEid$.pipe(untilDestroyed(this)).subscribe() + + this.onEid$ + .pipe(tag('evidence-select onEid$'), untilDestroyed(this)) + .subscribe() // if form value exists on init, emit it so evidence manager will be updated - this.onEid$.next(this.formControl.value) + if ( + this.formControl.value !== undefined && + this.formControl.value.length !== 0 + ) { + this.onEid$.next(this.formControl.value) + } + this.onValueChange$ .pipe( withLatestFrom(this.onEid$), diff --git a/client/src/app/forms/types/form-types.module.ts b/client/src/app/forms/types/form-types.module.ts index ad6818d2f..d95e56dd7 100644 --- a/client/src/app/forms/types/form-types.module.ts +++ b/client/src/app/forms/types/form-types.module.ts @@ -1,69 +1,73 @@ import { CommonModule } from '@angular/common' import { NgModule } from '@angular/core' -import { CvcCheckboxModule } from './checkbox/checkbox.module' +import { CvcAcmgCodeSelectModule } from './acmg-code-select/acmg-code-select.module' +import { CvcAmpCategorySelectModule } from './amp-category-select/amp-category-select.module' +import { CvcBaseCheckboxModule } from './base/checkbox/checkbox.module' +import { CvcBaseInputModule } from './base/input/input.module' +import { CvcBaseSelectModule } from './base/select/select.module' +import { CvcBaseTextareaFieldModule } from './base/textarea/textarea.module' +import { CvcCancelButtonModule } from './cancel-button/cancel-button.module' +import { CvcClingenCodeSelectModule } from './clingen-code-select/clingen-code-select.module' +import { CvcClinvarInputFieldModule } from './clinvar-input/clinvar-input.module' +import { CvcCvcFdaCompanionTestCheckboxFieldModule } from './fda-companion-test-checkbox/fda-companion-test-checkbox.module' +import { CvcCvcFdaRegulatoryApprovalCheckboxFieldModule } from './fda-regulatory-approval-checkbox/fda-regulatory-approval-checkbox.module' import { CvcDirectionSelectModule } from './direction-select/direction-select.module' import { CvcDiseaseSelectModule } from './disease-select/disease-select.module' +import { CvcEntityTypeSelectModule } from './type-select/type-select.module' import { CvcEvidenceSelectFieldModule } from './evidence-select/evidence-select.module' import { CvcGeneSelectModule } from './gene-select/gene-select.module' import { CvcInteractionSelectModule } from './interaction-select/interaction-select.module' import { CvcLevelSelectModule } from './level-select/level-select.module' +import { CvcMolecularProfileSelectModule } from './molecular-profile-select/molecular-profile-select.module' +import { CvcNccnGuidelineSelectModule } from './nccn-guideline-select/nccn-guideline-select.module' +import { CvcNccnGuidelineVersionFieldModule } from './nccn-guideline-version-input/nccn-guideline-version-input.module' import { CvcOrgSubmitButtonTypeModule } from './org-submit-button/org-submit-button.type.module' import { CvcOriginSelectModule } from './origin-select/origin-select.module' import { CvcPhenotypeSelectModule } from './phenotype-select/phenotype-select.module' import { CvcRatingModule } from './rating/rating.module' +import { CvcReferenceBuildSelectModule } from './reference-build-select/reference-build-select.module' import { CvcSignificanceSelectModule } from './significance-select/significance-select.module' import { CvcSourceSelectModule } from './source-select/source-select.module' -import { CvcBaseInputFieldModule } from './tag-input/tag-input.module' -import { CvcTextareaFieldModule } from './textarea/textarea.module' +import { CvcTagInputModule } from './tag-input/tag-input.module' import { CvcTherapySelectModule } from './therapy-select/therapy-select.module' -import { CvcEntityTypeSelectModule } from './type-select/type-select.module' import { CvcVariantSelectModule } from './variant-select/variant-select.module' -import { CvcMolecularProfileSelectModule } from './molecular-profile-select/molecular-profile-select.module' -import { CvcAmpCategorySelectModule } from './amp-category-select/amp-category-select.module' -import { CvcAcmgCodeSelectModule } from './acmg-code-select/acmg-code-select.module' -import { CvcClingenCodeSelectModule } from './clingen-code-select/clingen-code-select.module' -import { CvcNccnGuidelineSelectModule } from './nccn-guideline-select/nccn-guideline-select.module' -import { CvcNccnGuidelineVersionFieldModule } from './nccn-guideline-version-input/nccn-guideline-version-input.module' -import { CvcCvcFdaRegulatoryApprovalCheckboxFieldModule } from './fda-regulatory-approval-checkbox/fda-regulatory-approval-checkbox.module' -import { CvcCvcFdaCompanionTestCheckboxFieldModule } from './fda-companion-test-checkbox/fda-companion-test-checkbox.module' -import { CvcReferenceBuildSelectModule } from './reference-build-select/reference-build-select.module' import { CvcVariantTypeSelectModule } from './variant-type-select/variant-type-select.module' -import { CvcClinvarInputFieldModule } from './clinvar-input/clinvar-input.module' -import { CvcCancelButtonModule } from './cancel-button/cancel-button.module' @NgModule({ imports: [ CommonModule, - CvcOrgSubmitButtonTypeModule, - CvcTherapySelectModule, - CvcEntityTypeSelectModule, - CvcGeneSelectModule, - CvcVariantSelectModule, - CvcSignificanceSelectModule, + CvcAcmgCodeSelectModule, + CvcAmpCategorySelectModule, + CvcBaseCheckboxModule, + CvcBaseInputModule, + CvcBaseSelectModule, + CvcBaseTextareaFieldModule, + CvcCancelButtonModule, + CvcClingenCodeSelectModule, + CvcClinvarInputFieldModule, + CvcCvcFdaCompanionTestCheckboxFieldModule, + CvcCvcFdaRegulatoryApprovalCheckboxFieldModule, CvcDirectionSelectModule, CvcDiseaseSelectModule, + CvcEntityTypeSelectModule, + CvcEvidenceSelectFieldModule, + CvcGeneSelectModule, CvcInteractionSelectModule, - CvcCheckboxModule, CvcLevelSelectModule, - CvcRatingModule, - CvcOriginSelectModule, - CvcSourceSelectModule, - CvcTextareaFieldModule, - CvcBaseInputFieldModule, - CvcPhenotypeSelectModule, CvcMolecularProfileSelectModule, - CvcEvidenceSelectFieldModule, - CvcAmpCategorySelectModule, - CvcAcmgCodeSelectModule, - CvcClingenCodeSelectModule, CvcNccnGuidelineSelectModule, CvcNccnGuidelineVersionFieldModule, - CvcCvcFdaRegulatoryApprovalCheckboxFieldModule, - CvcCvcFdaCompanionTestCheckboxFieldModule, + CvcOrgSubmitButtonTypeModule, + CvcOriginSelectModule, + CvcPhenotypeSelectModule, + CvcRatingModule, CvcReferenceBuildSelectModule, + CvcSignificanceSelectModule, + CvcSourceSelectModule, + CvcTagInputModule, + CvcTherapySelectModule, + CvcVariantSelectModule, CvcVariantTypeSelectModule, - CvcClinvarInputFieldModule, - CvcCancelButtonModule ], }) export class CvcFormTypesModule {} diff --git a/client/src/app/forms/types/interaction-select/interaction-select.type.ts b/client/src/app/forms/types/interaction-select/interaction-select.type.ts index 2d33c4b4a..e567bdccc 100644 --- a/client/src/app/forms/types/interaction-select/interaction-select.type.ts +++ b/client/src/app/forms/types/interaction-select/interaction-select.type.ts @@ -85,7 +85,7 @@ export class CvcInteractionSelectField requireMultipleTherapiesPromptFn: () => `A single associated therapy does not have an Interaction type`, tooltip: 'Characterizes the interaction of a multi-therapy treatment', - extraType: 'prompt', + }, } @@ -191,6 +191,7 @@ export class CvcInteractionSelectField this.props.extraType = 'description' } else { this.props.extraType = 'prompt' + this.field.formControl.markAsTouched() } }) } diff --git a/client/src/app/forms/types/level-select/level-select.module.ts b/client/src/app/forms/types/level-select/level-select.module.ts index 51de30854..57b221743 100644 --- a/client/src/app/forms/types/level-select/level-select.module.ts +++ b/client/src/app/forms/types/level-select/level-select.module.ts @@ -21,8 +21,7 @@ const typeConfig: ConfigOption = { }, { name: 'level-multi-select', - wrappers: ['form-field'], - component: CvcLevelSelectField, + extends: 'level-select', defaultOptions: >>{ props: { label: 'Levels', @@ -38,7 +37,8 @@ const typeConfig: ConfigOption = { imports: [ CommonModule, ReactiveFormsModule, - LetDirective, PushPipe, + LetDirective, + PushPipe, FormlyModule.forChild(typeConfig), NzTagModule, CvcPipesModule, diff --git a/client/src/app/forms/types/level-select/level-select.type.html b/client/src/app/forms/types/level-select/level-select.type.html index c9753f9d2..dc8d40eb2 100644 --- a/client/src/app/forms/types/level-select/level-select.type.html +++ b/client/src/app/forms/types/level-select/level-select.type.html @@ -2,7 +2,7 @@ [cvcFormControl]="formControl" [cvcFormlyAttributes]="field" [cvcSelectMode]="props.isMultiSelect ? 'multiple' : 'default'" - [cvcPlaceholder]="placeholder$ | ngrxPush" + [cvcPlaceholder]="props.placeholder" [cvcCustomTemplate]="selectedTemplate" [cvcOptions]="selectOption$ | ngrxPush" [cvcShowError]="showError" @@ -10,8 +10,8 @@ - {{ enum }} - - {{ enum | enumTooltip: 'evidenceLevelBrief' }} + {{ enum }} - {{ enum | enumTooltip: 'evidenceLevelBrief' + }} @@ -24,11 +24,12 @@ *ngIf="!props.isMultiSelect" nzMode="closeable" (nzOnClose)="onTagClose$.next($event)"> - {{ selected.nzValue }} - - {{ selected.nzValue | enumTooltip: 'evidenceLevelBrief' }} + {{ selected.nzValue }} - {{ selected.nzValue | + enumTooltip: 'evidenceLevelBrief' }} - {{ selected.nzValue | enumTooltip: 'evidenceLevelBrief' }} + {{ selected.nzValue }} - {{ selected.nzValue | + enumTooltip: 'evidenceLevelBrief' }} diff --git a/client/src/app/forms/types/level-select/level-select.type.ts b/client/src/app/forms/types/level-select/level-select.type.ts index f6d92e569..b664c0556 100644 --- a/client/src/app/forms/types/level-select/level-select.type.ts +++ b/client/src/app/forms/types/level-select/level-select.type.ts @@ -1,5 +1,6 @@ import { AfterViewInit, + ChangeDetectionStrategy, ChangeDetectorRef, Component, QueryList, @@ -10,6 +11,7 @@ import { import { CvcInputEnum } from '@app/forms/forms.types' import { BaseFieldType } from '@app/forms/mixins/base/base-field' import { EnumSelectField } from '@app/forms/mixins/enum-select-field.mixin' +import { CvcFormFieldExtraType } from '@app/forms/wrappers/form-field/form-field.wrapper' import { EvidenceLevel, Maybe } from '@app/generated/civic.apollo' import { untilDestroyed } from '@ngneat/until-destroy' import { @@ -17,7 +19,7 @@ import { FormlyFieldConfig, FormlyFieldProps, } from '@ngx-formly/core' -import { BehaviorSubject, from, map, withLatestFrom } from 'rxjs' +import { BehaviorSubject, map, filter, take } from 'rxjs' import { $enum } from 'ts-enum-util' import mixin from 'ts-mixin-extended' @@ -48,6 +50,7 @@ export interface CvcLevelSelectFieldProps extends FormlyFieldProps { isMultiSelect: boolean description?: string tooltip?: string + extraType?: CvcFormFieldExtraType } export interface CvcLevelSelectFieldConfig @@ -67,6 +70,7 @@ const LevelSelectMixin = mixin( selector: 'cvc-level-select', templateUrl: './level-select.type.html', styleUrls: ['./level-select.type.less'], + changeDetection: ChangeDetectionStrategy.OnPush, }) export class CvcLevelSelectField extends LevelSelectMixin @@ -75,12 +79,6 @@ export class CvcLevelSelectField //TODO: implement more precise types so specific enum-selects like this one can specify their enums, e.g. EvidenceLevel instead of CvcInputEnum // STATE SOURCE STREAMS levelEnum$: BehaviorSubject - onTypeSelect$?: BehaviorSubject> - - // LOCAL SOURCE STREAMS - // LOCAL INTERMEDIATE STREAMS - // LOCAL PRESENTATION STREAMS - placeholder$!: BehaviorSubject // FieldTypeConfig defaults defaultOptions: CvcLevelSelectFieldOptions = { @@ -89,6 +87,7 @@ export class CvcLevelSelectField required: false, isMultiSelect: false, placeholder: 'Select Evidence Level', + extraType: 'description', }, } @@ -102,20 +101,25 @@ export class CvcLevelSelectField ngAfterViewInit(): void { this.configureBaseField() // mixin fn - this.configureStateConnections() // local fn - this.configureEnumSelectField({ - optionEnum$: this.levelEnum$, - optionTemplate$: this.optionTemplate$, - changeDetectorRef: this.cdr, - }) + if (this.state && this.state.formReady$) { + this.state.formReady$ + .pipe( + filter((r) => r), // only pass true values + take(1), // unsubscribe after 1st emit + untilDestroyed(this) // or form destroyed + ) + .subscribe((_) => { + this.configureField() + }) + } else { + this.configureField() + } } - configureStateConnections(): void { + configureField(): void { this.props.tooltip = 'Type of study performed to produce the evidence statement' - this.placeholder$ = new BehaviorSubject(this.props.placeholder) - this.levelEnum$.next($enum(EvidenceLevel).map((level) => level)) // set up optionTemplates Observable @@ -139,7 +143,13 @@ export class CvcLevelSelectField this.props.description = undefined } else { this.props.description = optionText.get(level) + this.field.formControl.markAsTouched() } }) + this.configureEnumSelectField({ + optionEnum$: this.levelEnum$, + optionTemplate$: this.optionTemplate$, + changeDetectorRef: this.cdr, + }) } } diff --git a/client/src/app/forms/types/molecular-profile-builder/molecular-profile-builder.type.ts b/client/src/app/forms/types/molecular-profile-builder/molecular-profile-builder.type.ts index 5ecaa233c..267b86a2d 100644 --- a/client/src/app/forms/types/molecular-profile-builder/molecular-profile-builder.type.ts +++ b/client/src/app/forms/types/molecular-profile-builder/molecular-profile-builder.type.ts @@ -29,7 +29,6 @@ export class CvcMolecularProfileBuilderType required: true, formLayout: 'inline', hideLabel: true, - colSpan: 12, }, resetOnHide: false, expressions: { @@ -51,7 +50,6 @@ export class CvcMolecularProfileBuilderType emitMolecularProfileId: true, formLayout: 'inline', hideLabel: true, - colSpan: 12, }, resetOnHide: false, expressions: { diff --git a/client/src/app/forms/types/molecular-profile-select/molecular-profile-select.type.html b/client/src/app/forms/types/molecular-profile-select/molecular-profile-select.type.html index 2a47858b2..4587a7a68 100644 --- a/client/src/app/forms/types/molecular-profile-select/molecular-profile-select.type.html +++ b/client/src/app/forms/types/molecular-profile-select/molecular-profile-select.type.html @@ -13,34 +13,38 @@ nz-typography nzEllipsis nzType="secondary"> - Select or create a Molecular Profile with the expression editor + Select or create a Molecular Profile with the expression editor +
- - +
+ + +
diff --git a/client/src/app/forms/types/molecular-profile-select/molecular-profile-select.type.less b/client/src/app/forms/types/molecular-profile-select/molecular-profile-select.type.less index caa4a5238..00f8e8678 100644 --- a/client/src/app/forms/types/molecular-profile-select/molecular-profile-select.type.less +++ b/client/src/app/forms/types/molecular-profile-select/molecular-profile-select.type.less @@ -15,3 +15,21 @@ form, cursor: default; border-radius: 2px; } +.select-container { + // mimic the appearance of the full width populated selects displayed by + // the other fields. Can't display a full-width select for reasons detailed below. + padding: 0; + background-color: white; + cursor: default; + border-radius: 2px; + border: 1px solid rgb(217, 217, 217); + .limit-select-width { + // using inline-block will cause its child select element to shrink to fit + // its contents, otherwise users might click in the empty area of the select + // and display a confusing dropdown which we should ideally suppress. + display: inline-block; + // adjustments to get select bg height same as Editor button + margin-top: -1px; + margin-bottom: -1px; + } +} diff --git a/client/src/app/forms/types/molecular-profile-select/molecular-profile-select.type.ts b/client/src/app/forms/types/molecular-profile-select/molecular-profile-select.type.ts index 26fb2546b..2f989cf53 100644 --- a/client/src/app/forms/types/molecular-profile-select/molecular-profile-select.type.ts +++ b/client/src/app/forms/types/molecular-profile-select/molecular-profile-select.type.ts @@ -115,10 +115,12 @@ export class CvcMolecularProfileSelectField props: { label: 'Molecular Profile', placeholder: 'Search Molecular Profiles', + tooltip: + 'A single variant (Simple Molecular Profile) or a combination of variants (Complex Molecular Profile) relevant to the curated assertion.', isMultiSelect: false, description: 'Select a Gene and Variant to specify a simple Molecular Profile.', - extraType: 'prompt', + entityName: { singular: 'Molecular Profile', plural: 'Molecular Profiles', @@ -205,6 +207,7 @@ export class CvcMolecularProfileSelectField if (this.editorOpen) this.onShowExpClick$.next() this.cdr.detectChanges() this.field.formControl.setValue(mp.id) + this.field.formControl.markAsTouched() }) } // ngAfterViewInit diff --git a/client/src/app/forms/types/molecular-profile-select/mp-expression-editor/mp-expression-editor.component.ts b/client/src/app/forms/types/molecular-profile-select/mp-expression-editor/mp-expression-editor.component.ts index 29c505bbe..bff727b9f 100644 --- a/client/src/app/forms/types/molecular-profile-select/mp-expression-editor/mp-expression-editor.component.ts +++ b/client/src/app/forms/types/molecular-profile-select/mp-expression-editor/mp-expression-editor.component.ts @@ -14,6 +14,7 @@ import { ApolloQueryResult } from '@apollo/client/core' import { LinkableMolecularProfile } from '@app/components/molecular-profiles/molecular-profile-tag/molecular-profile-tag.component' import { LinkableVariantType } from '@app/components/variant-types/variant-type-tag/variant-type-tag.component' import { NetworkErrorsService } from '@app/core/services/network-errors.service' +import { Viewer, ViewerService } from '@app/core/services/viewer/viewer.service' import { MpParseError, parseMolecularProfile, @@ -31,6 +32,7 @@ import { MolecularProfile, MolecularProfileComponentInput, MpExpressionEditorPrepopulateGQL, + Organization, PreviewMolecularProfileName2GQL, PreviewMolecularProfileName2Query, PreviewMolecularProfileName2QueryVariables, @@ -161,12 +163,17 @@ export class MpExpressionEditorComponent implements AfterViewInit, OnChanges { description: 'KIT D816V must be absent.', }, ] + + viewer$: Observable + mostRecentOrg$: Observable> + mostRecentOrgId: Maybe constructor( private previewMpGql: PreviewMolecularProfileName2GQL, private createMolecularProfileGql: CreateMolecularProfile2GQL, private mpEditorPrepopulate: MpExpressionEditorPrepopulateGQL, - private networkErrorService: NetworkErrorsService + private networkErrorService: NetworkErrorsService, + private viewerService: ViewerService, ) { this.createMolecularProfileMutator = new MutatorWithState( this.networkErrorService @@ -185,9 +192,18 @@ export class MpExpressionEditorComponent implements AfterViewInit, OnChanges { this.expressionSegment$ = new Subject>() this.existingMp$ = new Subject>() // this.existingMp$.pipe(tag('existingMp$')).subscribe() + this.viewer$ = this.viewerService.viewer$ + this.mostRecentOrg$ = this.viewer$.pipe(pluck('mostRecentOrg')) } ngAfterViewInit(): void { + this.mostRecentOrg$ + .pipe( + untilDestroyed(this) + ) + .subscribe((org) => { + this.mostRecentOrgId = org?.id + }) this.onInputChange$ .pipe( // tag('onInputChange$'), @@ -343,7 +359,7 @@ export class MpExpressionEditorComponent implements AfterViewInit, OnChanges { if ('errorMessage' in res) return this.state = this.createMolecularProfileMutator.mutate( this.createMolecularProfileGql, - { mpStructure: res }, + { mpStructure: res, organizationId: this.mostRecentOrgId }, {}, (data) => { setTimeout(() => { diff --git a/client/src/app/forms/types/molecular-profile-select/mp-expression-editor/mp-expression-editor.query.gql b/client/src/app/forms/types/molecular-profile-select/mp-expression-editor/mp-expression-editor.query.gql index 2ac8f8041..35677f2a5 100644 --- a/client/src/app/forms/types/molecular-profile-select/mp-expression-editor/mp-expression-editor.query.gql +++ b/client/src/app/forms/types/molecular-profile-select/mp-expression-editor/mp-expression-editor.query.gql @@ -31,9 +31,10 @@ query MpExpressionEditorPrepopulate($mpId: Int!) { # previously: createMolecularProfile mutation CreateMolecularProfile2( - $mpStructure: MolecularProfileComponentInput! + $mpStructure: MolecularProfileComponentInput!, + $organizationId: Int, ) { - createMolecularProfile(input: { structure: $mpStructure }) { + createMolecularProfile(input: { structure: $mpStructure, organizationId: $organizationId }) { molecularProfile { id name diff --git a/client/src/app/forms/types/molecular-profile-select/mp-finder/mp-finder.component.html b/client/src/app/forms/types/molecular-profile-select/mp-finder/mp-finder.component.html index 61861c7b9..44d405217 100644 --- a/client/src/app/forms/types/molecular-profile-select/mp-finder/mp-finder.component.html +++ b/client/src/app/forms/types/molecular-profile-select/mp-finder/mp-finder.component.html @@ -1,7 +1,7 @@ + [formGroup]="form" + [nzLayout]="finderState.formLayout"> >(undefined), variantId$: new BehaviorSubject>(undefined), @@ -61,10 +59,11 @@ export class MpFinderComponent { this.config = [ { - wrappers: ['field-grid'], - props: { - grid: { - cols: 2, + wrappers: ['form-row'], + props: { + formRowOptions: { + gutter: [8, 0], // zero vertical margin ensures no top margins set on gene, variant select fields + span: 12, }, }, fieldGroup: [ @@ -74,9 +73,9 @@ export class MpFinderComponent { props: { placeholder: 'Select MP Gene', hideLabel: true, - layout: { - showExtra: false, - }, + showExtra: false, + showErrorTip: false, + required: true, }, }, { @@ -84,11 +83,11 @@ export class MpFinderComponent { type: 'variant-select', props: { placeholder: 'Select MP Variant', - requireGene: true, - layout: { - showExtra: false, - }, hideLabel: true, + required: true, + showExtra: false, + showErrorTip: false, + requireGene: true, }, }, ], @@ -102,17 +101,14 @@ export class MpFinderComponent { if (variant) { this.model = { geneId: undefined, - variantId: undefined + variantId: undefined, } this.cvcOnSelect.next(variant.singleVariantMolecularProfile) this.cvcOnVariantSelect.next(variant) } - } - getSelectedVariant( - variantId: Maybe, - ): Maybe { + getSelectedVariant(variantId: Maybe): Maybe { if (!variantId) return const fragment = { id: `Variant:${variantId}`, @@ -139,11 +135,9 @@ export class MpFinderComponent { console.error(err) } if (!variant) { - console.error( - `MpFinderForm could not resolve its Variant from the cache` - ) + console.error(`MpFinderForm could not resolve its Variant from the cache`) return } - return variant + return variant } } diff --git a/client/src/app/forms/types/nccn-guideline-select/nccn-guideline-select.type.html b/client/src/app/forms/types/nccn-guideline-select/nccn-guideline-select.type.html index 2469eae78..d86583df8 100644 --- a/client/src/app/forms/types/nccn-guideline-select/nccn-guideline-select.type.html +++ b/client/src/app/forms/types/nccn-guideline-select/nccn-guideline-select.type.html @@ -20,9 +20,7 @@ - {{ result.name }} + {{ result.name }} @@ -39,6 +37,7 @@ [cvcCacheId]="'NccnGuideline:' + selected.nzValue" [cvcContext]="props.isMultiSelect ? 'multi-select-item' : 'select-item'" [cvcMode]="props.isMultiSelect ? 'default' : 'closeable'" + [cvcShowIcon]="false" (cvcOnClose)="onTagClose$.next(selected.nzValue)"> diff --git a/client/src/app/forms/types/org-submit-button/org-submit-button.type.html b/client/src/app/forms/types/org-submit-button/org-submit-button.type.html index 437b07a39..62b362db7 100644 --- a/client/src/app/forms/types/org-submit-button/org-submit-button.type.html +++ b/client/src/app/forms/types/org-submit-button/org-submit-button.type.html @@ -4,16 +4,24 @@ [formControl]="formControl" [formlyAttributes]="field" /> - +
+ +
diff --git a/client/src/app/forms/types/org-submit-button/org-submit-button.type.less b/client/src/app/forms/types/org-submit-button/org-submit-button.type.less index 816cd182e..4e2a1885b 100644 --- a/client/src/app/forms/types/org-submit-button/org-submit-button.type.less +++ b/client/src/app/forms/types/org-submit-button/org-submit-button.type.less @@ -1,25 +1,12 @@ -:host { - display: inline-block; - // fixes the right border on the first button - ::ng-deep .ant-btn-dangerous.ant-btn-primary:first-child:not(:last-child) { - border-right-color: #ff4d4f; +.btn-aligner { + width: 100%; + &.btn-right { + text-align: right; } - ::ng-deep .ant-btn-dangerous.ant-btn-primary:hover, - ::ng-deep .ant-btn-dangerous.ant-btn-primary:focus { - border-right-color: #fd7978; + &.btn-left { + text-align: left; } -} - -.org-dropdown-btn { - nz-avatar { - margin: 0 6px; - margin-top: -2px; - border: 1px solid rgba(255, 255, 255, 0.3); - background-color: rgba(255, 255, 255, 0.9); - } - // fixes the left border on the last button - &.ant-btn-dangerous:last-child:not(:first-child), - .ant-btn-dangerous + .ant-btn-dangerous { - border-left-color: #fd7978; + &.btn-center { + text-align: center; } } diff --git a/client/src/app/forms/types/org-submit-button/org-submit-button.type.ts b/client/src/app/forms/types/org-submit-button/org-submit-button.type.ts index cfa1cf589..a6700d703 100644 --- a/client/src/app/forms/types/org-submit-button/org-submit-button.type.ts +++ b/client/src/app/forms/types/org-submit-button/org-submit-button.type.ts @@ -34,6 +34,7 @@ import { interface CvcOrgSubmitButtonProps extends FormlyFieldProps { submitLabel: string + align?: 'left' | 'right' | 'center' } export interface CvcOrgSubmitButtonFieldConfig @@ -98,7 +99,7 @@ export class CvcOrgSubmitButtonComponent ngOnInit(): void { // set defaults - // this.props.submitLabel = this.props.submitLabel || defaultProps.submitLabel + // this.props.submitLabel = this.props.submitLabel || defaultOptions.props.submitLabel this.menuSelection$ .pipe(withLatestFrom(this.viewer$)) .subscribe(([mroId, viewer]: [number, Viewer]) => { diff --git a/client/src/app/forms/types/origin-select/origin-select.type.ts b/client/src/app/forms/types/origin-select/origin-select.type.ts index 97531053d..79f9804b1 100644 --- a/client/src/app/forms/types/origin-select/origin-select.type.ts +++ b/client/src/app/forms/types/origin-select/origin-select.type.ts @@ -10,6 +10,7 @@ import { import { CvcInputEnum } from '@app/forms/forms.types' import { BaseFieldType } from '@app/forms/mixins/base/base-field' import { EnumSelectField } from '@app/forms/mixins/enum-select-field.mixin' +import { CvcFormFieldExtraType } from '@app/forms/wrappers/form-field/form-field.wrapper' import { Maybe, VariantOrigin } from '@app/generated/civic.apollo' import { untilDestroyed } from '@ngneat/until-destroy' import { @@ -56,6 +57,7 @@ export interface CvcOriginSelectFieldProps extends FormlyFieldProps { isMultiSelect: boolean description?: string tooltip?: string + extraType?: CvcFormFieldExtraType } export interface CvcOriginSelectFieldConfig @@ -140,8 +142,10 @@ export class CvcOriginSelectField .subscribe((origin: Maybe) => { if (!origin) { this.props.description = undefined + this.props.extraType = 'prompt' } else { this.props.description = optionMap.get(origin) + this.props.extraType = 'description' } }) } diff --git a/client/src/app/forms/types/phenotype-select/phenotype-select.type.ts b/client/src/app/forms/types/phenotype-select/phenotype-select.type.ts index c610cb911..613f19b01 100644 --- a/client/src/app/forms/types/phenotype-select/phenotype-select.type.ts +++ b/client/src/app/forms/types/phenotype-select/phenotype-select.type.ts @@ -13,6 +13,7 @@ import { CvcSelectEntityName } from '@app/forms/components/entity-select/entity- import { BaseFieldType } from '@app/forms/mixins/base/base-field' import { EntitySelectField } from '@app/forms/mixins/entity-select-field.mixin' import { EntityType } from '@app/forms/states/base.state' +import { CvcFormFieldExtraType } from '@app/forms/wrappers/form-field/form-field.wrapper' import { Maybe, PhenotypeSelectTagGQL, @@ -54,7 +55,7 @@ export interface CvcPhenotypeSelectFieldProps extends FormlyFieldProps { } tooltip?: string description?: string - extraType?: string + extraType?: CvcFormFieldExtraType } // NOTE: any multi-select field must have the string 'multi' in its type name, @@ -119,7 +120,7 @@ export class CvcPhenotypeSelectField }, description: 'Please provide any HPO phenotypes, including age of onset.', - extraType: 'description', + extraType: 'prompt', }, } diff --git a/client/src/app/forms/types/rating/rating.type.html b/client/src/app/forms/types/rating/rating.type.html index 780530f3a..7f09e025a 100644 --- a/client/src/app/forms/types/rating/rating.type.html +++ b/client/src/app/forms/types/rating/rating.type.html @@ -2,8 +2,11 @@ type="hidden" [formControl]="formControl" [formlyAttributes]="field" /> - + +
+ +
diff --git a/client/src/app/forms/types/rating/rating.type.less b/client/src/app/forms/types/rating/rating.type.less index f2c96ec6f..0712ec96c 100644 --- a/client/src/app/forms/types/rating/rating.type.less +++ b/client/src/app/forms/types/rating/rating.type.less @@ -1,5 +1,10 @@ :host { - ::ng-deep nz-rate ul { + .rate-block { + display: inline-block; + background-color: #fff; + border-radius: 2px; + padding: 2px 4px; + margin-top: -4px; } ::ng-deep nz-rate .anticon { font-size: 160%; diff --git a/client/src/app/forms/types/rating/rating.type.ts b/client/src/app/forms/types/rating/rating.type.ts index 75ab47330..237e8cc76 100644 --- a/client/src/app/forms/types/rating/rating.type.ts +++ b/client/src/app/forms/types/rating/rating.type.ts @@ -6,6 +6,7 @@ import { } from '@angular/core' import { BaseFieldType } from '@app/forms/mixins/base/base-field' import { EnumSelectField } from '@app/forms/mixins/enum-select-field.mixin' +import { CvcFormFieldExtraType } from '@app/forms/wrappers/form-field/form-field.wrapper' import { Maybe } from '@app/generated/civic.apollo' import { untilDestroyed } from '@ngneat/until-destroy' import { @@ -34,6 +35,7 @@ interface CvcRatingFieldProps extends FormlyFieldProps { description?: string tooltip?: string hoverText: string[] + extraType?: CvcFormFieldExtraType } export interface CvcRatingSelectFieldConfig @@ -52,10 +54,7 @@ const RatingMixin = mixin( styleUrls: ['./rating.type.less'], changeDetection: ChangeDetectionStrategy.OnPush, }) -export class CvcRatingField - extends RatingMixin - implements AfterViewInit -{ +export class CvcRatingField extends RatingMixin implements AfterViewInit { // LOCAL SOURCE STREAMS rating$: BehaviorSubject> @@ -81,7 +80,7 @@ export class CvcRatingField this.configureBaseField() // mixin fn this.configureStateConnections() // local fn - if(this.formControl.value) { + if (this.formControl.value) { this.rating$.next(this.formControl.value) } @@ -101,10 +100,14 @@ export class CvcRatingField this.onValueChange$ .pipe(untilDestroyed(this)) .subscribe((rating: Maybe) => { - if (!rating) { + if (!rating || rating === 0) { + // zero is not a valid rating, unset model instead + this.formControl.setValue(undefined) this.props.description = undefined + this.props.extraType = 'prompt' } else { this.props.description = optionText[rating] + this.props.extraType = 'description' } }) } diff --git a/client/src/app/forms/types/significance-select/significance-select.type.ts b/client/src/app/forms/types/significance-select/significance-select.type.ts index 22e5b71f3..2ae22772a 100644 --- a/client/src/app/forms/types/significance-select/significance-select.type.ts +++ b/client/src/app/forms/types/significance-select/significance-select.type.ts @@ -121,7 +121,7 @@ interface CvcSignificanceSelectFieldProps extends FormlyFieldProps { isMultiSelect: boolean tooltip?: string description?: string - extraType?: CvcFormFieldExtraType, + extraType?: CvcFormFieldExtraType formMode: 'revise' | 'add' | 'clone' } @@ -170,7 +170,7 @@ export class CvcSignificanceSelectField requireTypePromptFn: (entityName: string) => `Select ${entityName} Type to select its Significance`, tooltip: 'Clinical impact of the variant', - formMode: 'add' + formMode: 'add', }, } @@ -274,6 +274,7 @@ export class CvcSignificanceSelectField this.props.description = undefined this.props.extraType = 'description' this.props.description = optionText[this.state.entityName][et][cs] + this.field.formControl.markAsTouched() }) } } diff --git a/client/src/app/forms/types/source-select/source-select.type.html b/client/src/app/forms/types/source-select/source-select.type.html index c22fe5922..ea64803c2 100644 --- a/client/src/app/forms/types/source-select/source-select.type.html +++ b/client/src/app/forms/types/source-select/source-select.type.html @@ -1,4 +1,6 @@ - + diff --git a/client/src/app/forms/types/source-select/source-select.type.less b/client/src/app/forms/types/source-select/source-select.type.less index 8249ad920..5b1d47ba9 100644 --- a/client/src/app/forms/types/source-select/source-select.type.less +++ b/client/src/app/forms/types/source-select/source-select.type.less @@ -5,3 +5,6 @@ color: #999; } } +.select-layout { + flex-wrap: nowrap; +} diff --git a/client/src/app/forms/types/source-select/source-select.type.ts b/client/src/app/forms/types/source-select/source-select.type.ts index 91a25496e..dca00b238 100644 --- a/client/src/app/forms/types/source-select/source-select.type.ts +++ b/client/src/app/forms/types/source-select/source-select.type.ts @@ -100,6 +100,7 @@ export class CvcSourceSelectField showTypeSelect$: Observable defaultSourceType: SourceSource = SourceSource.Pubmed + initialDescription!: Maybe // FieldTypeConfig defaults defaultOptions: CvcSourceSelectFieldOptions = { @@ -115,8 +116,7 @@ export class CvcSourceSelectField return `Search ${sourceName} Sources` }, }, - // description: 'Choose Source type and enter its ID to select an existing Source or add a Source', - extraType: 'prompt', + description: 'Select Source type, then enter its ID to search Sources', }, } @@ -161,6 +161,8 @@ export class CvcSourceSelectField minSearchStrLength: this.field.props.minSearchStrLength, }) + this.initialDescription = this.props.description + this.showTypeSelect$ = this.onValueChange$.pipe( map((value) => { if (!value || (value && Array.isArray(value))) return true @@ -185,6 +187,14 @@ export class CvcSourceSelectField return { citationId: citationId, sourceType: sourceType } }) ) + // hide/show prompt when field is populated/undefined + this.onValueChange$.pipe(untilDestroyed(this)).subscribe((sourceId) => { + if (sourceId) { + this.props.description = undefined + } else { + this.props.description = this.initialDescription + } + }) } getTypeaheadVarsFn( diff --git a/client/src/app/forms/types/tag-input/tag-input.module.ts b/client/src/app/forms/types/tag-input/tag-input.module.ts index abf5d662c..76e46d943 100644 --- a/client/src/app/forms/types/tag-input/tag-input.module.ts +++ b/client/src/app/forms/types/tag-input/tag-input.module.ts @@ -1,29 +1,30 @@ import { NgModule } from '@angular/core' import { CommonModule } from '@angular/common' -import { CvcBaseInputField, CvcBaseInputFieldProps } from './tag-input.type' +import { CvcTagInputField, CvcTagInputProps } from './tag-input.type' import { ConfigOption, FormlyModule } from '@ngx-formly/core' import { ReactiveFormsModule } from '@angular/forms' import { LetDirective, PushPipe } from '@ngrx/component' -import { FormlyNzFormFieldModule } from '@ngx-formly/ng-zorro-antd/form-field' import { NzInputModule } from 'ng-zorro-antd/input' import { NzFormModule } from 'ng-zorro-antd/form' import { CvcStringTagModule } from '@app/forms/components/string-tag/string-tag.module' +import { NzSelectModule } from 'ng-zorro-antd/select' +import { NzTagModule } from 'ng-zorro-antd/tag' const typeConfig: ConfigOption = { types: [ { name: 'tag-input', wrappers: ['form-field'], - component: CvcBaseInputField, + component: CvcTagInputField, }, { // for use in repeat-field types name: 'tag-multi-input', wrappers: ['form-field'], - component: CvcBaseInputField, + component: CvcTagInputField, defaultOptions: { - props: { - isRepeatItem: true, + props: { + isMultiInput: true, }, }, }, @@ -31,17 +32,19 @@ const typeConfig: ConfigOption = { } @NgModule({ - declarations: [CvcBaseInputField], + declarations: [CvcTagInputField], imports: [ CommonModule, ReactiveFormsModule, - LetDirective, PushPipe, + LetDirective, + PushPipe, FormlyModule.forChild(typeConfig), - FormlyNzFormFieldModule, // for form-field wrapper - NzInputModule, NzFormModule, + NzInputModule, + NzSelectModule, + NzTagModule, CvcStringTagModule, ], - exports: [CvcBaseInputField], + exports: [CvcTagInputField], }) -export class CvcBaseInputFieldModule {} +export class CvcTagInputModule {} diff --git a/client/src/app/forms/types/tag-input/tag-input.type.html b/client/src/app/forms/types/tag-input/tag-input.type.html index 49bf2eae5..fc3aff551 100644 --- a/client/src/app/forms/types/tag-input/tag-input.type.html +++ b/client/src/app/forms/types/tag-input/tag-input.type.html @@ -1,13 +1,43 @@ -
- - -
+ + + + + - + + + {{ tagLabel }} + + + + + + + + + diff --git a/client/src/app/forms/types/tag-input/tag-input.type.less b/client/src/app/forms/types/tag-input/tag-input.type.less index e69de29bb..4f004eb6b 100644 --- a/client/src/app/forms/types/tag-input/tag-input.type.less +++ b/client/src/app/forms/types/tag-input/tag-input.type.less @@ -0,0 +1 @@ +// NOTES: .hide-dropdown is located in default.less diff --git a/client/src/app/forms/types/tag-input/tag-input.type.ts b/client/src/app/forms/types/tag-input/tag-input.type.ts index 08e646b65..f24808712 100644 --- a/client/src/app/forms/types/tag-input/tag-input.type.ts +++ b/client/src/app/forms/types/tag-input/tag-input.type.ts @@ -1,39 +1,30 @@ import { AfterViewInit, ChangeDetectionStrategy, - ChangeDetectorRef, Component, - Injector, Type, } from '@angular/core' import { BaseFieldType } from '@app/forms/mixins/base/base-field' import { StringTagField } from '@app/forms/mixins/string-input-field.mixin' import { Maybe } from '@app/generated/civic.apollo' -import { UntilDestroy } from '@ngneat/until-destroy' import { FieldTypeConfig, FormlyFieldConfig, FormlyFieldProps, } from '@ngx-formly/core' -import { BehaviorSubject, Subject } from 'rxjs' import mixin from 'ts-mixin-extended' -export type CvcBaseInputFieldOptions = Partial< - FieldTypeConfig -> -export interface CvcBaseInputFieldProps extends FormlyFieldProps { +export type CvcTagInputOptions = Partial> +export interface CvcTagInputProps extends FormlyFieldProps { + isMultiInput?: boolean } -export interface CvcBaseInputFieldConfig - extends FormlyFieldConfig { - type: 'tag-input' | 'tag-input-item' | Type +export interface CvcTagInputConfig extends FormlyFieldConfig { + type: 'tag-input' | 'tag-input-item' | Type } -const BaseInputMixin = mixin( - BaseFieldType< - FieldTypeConfig, - Maybe - >(), +const TagInputMixin = mixin( + BaseFieldType, Maybe>(), StringTagField ) @@ -43,8 +34,8 @@ const BaseInputMixin = mixin( styleUrls: ['./tag-input.type.less'], changeDetection: ChangeDetectionStrategy.OnPush, }) -export class CvcBaseInputField extends BaseInputMixin implements AfterViewInit { - defaultOptions: Partial> = { +export class CvcTagInputField extends TagInputMixin implements AfterViewInit { + defaultOptions: Partial> = { modelOptions: { // update model when focus leaves field // (template's keydown.enter listener blurs the field, updating the model) @@ -52,43 +43,15 @@ export class CvcBaseInputField extends BaseInputMixin implements AfterViewInit { }, props: { label: 'Enter value', - placeholder: 'Enter value and hit Return' }, } - tags$ = new Subject() - values = new Set() - - constructor(private cdr: ChangeDetectorRef) { + constructor() { super() } - onEnter(e: Event) { - let target = (e.target as HTMLInputElement) - if(target.value) { - this.values.add(target.value) - target.value = '' - } - let arr = Array.from(this.values) - this.tags$.next(arr) - this.formControl.setValue(arr) - } - - tagClosed(tag: string) { - this.values.delete(tag) - let arr = Array.from(this.values) - this.tags$.next(arr) - this.formControl.setValue(arr) - this.tags$.next(arr) - } - ngAfterViewInit(): void { this.configureBaseField() this.configureStringTagField() - if(this.formControl.value && Array.isArray(this.formControl.value)) { - this.formControl.value.forEach(v => this.values.add(v)) - this.tags$.next(this.formControl.value) - this.cdr.detectChanges() - } } // ngAfterViewInit } diff --git a/client/src/app/forms/types/textarea/textarea.type.html b/client/src/app/forms/types/textarea/textarea.type.html deleted file mode 100644 index daa40a8e9..000000000 --- a/client/src/app/forms/types/textarea/textarea.type.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/client/src/app/forms/types/therapy-select/therapy-quick-add/therapy-quick-add.form.ts b/client/src/app/forms/types/therapy-select/therapy-quick-add/therapy-quick-add.form.ts index d51284a8e..6bd3f7faf 100644 --- a/client/src/app/forms/types/therapy-select/therapy-quick-add/therapy-quick-add.form.ts +++ b/client/src/app/forms/types/therapy-select/therapy-quick-add/therapy-quick-add.form.ts @@ -85,9 +85,7 @@ export class CvcTherapyQuickAddForm { this.fields = [ { key: 'name', - // type: 'input', props: { - // label: 'Therapy Name', hidden: true, required: true, }, @@ -102,7 +100,6 @@ export class CvcTherapyQuickAddForm { // handle submit events from form this.onSubmit$.pipe(untilDestroyed(this)).subscribe((model) => { - console.log('therapy-quick-add form model submitted.', model) this.submitTherapy(model) }) } diff --git a/client/src/app/forms/types/type-select/type-select.type.ts b/client/src/app/forms/types/type-select/type-select.type.ts index 7b574822a..d11f25c8f 100644 --- a/client/src/app/forms/types/type-select/type-select.type.ts +++ b/client/src/app/forms/types/type-select/type-select.type.ts @@ -13,6 +13,7 @@ import { CvcInputEnum } from '@app/forms/forms.types' import { BaseFieldType } from '@app/forms/mixins/base/base-field' import { EnumSelectField } from '@app/forms/mixins/enum-select-field.mixin' import { EntityType } from '@app/forms/states/base.state' +import { CvcFormFieldExtraType } from '@app/forms/wrappers/form-field/form-field.wrapper' import { Maybe } from '@app/generated/civic.apollo' import { untilDestroyed } from '@ngneat/until-destroy' import { @@ -39,10 +40,6 @@ const optionText: { [option: string]: string } = { 'Evidence pertains to a variant that alters biological function from the reference state.', } -export type CvcEntityTypeSelectFieldOptions = Partial< - FieldTypeConfig -> - interface CvcEntityTypeSelectFieldProps extends FormlyFieldProps { label: string placeholder: string @@ -50,11 +47,12 @@ interface CvcEntityTypeSelectFieldProps extends FormlyFieldProps { isMultiSelect: boolean description?: string tooltip?: string + extraType?: CvcFormFieldExtraType } export interface CvcEntityTypeSelectFieldConfig extends FormlyFieldConfig { - type: 'type-select' | Type + type: 'type-select' | 'type-multi-select' | Type } const EntityTypeSelectMixin = mixin( @@ -123,6 +121,7 @@ export class CvcEntityTypeSelectField } else { this.props.description = optionText[v] this.props.extraType = 'description' + this.field.formControl.markAsTouched() } }) if (!this.state) { diff --git a/client/src/app/forms/types/variant-select/variant-manager/variant-manager.component.html b/client/src/app/forms/types/variant-select/variant-manager/variant-manager.component.html index ce81c951d..b547a7662 100644 --- a/client/src/app/forms/types/variant-select/variant-manager/variant-manager.component.html +++ b/client/src/app/forms/types/variant-select/variant-manager/variant-manager.component.html @@ -534,7 +534,7 @@ - Use checkboxes to select or deselect EIDs + Use checkboxes to select or deselect Variants diff --git a/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.form.html b/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.form.html index 3fc198ae0..858ba0402 100644 --- a/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.form.html +++ b/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.form.html @@ -20,18 +20,6 @@ (modelChange)="model = $event">
- - -
diff --git a/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.form.ts b/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.form.ts index 30ff0fd97..9120afd71 100644 --- a/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.form.ts +++ b/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.form.ts @@ -19,17 +19,17 @@ import { QuickAddVariantGQL, QuickAddVariantMutation, QuickAddVariantMutationVariables, - Variant, - VariantSelectTypeaheadFieldsFragment, } from '@app/generated/civic.apollo' import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy' -import { FormlyFieldConfig, FormlyFormOptions } from '@ngx-formly/core' +import { FormlyFieldConfig } from '@ngx-formly/core' import { NzFormLayoutType } from 'ng-zorro-antd/form' -import { BehaviorSubject, Observable, Subject } from 'rxjs' +import { BehaviorSubject, Subject } from 'rxjs' +import { VariantIdWithCreationStatus } from '../variant-select.type' type VariantQuickAddModel = { name?: string geneId?: number + organizationId?: number } type VariantQuickAddDisplay = { @@ -60,7 +60,7 @@ export class CvcVariantQuickAddForm implements OnChanges { this.searchString$.next(str) } - @Output() cvcOnCreate = new EventEmitter() + @Output() cvcOnCreate = new EventEmitter() model: Partial form: UntypedFormGroup @@ -133,6 +133,13 @@ export class CvcVariantQuickAddForm implements OnChanges { required: true, }, }, + { + key: 'organizationId', + type: 'org-submit-button', + props: { + submitLabel: 'Add Variant', + }, + } ] // keep form module updated w/ Inputs @@ -144,7 +151,10 @@ export class CvcVariantQuickAddForm implements OnChanges { .pipe(untilDestroyed(this)) .subscribe((str: Maybe) => { this.model.name = str - if (str !== undefined && str.length < this.minNameLength) { + if ( + str === undefined || + (str !== undefined && str.length < this.minNameLength) + ) { this.formMessageDisplay$.next({ message: `New Variant name must be at least ${this.minNameLength} characters.`, }) @@ -174,18 +184,17 @@ export class CvcVariantQuickAddForm implements OnChanges { { name: model.name, geneId: model.geneId, + organizationId: model.organizationId, }, {}, (data) => { console.log('variant-quick-add submit data callback', data) - if (!data.addVariant) return + if (!data.createVariant) return // const vid = data.addVariant.variant.id this.formMessageDisplay$.next({ message: undefined }) setTimeout(() => { - if (data && data.addVariant) { - const variant = data.addVariant - .variant as VariantSelectTypeaheadFieldsFragment - this.cvcOnCreate.next(variant.id) + if (data && data.createVariant) { + this.cvcOnCreate.next({id: data.createVariant.variant.id, new: data.createVariant.new}) } }, 1000) } diff --git a/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.query.gql b/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.query.gql index da28dec97..6c58eb87c 100644 --- a/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.query.gql +++ b/client/src/app/forms/types/variant-select/variant-quick-add/variant-quick-add.query.gql @@ -1,10 +1,10 @@ -mutation QuickAddVariant($name: String!, $geneId: Int!) { - addVariant(input: { name: $name, geneId: $geneId }) { +mutation QuickAddVariant($name: String!, $geneId: Int!, $organizationId: Int) { + createVariant(input: { name: $name, geneId: $geneId, organizationId: $organizationId }) { ...QuickAddVariantFields } } -fragment QuickAddVariantFields on AddVariantPayload { +fragment QuickAddVariantFields on CreateVariantPayload { clientMutationId new variant { diff --git a/client/src/app/forms/types/variant-select/variant-select.type.html b/client/src/app/forms/types/variant-select/variant-select.type.html index 729f4603a..1d255236e 100644 --- a/client/src/app/forms/types/variant-select/variant-select.type.html +++ b/client/src/app/forms/types/variant-select/variant-select.type.html @@ -115,6 +115,6 @@ [cvcSearchString]="searchStr" [cvcGeneId]="onGeneId$ | ngrxPush" [cvcGeneName]="onGeneName$ | ngrxPush" - (cvcOnCreate)="onPopulate$.next($event)"> + (cvcOnCreate)="onSelectOrCreate($event)"> diff --git a/client/src/app/forms/types/variant-select/variant-select.type.ts b/client/src/app/forms/types/variant-select/variant-select.type.ts index 9fb12158f..93c4c4c4b 100644 --- a/client/src/app/forms/types/variant-select/variant-select.type.ts +++ b/client/src/app/forms/types/variant-select/variant-select.type.ts @@ -30,7 +30,6 @@ import { FormlyFieldConfig, FormlyFieldProps, } from '@ngx-formly/core' -import { Apollo } from 'apollo-angular' import { NzSelectOptionInterface } from 'ng-zorro-antd/select' import { BehaviorSubject, @@ -39,16 +38,19 @@ import { map, Observable, ReplaySubject, - startWith, Subject, scan, withLatestFrom, filter, take, } from 'rxjs' -import { tag } from 'rxjs-spy/operators' import mixin from 'ts-mixin-extended' +export interface VariantIdWithCreationStatus { + new: boolean + id: number +} + export type CvcVariantSelectFieldOption = Partial< FieldTypeConfig> > @@ -265,6 +267,13 @@ export class CvcVariantSelectField ) } + onSelectOrCreate(variant: VariantIdWithCreationStatus) { + this.onPopulate$.next(variant.id) + if(this.props.isNewlyCreatedCallback) { + this.props.isNewlyCreatedCallback(variant.new) + } + } + private onGeneId(gid: Maybe): void { this.selectedGeneId = gid // if field config indicates that a geneId is required, and none is provided, diff --git a/client/src/app/forms/types/variant-type-select/variant-type-select.type.ts b/client/src/app/forms/types/variant-type-select/variant-type-select.type.ts index b0639a5d2..d9c654939 100644 --- a/client/src/app/forms/types/variant-type-select/variant-type-select.type.ts +++ b/client/src/app/forms/types/variant-type-select/variant-type-select.type.ts @@ -108,7 +108,7 @@ export class CvcVariantTypeSelectField }, description: 'Add one or more variant types from the Sequence Ontology (e.g., missense, loss-of-function). Be specific as possible, avoid the addition of root concepts, and use the sequence_variant tree of the sequence ontology.', - extraType: 'prompt', + }, } diff --git a/client/src/app/forms/wrappers/field-grid/field-grid.wrapper.html b/client/src/app/forms/wrappers/field-grid/field-grid.wrapper.html deleted file mode 100644 index 10655f85b..000000000 --- a/client/src/app/forms/wrappers/field-grid/field-grid.wrapper.html +++ /dev/null @@ -1,5 +0,0 @@ -
- -
diff --git a/client/src/app/forms/wrappers/field-grid/field-grid.wrapper.less b/client/src/app/forms/wrappers/field-grid/field-grid.wrapper.less deleted file mode 100644 index 637d56636..000000000 --- a/client/src/app/forms/wrappers/field-grid/field-grid.wrapper.less +++ /dev/null @@ -1,27 +0,0 @@ -@import 'themes/global-variables.less'; - -.cvc-grid-cols(@columns) { - display: grid; - grid-template-columns: repeat(@columns, 1fr); - gap: @margin-sm; -} - -.field-grid { - &.cols-2 { - ::ng-deep formly-group:first-of-type { - .cvc-grid-cols(2); - } - } - - &.cols-3 { - ::ng-deep formly-group:first-of-type { - .cvc-grid-cols(3); - } - } - - &.cols-4 { - ::ng-deep formly-group:first-of-type { - .cvc-grid-cols(4); - } - } -} diff --git a/client/src/app/forms/wrappers/field-grid/field-grid.wrapper.ts b/client/src/app/forms/wrappers/field-grid/field-grid.wrapper.ts deleted file mode 100644 index 7aebdc152..000000000 --- a/client/src/app/forms/wrappers/field-grid/field-grid.wrapper.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core' -import { FieldWrapper, FormlyFieldConfig } from '@ngx-formly/core' - -export type CvcFieldGridWrapperConfig = Partial - -type GroupConfig = { - grid: { - // columns of equal width - cols: - | 2 - | 3 - | 4 - // thirds, quarters layouts - | '1-2' - | '2-1' - | '1-3' - | '3-1' - } -} - -@Component({ - selector: 'cvc-field-grid', - templateUrl: './field-grid.wrapper.html', - styleUrls: ['./field-grid.wrapper.less'], - changeDetection: ChangeDetectionStrategy.OnPush, -}) -export class CvcFieldGridWrapper - extends FieldWrapper> - implements OnInit -{ - get errorState() { - return this.showError ? 'error' : '' - } - - ngOnInit(): void { - // set default layout to grid, merge w/ any specified grid props - this.props.grid = { - cols: 2, - ...(this.props.grid ? this.props.grid : undefined), - } - } -} diff --git a/client/src/app/forms/wrappers/form-card/form-card.wrapper.html b/client/src/app/forms/wrappers/form-card/form-card.wrapper.html index 3aa6fc44f..1458b6c9d 100644 --- a/client/src/app/forms/wrappers/form-card/form-card.wrapper.html +++ b/client/src/app/forms/wrappers/form-card/form-card.wrapper.html @@ -1,15 +1,7 @@ - - - - - - - + [nzTitle]="wrapperOptions.title" + [nzSize]="wrapperOptions.size ?? 'default'"> + - - diff --git a/client/src/app/forms/wrappers/form-card/form-card.wrapper.ts b/client/src/app/forms/wrappers/form-card/form-card.wrapper.ts index 27697e2e0..418752b54 100644 --- a/client/src/app/forms/wrappers/form-card/form-card.wrapper.ts +++ b/client/src/app/forms/wrappers/form-card/form-card.wrapper.ts @@ -1,16 +1,19 @@ import { Component, OnInit } from '@angular/core' import { FieldWrapper, FormlyFieldConfig } from '@ngx-formly/core' import { FormlyFieldProps } from '@ngx-formly/ng-zorro-antd/form-field' +import { IndexableObject } from 'ng-zorro-antd/core/types' + +type FormCardOptions = { + title?: string + size?: 'default' | 'small' +} export interface CvcFormCardWrapperProps extends FormlyFieldProps { - title: string - gutterHorizontal: number - gutterVertical: number + formCardOptions?: FormCardOptions } -const defaultProps = { - gutterHorizontal: 8, - gutterVertical: 8, +const defaultWrapperOptions: FormCardOptions = { + size: 'default', } @Component({ @@ -22,6 +25,8 @@ export class CvcFormCardWrapper extends FieldWrapper> implements OnInit { + wrapperOptions: FormCardOptions = { ...defaultWrapperOptions } + get errorState() { return this.showError ? 'error' : '' } @@ -31,9 +36,11 @@ export class CvcFormCardWrapper } ngOnInit(): void { - this.props.gutterHorizontal = - this.props.gutterHorizontal || defaultProps.gutterHorizontal - this.props.gutterVertical = - this.props.gutterVertical || defaultProps.gutterVertical + if (this.props.formCardOptions) { + this.wrapperOptions = { + ...this.wrapperOptions, + ...this.props.formCardOptions, + } + } } } diff --git a/client/src/app/forms/wrappers/form-field/form-field.module.ts b/client/src/app/forms/wrappers/form-field/form-field.module.ts index 6eee36ddf..18d5d4b83 100644 --- a/client/src/app/forms/wrappers/form-field/form-field.module.ts +++ b/client/src/app/forms/wrappers/form-field/form-field.module.ts @@ -5,15 +5,8 @@ import { ReactiveFormsModule } from '@angular/forms' import { NzFormModule } from 'ng-zorro-antd/form' import { CvcFormFieldWrapper } from './form-field.wrapper' import { NzToolTipModule } from 'ng-zorro-antd/tooltip' -import { NzIconModule } from 'ng-zorro-antd/icon' import { NzTypographyModule } from 'ng-zorro-antd/typography' -import { LetDirective, PushPipe } from '@ngrx/component' -import { NzGridModule } from 'ng-zorro-antd/grid' -// NOTE: this wrapper replaces, and is heavily based on, ngx-formly's -// ng-zorro base form-field wrapper. If after an ngx-formly update, -// issues arise, ensure that any key updates are ported from ngx-formly's -// form-field wrapper. const wrapperConfig: ConfigOption = { wrappers: [{ name: 'form-field', component: CvcFormFieldWrapper }], } @@ -21,12 +14,8 @@ const wrapperConfig: ConfigOption = { declarations: [CvcFormFieldWrapper], imports: [ CommonModule, - LetDirective, - PushPipe, ReactiveFormsModule, NzFormModule, - NzGridModule, - NzIconModule, NzToolTipModule, NzTypographyModule, FormlyModule.forChild(wrapperConfig), diff --git a/client/src/app/forms/wrappers/form-field/form-field.wrapper.html b/client/src/app/forms/wrappers/form-field/form-field.wrapper.html index 47b1c9e5f..c93c4ff4c 100644 --- a/client/src/app/forms/wrappers/form-field/form-field.wrapper.html +++ b/client/src/app/forms/wrappers/form-field/form-field.wrapper.html @@ -1,125 +1,31 @@ - -
- -
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + valid: field.formControl!.status === 'VALID' && field.formControl!.touched === true + }"> + + + + + + + + + @@ -148,6 +54,8 @@ #errorTpl let-control>
- +
diff --git a/client/src/app/forms/wrappers/form-field/form-field.wrapper.less b/client/src/app/forms/wrappers/form-field/form-field.wrapper.less index 00ea74a5f..e9e150ade 100644 --- a/client/src/app/forms/wrappers/form-field/form-field.wrapper.less +++ b/client/src/app/forms/wrappers/form-field/form-field.wrapper.less @@ -1,73 +1,155 @@ @import 'themes/default.less'; -@helpIconSize: 14px; -@helpIconColor: #cfcfdf; - -.layout-vertical ::ng-deep nz-form-item:first-of-type { - flex-wrap: nowrap; - flex-direction: column; -} - -.layout-horizontal ::ng-deep nz-form-item:first-of-type { - flex-direction: inherit; - nz-form-label { - text-align: right; - line-height: 28px; - white-space: inherit; - padding: inherit; - } -} - -.layout-inline ::ng-deep nz-form-item:first-of-type { - flex-direction: inherit; - nz-form-label { - height: 28px; - line-height: 28px; - white-space: inherit; - padding: inherit; - } -} - -.cvc-field-label() { - label { - // embolden required labels - &.ant-form-item-required { - font-weight: 500; - - &:before { - border: 1px solid @error-color; - height: 1em; - content: ''; +@default-border: 1px solid @blue-1; +@default-bg-color: @blue-1; +@default-label-color: @blue-7; +@default-icon-color: @blue-4; + +@disabled-border: 1px solid @grey-3; +@disabled-bg-color: @grey-3; +@disabled-label-color: @text-color-secondary; +@disabled-icon-color: @grey-5; + +@required-border: 1px solid @blue-4; +@required-bg-color: @blue-1; +@required-label-color: @blue-7; +@required-icon-color: @blue-5; + +@error-border: 1px solid @red-4; +@error-bg-color: @red-1; +@error-label-color: @red-7; +@error-icon-color: @red-5; + +@valid-border: 1px solid @green-4; +@valid-bg-color: @green-1; +@valid-label-color: @green-7; +@valid-icon-color: @green-5; + +@item-border-radius: 4px; +@item-padding: 4px 8px; +@item-border: @default-border; +@item-background-color: @default-bg-color; + +:host { + > nz-form-item { + border-radius: @item-border-radius; + margin-top: 8px; + margin-bottom: 0; + // defaults + > nz-form-label { + span.label { + color: @default-label-color; } + ::ng-deep span.anticon { + margin-left: 0.25em; + path { + color: @default-icon-color; + } + } + } + // handy selector for selecting fields contained by a form-row wrapper + :host-context(.form-row-wrapped) { + > nz-form-item { + margin-top: 0; + margin-bottom: 0; + } } - } - ::ng-deep span.label { - padding-right: 4px; - } + // required state + &.required { + > nz-form-label { + ::ng-deep label { + &:before { + border: 1px solid @required-label-color; + height: 1em; + content: ''; + } + span.label { + color: @required-label-color; + font-weight: 600; + } + ::ng-deep span.anticon path { + color: @required-icon-color; + } + } + } + } - &.disabled label ::ng-deep span.label { - color: @text-color-secondary; - } + // error state + &.error { + > nz-form-label { + ::ng-deep label { + &:before { + border-color: @error-label-color; + } + span.label { + color: @error-label-color; + } + ::ng-deep span.anticon path { + color: @error-icon-color; + } + } + } + } - &.error label ::ng-deep span.label { - color: @error-color; - } + // valid state + &.valid { + > nz-form-label { + ::ng-deep label { + &:before { + border-color: @valid-label-color; + } + span.label { + color: @valid-label-color; + } + ::ng-deep span.anticon path { + color: @valid-icon-color; + } + } + } + } - &.valid label ::ng-deep span.label { - color: @error-color; + &.disabled { + > nz-form-label { + ::ng-deep label { + &:before { + border-color: @disabled-label-color; + } + span.label { + color: @disabled-label-color; + } + ::ng-deep span.anticon path { + color: @disabled-icon-color; + } + } + } + } } } -.cvc-form-field-card() { - background-color: white; - border: 1px solid #d9d9d9; - padding: 4px 8px; - border-radius: 6px; - &.disabled { - border: 1px solid #f5f5f5; - background-color: #f5f5f5; +// vertical layout fields displayed in a block w/ bg color & border styles +:host(.layout-vertical) { + > nz-form-item { + background-color: @default-bg-color; + border: @default-border; + padding: @item-padding; + &.required { + background-color: @required-bg-color; + border: @required-border; + } + &.error { + background-color: @error-bg-color; + border: @error-border; + } + &.valid { + background-color: @valid-bg-color; + border: @valid-border; + } + &.disabled { + background-color: @disabled-bg-color; + border: @disabled-border; + } } } @@ -89,26 +171,3 @@ .cvc-form-field-validation { font-weight: 600; } - -nz-form-item.layout-horizontal { - ::ng-deep nz-form-label:first-of-type { - .cvc-field-label(); - } -} - -nz-form-item.layout-vertical { - .cvc-form-field-card(); - ::ng-deep nz-form-label:first-of-type { - .cvc-field-label(); - } - - margin-bottom: @margin-lg; -} - -nz-form-item.layout-inline { - ::ng-deep nz-form-label:first-of-type { - .cvc-field-label(); - text-align: right; - margin-right: 6px; - } -} diff --git a/client/src/app/forms/wrappers/form-field/form-field.wrapper.ts b/client/src/app/forms/wrappers/form-field/form-field.wrapper.ts index 92fe942a6..d5c8992e6 100644 --- a/client/src/app/forms/wrappers/form-field/form-field.wrapper.ts +++ b/client/src/app/forms/wrappers/form-field/form-field.wrapper.ts @@ -1,98 +1,73 @@ import { AfterViewInit, ChangeDetectionStrategy, + ChangeDetectorRef, Component, OnInit, } from '@angular/core' -import { UntilDestroy } from '@ngneat/until-destroy' -import { FieldWrapper, FormlyFieldConfig } from '@ngx-formly/core' -import { IndexableObject } from 'ng-zorro-antd/core/types' +import { + FieldWrapper, + FormlyFieldConfig, + FormlyFieldProps, +} from '@ngx-formly/core' import { NzFormLayoutType } from 'ng-zorro-antd/form' -import { NzAlign, NzJustify } from 'ng-zorro-antd/grid' export type CvcFormFieldExtraType = 'description' | 'prompt' -export interface CvcFormFieldWrapperLayout { - layout: { - item: { - gutter: - | string - | number - | IndexableObject - | [number, number] - | [IndexableObject, IndexableObject] - justify?: NzJustify - align?: NzAlign - } - label: { - span: number - } - control: { - span: number - } - } - showExtra: boolean +type FormFieldOptions = {} + +export interface CvcFormFieldWrapperProps extends FormlyFieldProps { + formFieldOptions: FormFieldOptions } +const defaultWrapperOptions: FormFieldOptions = {} + @Component({ selector: 'cvc-form-field-wrapper', templateUrl: './form-field.wrapper.html', styleUrls: ['./form-field.wrapper.less'], changeDetection: ChangeDetectionStrategy.OnPush, + host: { + '[class.layout-horizontal]': 'formLayout === "horizontal"', + '[class.layout-vertical]': 'formLayout === "vertical"', + '[class.layout-inline]': 'formLayout === "inline"', + }, }) export class CvcFormFieldWrapper extends FieldWrapper implements OnInit, AfterViewInit { formLayout: NzFormLayoutType = 'vertical' - wrapper!: CvcFormFieldWrapperLayout + wrapperOptions: FormFieldOptions = { ...defaultWrapperOptions } get errorState() { return this.showError ? 'error' : '' } - constructor() { + constructor(private cdr: ChangeDetectorRef) { super() } ngOnInit(): void { - // merge local wrapper config with field config specified properties - try { - this.wrapper = { - layout: { - // layout only relevant for horizontal nzLayout type - item: { - gutter: [6, 12], - ...(this.props.layout?.item ? this.props.layout.item : undefined), - }, - label: { - span: 4, - ...(this.props.layout?.label ? this.props.layout.label : undefined), - }, - control: { - span: 20, - ...(this.props.layout?.control - ? this.props.layout?.control - : undefined), - }, - }, - showExtra: - this.props.layout?.showExtra !== undefined - ? this.props.layout.showExtra - : true, + // set field props defaults + this.props.showExtra = this.props.showExtra ?? true + this.props.extraType = this.props.extraType ?? 'prompt' + this.props.showErrorTip = this.props.showErrorTip ?? true + + // merge wrapper defaults with field config specified properties + if (this.props.formFieldOptions) { + this.wrapperOptions = { + ...this.wrapperOptions, + ...this.props.formFieldOptions, } - } catch (err) { - console.error(err) } - if (this.options.formState.formLayout) { this.formLayout = this.options.formState.formLayout } } - ngAfterViewInit(): void { - if (this.options.formState.formLayout) { - this.formLayout = this.options.formState.formLayout - } + // some simpler fields, e.g. base fields, require a detectChanges here to + // update wrapper class on formControl status changes, e.g. touched + this.cdr.detectChanges() } } diff --git a/client/src/app/forms/wrappers/form-layout/form-layout.wrapper.html b/client/src/app/forms/wrappers/form-layout/form-layout.wrapper.html index 1149b2fad..2c01caa91 100644 --- a/client/src/app/forms/wrappers/form-layout/form-layout.wrapper.html +++ b/client/src/app/forms/wrappers/form-layout/form-layout.wrapper.html @@ -16,13 +16,3 @@ [cvcModel]="model"> - diff --git a/client/src/app/forms/wrappers/form-layout/form-layout.wrapper.ts b/client/src/app/forms/wrappers/form-layout/form-layout.wrapper.ts index c374b08ef..f3525fe1a 100644 --- a/client/src/app/forms/wrappers/form-layout/form-layout.wrapper.ts +++ b/client/src/app/forms/wrappers/form-layout/form-layout.wrapper.ts @@ -1,29 +1,25 @@ import { - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, - OnInit + ChangeDetectionStrategy, + ChangeDetectorRef, + Component, + OnInit, } from '@angular/core' import { Maybe } from '@app/generated/civic.apollo' import { UntilDestroy } from '@ngneat/until-destroy' import { - FieldWrapper, - FormlyFieldConfig, - FormlyFieldProps + FieldWrapper, + FormlyFieldConfig, + FormlyFieldProps, } from '@ngx-formly/core' import { environment } from 'environments/environment' import { Observable, Subscription } from 'rxjs' import { tag } from 'rxjs-spy/operators' export interface CvcFormLayoutWrapperProps extends FormlyFieldProps { - title: string - submitLabel: string showDevPanel: boolean } const defaultProps: CvcFormLayoutWrapperProps = { - title: 'Form Card', - submitLabel: 'Submit', showDevPanel: false, } @@ -42,17 +38,16 @@ export class CvcFormLayoutWrapper statusChange$: Maybe> subscriptions!: Subscription[] - constructor(cdr: ChangeDetectorRef) { + constructor() { super() - } get errorState() { return this.showError ? 'error' : '' } ngOnInit(): void { - this.props.title = this.props.title || defaultProps.title - this.props.submitLabel = this.props.submitLabel || defaultProps.submitLabel - this.props.showDevPanel = environment.production ? false : (this.props.showDevPanel || defaultProps.showDevPanel) + this.props.showDevPanel = environment.production + ? false + : this.props.showDevPanel || defaultProps.showDevPanel } } diff --git a/client/src/app/forms/wrappers/field-grid/field-grid.module.ts b/client/src/app/forms/wrappers/form-row/form-row.module.ts similarity index 70% rename from client/src/app/forms/wrappers/field-grid/field-grid.module.ts rename to client/src/app/forms/wrappers/form-row/form-row.module.ts index 2344801d6..fdbc689fe 100644 --- a/client/src/app/forms/wrappers/field-grid/field-grid.module.ts +++ b/client/src/app/forms/wrappers/form-row/form-row.module.ts @@ -1,16 +1,16 @@ import { NgModule } from '@angular/core' import { CommonModule } from '@angular/common' -import { CvcFieldGridWrapper } from './field-grid.wrapper' +import { CvcFormRowWrapper } from './form-row.wrapper' import { ConfigOption, FormlyModule } from '@ngx-formly/core' import { NzFormModule } from 'ng-zorro-antd/form' import { ReactiveFormsModule } from '@angular/forms' import { NzGridModule } from 'ng-zorro-antd/grid' const wrapperConfig: ConfigOption = { - wrappers: [{ name: 'field-grid', component: CvcFieldGridWrapper }], + wrappers: [{ name: 'form-row', component: CvcFormRowWrapper }], } @NgModule({ - declarations: [CvcFieldGridWrapper], + declarations: [CvcFormRowWrapper], imports: [ CommonModule, ReactiveFormsModule, @@ -19,4 +19,4 @@ const wrapperConfig: ConfigOption = { FormlyModule.forChild(wrapperConfig), ], }) -export class CvcFieldGridWrapperModule {} +export class CvcFormRowWrapperModule {} diff --git a/client/src/app/forms/wrappers/form-row/form-row.wrapper.html b/client/src/app/forms/wrappers/form-row/form-row.wrapper.html new file mode 100644 index 000000000..89c7b6cf9 --- /dev/null +++ b/client/src/app/forms/wrappers/form-row/form-row.wrapper.html @@ -0,0 +1,78 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/client/src/app/forms/wrappers/form-row/form-row.wrapper.less b/client/src/app/forms/wrappers/form-row/form-row.wrapper.less new file mode 100644 index 000000000..2284a8308 --- /dev/null +++ b/client/src/app/forms/wrappers/form-row/form-row.wrapper.less @@ -0,0 +1 @@ +@import 'themes/global-variables.less'; diff --git a/client/src/app/forms/wrappers/form-row/form-row.wrapper.ts b/client/src/app/forms/wrappers/form-row/form-row.wrapper.ts new file mode 100644 index 000000000..9f86c5a52 --- /dev/null +++ b/client/src/app/forms/wrappers/form-row/form-row.wrapper.ts @@ -0,0 +1,88 @@ +import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core' +import { + FieldWrapper, + FormlyFieldConfig, + FormlyFieldProps, +} from '@ngx-formly/core' +import { IndexableObject } from 'ng-zorro-antd/core/types' +import { EmbeddedProperty } from 'ng-zorro-antd/grid' + +type ResponsiveColConfig = { + xs?: string | number | EmbeddedProperty | null + sm?: string | number | EmbeddedProperty | null + md?: string | number | EmbeddedProperty | null + lg?: string | number | EmbeddedProperty | null + xl?: string | number | EmbeddedProperty | null + xxl?: string | number | EmbeddedProperty | null +} + +type FormRowOptions = { + // nz-row gutter + gutter?: number | [number, number] | null + // NOTE: if gutter[1] (vertial gutter) is set to 0, row will receive no top margin (see mp-finder config) + // nz-col's nzSpan, nzXs - nzXXl config applied to every field + span?: string | number | null + responsive?: ResponsiveColConfig + flex?: string | number | null + // nz-col's nzXs - nzXXl applied iteratively to each field + spanIndexed?: string[] | number[] | null + responsiveIndexed?: ResponsiveColConfig[] + flexIndexed?: string[] | number[] | null + // NOTE: spanIndexed and responsiveIndexed arrays will iteratively + // populate each fields' nz-col container attributes. + // e.g. spanIndexed[0] value will set the nzSpan attribute of + // the nz-col containing the field at fieldGroup[0]. + // see nz-grid's API docs for details: https://ng.ant.design/components/grid/en#api +} + +export interface CvcFormRowWrapperProps extends FormlyFieldProps { + formRowOptions?: FormRowOptions +} + +const defaultWrapperOptions: FormRowOptions = { + gutter: [8, 8], + span: 24, +} + +@Component({ + selector: 'cvc-form-row', + templateUrl: './form-row.wrapper.html', + styleUrls: ['./form-row.wrapper.less'], + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class CvcFormRowWrapper + extends FieldWrapper> + implements OnInit +{ + wrapperOptions: FormRowOptions = { ...defaultWrapperOptions } + topMargin: string = '0' + + constructor() { + super() + } + + ngOnInit(): void { + if (this.props.formRowOptions) { + this.wrapperOptions = { + ...this.wrapperOptions, + ...this.props.formRowOptions, + } + } + // form-row wrappers stacked on each other do not provide enough + // margins between them to match the horizontal gutter size between + // enclosed column blocks. This logic attempts to equalize margins. + // NOTE: setting horizontal gutter to zero (e.g. gutter: [8,0]) sets + // top margin to zero - do this for one-line forms like variant-quick-add, mp-finder + if (Array.isArray(this.wrapperOptions.gutter)) { + if (this.wrapperOptions.gutter[1] > 0) { + this.topMargin = this.wrapperOptions.gutter[1] / 2 + 'px' + } else { + this.topMargin = '0' + } + } else if (this.wrapperOptions.gutter && this.wrapperOptions.gutter > 0) { + this.topMargin = this.wrapperOptions.gutter + 'px' + } else { + this.topMargin = '0' + } + } +} diff --git a/client/src/app/forms/wrappers/form-wrappers.module.ts b/client/src/app/forms/wrappers/form-wrappers.module.ts index 0ddf7bec6..0f0d8591c 100644 --- a/client/src/app/forms/wrappers/form-wrappers.module.ts +++ b/client/src/app/forms/wrappers/form-wrappers.module.ts @@ -1,11 +1,11 @@ import { CommonModule } from '@angular/common' import { NgModule } from '@angular/core' import { CvcAddEntityFormWrapperModule } from './add-entity-form/add-entity-form.module' -import { CvcFieldGridWrapperModule } from './field-grid/field-grid.module' import { CvcFormCardModule } from './form-card/form-card.module' import { CvcFormFieldWrapperModule } from './form-field/form-field.module' import { CvcFormFooterWrapperModule } from './form-footer/form-footer.wrapper.module' import { CvcFormLayoutWrapperModule } from './form-layout/form-layout.wrapper.module' +import { CvcFormRowWrapperModule } from './form-row/form-row.module' @NgModule({ imports: [ @@ -14,7 +14,7 @@ import { CvcFormLayoutWrapperModule } from './form-layout/form-layout.wrapper.mo CvcFormCardModule, CvcFormFooterWrapperModule, CvcFormFieldWrapperModule, - CvcFieldGridWrapperModule, + CvcFormRowWrapperModule, CvcAddEntityFormWrapperModule, ], }) diff --git a/client/src/app/generated/civic.apollo-helpers.ts b/client/src/app/generated/civic.apollo-helpers.ts index a52ec108b..1d51976a6 100644 --- a/client/src/app/generated/civic.apollo-helpers.ts +++ b/client/src/app/generated/civic.apollo-helpers.ts @@ -1,4 +1,18 @@ import type { FieldPolicy, FieldReadFunction, TypePolicies, TypePolicy } from '@apollo/client/cache'; +export type AcceptRevisionsActivityKeySpecifier = ('createdAt' | 'events' | 'id' | 'note' | 'organization' | 'parsedNote' | 'revisions' | 'subject' | 'supersededRevisions' | 'user' | 'verbiage' | AcceptRevisionsActivityKeySpecifier)[]; +export type AcceptRevisionsActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + revisions?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + supersededRevisions?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; export type AcceptRevisionsPayloadKeySpecifier = ('clientMutationId' | 'revisions' | 'supersededRevisions' | AcceptRevisionsPayloadKeySpecifier)[]; export type AcceptRevisionsPayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, @@ -13,6 +27,31 @@ export type AcmgCodeFieldPolicy = { name?: FieldPolicy | FieldReadFunction, tooltip?: FieldPolicy | FieldReadFunction }; +export type ActivityInterfaceKeySpecifier = ('createdAt' | 'events' | 'id' | 'note' | 'organization' | 'parsedNote' | 'subject' | 'user' | 'verbiage' | ActivityInterfaceKeySpecifier)[]; +export type ActivityInterfaceFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; +export type ActivityInterfaceConnectionKeySpecifier = ('edges' | 'nodes' | 'pageCount' | 'pageInfo' | 'totalCount' | ActivityInterfaceConnectionKeySpecifier)[]; +export type ActivityInterfaceConnectionFieldPolicy = { + edges?: FieldPolicy | FieldReadFunction, + nodes?: FieldPolicy | FieldReadFunction, + pageCount?: FieldPolicy | FieldReadFunction, + pageInfo?: FieldPolicy | FieldReadFunction, + totalCount?: FieldPolicy | FieldReadFunction +}; +export type ActivityInterfaceEdgeKeySpecifier = ('cursor' | 'node' | ActivityInterfaceEdgeKeySpecifier)[]; +export type ActivityInterfaceEdgeFieldPolicy = { + cursor?: FieldPolicy | FieldReadFunction, + node?: FieldPolicy | FieldReadFunction +}; export type AddCommentPayloadKeySpecifier = ('clientMutationId' | 'comment' | AddCommentPayloadKeySpecifier)[]; export type AddCommentPayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, @@ -35,20 +74,13 @@ export type AddTherapyPayloadFieldPolicy = { new?: FieldPolicy | FieldReadFunction, therapy?: FieldPolicy | FieldReadFunction }; -export type AddVariantPayloadKeySpecifier = ('clientMutationId' | 'molecularProfile' | 'new' | 'variant' | AddVariantPayloadKeySpecifier)[]; -export type AddVariantPayloadFieldPolicy = { - clientMutationId?: FieldPolicy | FieldReadFunction, - molecularProfile?: FieldPolicy | FieldReadFunction, - new?: FieldPolicy | FieldReadFunction, - variant?: FieldPolicy | FieldReadFunction -}; export type AdvancedSearchResultKeySpecifier = ('permalinkId' | 'resultIds' | 'searchEndpoint' | AdvancedSearchResultKeySpecifier)[]; export type AdvancedSearchResultFieldPolicy = { permalinkId?: FieldPolicy | FieldReadFunction, resultIds?: FieldPolicy | FieldReadFunction, searchEndpoint?: FieldPolicy | FieldReadFunction }; -export type AssertionKeySpecifier = ('acceptanceEvent' | 'acmgCodes' | 'ampLevel' | 'assertionDirection' | 'assertionType' | 'clingenCodes' | 'comments' | 'description' | 'disease' | 'events' | 'evidenceItems' | 'evidenceItemsCount' | 'fdaCompanionTest' | 'fdaCompanionTestLastUpdated' | 'flagged' | 'flags' | 'id' | 'lastAcceptedRevisionEvent' | 'lastCommentEvent' | 'lastSubmittedRevisionEvent' | 'link' | 'molecularProfile' | 'name' | 'nccnGuideline' | 'nccnGuidelineVersion' | 'phenotypes' | 'regulatoryApproval' | 'regulatoryApprovalLastUpdated' | 'rejectionEvent' | 'revisions' | 'significance' | 'status' | 'submissionEvent' | 'summary' | 'therapies' | 'therapyInteractionType' | 'variantOrigin' | AssertionKeySpecifier)[]; +export type AssertionKeySpecifier = ('acceptanceEvent' | 'acmgCodes' | 'ampLevel' | 'assertionDirection' | 'assertionType' | 'clingenCodes' | 'comments' | 'description' | 'disease' | 'events' | 'evidenceItems' | 'evidenceItemsCount' | 'fdaCompanionTest' | 'fdaCompanionTestLastUpdated' | 'flagged' | 'flags' | 'id' | 'lastAcceptedRevisionEvent' | 'lastCommentEvent' | 'lastSubmittedRevisionEvent' | 'link' | 'molecularProfile' | 'name' | 'nccnGuideline' | 'nccnGuidelineVersion' | 'phenotypes' | 'regulatoryApproval' | 'regulatoryApprovalLastUpdated' | 'rejectionEvent' | 'revisions' | 'significance' | 'status' | 'submissionActivity' | 'submissionEvent' | 'summary' | 'therapies' | 'therapyInteractionType' | 'variantOrigin' | AssertionKeySpecifier)[]; export type AssertionFieldPolicy = { acceptanceEvent?: FieldPolicy | FieldReadFunction, acmgCodes?: FieldPolicy | FieldReadFunction, @@ -82,6 +114,7 @@ export type AssertionFieldPolicy = { revisions?: FieldPolicy | FieldReadFunction, significance?: FieldPolicy | FieldReadFunction, status?: FieldPolicy | FieldReadFunction, + submissionActivity?: FieldPolicy | FieldReadFunction, submissionEvent?: FieldPolicy | FieldReadFunction, summary?: FieldPolicy | FieldReadFunction, therapies?: FieldPolicy | FieldReadFunction, @@ -431,6 +464,19 @@ export type CommentFieldPolicy = { parsedComment?: FieldPolicy | FieldReadFunction, title?: FieldPolicy | FieldReadFunction }; +export type CommentActivityKeySpecifier = ('comment' | 'createdAt' | 'events' | 'id' | 'note' | 'organization' | 'parsedNote' | 'subject' | 'user' | 'verbiage' | CommentActivityKeySpecifier)[]; +export type CommentActivityFieldPolicy = { + comment?: FieldPolicy | FieldReadFunction, + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; export type CommentConnectionKeySpecifier = ('edges' | 'mentionedEntities' | 'mentionedRoles' | 'mentionedUsers' | 'nodes' | 'pageCount' | 'pageInfo' | 'totalCount' | 'unfilteredCountForSubject' | 'uniqueCommenters' | CommentConnectionKeySpecifier)[]; export type CommentConnectionFieldPolicy = { edges?: FieldPolicy | FieldReadFunction, @@ -501,11 +547,43 @@ export type CountryFieldPolicy = { iso?: FieldPolicy | FieldReadFunction, name?: FieldPolicy | FieldReadFunction }; +export type CreateComplexMolecularProfileActivityKeySpecifier = ('createdAt' | 'events' | 'id' | 'note' | 'organization' | 'parsedNote' | 'subject' | 'user' | 'verbiage' | CreateComplexMolecularProfileActivityKeySpecifier)[]; +export type CreateComplexMolecularProfileActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; export type CreateMolecularProfilePayloadKeySpecifier = ('clientMutationId' | 'molecularProfile' | CreateMolecularProfilePayloadKeySpecifier)[]; export type CreateMolecularProfilePayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, molecularProfile?: FieldPolicy | FieldReadFunction }; +export type CreateVariantActivityKeySpecifier = ('createdAt' | 'events' | 'id' | 'molecularProfile' | 'note' | 'organization' | 'parsedNote' | 'subject' | 'user' | 'verbiage' | CreateVariantActivityKeySpecifier)[]; +export type CreateVariantActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + molecularProfile?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; +export type CreateVariantPayloadKeySpecifier = ('clientMutationId' | 'molecularProfile' | 'new' | 'variant' | CreateVariantPayloadKeySpecifier)[]; +export type CreateVariantPayloadFieldPolicy = { + clientMutationId?: FieldPolicy | FieldReadFunction, + molecularProfile?: FieldPolicy | FieldReadFunction, + new?: FieldPolicy | FieldReadFunction, + variant?: FieldPolicy | FieldReadFunction +}; export type DataReleaseKeySpecifier = ('acceptedAndSubmittedVariantsVcf' | 'acceptedVariantsVcf' | 'assertionTsv' | 'evidenceTsv' | 'geneTsv' | 'molecularProfileTsv' | 'name' | 'variantGroupTsv' | 'variantTsv' | DataReleaseKeySpecifier)[]; export type DataReleaseFieldPolicy = { acceptedAndSubmittedVariantsVcf?: FieldPolicy | FieldReadFunction, @@ -518,6 +596,36 @@ export type DataReleaseFieldPolicy = { variantGroupTsv?: FieldPolicy | FieldReadFunction, variantTsv?: FieldPolicy | FieldReadFunction }; +export type DeprecateComplexMolecularProfileActivityKeySpecifier = ('createdAt' | 'events' | 'id' | 'note' | 'organization' | 'parsedNote' | 'subject' | 'user' | 'verbiage' | DeprecateComplexMolecularProfileActivityKeySpecifier)[]; +export type DeprecateComplexMolecularProfileActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; +export type DeprecateComplexMolecularProfilePayloadKeySpecifier = ('clientMutationId' | 'molecularProfile' | DeprecateComplexMolecularProfilePayloadKeySpecifier)[]; +export type DeprecateComplexMolecularProfilePayloadFieldPolicy = { + clientMutationId?: FieldPolicy | FieldReadFunction, + molecularProfile?: FieldPolicy | FieldReadFunction +}; +export type DeprecateVariantActivityKeySpecifier = ('createdAt' | 'events' | 'id' | 'molecularProfiles' | 'note' | 'organization' | 'parsedNote' | 'subject' | 'user' | 'verbiage' | DeprecateVariantActivityKeySpecifier)[]; +export type DeprecateVariantActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + molecularProfiles?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; export type DeprecateVariantPayloadKeySpecifier = ('clientMutationId' | 'newlyDeprecatedMolecularProfiles' | 'variant' | DeprecateVariantPayloadKeySpecifier)[]; export type DeprecateVariantPayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, @@ -604,7 +712,7 @@ export type EventSubjectWithCountFieldPolicy = { occuranceCount?: FieldPolicy | FieldReadFunction, subject?: FieldPolicy | FieldReadFunction }; -export type EvidenceItemKeySpecifier = ('acceptanceEvent' | 'assertions' | 'comments' | 'description' | 'disease' | 'events' | 'evidenceDirection' | 'evidenceLevel' | 'evidenceRating' | 'evidenceType' | 'flagged' | 'flags' | 'id' | 'lastAcceptedRevisionEvent' | 'lastCommentEvent' | 'lastSubmittedRevisionEvent' | 'link' | 'molecularProfile' | 'name' | 'phenotypes' | 'rejectionEvent' | 'revisions' | 'significance' | 'source' | 'status' | 'submissionEvent' | 'therapies' | 'therapyInteractionType' | 'variantHgvs' | 'variantOrigin' | EvidenceItemKeySpecifier)[]; +export type EvidenceItemKeySpecifier = ('acceptanceEvent' | 'assertions' | 'comments' | 'description' | 'disease' | 'events' | 'evidenceDirection' | 'evidenceLevel' | 'evidenceRating' | 'evidenceType' | 'flagged' | 'flags' | 'id' | 'lastAcceptedRevisionEvent' | 'lastCommentEvent' | 'lastSubmittedRevisionEvent' | 'link' | 'molecularProfile' | 'name' | 'phenotypes' | 'rejectionEvent' | 'revisions' | 'significance' | 'source' | 'status' | 'submissionActivity' | 'submissionEvent' | 'therapies' | 'therapyInteractionType' | 'variantHgvs' | 'variantOrigin' | EvidenceItemKeySpecifier)[]; export type EvidenceItemFieldPolicy = { acceptanceEvent?: FieldPolicy | FieldReadFunction, assertions?: FieldPolicy | FieldReadFunction, @@ -631,6 +739,7 @@ export type EvidenceItemFieldPolicy = { significance?: FieldPolicy | FieldReadFunction, source?: FieldPolicy | FieldReadFunction, status?: FieldPolicy | FieldReadFunction, + submissionActivity?: FieldPolicy | FieldReadFunction, submissionEvent?: FieldPolicy | FieldReadFunction, therapies?: FieldPolicy | FieldReadFunction, therapyInteractionType?: FieldPolicy | FieldReadFunction, @@ -657,6 +766,16 @@ export type EvidenceItemsByStatusFieldPolicy = { rejectedCount?: FieldPolicy | FieldReadFunction, submittedCount?: FieldPolicy | FieldReadFunction }; +export type EvidenceItemsByTypeKeySpecifier = ('diagnosticCount' | 'functionalCount' | 'molecularProfileId' | 'oncogenicCount' | 'predictiveCount' | 'predisposingCount' | 'prognosticCount' | EvidenceItemsByTypeKeySpecifier)[]; +export type EvidenceItemsByTypeFieldPolicy = { + diagnosticCount?: FieldPolicy | FieldReadFunction, + functionalCount?: FieldPolicy | FieldReadFunction, + molecularProfileId?: FieldPolicy | FieldReadFunction, + oncogenicCount?: FieldPolicy | FieldReadFunction, + predictiveCount?: FieldPolicy | FieldReadFunction, + predisposingCount?: FieldPolicy | FieldReadFunction, + prognosticCount?: FieldPolicy | FieldReadFunction +}; export type FdaCodeKeySpecifier = ('code' | 'description' | FdaCodeKeySpecifier)[]; export type FdaCodeFieldPolicy = { code?: FieldPolicy | FieldReadFunction, @@ -672,19 +791,19 @@ export type FieldValidationErrorFieldPolicy = { error?: FieldPolicy | FieldReadFunction, fieldName?: FieldPolicy | FieldReadFunction }; -export type FlagKeySpecifier = ('comments' | 'createdAt' | 'flaggable' | 'flaggingUser' | 'id' | 'lastCommentEvent' | 'link' | 'name' | 'openComment' | 'resolutionComment' | 'resolvedAt' | 'resolvingUser' | 'state' | FlagKeySpecifier)[]; +export type FlagKeySpecifier = ('comments' | 'createdAt' | 'events' | 'flaggable' | 'flaggingUser' | 'id' | 'lastCommentEvent' | 'link' | 'name' | 'openActivity' | 'resolutionActivity' | 'resolvingUser' | 'state' | FlagKeySpecifier)[]; export type FlagFieldPolicy = { comments?: FieldPolicy | FieldReadFunction, createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, flaggable?: FieldPolicy | FieldReadFunction, flaggingUser?: FieldPolicy | FieldReadFunction, id?: FieldPolicy | FieldReadFunction, lastCommentEvent?: FieldPolicy | FieldReadFunction, link?: FieldPolicy | FieldReadFunction, name?: FieldPolicy | FieldReadFunction, - openComment?: FieldPolicy | FieldReadFunction, - resolutionComment?: FieldPolicy | FieldReadFunction, - resolvedAt?: FieldPolicy | FieldReadFunction, + openActivity?: FieldPolicy | FieldReadFunction, + resolutionActivity?: FieldPolicy | FieldReadFunction, resolvingUser?: FieldPolicy | FieldReadFunction, state?: FieldPolicy | FieldReadFunction }; @@ -704,6 +823,19 @@ export type FlagEdgeFieldPolicy = { cursor?: FieldPolicy | FieldReadFunction, node?: FieldPolicy | FieldReadFunction }; +export type FlagEntityActivityKeySpecifier = ('createdAt' | 'events' | 'flag' | 'id' | 'note' | 'organization' | 'parsedNote' | 'subject' | 'user' | 'verbiage' | FlagEntityActivityKeySpecifier)[]; +export type FlagEntityActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + flag?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; export type FlagEntityPayloadKeySpecifier = ('clientMutationId' | 'flag' | FlagEntityPayloadKeySpecifier)[]; export type FlagEntityPayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, @@ -867,11 +999,35 @@ export type LinkoutDataFieldPolicy = { name?: FieldPolicy | FieldReadFunction, suggestedValue?: FieldPolicy | FieldReadFunction }; +export type ModerateAssertionActivityKeySpecifier = ('createdAt' | 'events' | 'id' | 'note' | 'organization' | 'parsedNote' | 'subject' | 'user' | 'verbiage' | ModerateAssertionActivityKeySpecifier)[]; +export type ModerateAssertionActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; export type ModerateAssertionPayloadKeySpecifier = ('assertion' | 'clientMutationId' | ModerateAssertionPayloadKeySpecifier)[]; export type ModerateAssertionPayloadFieldPolicy = { assertion?: FieldPolicy | FieldReadFunction, clientMutationId?: FieldPolicy | FieldReadFunction }; +export type ModerateEvidenceItemActivityKeySpecifier = ('createdAt' | 'events' | 'id' | 'note' | 'organization' | 'parsedNote' | 'subject' | 'user' | 'verbiage' | ModerateEvidenceItemActivityKeySpecifier)[]; +export type ModerateEvidenceItemActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; export type ModerateEvidenceItemPayloadKeySpecifier = ('clientMutationId' | 'evidenceItem' | ModerateEvidenceItemPayloadKeySpecifier)[]; export type ModerateEvidenceItemPayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, @@ -886,21 +1042,25 @@ export type ModeratedObjectFieldFieldPolicy = { id?: FieldPolicy | FieldReadFunction, link?: FieldPolicy | FieldReadFunction }; -export type MolecularProfileKeySpecifier = ('assertions' | 'comments' | 'deprecated' | 'deprecatedVariants' | 'deprecationEvent' | 'description' | 'events' | 'evidenceCountsByStatus' | 'evidenceItems' | 'flagged' | 'flags' | 'id' | 'isComplex' | 'lastAcceptedRevisionEvent' | 'lastCommentEvent' | 'lastSubmittedRevisionEvent' | 'link' | 'molecularProfileAliases' | 'molecularProfileScore' | 'name' | 'parsedName' | 'rawName' | 'revisions' | 'sources' | 'variants' | MolecularProfileKeySpecifier)[]; +export type MolecularProfileKeySpecifier = ('assertions' | 'comments' | 'complexMolecularProfileCreationActivity' | 'complexMolecularProfileDeprecationActivity' | 'deprecated' | 'deprecatedVariants' | 'deprecationReason' | 'description' | 'events' | 'evidenceCountsByStatus' | 'evidenceCountsByType' | 'evidenceItems' | 'flagged' | 'flags' | 'id' | 'isComplex' | 'isMultiVariant' | 'lastAcceptedRevisionEvent' | 'lastCommentEvent' | 'lastSubmittedRevisionEvent' | 'link' | 'molecularProfileAliases' | 'molecularProfileScore' | 'name' | 'parsedName' | 'rawName' | 'revisions' | 'sources' | 'variantCreationActivity' | 'variantDeprecationActivity' | 'variants' | MolecularProfileKeySpecifier)[]; export type MolecularProfileFieldPolicy = { assertions?: FieldPolicy | FieldReadFunction, comments?: FieldPolicy | FieldReadFunction, + complexMolecularProfileCreationActivity?: FieldPolicy | FieldReadFunction, + complexMolecularProfileDeprecationActivity?: FieldPolicy | FieldReadFunction, deprecated?: FieldPolicy | FieldReadFunction, deprecatedVariants?: FieldPolicy | FieldReadFunction, - deprecationEvent?: FieldPolicy | FieldReadFunction, + deprecationReason?: FieldPolicy | FieldReadFunction, description?: FieldPolicy | FieldReadFunction, events?: FieldPolicy | FieldReadFunction, evidenceCountsByStatus?: FieldPolicy | FieldReadFunction, + evidenceCountsByType?: FieldPolicy | FieldReadFunction, evidenceItems?: FieldPolicy | FieldReadFunction, flagged?: FieldPolicy | FieldReadFunction, flags?: FieldPolicy | FieldReadFunction, id?: FieldPolicy | FieldReadFunction, isComplex?: FieldPolicy | FieldReadFunction, + isMultiVariant?: FieldPolicy | FieldReadFunction, lastAcceptedRevisionEvent?: FieldPolicy | FieldReadFunction, lastCommentEvent?: FieldPolicy | FieldReadFunction, lastSubmittedRevisionEvent?: FieldPolicy | FieldReadFunction, @@ -912,6 +1072,8 @@ export type MolecularProfileFieldPolicy = { rawName?: FieldPolicy | FieldReadFunction, revisions?: FieldPolicy | FieldReadFunction, sources?: FieldPolicy | FieldReadFunction, + variantCreationActivity?: FieldPolicy | FieldReadFunction, + variantDeprecationActivity?: FieldPolicy | FieldReadFunction, variants?: FieldPolicy | FieldReadFunction }; export type MolecularProfileAliasKeySpecifier = ('name' | MolecularProfileAliasKeySpecifier)[]; @@ -947,15 +1109,16 @@ export type MolecularProfileTextSegmentKeySpecifier = ('text' | MolecularProfile export type MolecularProfileTextSegmentFieldPolicy = { text?: FieldPolicy | FieldReadFunction }; -export type MutationKeySpecifier = ('acceptRevisions' | 'addComment' | 'addDisease' | 'addRemoteCitation' | 'addTherapy' | 'addVariant' | 'createMolecularProfile' | 'deprecateVariant' | 'editUser' | 'flagEntity' | 'moderateAssertion' | 'moderateEvidenceItem' | 'rejectRevisions' | 'resolveFlag' | 'submitAssertion' | 'submitEvidence' | 'submitVariantGroup' | 'subscribe' | 'suggestAssertionRevision' | 'suggestEvidenceItemRevision' | 'suggestGeneRevision' | 'suggestMolecularProfileRevision' | 'suggestSource' | 'suggestVariantGroupRevision' | 'suggestVariantRevision' | 'unsubscribe' | 'updateCoi' | 'updateNotificationStatus' | 'updateSourceSuggestionStatus' | MutationKeySpecifier)[]; +export type MutationKeySpecifier = ('acceptRevisions' | 'addComment' | 'addDisease' | 'addRemoteCitation' | 'addTherapy' | 'createMolecularProfile' | 'createVariant' | 'deprecateComplexMolecularProfile' | 'deprecateVariant' | 'editUser' | 'flagEntity' | 'moderateAssertion' | 'moderateEvidenceItem' | 'rejectRevisions' | 'resolveFlag' | 'submitAssertion' | 'submitEvidence' | 'submitVariantGroup' | 'subscribe' | 'suggestAssertionRevision' | 'suggestEvidenceItemRevision' | 'suggestGeneRevision' | 'suggestMolecularProfileRevision' | 'suggestSource' | 'suggestVariantGroupRevision' | 'suggestVariantRevision' | 'unsubscribe' | 'updateCoi' | 'updateNotificationStatus' | 'updateSourceSuggestionStatus' | MutationKeySpecifier)[]; export type MutationFieldPolicy = { acceptRevisions?: FieldPolicy | FieldReadFunction, addComment?: FieldPolicy | FieldReadFunction, addDisease?: FieldPolicy | FieldReadFunction, addRemoteCitation?: FieldPolicy | FieldReadFunction, addTherapy?: FieldPolicy | FieldReadFunction, - addVariant?: FieldPolicy | FieldReadFunction, createMolecularProfile?: FieldPolicy | FieldReadFunction, + createVariant?: FieldPolicy | FieldReadFunction, + deprecateComplexMolecularProfile?: FieldPolicy | FieldReadFunction, deprecateVariant?: FieldPolicy | FieldReadFunction, editUser?: FieldPolicy | FieldReadFunction, flagEntity?: FieldPolicy | FieldReadFunction, @@ -1186,10 +1349,12 @@ export type PhenotypePopoverFieldPolicy = { name?: FieldPolicy | FieldReadFunction, url?: FieldPolicy | FieldReadFunction }; -export type QueryKeySpecifier = ('acmgCode' | 'acmgCodesTypeahead' | 'assertion' | 'assertions' | 'browseDiseases' | 'browseGenes' | 'browseMolecularProfiles' | 'browseSources' | 'browseVariantGroups' | 'browseVariants' | 'clingenCode' | 'clingenCodesTypeahead' | 'clinicalTrial' | 'clinicalTrials' | 'comment' | 'comments' | 'contributors' | 'countries' | 'dataReleases' | 'disease' | 'diseasePopover' | 'diseaseTypeahead' | 'entityTypeahead' | 'events' | 'evidenceItem' | 'evidenceItems' | 'flag' | 'flags' | 'gene' | 'geneTypeahead' | 'genes' | 'molecularProfile' | 'molecularProfiles' | 'nccnGuideline' | 'nccnGuidelinesTypeahead' | 'notifications' | 'organization' | 'organizationLeaderboards' | 'organizations' | 'phenotype' | 'phenotypePopover' | 'phenotypeTypeahead' | 'phenotypes' | 'previewCommentText' | 'previewMolecularProfileName' | 'remoteCitation' | 'revision' | 'revisions' | 'search' | 'searchByPermalink' | 'searchGenes' | 'source' | 'sourcePopover' | 'sourceSuggestionValues' | 'sourceSuggestions' | 'sourceTypeahead' | 'subscriptionForEntity' | 'therapies' | 'therapy' | 'therapyPopover' | 'therapyTypeahead' | 'timepointStats' | 'user' | 'userLeaderboards' | 'userTypeahead' | 'users' | 'validateRevisionsForAcceptance' | 'variant' | 'variantGroup' | 'variantGroups' | 'variantType' | 'variantTypePopover' | 'variantTypeTypeahead' | 'variantTypes' | 'variants' | 'viewer' | QueryKeySpecifier)[]; +export type QueryKeySpecifier = ('acmgCode' | 'acmgCodesTypeahead' | 'activities' | 'activity' | 'assertion' | 'assertions' | 'browseDiseases' | 'browseGenes' | 'browseMolecularProfiles' | 'browseSources' | 'browseVariantGroups' | 'browseVariants' | 'clingenCode' | 'clingenCodesTypeahead' | 'clinicalTrial' | 'clinicalTrials' | 'comment' | 'comments' | 'contributors' | 'countries' | 'dataReleases' | 'disease' | 'diseasePopover' | 'diseaseTypeahead' | 'entityTypeahead' | 'events' | 'evidenceItem' | 'evidenceItems' | 'flag' | 'flags' | 'gene' | 'geneTypeahead' | 'genes' | 'molecularProfile' | 'molecularProfiles' | 'nccnGuideline' | 'nccnGuidelinesTypeahead' | 'notifications' | 'organization' | 'organizationLeaderboards' | 'organizations' | 'phenotype' | 'phenotypePopover' | 'phenotypeTypeahead' | 'phenotypes' | 'previewCommentText' | 'previewMolecularProfileName' | 'remoteCitation' | 'revision' | 'revisions' | 'search' | 'searchByPermalink' | 'searchGenes' | 'source' | 'sourcePopover' | 'sourceSuggestionValues' | 'sourceSuggestions' | 'sourceTypeahead' | 'subscriptionForEntity' | 'therapies' | 'therapy' | 'therapyPopover' | 'therapyTypeahead' | 'timepointStats' | 'user' | 'userLeaderboards' | 'userTypeahead' | 'users' | 'validateRevisionsForAcceptance' | 'variant' | 'variantGroup' | 'variantGroups' | 'variantType' | 'variantTypePopover' | 'variantTypeTypeahead' | 'variantTypes' | 'variants' | 'viewer' | QueryKeySpecifier)[]; export type QueryFieldPolicy = { acmgCode?: FieldPolicy | FieldReadFunction, acmgCodesTypeahead?: FieldPolicy | FieldReadFunction, + activities?: FieldPolicy | FieldReadFunction, + activity?: FieldPolicy | FieldReadFunction, assertion?: FieldPolicy | FieldReadFunction, assertions?: FieldPolicy | FieldReadFunction, browseDiseases?: FieldPolicy | FieldReadFunction, @@ -1272,22 +1437,48 @@ export type RanksFieldPolicy = { revisionsRank?: FieldPolicy | FieldReadFunction, submissionsRank?: FieldPolicy | FieldReadFunction }; +export type RejectRevisionsActivityKeySpecifier = ('createdAt' | 'events' | 'id' | 'note' | 'organization' | 'parsedNote' | 'revisions' | 'subject' | 'user' | 'verbiage' | RejectRevisionsActivityKeySpecifier)[]; +export type RejectRevisionsActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + revisions?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; export type RejectRevisionsPayloadKeySpecifier = ('clientMutationId' | 'revisions' | RejectRevisionsPayloadKeySpecifier)[]; export type RejectRevisionsPayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, revisions?: FieldPolicy | FieldReadFunction }; +export type ResolveFlagActivityKeySpecifier = ('createdAt' | 'events' | 'flag' | 'id' | 'note' | 'organization' | 'parsedNote' | 'subject' | 'user' | 'verbiage' | ResolveFlagActivityKeySpecifier)[]; +export type ResolveFlagActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + flag?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; export type ResolveFlagPayloadKeySpecifier = ('clientMutationId' | 'flag' | ResolveFlagPayloadKeySpecifier)[]; export type ResolveFlagPayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, flag?: FieldPolicy | FieldReadFunction }; -export type RevisionKeySpecifier = ('comments' | 'createdAt' | 'creationComment' | 'creationEvent' | 'currentValue' | 'events' | 'fieldName' | 'id' | 'lastCommentEvent' | 'link' | 'linkoutData' | 'name' | 'resolutionComment' | 'resolvedAt' | 'resolver' | 'resolvingEvent' | 'revisionSetId' | 'revisor' | 'status' | 'subject' | 'suggestedValue' | 'updatedAt' | RevisionKeySpecifier)[]; +export type RevisionKeySpecifier = ('acceptanceActivity' | 'comments' | 'createdAt' | 'creationActivity' | 'currentValue' | 'events' | 'fieldName' | 'id' | 'lastCommentEvent' | 'link' | 'linkoutData' | 'name' | 'rejectionActivity' | 'resolutionActivity' | 'revisionSetId' | 'status' | 'subject' | 'suggestedValue' | 'supersedingActivity' | 'updatedAt' | RevisionKeySpecifier)[]; export type RevisionFieldPolicy = { + acceptanceActivity?: FieldPolicy | FieldReadFunction, comments?: FieldPolicy | FieldReadFunction, createdAt?: FieldPolicy | FieldReadFunction, - creationComment?: FieldPolicy | FieldReadFunction, - creationEvent?: FieldPolicy | FieldReadFunction, + creationActivity?: FieldPolicy | FieldReadFunction, currentValue?: FieldPolicy | FieldReadFunction, events?: FieldPolicy | FieldReadFunction, fieldName?: FieldPolicy | FieldReadFunction, @@ -1296,15 +1487,13 @@ export type RevisionFieldPolicy = { link?: FieldPolicy | FieldReadFunction, linkoutData?: FieldPolicy | FieldReadFunction, name?: FieldPolicy | FieldReadFunction, - resolutionComment?: FieldPolicy | FieldReadFunction, - resolvedAt?: FieldPolicy | FieldReadFunction, - resolver?: FieldPolicy | FieldReadFunction, - resolvingEvent?: FieldPolicy | FieldReadFunction, + rejectionActivity?: FieldPolicy | FieldReadFunction, + resolutionActivity?: FieldPolicy | FieldReadFunction, revisionSetId?: FieldPolicy | FieldReadFunction, - revisor?: FieldPolicy | FieldReadFunction, status?: FieldPolicy | FieldReadFunction, subject?: FieldPolicy | FieldReadFunction, suggestedValue?: FieldPolicy | FieldReadFunction, + supersedingActivity?: FieldPolicy | FieldReadFunction, updatedAt?: FieldPolicy | FieldReadFunction }; export type RevisionConnectionKeySpecifier = ('edges' | 'nodes' | 'pageCount' | 'pageInfo' | 'revisedFieldNames' | 'totalCount' | 'unfilteredCountForSubject' | 'uniqueResolvers' | 'uniqueRevisors' | RevisionConnectionKeySpecifier)[]; @@ -1331,6 +1520,17 @@ export type RevisionResultFieldPolicy = { newlyCreated?: FieldPolicy | FieldReadFunction, revisionSetId?: FieldPolicy | FieldReadFunction }; +export type RevisionSetKeySpecifier = ('createdAt' | 'displayName' | 'events' | 'id' | 'link' | 'name' | 'revisions' | 'updatedAt' | RevisionSetKeySpecifier)[]; +export type RevisionSetFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + displayName?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + link?: FieldPolicy | FieldReadFunction, + name?: FieldPolicy | FieldReadFunction, + revisions?: FieldPolicy | FieldReadFunction, + updatedAt?: FieldPolicy | FieldReadFunction +}; export type ScalarFieldKeySpecifier = ('value' | ScalarFieldKeySpecifier)[]; export type ScalarFieldFieldPolicy = { value?: FieldPolicy | FieldReadFunction @@ -1410,13 +1610,15 @@ export type SourceStubFieldPolicy = { id?: FieldPolicy | FieldReadFunction, sourceType?: FieldPolicy | FieldReadFunction }; -export type SourceSuggestionKeySpecifier = ('createdAt' | 'disease' | 'events' | 'id' | 'initialComment' | 'link' | 'molecularProfile' | 'name' | 'reason' | 'source' | 'status' | 'user' | SourceSuggestionKeySpecifier)[]; +export type SourceSuggestionKeySpecifier = ('createdAt' | 'creationActivity' | 'disease' | 'events' | 'id' | 'initialComment' | 'lastStatusUpdateActivity' | 'link' | 'molecularProfile' | 'name' | 'reason' | 'source' | 'status' | 'user' | SourceSuggestionKeySpecifier)[]; export type SourceSuggestionFieldPolicy = { createdAt?: FieldPolicy | FieldReadFunction, + creationActivity?: FieldPolicy | FieldReadFunction, disease?: FieldPolicy | FieldReadFunction, events?: FieldPolicy | FieldReadFunction, id?: FieldPolicy | FieldReadFunction, initialComment?: FieldPolicy | FieldReadFunction, + lastStatusUpdateActivity?: FieldPolicy | FieldReadFunction, link?: FieldPolicy | FieldReadFunction, molecularProfile?: FieldPolicy | FieldReadFunction, name?: FieldPolicy | FieldReadFunction, @@ -1457,11 +1659,35 @@ export type StatsFieldPolicy = { submittedEvidenceItems?: FieldPolicy | FieldReadFunction, suggestedSources?: FieldPolicy | FieldReadFunction }; +export type SubmitAssertionActivityKeySpecifier = ('createdAt' | 'events' | 'id' | 'note' | 'organization' | 'parsedNote' | 'subject' | 'user' | 'verbiage' | SubmitAssertionActivityKeySpecifier)[]; +export type SubmitAssertionActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; export type SubmitAssertionPayloadKeySpecifier = ('assertion' | 'clientMutationId' | SubmitAssertionPayloadKeySpecifier)[]; export type SubmitAssertionPayloadFieldPolicy = { assertion?: FieldPolicy | FieldReadFunction, clientMutationId?: FieldPolicy | FieldReadFunction }; +export type SubmitEvidenceItemActivityKeySpecifier = ('createdAt' | 'events' | 'id' | 'note' | 'organization' | 'parsedNote' | 'subject' | 'user' | 'verbiage' | SubmitEvidenceItemActivityKeySpecifier)[]; +export type SubmitEvidenceItemActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; export type SubmitEvidenceItemPayloadKeySpecifier = ('clientMutationId' | 'evidenceItem' | SubmitEvidenceItemPayloadKeySpecifier)[]; export type SubmitEvidenceItemPayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, @@ -1511,6 +1737,33 @@ export type SuggestMolecularProfileRevisionPayloadFieldPolicy = { molecularProfile?: FieldPolicy | FieldReadFunction, results?: FieldPolicy | FieldReadFunction }; +export type SuggestRevisionSetActivityKeySpecifier = ('createdAt' | 'events' | 'id' | 'note' | 'organization' | 'parsedNote' | 'revisionSet' | 'revisions' | 'subject' | 'user' | 'verbiage' | SuggestRevisionSetActivityKeySpecifier)[]; +export type SuggestRevisionSetActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + revisionSet?: FieldPolicy | FieldReadFunction, + revisions?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; +export type SuggestSourceActivityKeySpecifier = ('createdAt' | 'events' | 'id' | 'note' | 'organization' | 'parsedNote' | 'sourceSuggestion' | 'subject' | 'user' | 'verbiage' | SuggestSourceActivityKeySpecifier)[]; +export type SuggestSourceActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + sourceSuggestion?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; export type SuggestSourcePayloadKeySpecifier = ('clientMutationId' | 'sourceSuggestion' | SuggestSourcePayloadKeySpecifier)[]; export type SuggestSourcePayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, @@ -1573,6 +1826,19 @@ export type UpdateNotificationStatusPayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, notifications?: FieldPolicy | FieldReadFunction }; +export type UpdateSourceSuggestionStatusActivityKeySpecifier = ('createdAt' | 'events' | 'id' | 'note' | 'organization' | 'parsedNote' | 'sourceSuggestion' | 'subject' | 'user' | 'verbiage' | UpdateSourceSuggestionStatusActivityKeySpecifier)[]; +export type UpdateSourceSuggestionStatusActivityFieldPolicy = { + createdAt?: FieldPolicy | FieldReadFunction, + events?: FieldPolicy | FieldReadFunction, + id?: FieldPolicy | FieldReadFunction, + note?: FieldPolicy | FieldReadFunction, + organization?: FieldPolicy | FieldReadFunction, + parsedNote?: FieldPolicy | FieldReadFunction, + sourceSuggestion?: FieldPolicy | FieldReadFunction, + subject?: FieldPolicy | FieldReadFunction, + user?: FieldPolicy | FieldReadFunction, + verbiage?: FieldPolicy | FieldReadFunction +}; export type UpdateSourceSuggestionStatusPayloadKeySpecifier = ('clientMutationId' | 'sourceSuggestion' | UpdateSourceSuggestionStatusPayloadKeySpecifier)[]; export type UpdateSourceSuggestionStatusPayloadFieldPolicy = { clientMutationId?: FieldPolicy | FieldReadFunction, @@ -1631,14 +1897,14 @@ export type ValidationErrorsFieldPolicy = { genericErrors?: FieldPolicy | FieldReadFunction, validationErrors?: FieldPolicy | FieldReadFunction }; -export type VariantKeySpecifier = ('alleleRegistryId' | 'clinvarIds' | 'comments' | 'deprecated' | 'deprecationComment' | 'deprecationEvent' | 'deprecationReason' | 'ensemblVersion' | 'events' | 'flagged' | 'flags' | 'gene' | 'hgvsDescriptions' | 'id' | 'lastAcceptedRevisionEvent' | 'lastCommentEvent' | 'lastSubmittedRevisionEvent' | 'link' | 'maneSelectTranscript' | 'molecularProfiles' | 'myVariantInfo' | 'name' | 'openCravatUrl' | 'primaryCoordinates' | 'referenceBases' | 'referenceBuild' | 'revisions' | 'secondaryCoordinates' | 'singleVariantMolecularProfile' | 'singleVariantMolecularProfileId' | 'variantAliases' | 'variantBases' | 'variantTypes' | VariantKeySpecifier)[]; +export type VariantKeySpecifier = ('alleleRegistryId' | 'clinvarIds' | 'comments' | 'creationActivity' | 'deprecated' | 'deprecationActivity' | 'deprecationReason' | 'ensemblVersion' | 'events' | 'flagged' | 'flags' | 'gene' | 'hgvsDescriptions' | 'id' | 'lastAcceptedRevisionEvent' | 'lastCommentEvent' | 'lastSubmittedRevisionEvent' | 'link' | 'maneSelectTranscript' | 'molecularProfiles' | 'myVariantInfo' | 'name' | 'openCravatUrl' | 'primaryCoordinates' | 'referenceBases' | 'referenceBuild' | 'revisions' | 'secondaryCoordinates' | 'singleVariantMolecularProfile' | 'singleVariantMolecularProfileId' | 'variantAliases' | 'variantBases' | 'variantTypes' | VariantKeySpecifier)[]; export type VariantFieldPolicy = { alleleRegistryId?: FieldPolicy | FieldReadFunction, clinvarIds?: FieldPolicy | FieldReadFunction, comments?: FieldPolicy | FieldReadFunction, + creationActivity?: FieldPolicy | FieldReadFunction, deprecated?: FieldPolicy | FieldReadFunction, - deprecationComment?: FieldPolicy | FieldReadFunction, - deprecationEvent?: FieldPolicy | FieldReadFunction, + deprecationActivity?: FieldPolicy | FieldReadFunction, deprecationReason?: FieldPolicy | FieldReadFunction, ensemblVersion?: FieldPolicy | FieldReadFunction, events?: FieldPolicy | FieldReadFunction, @@ -1740,6 +2006,10 @@ export type WithRevisionsFieldPolicy = { revisions?: FieldPolicy | FieldReadFunction }; export type StrictTypedTypePolicies = { + AcceptRevisionsActivity?: Omit & { + keyFields?: false | AcceptRevisionsActivityKeySpecifier | (() => undefined | AcceptRevisionsActivityKeySpecifier), + fields?: AcceptRevisionsActivityFieldPolicy, + }, AcceptRevisionsPayload?: Omit & { keyFields?: false | AcceptRevisionsPayloadKeySpecifier | (() => undefined | AcceptRevisionsPayloadKeySpecifier), fields?: AcceptRevisionsPayloadFieldPolicy, @@ -1748,6 +2018,18 @@ export type StrictTypedTypePolicies = { keyFields?: false | AcmgCodeKeySpecifier | (() => undefined | AcmgCodeKeySpecifier), fields?: AcmgCodeFieldPolicy, }, + ActivityInterface?: Omit & { + keyFields?: false | ActivityInterfaceKeySpecifier | (() => undefined | ActivityInterfaceKeySpecifier), + fields?: ActivityInterfaceFieldPolicy, + }, + ActivityInterfaceConnection?: Omit & { + keyFields?: false | ActivityInterfaceConnectionKeySpecifier | (() => undefined | ActivityInterfaceConnectionKeySpecifier), + fields?: ActivityInterfaceConnectionFieldPolicy, + }, + ActivityInterfaceEdge?: Omit & { + keyFields?: false | ActivityInterfaceEdgeKeySpecifier | (() => undefined | ActivityInterfaceEdgeKeySpecifier), + fields?: ActivityInterfaceEdgeFieldPolicy, + }, AddCommentPayload?: Omit & { keyFields?: false | AddCommentPayloadKeySpecifier | (() => undefined | AddCommentPayloadKeySpecifier), fields?: AddCommentPayloadFieldPolicy, @@ -1764,10 +2046,6 @@ export type StrictTypedTypePolicies = { keyFields?: false | AddTherapyPayloadKeySpecifier | (() => undefined | AddTherapyPayloadKeySpecifier), fields?: AddTherapyPayloadFieldPolicy, }, - AddVariantPayload?: Omit & { - keyFields?: false | AddVariantPayloadKeySpecifier | (() => undefined | AddVariantPayloadKeySpecifier), - fields?: AddVariantPayloadFieldPolicy, - }, AdvancedSearchResult?: Omit & { keyFields?: false | AdvancedSearchResultKeySpecifier | (() => undefined | AdvancedSearchResultKeySpecifier), fields?: AdvancedSearchResultFieldPolicy, @@ -1924,6 +2202,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | CommentKeySpecifier | (() => undefined | CommentKeySpecifier), fields?: CommentFieldPolicy, }, + CommentActivity?: Omit & { + keyFields?: false | CommentActivityKeySpecifier | (() => undefined | CommentActivityKeySpecifier), + fields?: CommentActivityFieldPolicy, + }, CommentConnection?: Omit & { keyFields?: false | CommentConnectionKeySpecifier | (() => undefined | CommentConnectionKeySpecifier), fields?: CommentConnectionFieldPolicy, @@ -1964,14 +2246,38 @@ export type StrictTypedTypePolicies = { keyFields?: false | CountryKeySpecifier | (() => undefined | CountryKeySpecifier), fields?: CountryFieldPolicy, }, + CreateComplexMolecularProfileActivity?: Omit & { + keyFields?: false | CreateComplexMolecularProfileActivityKeySpecifier | (() => undefined | CreateComplexMolecularProfileActivityKeySpecifier), + fields?: CreateComplexMolecularProfileActivityFieldPolicy, + }, CreateMolecularProfilePayload?: Omit & { keyFields?: false | CreateMolecularProfilePayloadKeySpecifier | (() => undefined | CreateMolecularProfilePayloadKeySpecifier), fields?: CreateMolecularProfilePayloadFieldPolicy, }, + CreateVariantActivity?: Omit & { + keyFields?: false | CreateVariantActivityKeySpecifier | (() => undefined | CreateVariantActivityKeySpecifier), + fields?: CreateVariantActivityFieldPolicy, + }, + CreateVariantPayload?: Omit & { + keyFields?: false | CreateVariantPayloadKeySpecifier | (() => undefined | CreateVariantPayloadKeySpecifier), + fields?: CreateVariantPayloadFieldPolicy, + }, DataRelease?: Omit & { keyFields?: false | DataReleaseKeySpecifier | (() => undefined | DataReleaseKeySpecifier), fields?: DataReleaseFieldPolicy, }, + DeprecateComplexMolecularProfileActivity?: Omit & { + keyFields?: false | DeprecateComplexMolecularProfileActivityKeySpecifier | (() => undefined | DeprecateComplexMolecularProfileActivityKeySpecifier), + fields?: DeprecateComplexMolecularProfileActivityFieldPolicy, + }, + DeprecateComplexMolecularProfilePayload?: Omit & { + keyFields?: false | DeprecateComplexMolecularProfilePayloadKeySpecifier | (() => undefined | DeprecateComplexMolecularProfilePayloadKeySpecifier), + fields?: DeprecateComplexMolecularProfilePayloadFieldPolicy, + }, + DeprecateVariantActivity?: Omit & { + keyFields?: false | DeprecateVariantActivityKeySpecifier | (() => undefined | DeprecateVariantActivityKeySpecifier), + fields?: DeprecateVariantActivityFieldPolicy, + }, DeprecateVariantPayload?: Omit & { keyFields?: false | DeprecateVariantPayloadKeySpecifier | (() => undefined | DeprecateVariantPayloadKeySpecifier), fields?: DeprecateVariantPayloadFieldPolicy, @@ -2032,6 +2338,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | EvidenceItemsByStatusKeySpecifier | (() => undefined | EvidenceItemsByStatusKeySpecifier), fields?: EvidenceItemsByStatusFieldPolicy, }, + EvidenceItemsByType?: Omit & { + keyFields?: false | EvidenceItemsByTypeKeySpecifier | (() => undefined | EvidenceItemsByTypeKeySpecifier), + fields?: EvidenceItemsByTypeFieldPolicy, + }, FdaCode?: Omit & { keyFields?: false | FdaCodeKeySpecifier | (() => undefined | FdaCodeKeySpecifier), fields?: FdaCodeFieldPolicy, @@ -2056,6 +2366,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | FlagEdgeKeySpecifier | (() => undefined | FlagEdgeKeySpecifier), fields?: FlagEdgeFieldPolicy, }, + FlagEntityActivity?: Omit & { + keyFields?: false | FlagEntityActivityKeySpecifier | (() => undefined | FlagEntityActivityKeySpecifier), + fields?: FlagEntityActivityFieldPolicy, + }, FlagEntityPayload?: Omit & { keyFields?: false | FlagEntityPayloadKeySpecifier | (() => undefined | FlagEntityPayloadKeySpecifier), fields?: FlagEntityPayloadFieldPolicy, @@ -2128,10 +2442,18 @@ export type StrictTypedTypePolicies = { keyFields?: false | LinkoutDataKeySpecifier | (() => undefined | LinkoutDataKeySpecifier), fields?: LinkoutDataFieldPolicy, }, + ModerateAssertionActivity?: Omit & { + keyFields?: false | ModerateAssertionActivityKeySpecifier | (() => undefined | ModerateAssertionActivityKeySpecifier), + fields?: ModerateAssertionActivityFieldPolicy, + }, ModerateAssertionPayload?: Omit & { keyFields?: false | ModerateAssertionPayloadKeySpecifier | (() => undefined | ModerateAssertionPayloadKeySpecifier), fields?: ModerateAssertionPayloadFieldPolicy, }, + ModerateEvidenceItemActivity?: Omit & { + keyFields?: false | ModerateEvidenceItemActivityKeySpecifier | (() => undefined | ModerateEvidenceItemActivityKeySpecifier), + fields?: ModerateEvidenceItemActivityFieldPolicy, + }, ModerateEvidenceItemPayload?: Omit & { keyFields?: false | ModerateEvidenceItemPayloadKeySpecifier | (() => undefined | ModerateEvidenceItemPayloadKeySpecifier), fields?: ModerateEvidenceItemPayloadFieldPolicy, @@ -2244,10 +2566,18 @@ export type StrictTypedTypePolicies = { keyFields?: false | RanksKeySpecifier | (() => undefined | RanksKeySpecifier), fields?: RanksFieldPolicy, }, + RejectRevisionsActivity?: Omit & { + keyFields?: false | RejectRevisionsActivityKeySpecifier | (() => undefined | RejectRevisionsActivityKeySpecifier), + fields?: RejectRevisionsActivityFieldPolicy, + }, RejectRevisionsPayload?: Omit & { keyFields?: false | RejectRevisionsPayloadKeySpecifier | (() => undefined | RejectRevisionsPayloadKeySpecifier), fields?: RejectRevisionsPayloadFieldPolicy, }, + ResolveFlagActivity?: Omit & { + keyFields?: false | ResolveFlagActivityKeySpecifier | (() => undefined | ResolveFlagActivityKeySpecifier), + fields?: ResolveFlagActivityFieldPolicy, + }, ResolveFlagPayload?: Omit & { keyFields?: false | ResolveFlagPayloadKeySpecifier | (() => undefined | ResolveFlagPayloadKeySpecifier), fields?: ResolveFlagPayloadFieldPolicy, @@ -2268,6 +2598,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | RevisionResultKeySpecifier | (() => undefined | RevisionResultKeySpecifier), fields?: RevisionResultFieldPolicy, }, + RevisionSet?: Omit & { + keyFields?: false | RevisionSetKeySpecifier | (() => undefined | RevisionSetKeySpecifier), + fields?: RevisionSetFieldPolicy, + }, ScalarField?: Omit & { keyFields?: false | ScalarFieldKeySpecifier | (() => undefined | ScalarFieldKeySpecifier), fields?: ScalarFieldFieldPolicy, @@ -2312,10 +2646,18 @@ export type StrictTypedTypePolicies = { keyFields?: false | StatsKeySpecifier | (() => undefined | StatsKeySpecifier), fields?: StatsFieldPolicy, }, + SubmitAssertionActivity?: Omit & { + keyFields?: false | SubmitAssertionActivityKeySpecifier | (() => undefined | SubmitAssertionActivityKeySpecifier), + fields?: SubmitAssertionActivityFieldPolicy, + }, SubmitAssertionPayload?: Omit & { keyFields?: false | SubmitAssertionPayloadKeySpecifier | (() => undefined | SubmitAssertionPayloadKeySpecifier), fields?: SubmitAssertionPayloadFieldPolicy, }, + SubmitEvidenceItemActivity?: Omit & { + keyFields?: false | SubmitEvidenceItemActivityKeySpecifier | (() => undefined | SubmitEvidenceItemActivityKeySpecifier), + fields?: SubmitEvidenceItemActivityFieldPolicy, + }, SubmitEvidenceItemPayload?: Omit & { keyFields?: false | SubmitEvidenceItemPayloadKeySpecifier | (() => undefined | SubmitEvidenceItemPayloadKeySpecifier), fields?: SubmitEvidenceItemPayloadFieldPolicy, @@ -2352,6 +2694,14 @@ export type StrictTypedTypePolicies = { keyFields?: false | SuggestMolecularProfileRevisionPayloadKeySpecifier | (() => undefined | SuggestMolecularProfileRevisionPayloadKeySpecifier), fields?: SuggestMolecularProfileRevisionPayloadFieldPolicy, }, + SuggestRevisionSetActivity?: Omit & { + keyFields?: false | SuggestRevisionSetActivityKeySpecifier | (() => undefined | SuggestRevisionSetActivityKeySpecifier), + fields?: SuggestRevisionSetActivityFieldPolicy, + }, + SuggestSourceActivity?: Omit & { + keyFields?: false | SuggestSourceActivityKeySpecifier | (() => undefined | SuggestSourceActivityKeySpecifier), + fields?: SuggestSourceActivityFieldPolicy, + }, SuggestSourcePayload?: Omit & { keyFields?: false | SuggestSourcePayloadKeySpecifier | (() => undefined | SuggestSourcePayloadKeySpecifier), fields?: SuggestSourcePayloadFieldPolicy, @@ -2388,6 +2738,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | UpdateNotificationStatusPayloadKeySpecifier | (() => undefined | UpdateNotificationStatusPayloadKeySpecifier), fields?: UpdateNotificationStatusPayloadFieldPolicy, }, + UpdateSourceSuggestionStatusActivity?: Omit & { + keyFields?: false | UpdateSourceSuggestionStatusActivityKeySpecifier | (() => undefined | UpdateSourceSuggestionStatusActivityKeySpecifier), + fields?: UpdateSourceSuggestionStatusActivityFieldPolicy, + }, UpdateSourceSuggestionStatusPayload?: Omit & { keyFields?: false | UpdateSourceSuggestionStatusPayloadKeySpecifier | (() => undefined | UpdateSourceSuggestionStatusPayloadKeySpecifier), fields?: UpdateSourceSuggestionStatusPayloadFieldPolicy, diff --git a/client/src/app/generated/civic.apollo.ts b/client/src/app/generated/civic.apollo.ts index 502bb6c88..a4ea50b3a 100644 --- a/client/src/app/generated/civic.apollo.ts +++ b/client/src/app/generated/civic.apollo.ts @@ -20,6 +20,21 @@ export type Scalars = { JSON: any; }; +export type AcceptRevisionsActivity = ActivityInterface & { + __typename: 'AcceptRevisionsActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + revisions: Array; + subject: EventSubject; + supersededRevisions: Array; + user: User; + verbiage: Scalars['String']; +}; + /** Autogenerated input type of AcceptRevisions */ export type AcceptRevisionsInput = { /** A unique identifier for the client performing the mutation. */ @@ -59,6 +74,43 @@ export type AcmgCode = { tooltip: Scalars['String']; }; +/** An activity done by a curator or editor */ +export type ActivityInterface = { + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + +/** The connection type for ActivityInterface. */ +export type ActivityInterfaceConnection = { + __typename: 'ActivityInterfaceConnection'; + /** A list of edges. */ + edges: Array; + /** A list of nodes. */ + nodes: Array; + /** Total number of pages, based on filtered count and pagesize. */ + pageCount: Scalars['Int']; + /** Information to aid in pagination. */ + pageInfo: PageInfo; + /** The total number of records in this filtered collection. */ + totalCount: Scalars['Int']; +}; + +/** An edge in a connection. */ +export type ActivityInterfaceEdge = { + __typename: 'ActivityInterfaceEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['String']; + /** The item at the end of the edge. */ + node?: Maybe; +}; + /** Autogenerated input type of AddComment */ export type AddCommentInput = { /** Text of the comment. */ @@ -148,29 +200,6 @@ export type AddTherapyPayload = { therapy: Therapy; }; -/** Autogenerated input type of AddVariant */ -export type AddVariantInput = { - /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; - /** The CIViC ID of the Gene to which the new variant belongs. */ - geneId: Scalars['Int']; - /** The name of the variant to add. */ - name: Scalars['String']; -}; - -/** Autogenerated return type of AddVariant */ -export type AddVariantPayload = { - __typename: 'AddVariantPayload'; - /** A unique identifier for the client performing the mutation. */ - clientMutationId?: Maybe; - /** The newly created molecular profile for the new variant. */ - molecularProfile: MolecularProfile; - /** True if the variant was newly created. False if the returned variant was already in the database. */ - new: Scalars['Boolean']; - /** The newly created Variant. */ - variant: Variant; -}; - export type AdvancedSearchResult = { __typename: 'AdvancedSearchResult'; permalinkId?: Maybe; @@ -232,6 +261,7 @@ export type Assertion = Commentable & EventOriginObject & EventSubject & Flaggab revisions: RevisionConnection; significance: AssertionSignificance; status: EvidenceStatus; + submissionActivity: SubmitAssertionActivity; submissionEvent: Event; summary: Scalars['String']; therapies: Array; @@ -937,6 +967,20 @@ export type Comment = EventOriginObject & { title?: Maybe; }; +export type CommentActivity = ActivityInterface & { + __typename: 'CommentActivity'; + comment: Comment; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + /** Segment of a comment that can either be text or an object to be rendered as a tag */ export type CommentBodySegment = CommentTagSegment | CommentTextSegment | User; @@ -1078,10 +1122,30 @@ export type Country = { name: Scalars['String']; }; +export type CreateComplexMolecularProfileActivity = ActivityInterface & { + __typename: 'CreateComplexMolecularProfileActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + /** Autogenerated input type of CreateMolecularProfile */ export type CreateMolecularProfileInput = { /** A unique identifier for the client performing the mutation. */ clientMutationId?: InputMaybe; + /** + * The ID of the organization to credit the user's contributions to. + * If the user belongs to a single organization or no organizations, this field is not required. + * This field is required if the user belongs to more than one organization. + * The user must belong to the organization provided. + */ + organizationId?: InputMaybe; /** Representation of the constituent parts of the Molecular Profile along with the logic used to combine them. */ structure: MolecularProfileComponentInput; }; @@ -1095,6 +1159,50 @@ export type CreateMolecularProfilePayload = { molecularProfile: MolecularProfile; }; +export type CreateVariantActivity = ActivityInterface & { + __typename: 'CreateVariantActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + molecularProfile: MolecularProfile; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + +/** Autogenerated input type of CreateVariant */ +export type CreateVariantInput = { + /** A unique identifier for the client performing the mutation. */ + clientMutationId?: InputMaybe; + /** The CIViC ID of the Gene to which the new variant belongs. */ + geneId: Scalars['Int']; + /** The name of the variant to create. */ + name: Scalars['String']; + /** + * The ID of the organization to credit the user's contributions to. + * If the user belongs to a single organization or no organizations, this field is not required. + * This field is required if the user belongs to more than one organization. + * The user must belong to the organization provided. + */ + organizationId?: InputMaybe; +}; + +/** Autogenerated return type of CreateVariant */ +export type CreateVariantPayload = { + __typename: 'CreateVariantPayload'; + /** A unique identifier for the client performing the mutation. */ + clientMutationId?: Maybe; + /** The newly created molecular profile for the new variant. */ + molecularProfile: MolecularProfile; + /** True if the variant was newly created. False if the returned variant was already in the database. */ + new: Scalars['Boolean']; + /** The newly created Variant. */ + variant: Variant; +}; + export type DataRelease = { __typename: 'DataRelease'; acceptedAndSubmittedVariantsVcf?: Maybe; @@ -1120,6 +1228,61 @@ export enum DateSortColumns { LastModified = 'LAST_MODIFIED' } +export type DeprecateComplexMolecularProfileActivity = ActivityInterface & { + __typename: 'DeprecateComplexMolecularProfileActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + +/** Autogenerated input type of DeprecateComplexMolecularProfile */ +export type DeprecateComplexMolecularProfileInput = { + /** A unique identifier for the client performing the mutation. */ + clientMutationId?: InputMaybe; + /** Text giving more context for deprecating this complex molecular profile. */ + comment: Scalars['String']; + /** The reason for deprecating this molecular profile. */ + deprecationReason: MolecularProfileDeprecationReasonMutationInput; + /** The CIViC ID of the complex molecular profile to deprecate. */ + molecularProfileId: Scalars['Int']; + /** + * The ID of the organization to credit the user's contributions to. + * If the user belongs to a single organization or no organizations, this field is not required. + * This field is required if the user belongs to more than one organization. + * The user must belong to the organization provided. + */ + organizationId?: InputMaybe; +}; + +/** Autogenerated return type of DeprecateComplexMolecularProfile */ +export type DeprecateComplexMolecularProfilePayload = { + __typename: 'DeprecateComplexMolecularProfilePayload'; + /** A unique identifier for the client performing the mutation. */ + clientMutationId?: Maybe; + /** The deprecated complex Molecular Profile. */ + molecularProfile?: Maybe; +}; + +export type DeprecateVariantActivity = ActivityInterface & { + __typename: 'DeprecateVariantActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + molecularProfiles: Array; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + /** Autogenerated input type of DeprecateVariant */ export type DeprecateVariantInput = { /** A unique identifier for the client performing the mutation. */ @@ -1127,7 +1290,7 @@ export type DeprecateVariantInput = { /** Text giving more context for deprecation this variant. */ comment: Scalars['String']; /** The reason for deprecation this variant. */ - deprecationReason: DeprecationReason; + deprecationReason: VariantDeprecationReason; /** * The ID of the organization to credit the user's contributions to. * If the user belongs to a single organization or no organizations, this field is not required. @@ -1153,12 +1316,6 @@ export type DeprecateVariantPayload = { variant?: Maybe; }; -export enum DeprecationReason { - Duplicate = 'DUPLICATE', - Invalid = 'INVALID', - Other = 'OTHER' -} - export type Disease = { __typename: 'Disease'; diseaseAliases: Array; @@ -1266,6 +1423,7 @@ export enum EventAction { AssertionReverted = 'ASSERTION_REVERTED', AssertionSubmitted = 'ASSERTION_SUBMITTED', Commented = 'COMMENTED', + ComplexMolecularProfileCreated = 'COMPLEX_MOLECULAR_PROFILE_CREATED', CuratedSourceSuggestion = 'CURATED_SOURCE_SUGGESTION', DeprecatedMolecularProfile = 'DEPRECATED_MOLECULAR_PROFILE', DeprecatedVariant = 'DEPRECATED_VARIANT', @@ -1280,7 +1438,8 @@ export enum EventAction { RevisionRejected = 'REVISION_REJECTED', RevisionSuggested = 'REVISION_SUGGESTED', RevisionSuperseded = 'REVISION_SUPERSEDED', - Submitted = 'SUBMITTED' + Submitted = 'SUBMITTED', + VariantCreated = 'VARIANT_CREATED' } /** The connection type for Event. */ @@ -1408,6 +1567,7 @@ export type EvidenceItem = Commentable & EventOriginObject & EventSubject & Flag significance: EvidenceSignificance; source: Source; status: EvidenceStatus; + submissionActivity: SubmitEvidenceItemActivity; submissionEvent: Event; therapies: Array; therapyInteractionType?: Maybe; @@ -1527,6 +1687,17 @@ export type EvidenceItemsByStatus = { submittedCount: Scalars['Int']; }; +export type EvidenceItemsByType = { + __typename: 'EvidenceItemsByType'; + diagnosticCount: Scalars['Int']; + functionalCount: Scalars['Int']; + molecularProfileId: Scalars['Int']; + oncogenicCount: Scalars['Int']; + predictiveCount: Scalars['Int']; + predisposingCount: Scalars['Int']; + prognosticCount: Scalars['Int']; +}; + export enum EvidenceLevel { A = 'A', B = 'B', @@ -1624,20 +1795,21 @@ export type FieldValidationError = { fieldName: Scalars['String']; }; -export type Flag = Commentable & EventOriginObject & { +export type Flag = Commentable & EventOriginObject & EventSubject & { __typename: 'Flag'; /** List and filter comments. */ comments: CommentConnection; createdAt: Scalars['ISO8601DateTime']; + /** List and filter events for an object */ + events: EventConnection; flaggable: Flaggable; flaggingUser: User; id: Scalars['Int']; lastCommentEvent?: Maybe; link: Scalars['String']; name: Scalars['String']; - openComment: Comment; - resolutionComment?: Maybe; - resolvedAt?: Maybe; + openActivity: FlagEntityActivity; + resolutionActivity?: Maybe; resolvingUser?: Maybe; state: FlagState; }; @@ -1655,6 +1827,18 @@ export type FlagCommentsArgs = { sortBy?: InputMaybe; }; + +export type FlagEventsArgs = { + after?: InputMaybe; + before?: InputMaybe; + eventType?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + organizationId?: InputMaybe; + originatingUserId?: InputMaybe; + sortBy?: InputMaybe; +}; + /** The connection type for Flag. */ export type FlagConnection = { __typename: 'FlagConnection'; @@ -1688,6 +1872,20 @@ export type FlagEdge = { node?: Maybe; }; +export type FlagEntityActivity = ActivityInterface & { + __typename: 'FlagEntityActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + flag: Flag; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + /** Autogenerated input type of FlagEntity */ export type FlagEntityInput = { /** A unique identifier for the client performing the mutation. */ @@ -2117,6 +2315,19 @@ export type LinkoutData = { suggestedValue: ModeratedField; }; +export type ModerateAssertionActivity = ActivityInterface & { + __typename: 'ModerateAssertionActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + /** Autogenerated input type of ModerateAssertion */ export type ModerateAssertionInput = { /** ID of the Assertion to moderate */ @@ -2143,6 +2354,19 @@ export type ModerateAssertionPayload = { clientMutationId?: Maybe; }; +export type ModerateEvidenceItemActivity = ActivityInterface & { + __typename: 'ModerateEvidenceItemActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + /** Autogenerated input type of ModerateEvidenceItem */ export type ModerateEvidenceItemInput = { /** A unique identifier for the client performing the mutation. */ @@ -2209,13 +2433,16 @@ export type MolecularProfile = Commentable & EventOriginObject & EventSubject & assertions: AssertionConnection; /** List and filter comments. */ comments: CommentConnection; + complexMolecularProfileCreationActivity?: Maybe; + complexMolecularProfileDeprecationActivity?: Maybe; deprecated: Scalars['Boolean']; deprecatedVariants: Array; - deprecationEvent?: Maybe; + deprecationReason?: Maybe; description?: Maybe; /** List and filter events for an object */ events: EventConnection; evidenceCountsByStatus: EvidenceItemsByStatus; + evidenceCountsByType: EvidenceItemsByType; /** The collection of evidence items associated with this molecular profile. */ evidenceItems: EvidenceItemConnection; flagged: Scalars['Boolean']; @@ -2223,6 +2450,7 @@ export type MolecularProfile = Commentable & EventOriginObject & EventSubject & flags: FlagConnection; id: Scalars['Int']; isComplex: Scalars['Boolean']; + isMultiVariant: Scalars['Boolean']; lastAcceptedRevisionEvent?: Maybe; lastCommentEvent?: Maybe; lastSubmittedRevisionEvent?: Maybe; @@ -2238,6 +2466,8 @@ export type MolecularProfile = Commentable & EventOriginObject & EventSubject & /** List and filter revisions. */ revisions: RevisionConnection; sources: Array; + variantCreationActivity?: Maybe; + variantDeprecationActivity?: Maybe; /** The collection of variants included in this molecular profile. Please note the name for their relation to each other. */ variants: Array; }; @@ -2344,6 +2574,19 @@ export type MolecularProfileConnection = { totalCount: Scalars['Int']; }; +export enum MolecularProfileDeprecationReason { + Duplicate = 'DUPLICATE', + Invalid = 'INVALID', + Other = 'OTHER', + VariantDeprecated = 'VARIANT_DEPRECATED' +} + +export enum MolecularProfileDeprecationReasonMutationInput { + Duplicate = 'DUPLICATE', + Invalid = 'INVALID', + Other = 'OTHER' +} + export enum MolecularProfileDisplayFilter { /** Display all molecular profiles regardless of attached evidence status. */ All = 'ALL', @@ -2428,10 +2671,12 @@ export type Mutation = { addRemoteCitation?: Maybe; /** Add a new therapy to the database. */ addTherapy?: Maybe; - /** Add a new Variant to the database. */ - addVariant?: Maybe; /** Create a new Molecular Profile in order to attach Evidence Items to it. */ createMolecularProfile?: Maybe; + /** Create a new Variant to the database. */ + createVariant?: Maybe; + /** Deprecate a complex molecular profile to prevent it from being used in the future. */ + deprecateComplexMolecularProfile?: Maybe; /** * Deprecate a variant to prevent it from being used in the future and implicitly * deprecate all the molecular profiles linked to this variant. @@ -2515,13 +2760,18 @@ export type MutationAddTherapyArgs = { }; -export type MutationAddVariantArgs = { - input: AddVariantInput; +export type MutationCreateMolecularProfileArgs = { + input: CreateMolecularProfileInput; }; -export type MutationCreateMolecularProfileArgs = { - input: CreateMolecularProfileInput; +export type MutationCreateVariantArgs = { + input: CreateVariantInput; +}; + + +export type MutationDeprecateComplexMolecularProfileArgs = { + input: DeprecateComplexMolecularProfileInput; }; @@ -3098,6 +3348,10 @@ export type Query = { acmgCode?: Maybe; /** Retrieve ACMG Code options as a typeahead */ acmgCodesTypeahead: Array; + /** List and filter activities */ + activities: ActivityInterfaceConnection; + /** Find a CIViC activity record by CIViC ID */ + activity?: Maybe; /** Find an assertion by CIViC ID */ assertion?: Maybe; /** List and filter assertions. */ @@ -3239,6 +3493,20 @@ export type QueryAcmgCodesTypeaheadArgs = { }; +export type QueryActivitiesArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + userId?: InputMaybe; +}; + + +export type QueryActivityArgs = { + id: Scalars['Int']; +}; + + export type QueryAssertionArgs = { id: Scalars['Int']; }; @@ -3516,6 +3784,8 @@ export type QueryGeneTypeaheadArgs = { export type QueryGenesArgs = { after?: InputMaybe; before?: InputMaybe; + entrezIds?: InputMaybe>; + entrezSymbols?: InputMaybe>; first?: InputMaybe; last?: InputMaybe; }; @@ -3842,6 +4112,20 @@ export enum ReferenceBuild { Ncbi36 = 'NCBI36' } +export type RejectRevisionsActivity = ActivityInterface & { + __typename: 'RejectRevisionsActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + revisions: Array; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + /** Autogenerated input type of RejectRevisions */ export type RejectRevisionsInput = { /** A unique identifier for the client performing the mutation. */ @@ -3870,6 +4154,20 @@ export type RejectRevisionsPayload = { revisions: Array; }; +export type ResolveFlagActivity = ActivityInterface & { + __typename: 'ResolveFlagActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + flag: Flag; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + /** Autogenerated input type of ResolveFlag */ export type ResolveFlagInput = { /** A unique identifier for the client performing the mutation. */ @@ -3897,11 +4195,11 @@ export type ResolveFlagPayload = { export type Revision = Commentable & EventOriginObject & EventSubject & { __typename: 'Revision'; + acceptanceActivity?: Maybe; /** List and filter comments. */ comments: CommentConnection; createdAt: Scalars['ISO8601DateTime']; - creationComment?: Maybe; - creationEvent?: Maybe; + creationActivity?: Maybe; currentValue?: Maybe; /** List and filter events for an object */ events: EventConnection; @@ -3911,15 +4209,13 @@ export type Revision = Commentable & EventOriginObject & EventSubject & { link: Scalars['String']; linkoutData: LinkoutData; name: Scalars['String']; - resolutionComment?: Maybe; - resolvedAt?: Maybe; - resolver?: Maybe; - resolvingEvent?: Maybe; + rejectionActivity?: Maybe; + resolutionActivity?: Maybe; revisionSetId: Scalars['Int']; - revisor?: Maybe; status: RevisionStatus; subject: EventSubject; suggestedValue?: Maybe; + supersedingActivity?: Maybe; updatedAt: Scalars['ISO8601DateTime']; }; @@ -3995,6 +4291,31 @@ export type RevisionResult = { revisionSetId: Scalars['Int']; }; +export type RevisionSet = EventSubject & { + __typename: 'RevisionSet'; + createdAt: Scalars['ISO8601DateTime']; + displayName: Scalars['String']; + /** List and filter events for an object */ + events: EventConnection; + id: Scalars['Int']; + link: Scalars['String']; + name: Scalars['String']; + revisions: Array; + updatedAt: Scalars['ISO8601DateTime']; +}; + + +export type RevisionSetEventsArgs = { + after?: InputMaybe; + before?: InputMaybe; + eventType?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + organizationId?: InputMaybe; + originatingUserId?: InputMaybe; + sortBy?: InputMaybe; +}; + export enum RevisionStatus { Accepted = 'ACCEPTED', New = 'NEW', @@ -4165,11 +4486,13 @@ export type SourceStub = { export type SourceSuggestion = EventOriginObject & EventSubject & { __typename: 'SourceSuggestion'; createdAt: Scalars['ISO8601DateTime']; + creationActivity: SuggestSourceActivity; disease?: Maybe; /** List and filter events for an object */ events: EventConnection; id: Scalars['Int']; initialComment: Scalars['String']; + lastStatusUpdateActivity?: Maybe; link: Scalars['String']; molecularProfile?: Maybe; name: Scalars['String']; @@ -4291,6 +4614,19 @@ export enum StringSearchOperator { StartsWith = 'STARTS_WITH' } +export type SubmitAssertionActivity = ActivityInterface & { + __typename: 'SubmitAssertionActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + /** Autogenerated input type of SubmitAssertion */ export type SubmitAssertionInput = { /** A unique identifier for the client performing the mutation. */ @@ -4317,12 +4653,25 @@ export type SubmitAssertionPayload = { clientMutationId?: Maybe; }; -/** Autogenerated input type of SubmitEvidenceItem */ -export type SubmitEvidenceItemInput = { - /** A unique identifier for the client performing the mutation. */ - clientMutationId?: InputMaybe; - /** Text describing any further context or details about your proposed EvidenceItem. Will be attached as a comment. */ - comment?: InputMaybe; +export type SubmitEvidenceItemActivity = ActivityInterface & { + __typename: 'SubmitEvidenceItemActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + +/** Autogenerated input type of SubmitEvidenceItem */ +export type SubmitEvidenceItemInput = { + /** A unique identifier for the client performing the mutation. */ + clientMutationId?: InputMaybe; + /** Text describing any further context or details about your proposed EvidenceItem. Will be attached as a comment. */ + comment?: InputMaybe; /** The desired state of the EvidenceItems's editable fields. */ fields: EvidenceItemFields; /** @@ -4593,6 +4942,35 @@ export type SuggestMolecularProfileRevisionPayload = { results: Array; }; +export type SuggestRevisionSetActivity = ActivityInterface & { + __typename: 'SuggestRevisionSetActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + revisionSet: RevisionSet; + revisions: Array; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + +export type SuggestSourceActivity = ActivityInterface & { + __typename: 'SuggestSourceActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + sourceSuggestion: SourceSuggestion; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + /** Autogenerated input type of SuggestSource */ export type SuggestSourceInput = { /** A unique identifier for the client performing the mutation. */ @@ -4839,6 +5217,20 @@ export type UpdateNotificationStatusPayload = { notifications: Array; }; +export type UpdateSourceSuggestionStatusActivity = ActivityInterface & { + __typename: 'UpdateSourceSuggestionStatusActivity'; + createdAt: Scalars['ISO8601DateTime']; + events: Array; + id: Scalars['Int']; + note?: Maybe; + organization?: Maybe; + parsedNote: Array; + sourceSuggestion: SourceSuggestion; + subject: EventSubject; + user: User; + verbiage: Scalars['String']; +}; + /** Autogenerated input type of UpdateSourceSuggestionStatus */ export type UpdateSourceSuggestionStatusInput = { /** A unique identifier for the client performing the mutation. */ @@ -5030,10 +5422,10 @@ export type Variant = Commentable & EventOriginObject & EventSubject & Flaggable clinvarIds: Array; /** List and filter comments. */ comments: CommentConnection; + creationActivity?: Maybe; deprecated: Scalars['Boolean']; - deprecationComment?: Maybe; - deprecationEvent?: Maybe; - deprecationReason?: Maybe; + deprecationActivity?: Maybe; + deprecationReason?: Maybe; ensemblVersion?: Maybe; /** List and filter events for an object */ events: EventConnection; @@ -5151,6 +5543,12 @@ export type VariantConnection = { totalCount: Scalars['Int']; }; +export enum VariantDeprecationReason { + Duplicate = 'DUPLICATE', + Invalid = 'INVALID', + Other = 'OTHER' +} + /** An edge in a connection. */ export type VariantEdge = { __typename: 'VariantEdge'; @@ -5413,6 +5811,94 @@ export type WithRevisionsRevisionsArgs = { status?: InputMaybe; }; +export type ActivityCardQueryVariables = Exact<{ + activityId: Scalars['Int']; +}>; + + +export type ActivityCardQuery = { __typename: 'Query', activity?: { __typename: 'AcceptRevisionsActivity', id: number, verbiage: string } | { __typename: 'CommentActivity', id: number, verbiage: string } | { __typename: 'CreateComplexMolecularProfileActivity', id: number, verbiage: string } | { __typename: 'CreateVariantActivity', id: number, verbiage: string } | { __typename: 'DeprecateComplexMolecularProfileActivity', id: number, verbiage: string } | { __typename: 'DeprecateVariantActivity', id: number, verbiage: string } | { __typename: 'FlagEntityActivity', id: number, verbiage: string } | { __typename: 'ModerateAssertionActivity', id: number, verbiage: string } | { __typename: 'ModerateEvidenceItemActivity', id: number, verbiage: string } | { __typename: 'RejectRevisionsActivity', id: number, verbiage: string } | { __typename: 'ResolveFlagActivity', id: number, verbiage: string } | { __typename: 'SubmitAssertionActivity', id: number, verbiage: string } | { __typename: 'SubmitEvidenceItemActivity', id: number, verbiage: string } | { __typename: 'SuggestRevisionSetActivity', id: number, verbiage: string } | { __typename: 'SuggestSourceActivity', id: number, verbiage: string } | { __typename: 'UpdateSourceSuggestionStatusActivity', id: number, verbiage: string } | undefined }; + +type ActivityCard_AcceptRevisionsActivity_Fragment = { __typename: 'AcceptRevisionsActivity', id: number, verbiage: string }; + +type ActivityCard_CommentActivity_Fragment = { __typename: 'CommentActivity', id: number, verbiage: string }; + +type ActivityCard_CreateComplexMolecularProfileActivity_Fragment = { __typename: 'CreateComplexMolecularProfileActivity', id: number, verbiage: string }; + +type ActivityCard_CreateVariantActivity_Fragment = { __typename: 'CreateVariantActivity', id: number, verbiage: string }; + +type ActivityCard_DeprecateComplexMolecularProfileActivity_Fragment = { __typename: 'DeprecateComplexMolecularProfileActivity', id: number, verbiage: string }; + +type ActivityCard_DeprecateVariantActivity_Fragment = { __typename: 'DeprecateVariantActivity', id: number, verbiage: string }; + +type ActivityCard_FlagEntityActivity_Fragment = { __typename: 'FlagEntityActivity', id: number, verbiage: string }; + +type ActivityCard_ModerateAssertionActivity_Fragment = { __typename: 'ModerateAssertionActivity', id: number, verbiage: string }; + +type ActivityCard_ModerateEvidenceItemActivity_Fragment = { __typename: 'ModerateEvidenceItemActivity', id: number, verbiage: string }; + +type ActivityCard_RejectRevisionsActivity_Fragment = { __typename: 'RejectRevisionsActivity', id: number, verbiage: string }; + +type ActivityCard_ResolveFlagActivity_Fragment = { __typename: 'ResolveFlagActivity', id: number, verbiage: string }; + +type ActivityCard_SubmitAssertionActivity_Fragment = { __typename: 'SubmitAssertionActivity', id: number, verbiage: string }; + +type ActivityCard_SubmitEvidenceItemActivity_Fragment = { __typename: 'SubmitEvidenceItemActivity', id: number, verbiage: string }; + +type ActivityCard_SuggestRevisionSetActivity_Fragment = { __typename: 'SuggestRevisionSetActivity', id: number, verbiage: string }; + +type ActivityCard_SuggestSourceActivity_Fragment = { __typename: 'SuggestSourceActivity', id: number, verbiage: string }; + +type ActivityCard_UpdateSourceSuggestionStatusActivity_Fragment = { __typename: 'UpdateSourceSuggestionStatusActivity', id: number, verbiage: string }; + +export type ActivityCardFragment = ActivityCard_AcceptRevisionsActivity_Fragment | ActivityCard_CommentActivity_Fragment | ActivityCard_CreateComplexMolecularProfileActivity_Fragment | ActivityCard_CreateVariantActivity_Fragment | ActivityCard_DeprecateComplexMolecularProfileActivity_Fragment | ActivityCard_DeprecateVariantActivity_Fragment | ActivityCard_FlagEntityActivity_Fragment | ActivityCard_ModerateAssertionActivity_Fragment | ActivityCard_ModerateEvidenceItemActivity_Fragment | ActivityCard_RejectRevisionsActivity_Fragment | ActivityCard_ResolveFlagActivity_Fragment | ActivityCard_SubmitAssertionActivity_Fragment | ActivityCard_SubmitEvidenceItemActivity_Fragment | ActivityCard_SuggestRevisionSetActivity_Fragment | ActivityCard_SuggestSourceActivity_Fragment | ActivityCard_UpdateSourceSuggestionStatusActivity_Fragment; + +export type ActivityFeedQueryVariables = Exact<{ + first?: InputMaybe; + last?: InputMaybe; + before?: InputMaybe; + after?: InputMaybe; + userId?: InputMaybe; +}>; + + +export type ActivityFeedQuery = { __typename: 'Query', activities: { __typename: 'ActivityInterfaceConnection', pageInfo: { __typename: 'PageInfo', startCursor?: string | undefined, endCursor?: string | undefined, hasNextPage: boolean, hasPreviousPage: boolean }, edges: Array<{ __typename: 'ActivityInterfaceEdge', cursor: string, node?: { __typename: 'AcceptRevisionsActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'CommentActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'CreateComplexMolecularProfileActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'CreateVariantActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'DeprecateComplexMolecularProfileActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'DeprecateVariantActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'FlagEntityActivity', id: number, verbiage: string, createdAt: any, flag: { __typename: 'Flag', id: number, name: string, link: string }, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'ModerateAssertionActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'ModerateEvidenceItemActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'RejectRevisionsActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'ResolveFlagActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'SubmitAssertionActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'SubmitEvidenceItemActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'SuggestRevisionSetActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'SuggestSourceActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'UpdateSourceSuggestionStatusActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | undefined }> } }; + +export type ActivityFeedFragment = { __typename: 'ActivityInterfaceConnection', pageInfo: { __typename: 'PageInfo', startCursor?: string | undefined, endCursor?: string | undefined, hasNextPage: boolean, hasPreviousPage: boolean }, edges: Array<{ __typename: 'ActivityInterfaceEdge', cursor: string, node?: { __typename: 'AcceptRevisionsActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'CommentActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'CreateComplexMolecularProfileActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'CreateVariantActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'DeprecateComplexMolecularProfileActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'DeprecateVariantActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'FlagEntityActivity', id: number, verbiage: string, createdAt: any, flag: { __typename: 'Flag', id: number, name: string, link: string }, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'ModerateAssertionActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'ModerateEvidenceItemActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'RejectRevisionsActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'ResolveFlagActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'SubmitAssertionActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'SubmitEvidenceItemActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'SuggestRevisionSetActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'SuggestSourceActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | { __typename: 'UpdateSourceSuggestionStatusActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } } | undefined }> }; + +type ActivityFeedNode_AcceptRevisionsActivity_Fragment = { __typename: 'AcceptRevisionsActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_CommentActivity_Fragment = { __typename: 'CommentActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_CreateComplexMolecularProfileActivity_Fragment = { __typename: 'CreateComplexMolecularProfileActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_CreateVariantActivity_Fragment = { __typename: 'CreateVariantActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_DeprecateComplexMolecularProfileActivity_Fragment = { __typename: 'DeprecateComplexMolecularProfileActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_DeprecateVariantActivity_Fragment = { __typename: 'DeprecateVariantActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_FlagEntityActivity_Fragment = { __typename: 'FlagEntityActivity', id: number, verbiage: string, createdAt: any, flag: { __typename: 'Flag', id: number, name: string, link: string }, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_ModerateAssertionActivity_Fragment = { __typename: 'ModerateAssertionActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_ModerateEvidenceItemActivity_Fragment = { __typename: 'ModerateEvidenceItemActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_RejectRevisionsActivity_Fragment = { __typename: 'RejectRevisionsActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_ResolveFlagActivity_Fragment = { __typename: 'ResolveFlagActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_SubmitAssertionActivity_Fragment = { __typename: 'SubmitAssertionActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_SubmitEvidenceItemActivity_Fragment = { __typename: 'SubmitEvidenceItemActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_SuggestRevisionSetActivity_Fragment = { __typename: 'SuggestRevisionSetActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_SuggestSourceActivity_Fragment = { __typename: 'SuggestSourceActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +type ActivityFeedNode_UpdateSourceSuggestionStatusActivity_Fragment = { __typename: 'UpdateSourceSuggestionStatusActivity', id: number, verbiage: string, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, user: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } }; + +export type ActivityFeedNodeFragment = ActivityFeedNode_AcceptRevisionsActivity_Fragment | ActivityFeedNode_CommentActivity_Fragment | ActivityFeedNode_CreateComplexMolecularProfileActivity_Fragment | ActivityFeedNode_CreateVariantActivity_Fragment | ActivityFeedNode_DeprecateComplexMolecularProfileActivity_Fragment | ActivityFeedNode_DeprecateVariantActivity_Fragment | ActivityFeedNode_FlagEntityActivity_Fragment | ActivityFeedNode_ModerateAssertionActivity_Fragment | ActivityFeedNode_ModerateEvidenceItemActivity_Fragment | ActivityFeedNode_RejectRevisionsActivity_Fragment | ActivityFeedNode_ResolveFlagActivity_Fragment | ActivityFeedNode_SubmitAssertionActivity_Fragment | ActivityFeedNode_SubmitEvidenceItemActivity_Fragment | ActivityFeedNode_SuggestRevisionSetActivity_Fragment | ActivityFeedNode_SuggestSourceActivity_Fragment | ActivityFeedNode_UpdateSourceSuggestionStatusActivity_Fragment; + export type AssertionPopoverQueryVariables = Exact<{ assertionId: Scalars['Int']; }>; @@ -5495,6 +5981,14 @@ export type CommentListQuery = { __typename: 'Query', comments: { __typename: 'C export type CommentListNodeFragment = { __typename: 'Comment', id: number, title?: string | undefined, comment: string, createdAt: any, commenter: { __typename: 'User', id: number, username: string, displayName: string, name?: string | undefined, role: UserRole, profileImagePath?: string | undefined, organizations: Array<{ __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined }> }, parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> }; +type ParsedCommentFragment_CommentTagSegment_Fragment = { __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined }; + +type ParsedCommentFragment_CommentTextSegment_Fragment = { __typename: 'CommentTextSegment', text: string }; + +type ParsedCommentFragment_User_Fragment = { __typename: 'User', id: number, displayName: string, role: UserRole }; + +export type ParsedCommentFragmentFragment = ParsedCommentFragment_CommentTagSegment_Fragment | ParsedCommentFragment_CommentTextSegment_Fragment | ParsedCommentFragment_User_Fragment; + export type CommentPopoverQueryVariables = Exact<{ commentId: Scalars['Int']; }>; @@ -5558,11 +6052,11 @@ export type EventFeedQueryVariables = Exact<{ }>; -export type EventFeedQuery = { __typename: 'Query', events: { __typename: 'EventConnection', eventTypes?: Array, unfilteredCount: number, pageInfo: { __typename: 'PageInfo', startCursor?: string | undefined, endCursor?: string | undefined, hasNextPage: boolean, hasPreviousPage: boolean }, uniqueParticipants?: Array<{ __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined }>, participatingOrganizations?: Array<{ __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined }>, edges: Array<{ __typename: 'EventEdge', cursor: string, node?: { __typename: 'Event', id: number, action: EventAction, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, originatingUser: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject?: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } | undefined, originatingObject?: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'Comment', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Flag', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Revision', id: number, revisionSetId: number, name: string, link: string } | { __typename: 'SourceSuggestion', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | undefined } | undefined }> } }; +export type EventFeedQuery = { __typename: 'Query', events: { __typename: 'EventConnection', eventTypes?: Array, unfilteredCount: number, pageInfo: { __typename: 'PageInfo', startCursor?: string | undefined, endCursor?: string | undefined, hasNextPage: boolean, hasPreviousPage: boolean }, uniqueParticipants?: Array<{ __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined }>, participatingOrganizations?: Array<{ __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined }>, edges: Array<{ __typename: 'EventEdge', cursor: string, node?: { __typename: 'Event', id: number, action: EventAction, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, originatingUser: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject?: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } | undefined, originatingObject?: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'Comment', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Flag', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Revision', id: number, revisionSetId: number, name: string, link: string } | { __typename: 'SourceSuggestion', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | undefined } | undefined }> } }; -export type EventFeedFragment = { __typename: 'EventConnection', eventTypes?: Array, unfilteredCount: number, pageInfo: { __typename: 'PageInfo', startCursor?: string | undefined, endCursor?: string | undefined, hasNextPage: boolean, hasPreviousPage: boolean }, uniqueParticipants?: Array<{ __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined }>, participatingOrganizations?: Array<{ __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined }>, edges: Array<{ __typename: 'EventEdge', cursor: string, node?: { __typename: 'Event', id: number, action: EventAction, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, originatingUser: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject?: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } | undefined, originatingObject?: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'Comment', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Flag', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Revision', id: number, revisionSetId: number, name: string, link: string } | { __typename: 'SourceSuggestion', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | undefined } | undefined }> }; +export type EventFeedFragment = { __typename: 'EventConnection', eventTypes?: Array, unfilteredCount: number, pageInfo: { __typename: 'PageInfo', startCursor?: string | undefined, endCursor?: string | undefined, hasNextPage: boolean, hasPreviousPage: boolean }, uniqueParticipants?: Array<{ __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined }>, participatingOrganizations?: Array<{ __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined }>, edges: Array<{ __typename: 'EventEdge', cursor: string, node?: { __typename: 'Event', id: number, action: EventAction, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, originatingUser: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject?: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } | undefined, originatingObject?: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'Comment', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Flag', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Revision', id: number, revisionSetId: number, name: string, link: string } | { __typename: 'SourceSuggestion', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | undefined } | undefined }> }; -export type EventFeedNodeFragment = { __typename: 'Event', id: number, action: EventAction, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, originatingUser: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject?: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } | undefined, originatingObject?: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'Comment', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Flag', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Revision', id: number, revisionSetId: number, name: string, link: string } | { __typename: 'SourceSuggestion', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | undefined }; +export type EventFeedNodeFragment = { __typename: 'Event', id: number, action: EventAction, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, originatingUser: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject?: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } | undefined, originatingObject?: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'Comment', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Flag', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Revision', id: number, revisionSetId: number, name: string, link: string } | { __typename: 'SourceSuggestion', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | undefined }; export type EvidencePopoverQueryVariables = Exact<{ evidenceId: Scalars['Int']; @@ -5621,20 +6115,20 @@ export type FlagListQueryVariables = Exact<{ }>; -export type FlagListQuery = { __typename: 'Query', flags: { __typename: 'FlagConnection', totalCount: number, unfilteredCountForSubject?: number | undefined, pageInfo: { __typename: 'PageInfo', startCursor?: string | undefined, endCursor?: string | undefined, hasNextPage: boolean, hasPreviousPage: boolean }, uniqueFlaggingUsers: Array<{ __typename: 'User', username: string, id: number, profileImagePath?: string | undefined }>, uniqueResolvingUsers?: Array<{ __typename: 'User', username: string, id: number, profileImagePath?: string | undefined }> | undefined, edges: Array<{ __typename: 'FlagEdge', node?: { __typename: 'Flag', id: number, state: FlagState, createdAt: any, resolvedAt?: any | undefined, flaggable: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'BrowseGene', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | { __typename: 'VariantGroup', id: number, name: string, link: string }, flaggingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined }, resolvingUser?: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } | undefined, openComment: { __typename: 'Comment', parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, link: string } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> }, resolutionComment?: { __typename: 'Comment', parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, link: string } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined } | undefined }> } }; +export type FlagListQuery = { __typename: 'Query', flags: { __typename: 'FlagConnection', totalCount: number, unfilteredCountForSubject?: number | undefined, pageInfo: { __typename: 'PageInfo', startCursor?: string | undefined, endCursor?: string | undefined, hasNextPage: boolean, hasPreviousPage: boolean }, uniqueFlaggingUsers: Array<{ __typename: 'User', username: string, id: number, profileImagePath?: string | undefined }>, uniqueResolvingUsers?: Array<{ __typename: 'User', username: string, id: number, profileImagePath?: string | undefined }> | undefined, edges: Array<{ __typename: 'FlagEdge', node?: { __typename: 'Flag', id: number, state: FlagState, flaggable: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'BrowseGene', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | { __typename: 'VariantGroup', id: number, name: string, link: string }, openActivity: { __typename: 'FlagEntityActivity', id: number, createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } }, resolutionActivity?: { __typename: 'ResolveFlagActivity', id: number, createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined } | undefined }> } }; -export type FlagListFragment = { __typename: 'FlagConnection', totalCount: number, unfilteredCountForSubject?: number | undefined, pageInfo: { __typename: 'PageInfo', startCursor?: string | undefined, endCursor?: string | undefined, hasNextPage: boolean, hasPreviousPage: boolean }, uniqueFlaggingUsers: Array<{ __typename: 'User', username: string, id: number, profileImagePath?: string | undefined }>, uniqueResolvingUsers?: Array<{ __typename: 'User', username: string, id: number, profileImagePath?: string | undefined }> | undefined, edges: Array<{ __typename: 'FlagEdge', node?: { __typename: 'Flag', id: number, state: FlagState, createdAt: any, resolvedAt?: any | undefined, flaggable: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'BrowseGene', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | { __typename: 'VariantGroup', id: number, name: string, link: string }, flaggingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined }, resolvingUser?: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } | undefined, openComment: { __typename: 'Comment', parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, link: string } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> }, resolutionComment?: { __typename: 'Comment', parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, link: string } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined } | undefined }> }; +export type FlagListFragment = { __typename: 'FlagConnection', totalCount: number, unfilteredCountForSubject?: number | undefined, pageInfo: { __typename: 'PageInfo', startCursor?: string | undefined, endCursor?: string | undefined, hasNextPage: boolean, hasPreviousPage: boolean }, uniqueFlaggingUsers: Array<{ __typename: 'User', username: string, id: number, profileImagePath?: string | undefined }>, uniqueResolvingUsers?: Array<{ __typename: 'User', username: string, id: number, profileImagePath?: string | undefined }> | undefined, edges: Array<{ __typename: 'FlagEdge', node?: { __typename: 'Flag', id: number, state: FlagState, flaggable: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'BrowseGene', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | { __typename: 'VariantGroup', id: number, name: string, link: string }, openActivity: { __typename: 'FlagEntityActivity', id: number, createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } }, resolutionActivity?: { __typename: 'ResolveFlagActivity', id: number, createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined } | undefined }> }; -export type FlagFragment = { __typename: 'Flag', id: number, state: FlagState, createdAt: any, resolvedAt?: any | undefined, flaggable: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'BrowseGene', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | { __typename: 'VariantGroup', id: number, name: string, link: string }, flaggingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined }, resolvingUser?: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } | undefined, openComment: { __typename: 'Comment', parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, link: string } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> }, resolutionComment?: { __typename: 'Comment', parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, link: string } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined }; +export type FlagFragment = { __typename: 'Flag', id: number, state: FlagState, flaggable: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'BrowseGene', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | { __typename: 'VariantGroup', id: number, name: string, link: string }, openActivity: { __typename: 'FlagEntityActivity', id: number, createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } }, resolutionActivity?: { __typename: 'ResolveFlagActivity', id: number, createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined }; export type FlagPopoverQueryVariables = Exact<{ flagId: Scalars['Int']; }>; -export type FlagPopoverQuery = { __typename: 'Query', flag?: { __typename: 'Flag', id: number, name: string, state: FlagState, createdAt: any, flaggingUser: { __typename: 'User', id: number, displayName: string, role: UserRole }, flaggable: { __typename: 'Assertion', id: number, link: string, name: string } | { __typename: 'BrowseGene', id: number, link: string, name: string } | { __typename: 'EvidenceItem', id: number, link: string, name: string } | { __typename: 'Gene', id: number, link: string, name: string } | { __typename: 'MolecularProfile', id: number, link: string, name: string } | { __typename: 'Variant', id: number, link: string, name: string } | { __typename: 'VariantGroup', id: number, link: string, name: string }, openComment: { __typename: 'Comment', comment: string } } | undefined }; +export type FlagPopoverQuery = { __typename: 'Query', flag?: { __typename: 'Flag', id: number, name: string, state: FlagState, createdAt: any, flaggingUser: { __typename: 'User', id: number, displayName: string, role: UserRole }, flaggable: { __typename: 'Assertion', id: number, link: string, name: string } | { __typename: 'BrowseGene', id: number, link: string, name: string } | { __typename: 'EvidenceItem', id: number, link: string, name: string } | { __typename: 'Gene', id: number, link: string, name: string } | { __typename: 'MolecularProfile', id: number, link: string, name: string } | { __typename: 'Variant', id: number, link: string, name: string } | { __typename: 'VariantGroup', id: number, link: string, name: string }, openActivity: { __typename: 'FlagEntityActivity', parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } } | undefined }; -export type FlagPopoverFragment = { __typename: 'Flag', id: number, name: string, state: FlagState, createdAt: any, flaggingUser: { __typename: 'User', id: number, displayName: string, role: UserRole }, flaggable: { __typename: 'Assertion', id: number, link: string, name: string } | { __typename: 'BrowseGene', id: number, link: string, name: string } | { __typename: 'EvidenceItem', id: number, link: string, name: string } | { __typename: 'Gene', id: number, link: string, name: string } | { __typename: 'MolecularProfile', id: number, link: string, name: string } | { __typename: 'Variant', id: number, link: string, name: string } | { __typename: 'VariantGroup', id: number, link: string, name: string }, openComment: { __typename: 'Comment', comment: string } }; +export type FlagPopoverFragment = { __typename: 'Flag', id: number, name: string, state: FlagState, createdAt: any, flaggingUser: { __typename: 'User', id: number, displayName: string, role: UserRole }, flaggable: { __typename: 'Assertion', id: number, link: string, name: string } | { __typename: 'BrowseGene', id: number, link: string, name: string } | { __typename: 'EvidenceItem', id: number, link: string, name: string } | { __typename: 'Gene', id: number, link: string, name: string } | { __typename: 'MolecularProfile', id: number, link: string, name: string } | { __typename: 'Variant', id: number, link: string, name: string } | { __typename: 'VariantGroup', id: number, link: string, name: string }, openActivity: { __typename: 'FlagEntityActivity', parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } }; export type GenePopoverQueryVariables = Exact<{ geneId: Scalars['Int']; @@ -5837,9 +6331,9 @@ export type RevisionPopoverQueryVariables = Exact<{ }>; -export type RevisionPopoverQuery = { __typename: 'Query', revision?: { __typename: 'Revision', id: number, name: string, link: string, status: RevisionStatus, createdAt: any, revisor?: { __typename: 'User', id: number, displayName: string, role: UserRole } | undefined, subject: { __typename: 'Assertion', id: number, link: string, name: string } | { __typename: 'EvidenceItem', id: number, link: string, name: string } | { __typename: 'Gene', id: number, link: string, name: string } | { __typename: 'MolecularProfile', id: number, link: string, name: string } | { __typename: 'Revision', id: number, link: string, name: string } | { __typename: 'Source', id: number, link: string, name: string } | { __typename: 'SourcePopover', id: number, link: string, name: string } | { __typename: 'SourceSuggestion', id: number, link: string, name: string } | { __typename: 'Variant', id: number, link: string, name: string } | { __typename: 'VariantGroup', id: number, link: string, name: string }, linkoutData: { __typename: 'LinkoutData', name: string }, creationComment?: { __typename: 'Comment', comment: string } | undefined } | undefined }; +export type RevisionPopoverQuery = { __typename: 'Query', revision?: { __typename: 'Revision', id: number, name: string, link: string, status: RevisionStatus, createdAt: any, creationActivity?: { __typename: 'SuggestRevisionSetActivity', user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined, subject: { __typename: 'Assertion', id: number, link: string, name: string } | { __typename: 'EvidenceItem', id: number, link: string, name: string } | { __typename: 'Flag', id: number, link: string, name: string } | { __typename: 'Gene', id: number, link: string, name: string } | { __typename: 'MolecularProfile', id: number, link: string, name: string } | { __typename: 'Revision', id: number, link: string, name: string } | { __typename: 'RevisionSet', id: number, link: string, name: string } | { __typename: 'Source', id: number, link: string, name: string } | { __typename: 'SourcePopover', id: number, link: string, name: string } | { __typename: 'SourceSuggestion', id: number, link: string, name: string } | { __typename: 'Variant', id: number, link: string, name: string } | { __typename: 'VariantGroup', id: number, link: string, name: string }, linkoutData: { __typename: 'LinkoutData', name: string } } | undefined }; -export type RevisionPopoverFragment = { __typename: 'Revision', id: number, name: string, link: string, status: RevisionStatus, createdAt: any, revisor?: { __typename: 'User', id: number, displayName: string, role: UserRole } | undefined, subject: { __typename: 'Assertion', id: number, link: string, name: string } | { __typename: 'EvidenceItem', id: number, link: string, name: string } | { __typename: 'Gene', id: number, link: string, name: string } | { __typename: 'MolecularProfile', id: number, link: string, name: string } | { __typename: 'Revision', id: number, link: string, name: string } | { __typename: 'Source', id: number, link: string, name: string } | { __typename: 'SourcePopover', id: number, link: string, name: string } | { __typename: 'SourceSuggestion', id: number, link: string, name: string } | { __typename: 'Variant', id: number, link: string, name: string } | { __typename: 'VariantGroup', id: number, link: string, name: string }, linkoutData: { __typename: 'LinkoutData', name: string }, creationComment?: { __typename: 'Comment', comment: string } | undefined }; +export type RevisionPopoverFragment = { __typename: 'Revision', id: number, name: string, link: string, status: RevisionStatus, createdAt: any, creationActivity?: { __typename: 'SuggestRevisionSetActivity', user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined, subject: { __typename: 'Assertion', id: number, link: string, name: string } | { __typename: 'EvidenceItem', id: number, link: string, name: string } | { __typename: 'Flag', id: number, link: string, name: string } | { __typename: 'Gene', id: number, link: string, name: string } | { __typename: 'MolecularProfile', id: number, link: string, name: string } | { __typename: 'Revision', id: number, link: string, name: string } | { __typename: 'RevisionSet', id: number, link: string, name: string } | { __typename: 'Source', id: number, link: string, name: string } | { __typename: 'SourcePopover', id: number, link: string, name: string } | { __typename: 'SourceSuggestion', id: number, link: string, name: string } | { __typename: 'Variant', id: number, link: string, name: string } | { __typename: 'VariantGroup', id: number, link: string, name: string }, linkoutData: { __typename: 'LinkoutData', name: string } }; export type RevisionsQueryVariables = Exact<{ subject?: InputMaybe; @@ -5855,9 +6349,9 @@ export type RevisionsQueryVariables = Exact<{ }>; -export type RevisionsQuery = { __typename: 'Query', revisions: { __typename: 'RevisionConnection', totalCount: number, unfilteredCountForSubject?: number | undefined, uniqueRevisors: Array<{ __typename: 'User', username: string, id: number, profileImagePath?: string | undefined }>, uniqueResolvers: Array<{ __typename: 'User', username: string, id: number, profileImagePath?: string | undefined }>, revisedFieldNames: Array<{ __typename: 'FieldName', name: string, displayName: string }>, pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, endCursor?: string | undefined, startCursor?: string | undefined }, edges: Array<{ __typename: 'RevisionEdge', node?: { __typename: 'Revision', id: number, revisionSetId: number, createdAt: any, resolvedAt?: any | undefined, fieldName: string, currentValue?: any | undefined, suggestedValue?: any | undefined, status: RevisionStatus, linkoutData: { __typename: 'LinkoutData', name: string, diffValue: { __typename: 'ObjectFieldDiff', currentObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, addedObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, removedObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, keptObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, suggestedObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }> } | { __typename: 'ScalarFieldDiff', left: string, right: string } }, revisor?: { __typename: 'User', id: number, displayName: string, role: UserRole } | undefined, resolver?: { __typename: 'User', id: number, displayName: string, role: UserRole } | undefined, creationComment?: { __typename: 'Comment', parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, link: string } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined, resolutionComment?: { __typename: 'Comment', parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, link: string } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined } | undefined }> } }; +export type RevisionsQuery = { __typename: 'Query', revisions: { __typename: 'RevisionConnection', totalCount: number, unfilteredCountForSubject?: number | undefined, uniqueRevisors: Array<{ __typename: 'User', username: string, id: number, profileImagePath?: string | undefined }>, uniqueResolvers: Array<{ __typename: 'User', username: string, id: number, profileImagePath?: string | undefined }>, revisedFieldNames: Array<{ __typename: 'FieldName', name: string, displayName: string }>, pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, endCursor?: string | undefined, startCursor?: string | undefined }, edges: Array<{ __typename: 'RevisionEdge', node?: { __typename: 'Revision', id: number, revisionSetId: number, createdAt: any, fieldName: string, currentValue?: any | undefined, suggestedValue?: any | undefined, status: RevisionStatus, linkoutData: { __typename: 'LinkoutData', name: string, diffValue: { __typename: 'ObjectFieldDiff', currentObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, addedObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, removedObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, keptObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, suggestedObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }> } | { __typename: 'ScalarFieldDiff', left: string, right: string } }, creationActivity?: { __typename: 'SuggestRevisionSetActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined, resolutionActivity?: { __typename: 'AcceptRevisionsActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'CommentActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'CreateComplexMolecularProfileActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'CreateVariantActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'DeprecateComplexMolecularProfileActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'DeprecateVariantActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'FlagEntityActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'ModerateAssertionActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'ModerateEvidenceItemActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'RejectRevisionsActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'ResolveFlagActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'SubmitAssertionActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'SubmitEvidenceItemActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'SuggestRevisionSetActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'SuggestSourceActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'UpdateSourceSuggestionStatusActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined } | undefined }> } }; -export type RevisionFragment = { __typename: 'Revision', id: number, revisionSetId: number, createdAt: any, resolvedAt?: any | undefined, fieldName: string, currentValue?: any | undefined, suggestedValue?: any | undefined, status: RevisionStatus, linkoutData: { __typename: 'LinkoutData', name: string, diffValue: { __typename: 'ObjectFieldDiff', currentObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, addedObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, removedObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, keptObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, suggestedObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }> } | { __typename: 'ScalarFieldDiff', left: string, right: string } }, revisor?: { __typename: 'User', id: number, displayName: string, role: UserRole } | undefined, resolver?: { __typename: 'User', id: number, displayName: string, role: UserRole } | undefined, creationComment?: { __typename: 'Comment', parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, link: string } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined, resolutionComment?: { __typename: 'Comment', parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, link: string } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined }; +export type RevisionFragment = { __typename: 'Revision', id: number, revisionSetId: number, createdAt: any, fieldName: string, currentValue?: any | undefined, suggestedValue?: any | undefined, status: RevisionStatus, linkoutData: { __typename: 'LinkoutData', name: string, diffValue: { __typename: 'ObjectFieldDiff', currentObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, addedObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, removedObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, keptObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }>, suggestedObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string, link?: string | undefined, deleted: boolean }> } | { __typename: 'ScalarFieldDiff', left: string, right: string } }, creationActivity?: { __typename: 'SuggestRevisionSetActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined, resolutionActivity?: { __typename: 'AcceptRevisionsActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'CommentActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'CreateComplexMolecularProfileActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'CreateVariantActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'DeprecateComplexMolecularProfileActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'DeprecateVariantActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'FlagEntityActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'ModerateAssertionActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'ModerateEvidenceItemActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'RejectRevisionsActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'ResolveFlagActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'SubmitAssertionActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'SubmitEvidenceItemActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'SuggestRevisionSetActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'SuggestSourceActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | { __typename: 'UpdateSourceSuggestionStatusActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole }, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined }; export type ContributorAvatarsQueryVariables = Exact<{ subscribable: SubscribableInput; @@ -5917,9 +6411,9 @@ export type BrowseSourceSuggestionsQueryVariables = Exact<{ }>; -export type BrowseSourceSuggestionsQuery = { __typename: 'Query', sourceSuggestions: { __typename: 'SourceSuggestionConnection', totalCount: number, filteredCount: number, pageCount: number, pageInfo: { __typename: 'PageInfo', endCursor?: string | undefined, hasNextPage: boolean, startCursor?: string | undefined, hasPreviousPage: boolean }, edges: Array<{ __typename: 'SourceSuggestionEdge', cursor: string, node?: { __typename: 'SourceSuggestion', id: number, initialComment: string, status: SourceSuggestionStatus, reason?: string | undefined, createdAt: any, molecularProfile?: { __typename: 'MolecularProfile', id: number, name: string, link: string } | undefined, disease?: { __typename: 'Disease', id: number, name: string, link: string } | undefined, source?: { __typename: 'Source', link: string, id: number, citation?: string | undefined, citationId: string, sourceType: SourceSource, sourceUrl?: string | undefined, displayType: string } | undefined, user?: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } | undefined } | undefined }> } }; +export type BrowseSourceSuggestionsQuery = { __typename: 'Query', sourceSuggestions: { __typename: 'SourceSuggestionConnection', totalCount: number, filteredCount: number, pageCount: number, pageInfo: { __typename: 'PageInfo', endCursor?: string | undefined, hasNextPage: boolean, startCursor?: string | undefined, hasPreviousPage: boolean }, edges: Array<{ __typename: 'SourceSuggestionEdge', cursor: string, node?: { __typename: 'SourceSuggestion', id: number, status: SourceSuggestionStatus, reason?: string | undefined, createdAt: any, molecularProfile?: { __typename: 'MolecularProfile', id: number, name: string, link: string } | undefined, disease?: { __typename: 'Disease', id: number, name: string, link: string } | undefined, source?: { __typename: 'Source', link: string, id: number, citation?: string | undefined, citationId: string, sourceType: SourceSource, sourceUrl?: string | undefined, displayType: string } | undefined, user?: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } | undefined, creationActivity: { __typename: 'SuggestSourceActivity', parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> }, lastStatusUpdateActivity?: { __typename: 'UpdateSourceSuggestionStatusActivity', parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined } | undefined }> } }; -export type BrowseSourceSuggestionRowFieldsFragment = { __typename: 'SourceSuggestion', id: number, initialComment: string, status: SourceSuggestionStatus, reason?: string | undefined, createdAt: any, molecularProfile?: { __typename: 'MolecularProfile', id: number, name: string, link: string } | undefined, disease?: { __typename: 'Disease', id: number, name: string, link: string } | undefined, source?: { __typename: 'Source', link: string, id: number, citation?: string | undefined, citationId: string, sourceType: SourceSource, sourceUrl?: string | undefined, displayType: string } | undefined, user?: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } | undefined }; +export type BrowseSourceSuggestionRowFieldsFragment = { __typename: 'SourceSuggestion', id: number, status: SourceSuggestionStatus, reason?: string | undefined, createdAt: any, molecularProfile?: { __typename: 'MolecularProfile', id: number, name: string, link: string } | undefined, disease?: { __typename: 'Disease', id: number, name: string, link: string } | undefined, source?: { __typename: 'Source', link: string, id: number, citation?: string | undefined, citationId: string, sourceType: SourceSource, sourceUrl?: string | undefined, displayType: string } | undefined, user?: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } | undefined, creationActivity: { __typename: 'SuggestSourceActivity', parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> }, lastStatusUpdateActivity?: { __typename: 'UpdateSourceSuggestionStatusActivity', parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined }; export type UpdateSourceSuggestionStatusMutationVariables = Exact<{ input: UpdateSourceSuggestionStatusInput; @@ -6212,6 +6706,23 @@ export type EntityTypeaheadQueryVariables = Exact<{ export type EntityTypeaheadQuery = { __typename: 'Query', entityTypeahead: Array<{ __typename: 'CommentTagSegment', entityId: number, tagType: TaggableEntity, displayName: string }> }; +export type DeprecateComplexMolecularProfileMutationVariables = Exact<{ + molecularProfileId: Scalars['Int']; + deprecationReason: MolecularProfileDeprecationReasonMutationInput; + comment: Scalars['String']; + organizationId?: InputMaybe; +}>; + + +export type DeprecateComplexMolecularProfileMutation = { __typename: 'Mutation', deprecateComplexMolecularProfile?: { __typename: 'DeprecateComplexMolecularProfilePayload', molecularProfile?: { __typename: 'MolecularProfile', id: number, name: string } | undefined } | undefined }; + +export type EvidenceCountsForMolecularProfileQueryVariables = Exact<{ + molecularProfileId: Scalars['Int']; +}>; + + +export type EvidenceCountsForMolecularProfileQuery = { __typename: 'Query', molecularProfile?: { __typename: 'MolecularProfile', id: number, name: string, link: string, evidenceCountsByStatus: { __typename: 'EvidenceItemsByStatus', submittedCount: number, acceptedCount: number } } | undefined }; + export type LinkableGeneQueryVariables = Exact<{ geneId: Scalars['Int']; }>; @@ -6275,7 +6786,7 @@ export type CountriesQuery = { __typename: 'Query', countries: Array<{ __typenam export type DeprecateVariantMutationVariables = Exact<{ variantId: Scalars['Int']; - deprecationReason: DeprecationReason; + deprecationReason: VariantDeprecationReason; comment: Scalars['String']; organizationId?: InputMaybe; }>; @@ -6635,6 +7146,7 @@ export type MpExpressionEditorPrepopulateQuery = { __typename: 'Query', molecula export type CreateMolecularProfile2MutationVariables = Exact<{ mpStructure: MolecularProfileComponentInput; + organizationId?: InputMaybe; }>; @@ -6761,12 +7273,13 @@ export type VariantManagerFieldsFragment = { __typename: 'BrowseVariant', id: nu export type QuickAddVariantMutationVariables = Exact<{ name: Scalars['String']; geneId: Scalars['Int']; + organizationId?: InputMaybe; }>; -export type QuickAddVariantMutation = { __typename: 'Mutation', addVariant?: { __typename: 'AddVariantPayload', clientMutationId?: string | undefined, new: boolean, variant: { __typename: 'Variant', id: number, name: string, link: string, variantAliases: Array, singleVariantMolecularProfileId: number, singleVariantMolecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, molecularProfileAliases: Array } } } | undefined }; +export type QuickAddVariantMutation = { __typename: 'Mutation', createVariant?: { __typename: 'CreateVariantPayload', clientMutationId?: string | undefined, new: boolean, variant: { __typename: 'Variant', id: number, name: string, link: string, variantAliases: Array, singleVariantMolecularProfileId: number, singleVariantMolecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, molecularProfileAliases: Array } } } | undefined }; -export type QuickAddVariantFieldsFragment = { __typename: 'AddVariantPayload', clientMutationId?: string | undefined, new: boolean, variant: { __typename: 'Variant', id: number, name: string, link: string, variantAliases: Array, singleVariantMolecularProfileId: number, singleVariantMolecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, molecularProfileAliases: Array } } }; +export type QuickAddVariantFieldsFragment = { __typename: 'CreateVariantPayload', clientMutationId?: string | undefined, new: boolean, variant: { __typename: 'Variant', id: number, name: string, link: string, variantAliases: Array, singleVariantMolecularProfileId: number, singleVariantMolecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, molecularProfileAliases: Array } } }; export type VariantSelectTypeaheadQueryVariables = Exact<{ name: Scalars['String']; @@ -6806,18 +7319,20 @@ export type AssertionDetailQueryVariables = Exact<{ }>; -export type AssertionDetailQuery = { __typename: 'Query', assertion?: { __typename: 'Assertion', id: number, name: string, status: EvidenceStatus, submissionEvent: { __typename: 'Event', originatingUser: { __typename: 'User', id: number } }, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string }, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number } } | undefined }; +export type AssertionDetailQuery = { __typename: 'Query', assertion?: { __typename: 'Assertion', id: number, name: string, status: EvidenceStatus, submissionEvent: { __typename: 'Event', originatingUser: { __typename: 'User', id: number } }, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string }, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, submissionActivity: { __typename: 'SubmitAssertionActivity', createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', id: number, displayName: string, profileImagePath?: string | undefined } } } | undefined }; -export type AssertionDetailFieldsFragment = { __typename: 'Assertion', id: number, name: string, status: EvidenceStatus, submissionEvent: { __typename: 'Event', originatingUser: { __typename: 'User', id: number } }, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string }, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number } }; +export type AssertionDetailFieldsFragment = { __typename: 'Assertion', id: number, name: string, status: EvidenceStatus, submissionEvent: { __typename: 'Event', originatingUser: { __typename: 'User', id: number } }, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string }, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, submissionActivity: { __typename: 'SubmitAssertionActivity', createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', id: number, displayName: string, profileImagePath?: string | undefined } } }; + +export type AssertionSubmissionActivityFragment = { __typename: 'Assertion', submissionActivity: { __typename: 'SubmitAssertionActivity', createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', id: number, displayName: string, profileImagePath?: string | undefined } } }; export type AssertionSummaryQueryVariables = Exact<{ assertionId: Scalars['Int']; }>; -export type AssertionSummaryQuery = { __typename: 'Query', assertion?: { __typename: 'Assertion', id: number, name: string, summary: string, description: string, status: EvidenceStatus, variantOrigin: VariantOrigin, assertionType: AssertionType, assertionDirection: AssertionDirection, significance: AssertionSignificance, therapyInteractionType?: TherapyInteraction | undefined, ampLevel?: AmpLevel | undefined, nccnGuidelineVersion?: string | undefined, regulatoryApproval?: boolean | undefined, regulatoryApprovalLastUpdated?: any | undefined, fdaCompanionTest?: boolean | undefined, fdaCompanionTestLastUpdated?: any | undefined, disease?: { __typename: 'Disease', id: number, name: string, link: string } | undefined, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }> }, therapies: Array<{ __typename: 'Therapy', ncitId?: string | undefined, name: string, link: string, id: number }>, phenotypes: Array<{ __typename: 'Phenotype', id: number, name: string, link: string }>, acmgCodes: Array<{ __typename: 'AcmgCode', code: string, description: string }>, clingenCodes: Array<{ __typename: 'ClingenCode', id: number, code: string, description: string }>, nccnGuideline?: { __typename: 'NccnGuideline', id: number, name: string } | undefined, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, acceptanceEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, submissionEvent: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } }, rejectionEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined } | undefined }; +export type AssertionSummaryQuery = { __typename: 'Query', assertion?: { __typename: 'Assertion', id: number, name: string, summary: string, description: string, status: EvidenceStatus, variantOrigin: VariantOrigin, assertionType: AssertionType, assertionDirection: AssertionDirection, significance: AssertionSignificance, therapyInteractionType?: TherapyInteraction | undefined, ampLevel?: AmpLevel | undefined, nccnGuidelineVersion?: string | undefined, regulatoryApproval?: boolean | undefined, regulatoryApprovalLastUpdated?: any | undefined, fdaCompanionTest?: boolean | undefined, fdaCompanionTestLastUpdated?: any | undefined, disease?: { __typename: 'Disease', id: number, name: string, link: string } | undefined, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }> }, therapies: Array<{ __typename: 'Therapy', ncitId?: string | undefined, name: string, link: string, id: number }>, phenotypes: Array<{ __typename: 'Phenotype', id: number, name: string, link: string }>, acmgCodes: Array<{ __typename: 'AcmgCode', code: string, description: string }>, clingenCodes: Array<{ __typename: 'ClingenCode', id: number, code: string, description: string }>, nccnGuideline?: { __typename: 'NccnGuideline', id: number, name: string } | undefined, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, acceptanceEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, submissionEvent: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } }, rejectionEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, submissionActivity: { __typename: 'SubmitAssertionActivity', createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', id: number, displayName: string, profileImagePath?: string | undefined } } } | undefined }; -export type AssertionSummaryFieldsFragment = { __typename: 'Assertion', id: number, name: string, summary: string, description: string, status: EvidenceStatus, variantOrigin: VariantOrigin, assertionType: AssertionType, assertionDirection: AssertionDirection, significance: AssertionSignificance, therapyInteractionType?: TherapyInteraction | undefined, ampLevel?: AmpLevel | undefined, nccnGuidelineVersion?: string | undefined, regulatoryApproval?: boolean | undefined, regulatoryApprovalLastUpdated?: any | undefined, fdaCompanionTest?: boolean | undefined, fdaCompanionTestLastUpdated?: any | undefined, disease?: { __typename: 'Disease', id: number, name: string, link: string } | undefined, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }> }, therapies: Array<{ __typename: 'Therapy', ncitId?: string | undefined, name: string, link: string, id: number }>, phenotypes: Array<{ __typename: 'Phenotype', id: number, name: string, link: string }>, acmgCodes: Array<{ __typename: 'AcmgCode', code: string, description: string }>, clingenCodes: Array<{ __typename: 'ClingenCode', id: number, code: string, description: string }>, nccnGuideline?: { __typename: 'NccnGuideline', id: number, name: string } | undefined, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, acceptanceEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, submissionEvent: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } }, rejectionEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined }; +export type AssertionSummaryFieldsFragment = { __typename: 'Assertion', id: number, name: string, summary: string, description: string, status: EvidenceStatus, variantOrigin: VariantOrigin, assertionType: AssertionType, assertionDirection: AssertionDirection, significance: AssertionSignificance, therapyInteractionType?: TherapyInteraction | undefined, ampLevel?: AmpLevel | undefined, nccnGuidelineVersion?: string | undefined, regulatoryApproval?: boolean | undefined, regulatoryApprovalLastUpdated?: any | undefined, fdaCompanionTest?: boolean | undefined, fdaCompanionTestLastUpdated?: any | undefined, disease?: { __typename: 'Disease', id: number, name: string, link: string } | undefined, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }> }, therapies: Array<{ __typename: 'Therapy', ncitId?: string | undefined, name: string, link: string, id: number }>, phenotypes: Array<{ __typename: 'Phenotype', id: number, name: string, link: string }>, acmgCodes: Array<{ __typename: 'AcmgCode', code: string, description: string }>, clingenCodes: Array<{ __typename: 'ClingenCode', id: number, code: string, description: string }>, nccnGuideline?: { __typename: 'NccnGuideline', id: number, name: string } | undefined, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, acceptanceEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, submissionEvent: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } }, rejectionEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, submissionActivity: { __typename: 'SubmitAssertionActivity', createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', id: number, displayName: string, profileImagePath?: string | undefined } } }; export type ClinicalTrialDetailQueryVariables = Exact<{ clinicalTrialId: Scalars['Int']; @@ -6856,18 +7371,20 @@ export type EvidenceDetailQueryVariables = Exact<{ }>; -export type EvidenceDetailQuery = { __typename: 'Query', evidenceItem?: { __typename: 'EvidenceItem', id: number, name: string, status: EvidenceStatus, submissionEvent: { __typename: 'Event', originatingUser: { __typename: 'User', id: number } }, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string }, assertions: Array<{ __typename: 'Assertion', id: number, name: string, link: string }>, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number } } | undefined }; +export type EvidenceDetailQuery = { __typename: 'Query', evidenceItem?: { __typename: 'EvidenceItem', id: number, name: string, status: EvidenceStatus, submissionEvent: { __typename: 'Event', originatingUser: { __typename: 'User', id: number } }, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string }, assertions: Array<{ __typename: 'Assertion', id: number, name: string, link: string }>, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, submissionActivity: { __typename: 'SubmitEvidenceItemActivity', createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', id: number, displayName: string, profileImagePath?: string | undefined } } } | undefined }; + +export type EvidenceDetailFieldsFragment = { __typename: 'EvidenceItem', id: number, name: string, status: EvidenceStatus, submissionEvent: { __typename: 'Event', originatingUser: { __typename: 'User', id: number } }, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string }, assertions: Array<{ __typename: 'Assertion', id: number, name: string, link: string }>, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, submissionActivity: { __typename: 'SubmitEvidenceItemActivity', createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', id: number, displayName: string, profileImagePath?: string | undefined } } }; -export type EvidenceDetailFieldsFragment = { __typename: 'EvidenceItem', id: number, name: string, status: EvidenceStatus, submissionEvent: { __typename: 'Event', originatingUser: { __typename: 'User', id: number } }, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string }, assertions: Array<{ __typename: 'Assertion', id: number, name: string, link: string }>, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number } }; +export type EvidenceSubmissionActivityFragment = { __typename: 'EvidenceItem', submissionActivity: { __typename: 'SubmitEvidenceItemActivity', createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', id: number, displayName: string, profileImagePath?: string | undefined } } }; export type EvidenceSummaryQueryVariables = Exact<{ evidenceId: Scalars['Int']; }>; -export type EvidenceSummaryQuery = { __typename: 'Query', evidenceItem?: { __typename: 'EvidenceItem', id: number, name: string, description: string, status: EvidenceStatus, evidenceLevel: EvidenceLevel, evidenceType: EvidenceType, evidenceDirection: EvidenceDirection, significance: EvidenceSignificance, variantOrigin: VariantOrigin, therapyInteractionType?: TherapyInteraction | undefined, evidenceRating?: number | undefined, therapies: Array<{ __typename: 'Therapy', id: number, name: string, link: string }>, disease?: { __typename: 'Disease', id: number, name: string, link: string } | undefined, phenotypes: Array<{ __typename: 'Phenotype', id: number, name: string, link: string }>, source: { __typename: 'Source', id: number, citation?: string | undefined, citationId: string, sourceType: SourceSource, displayType: string, sourceUrl?: string | undefined, ascoAbstractId?: number | undefined, link: string, clinicalTrials?: Array<{ __typename: 'ClinicalTrial', nctId: string, id: number, link: string }> | undefined }, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }> }, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, acceptanceEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, submissionEvent: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } }, rejectionEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined } | undefined }; +export type EvidenceSummaryQuery = { __typename: 'Query', evidenceItem?: { __typename: 'EvidenceItem', id: number, name: string, description: string, status: EvidenceStatus, evidenceLevel: EvidenceLevel, evidenceType: EvidenceType, evidenceDirection: EvidenceDirection, significance: EvidenceSignificance, variantOrigin: VariantOrigin, therapyInteractionType?: TherapyInteraction | undefined, evidenceRating?: number | undefined, therapies: Array<{ __typename: 'Therapy', id: number, name: string, link: string }>, disease?: { __typename: 'Disease', id: number, name: string, link: string } | undefined, phenotypes: Array<{ __typename: 'Phenotype', id: number, name: string, link: string }>, source: { __typename: 'Source', id: number, citation?: string | undefined, citationId: string, sourceType: SourceSource, displayType: string, sourceUrl?: string | undefined, ascoAbstractId?: number | undefined, link: string, clinicalTrials?: Array<{ __typename: 'ClinicalTrial', nctId: string, id: number, link: string }> | undefined }, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }> }, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, submissionActivity: { __typename: 'SubmitEvidenceItemActivity', createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', displayName: string, profileImagePath?: string | undefined, id: number, role: UserRole } }, acceptanceEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, submissionEvent: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } }, rejectionEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined } | undefined }; -export type EvidenceSummaryFieldsFragment = { __typename: 'EvidenceItem', id: number, name: string, description: string, status: EvidenceStatus, evidenceLevel: EvidenceLevel, evidenceType: EvidenceType, evidenceDirection: EvidenceDirection, significance: EvidenceSignificance, variantOrigin: VariantOrigin, therapyInteractionType?: TherapyInteraction | undefined, evidenceRating?: number | undefined, therapies: Array<{ __typename: 'Therapy', id: number, name: string, link: string }>, disease?: { __typename: 'Disease', id: number, name: string, link: string } | undefined, phenotypes: Array<{ __typename: 'Phenotype', id: number, name: string, link: string }>, source: { __typename: 'Source', id: number, citation?: string | undefined, citationId: string, sourceType: SourceSource, displayType: string, sourceUrl?: string | undefined, ascoAbstractId?: number | undefined, link: string, clinicalTrials?: Array<{ __typename: 'ClinicalTrial', nctId: string, id: number, link: string }> | undefined }, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }> }, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, acceptanceEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, submissionEvent: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } }, rejectionEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined }; +export type EvidenceSummaryFieldsFragment = { __typename: 'EvidenceItem', id: number, name: string, description: string, status: EvidenceStatus, evidenceLevel: EvidenceLevel, evidenceType: EvidenceType, evidenceDirection: EvidenceDirection, significance: EvidenceSignificance, variantOrigin: VariantOrigin, therapyInteractionType?: TherapyInteraction | undefined, evidenceRating?: number | undefined, therapies: Array<{ __typename: 'Therapy', id: number, name: string, link: string }>, disease?: { __typename: 'Disease', id: number, name: string, link: string } | undefined, phenotypes: Array<{ __typename: 'Phenotype', id: number, name: string, link: string }>, source: { __typename: 'Source', id: number, citation?: string | undefined, citationId: string, sourceType: SourceSource, displayType: string, sourceUrl?: string | undefined, ascoAbstractId?: number | undefined, link: string, clinicalTrials?: Array<{ __typename: 'ClinicalTrial', nctId: string, id: number, link: string }> | undefined }, molecularProfile: { __typename: 'MolecularProfile', id: number, name: string, link: string, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }> }, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, submissionActivity: { __typename: 'SubmitEvidenceItemActivity', createdAt: any, parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }>, user: { __typename: 'User', displayName: string, profileImagePath?: string | undefined, id: number, role: UserRole } }, acceptanceEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, submissionEvent: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } }, rejectionEvent?: { __typename: 'Event', createdAt: any, originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined }; export type GeneDetailQueryVariables = Exact<{ geneId: Scalars['Int']; @@ -6892,18 +7409,18 @@ export type MolecularProfileDetailQueryVariables = Exact<{ }>; -export type MolecularProfileDetailQuery = { __typename: 'Query', molecularProfile?: { __typename: 'MolecularProfile', id: number, name: string, deprecated: boolean, molecularProfileAliases: Array, deprecatedVariants: Array<{ __typename: 'Variant', deprecationReason?: DeprecationReason | undefined, id: number, deprecated: boolean, name: string, link: string, deprecationComment?: { __typename: 'Comment', id: number, title?: string | undefined, comment: string, createdAt: any, commenter: { __typename: 'User', id: number, username: string, displayName: string, name?: string | undefined, role: UserRole, profileImagePath?: string | undefined, organizations: Array<{ __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined }> }, parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined }>, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number } } | undefined }; +export type MolecularProfileDetailQuery = { __typename: 'Query', molecularProfile?: { __typename: 'MolecularProfile', id: number, name: string, deprecated: boolean, deprecationReason?: MolecularProfileDeprecationReason | undefined, molecularProfileAliases: Array, complexMolecularProfileDeprecationActivity?: { __typename: 'DeprecateComplexMolecularProfileActivity', parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined, deprecatedVariants: Array<{ __typename: 'Variant', deprecationReason?: VariantDeprecationReason | undefined, id: number, deprecated: boolean, name: string, link: string, deprecationActivity?: { __typename: 'DeprecateVariantActivity', parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined }>, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, variants: Array<{ __typename: 'Variant', id: number }> } | undefined }; -export type MolecularProfileDetailFieldsFragment = { __typename: 'MolecularProfile', id: number, name: string, deprecated: boolean, molecularProfileAliases: Array, deprecatedVariants: Array<{ __typename: 'Variant', deprecationReason?: DeprecationReason | undefined, id: number, deprecated: boolean, name: string, link: string, deprecationComment?: { __typename: 'Comment', id: number, title?: string | undefined, comment: string, createdAt: any, commenter: { __typename: 'User', id: number, username: string, displayName: string, name?: string | undefined, role: UserRole, profileImagePath?: string | undefined, organizations: Array<{ __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined }> }, parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined }>, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number } }; +export type MolecularProfileDetailFieldsFragment = { __typename: 'MolecularProfile', id: number, name: string, deprecated: boolean, deprecationReason?: MolecularProfileDeprecationReason | undefined, molecularProfileAliases: Array, complexMolecularProfileDeprecationActivity?: { __typename: 'DeprecateComplexMolecularProfileActivity', parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined, deprecatedVariants: Array<{ __typename: 'Variant', deprecationReason?: VariantDeprecationReason | undefined, id: number, deprecated: boolean, name: string, link: string, deprecationActivity?: { __typename: 'DeprecateVariantActivity', parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined }>, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, variants: Array<{ __typename: 'Variant', id: number }> }; export type MolecularProfileSummaryQueryVariables = Exact<{ mpId: Scalars['Int']; }>; -export type MolecularProfileSummaryQuery = { __typename: 'Query', molecularProfile?: { __typename: 'MolecularProfile', id: number, name: string, description?: string | undefined, molecularProfileAliases: Array, molecularProfileScore: number, sources: Array<{ __typename: 'Source', id: number, citation?: string | undefined, link: string, sourceType: SourceSource }>, variants: Array<{ __typename: 'Variant', id: number, name: string, link: string, variantAliases: Array, clinvarIds: Array, alleleRegistryId?: string | undefined, openCravatUrl?: string | undefined, referenceBuild?: ReferenceBuild | undefined, ensemblVersion?: number | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, hgvsDescriptions: Array, gene: { __typename: 'Gene', id: number, name: string, link: string }, molecularProfiles: { __typename: 'MolecularProfileConnection', totalCount: number, nodes: Array<{ __typename: 'MolecularProfile', id: number, link: string, name: string, deprecated: boolean }> }, variantTypes: Array<{ __typename: 'VariantType', id: number, link: string, soid: string, name: string }>, primaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined }>, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }> } | undefined }; +export type MolecularProfileSummaryQuery = { __typename: 'Query', molecularProfile?: { __typename: 'MolecularProfile', id: number, name: string, description?: string | undefined, molecularProfileAliases: Array, molecularProfileScore: number, sources: Array<{ __typename: 'Source', id: number, citation?: string | undefined, link: string, sourceType: SourceSource }>, variants: Array<{ __typename: 'Variant', id: number, name: string, link: string, variantAliases: Array, clinvarIds: Array, alleleRegistryId?: string | undefined, openCravatUrl?: string | undefined, referenceBuild?: ReferenceBuild | undefined, ensemblVersion?: number | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, hgvsDescriptions: Array, gene: { __typename: 'Gene', id: number, name: string, link: string }, molecularProfiles: { __typename: 'MolecularProfileConnection', totalCount: number, nodes: Array<{ __typename: 'MolecularProfile', id: number, link: string, name: string, deprecated: boolean }> }, variantTypes: Array<{ __typename: 'VariantType', id: number, link: string, soid: string, name: string }>, primaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined }>, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }>, complexMolecularProfileCreationActivity?: { __typename: 'CreateComplexMolecularProfileActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, variantDeprecationActivity?: { __typename: 'DeprecateVariantActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, complexMolecularProfileDeprecationActivity?: { __typename: 'DeprecateComplexMolecularProfileActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined } | undefined }; -export type MolecularProfileSummaryFieldsFragment = { __typename: 'MolecularProfile', id: number, name: string, description?: string | undefined, molecularProfileAliases: Array, molecularProfileScore: number, sources: Array<{ __typename: 'Source', id: number, citation?: string | undefined, link: string, sourceType: SourceSource }>, variants: Array<{ __typename: 'Variant', id: number, name: string, link: string, variantAliases: Array, clinvarIds: Array, alleleRegistryId?: string | undefined, openCravatUrl?: string | undefined, referenceBuild?: ReferenceBuild | undefined, ensemblVersion?: number | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, hgvsDescriptions: Array, gene: { __typename: 'Gene', id: number, name: string, link: string }, molecularProfiles: { __typename: 'MolecularProfileConnection', totalCount: number, nodes: Array<{ __typename: 'MolecularProfile', id: number, link: string, name: string, deprecated: boolean }> }, variantTypes: Array<{ __typename: 'VariantType', id: number, link: string, soid: string, name: string }>, primaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined }>, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }> }; +export type MolecularProfileSummaryFieldsFragment = { __typename: 'MolecularProfile', id: number, name: string, description?: string | undefined, molecularProfileAliases: Array, molecularProfileScore: number, sources: Array<{ __typename: 'Source', id: number, citation?: string | undefined, link: string, sourceType: SourceSource }>, variants: Array<{ __typename: 'Variant', id: number, name: string, link: string, variantAliases: Array, clinvarIds: Array, alleleRegistryId?: string | undefined, openCravatUrl?: string | undefined, referenceBuild?: ReferenceBuild | undefined, ensemblVersion?: number | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, hgvsDescriptions: Array, gene: { __typename: 'Gene', id: number, name: string, link: string }, molecularProfiles: { __typename: 'MolecularProfileConnection', totalCount: number, nodes: Array<{ __typename: 'MolecularProfile', id: number, link: string, name: string, deprecated: boolean }> }, variantTypes: Array<{ __typename: 'VariantType', id: number, link: string, soid: string, name: string }>, primaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined }>, parsedName: Array<{ __typename: 'Gene', id: number, name: string, link: string } | { __typename: 'MolecularProfileTextSegment', text: string } | { __typename: 'Variant', id: number, name: string, link: string, deprecated: boolean }>, complexMolecularProfileCreationActivity?: { __typename: 'CreateComplexMolecularProfileActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, variantDeprecationActivity?: { __typename: 'DeprecateVariantActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, complexMolecularProfileDeprecationActivity?: { __typename: 'DeprecateComplexMolecularProfileActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined }; type MolecularProfileParsedName_Gene_Fragment = { __typename: 'Gene', id: number, name: string, link: string }; @@ -7020,22 +7537,22 @@ export type UserNotificationsQueryVariables = Exact<{ }>; -export type UserNotificationsQuery = { __typename: 'Query', notifications: { __typename: 'NotificationConnection', eventTypes: Array, pageInfo: { __typename: 'PageInfo', startCursor?: string | undefined, endCursor?: string | undefined, hasNextPage: boolean, hasPreviousPage: boolean }, notificationSubjects: Array<{ __typename: 'EventSubjectWithCount', occuranceCount: number, subject?: { __typename: 'Assertion', id: number, name: string } | { __typename: 'EvidenceItem', id: number, name: string } | { __typename: 'Gene', id: number, name: string } | { __typename: 'MolecularProfile', id: number, name: string } | { __typename: 'Revision', id: number, name: string } | { __typename: 'Source', id: number, name: string } | { __typename: 'SourcePopover', id: number, name: string } | { __typename: 'SourceSuggestion', id: number, name: string } | { __typename: 'Variant', id: number, name: string } | { __typename: 'VariantGroup', id: number, name: string } | undefined }>, originatingUsers: Array<{ __typename: 'User', id: number, displayName: string }>, organizations: Array<{ __typename: 'Organization', id: number, name: string }>, edges: Array<{ __typename: 'NotificationEdge', node?: { __typename: 'Notification', id: number, type: NotificationReason, seen: boolean, event: { __typename: 'Event', id: number, action: EventAction, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, originatingUser: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject?: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } | undefined, originatingObject?: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'Comment', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Flag', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Revision', id: number, revisionSetId: number, name: string, link: string } | { __typename: 'SourceSuggestion', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | undefined }, subscription?: { __typename: 'Subscription', id: number, subscribable: { __typename: 'Assertion', id: number, name: string } | { __typename: 'EvidenceItem', id: number, name: string } | { __typename: 'Gene', id: number, name: string } | { __typename: 'MolecularProfile', id: number, name: string } | { __typename: 'Revision', id: number, name: string } | { __typename: 'Source', id: number, name: string } | { __typename: 'SourcePopover', id: number, name: string } | { __typename: 'SourceSuggestion', id: number, name: string } | { __typename: 'Variant', id: number, name: string } | { __typename: 'VariantGroup', id: number, name: string } } | undefined } | undefined }> } }; +export type UserNotificationsQuery = { __typename: 'Query', notifications: { __typename: 'NotificationConnection', eventTypes: Array, pageInfo: { __typename: 'PageInfo', startCursor?: string | undefined, endCursor?: string | undefined, hasNextPage: boolean, hasPreviousPage: boolean }, notificationSubjects: Array<{ __typename: 'EventSubjectWithCount', occuranceCount: number, subject?: { __typename: 'Assertion', id: number, name: string } | { __typename: 'EvidenceItem', id: number, name: string } | { __typename: 'Flag', id: number, name: string } | { __typename: 'Gene', id: number, name: string } | { __typename: 'MolecularProfile', id: number, name: string } | { __typename: 'Revision', id: number, name: string } | { __typename: 'RevisionSet', id: number, name: string } | { __typename: 'Source', id: number, name: string } | { __typename: 'SourcePopover', id: number, name: string } | { __typename: 'SourceSuggestion', id: number, name: string } | { __typename: 'Variant', id: number, name: string } | { __typename: 'VariantGroup', id: number, name: string } | undefined }>, originatingUsers: Array<{ __typename: 'User', id: number, displayName: string }>, organizations: Array<{ __typename: 'Organization', id: number, name: string }>, edges: Array<{ __typename: 'NotificationEdge', node?: { __typename: 'Notification', id: number, type: NotificationReason, seen: boolean, event: { __typename: 'Event', id: number, action: EventAction, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, originatingUser: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject?: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } | undefined, originatingObject?: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'Comment', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Flag', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Revision', id: number, revisionSetId: number, name: string, link: string } | { __typename: 'SourceSuggestion', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | undefined }, subscription?: { __typename: 'Subscription', id: number, subscribable: { __typename: 'Assertion', id: number, name: string } | { __typename: 'EvidenceItem', id: number, name: string } | { __typename: 'Flag', id: number, name: string } | { __typename: 'Gene', id: number, name: string } | { __typename: 'MolecularProfile', id: number, name: string } | { __typename: 'Revision', id: number, name: string } | { __typename: 'RevisionSet', id: number, name: string } | { __typename: 'Source', id: number, name: string } | { __typename: 'SourcePopover', id: number, name: string } | { __typename: 'SourceSuggestion', id: number, name: string } | { __typename: 'Variant', id: number, name: string } | { __typename: 'VariantGroup', id: number, name: string } } | undefined } | undefined }> } }; export type NotificationOrganizationFragment = { __typename: 'Organization', id: number, name: string }; export type NotificationOriginatingUsersFragment = { __typename: 'User', id: number, displayName: string }; -export type NotificationFeedSubjectsFragment = { __typename: 'EventSubjectWithCount', occuranceCount: number, subject?: { __typename: 'Assertion', id: number, name: string } | { __typename: 'EvidenceItem', id: number, name: string } | { __typename: 'Gene', id: number, name: string } | { __typename: 'MolecularProfile', id: number, name: string } | { __typename: 'Revision', id: number, name: string } | { __typename: 'Source', id: number, name: string } | { __typename: 'SourcePopover', id: number, name: string } | { __typename: 'SourceSuggestion', id: number, name: string } | { __typename: 'Variant', id: number, name: string } | { __typename: 'VariantGroup', id: number, name: string } | undefined }; +export type NotificationFeedSubjectsFragment = { __typename: 'EventSubjectWithCount', occuranceCount: number, subject?: { __typename: 'Assertion', id: number, name: string } | { __typename: 'EvidenceItem', id: number, name: string } | { __typename: 'Flag', id: number, name: string } | { __typename: 'Gene', id: number, name: string } | { __typename: 'MolecularProfile', id: number, name: string } | { __typename: 'Revision', id: number, name: string } | { __typename: 'RevisionSet', id: number, name: string } | { __typename: 'Source', id: number, name: string } | { __typename: 'SourcePopover', id: number, name: string } | { __typename: 'SourceSuggestion', id: number, name: string } | { __typename: 'Variant', id: number, name: string } | { __typename: 'VariantGroup', id: number, name: string } | undefined }; -export type NotificationNodeFragment = { __typename: 'Notification', id: number, type: NotificationReason, seen: boolean, event: { __typename: 'Event', id: number, action: EventAction, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, originatingUser: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject?: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } | undefined, originatingObject?: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'Comment', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Flag', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Revision', id: number, revisionSetId: number, name: string, link: string } | { __typename: 'SourceSuggestion', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | undefined }, subscription?: { __typename: 'Subscription', id: number, subscribable: { __typename: 'Assertion', id: number, name: string } | { __typename: 'EvidenceItem', id: number, name: string } | { __typename: 'Gene', id: number, name: string } | { __typename: 'MolecularProfile', id: number, name: string } | { __typename: 'Revision', id: number, name: string } | { __typename: 'Source', id: number, name: string } | { __typename: 'SourcePopover', id: number, name: string } | { __typename: 'SourceSuggestion', id: number, name: string } | { __typename: 'Variant', id: number, name: string } | { __typename: 'VariantGroup', id: number, name: string } } | undefined }; +export type NotificationNodeFragment = { __typename: 'Notification', id: number, type: NotificationReason, seen: boolean, event: { __typename: 'Event', id: number, action: EventAction, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, originatingUser: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject?: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } | undefined, originatingObject?: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'Comment', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Flag', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Revision', id: number, revisionSetId: number, name: string, link: string } | { __typename: 'SourceSuggestion', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | undefined }, subscription?: { __typename: 'Subscription', id: number, subscribable: { __typename: 'Assertion', id: number, name: string } | { __typename: 'EvidenceItem', id: number, name: string } | { __typename: 'Flag', id: number, name: string } | { __typename: 'Gene', id: number, name: string } | { __typename: 'MolecularProfile', id: number, name: string } | { __typename: 'Revision', id: number, name: string } | { __typename: 'RevisionSet', id: number, name: string } | { __typename: 'Source', id: number, name: string } | { __typename: 'SourcePopover', id: number, name: string } | { __typename: 'SourceSuggestion', id: number, name: string } | { __typename: 'Variant', id: number, name: string } | { __typename: 'VariantGroup', id: number, name: string } } | undefined }; export type UpdateNotificationStatusMutationVariables = Exact<{ input: UpdateNotificationStatusInput; }>; -export type UpdateNotificationStatusMutation = { __typename: 'Mutation', updateNotificationStatus?: { __typename: 'UpdateNotificationStatusPayload', notifications: Array<{ __typename: 'Notification', id: number, type: NotificationReason, seen: boolean, event: { __typename: 'Event', id: number, action: EventAction, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, originatingUser: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject?: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } | undefined, originatingObject?: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'Comment', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Flag', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Revision', id: number, revisionSetId: number, name: string, link: string } | { __typename: 'SourceSuggestion', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | undefined }, subscription?: { __typename: 'Subscription', id: number, subscribable: { __typename: 'Assertion', id: number, name: string } | { __typename: 'EvidenceItem', id: number, name: string } | { __typename: 'Gene', id: number, name: string } | { __typename: 'MolecularProfile', id: number, name: string } | { __typename: 'Revision', id: number, name: string } | { __typename: 'Source', id: number, name: string } | { __typename: 'SourcePopover', id: number, name: string } | { __typename: 'SourceSuggestion', id: number, name: string } | { __typename: 'Variant', id: number, name: string } | { __typename: 'VariantGroup', id: number, name: string } } | undefined }> } | undefined }; +export type UpdateNotificationStatusMutation = { __typename: 'Mutation', updateNotificationStatus?: { __typename: 'UpdateNotificationStatusPayload', notifications: Array<{ __typename: 'Notification', id: number, type: NotificationReason, seen: boolean, event: { __typename: 'Event', id: number, action: EventAction, createdAt: any, organization?: { __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined } | undefined, originatingUser: { __typename: 'User', id: number, username: string, displayName: string, role: UserRole, profileImagePath?: string | undefined }, subject?: { __typename: 'Assertion', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'EvidenceItem', status: EvidenceStatus, name: string, id: number, link: string } | { __typename: 'Flag', name: string, id: number, link: string } | { __typename: 'Gene', name: string, id: number, link: string } | { __typename: 'MolecularProfile', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'Revision', revisionSetId: number, name: string, id: number, link: string } | { __typename: 'RevisionSet', name: string, id: number, link: string } | { __typename: 'Source', citation?: string | undefined, sourceType: SourceSource, name: string, id: number, link: string } | { __typename: 'SourcePopover', name: string, id: number, link: string } | { __typename: 'SourceSuggestion', name: string, id: number, link: string } | { __typename: 'Variant', deprecated: boolean, name: string, id: number, link: string } | { __typename: 'VariantGroup', name: string, id: number, link: string } | undefined, originatingObject?: { __typename: 'Assertion', id: number, name: string, link: string } | { __typename: 'Comment', id: number, name: string, link: string } | { __typename: 'EvidenceItem', id: number, name: string, link: string } | { __typename: 'Flag', id: number, name: string, link: string } | { __typename: 'MolecularProfile', id: number, name: string, link: string } | { __typename: 'Revision', id: number, revisionSetId: number, name: string, link: string } | { __typename: 'SourceSuggestion', id: number, name: string, link: string } | { __typename: 'Variant', id: number, name: string, link: string } | undefined }, subscription?: { __typename: 'Subscription', id: number, subscribable: { __typename: 'Assertion', id: number, name: string } | { __typename: 'EvidenceItem', id: number, name: string } | { __typename: 'Flag', id: number, name: string } | { __typename: 'Gene', id: number, name: string } | { __typename: 'MolecularProfile', id: number, name: string } | { __typename: 'Revision', id: number, name: string } | { __typename: 'RevisionSet', id: number, name: string } | { __typename: 'Source', id: number, name: string } | { __typename: 'SourcePopover', id: number, name: string } | { __typename: 'SourceSuggestion', id: number, name: string } | { __typename: 'Variant', id: number, name: string } | { __typename: 'VariantGroup', id: number, name: string } } | undefined }> } | undefined }; export type UnsubscribeMutationVariables = Exact<{ input: UnsubscribeInput; @@ -7062,19 +7579,6 @@ export type VariantGroupDetailQuery = { __typename: 'Query', variantGroup?: { __ export type VariantGroupDetailFieldsFragment = { __typename: 'VariantGroup', id: number, name: string, variants: { __typename: 'VariantConnection', totalCount: number }, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number } }; -export type VariantGroupRevisionsQueryVariables = Exact<{ - variantGroupId: Scalars['Int']; - first?: InputMaybe; - last?: InputMaybe; - before?: InputMaybe; - after?: InputMaybe; - fieldName?: InputMaybe; - originatingUserId?: InputMaybe; -}>; - - -export type VariantGroupRevisionsQuery = { __typename: 'Query', variantGroup?: { __typename: 'VariantGroup', id: number, revisions: { __typename: 'RevisionConnection', totalCount: number, uniqueRevisors: Array<{ __typename: 'User', username: string, id: number, profileImagePath?: string | undefined }>, revisedFieldNames: Array<{ __typename: 'FieldName', name: string, displayName: string }>, edges: Array<{ __typename: 'RevisionEdge', node?: { __typename: 'Revision', id: number, revisionSetId: number, createdAt: any, fieldName: string, currentValue?: any | undefined, suggestedValue?: any | undefined, status: RevisionStatus, linkoutData: { __typename: 'LinkoutData', name: string, diffValue: { __typename: 'ObjectFieldDiff', addedObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string }>, removedObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string }>, keptObjects: Array<{ __typename: 'ModeratedObjectField', id: number, displayName?: string | undefined, displayType?: string | undefined, entityType: string }> } | { __typename: 'ScalarFieldDiff', left: string, right: string } }, revisor?: { __typename: 'User', id: number, name?: string | undefined } | undefined } | undefined }> } } | undefined }; - export type VariantGroupsSummaryQueryVariables = Exact<{ variantGroupId: Scalars['Int']; }>; @@ -7096,21 +7600,94 @@ export type VariantDetailQueryVariables = Exact<{ }>; -export type VariantDetailQuery = { __typename: 'Query', variant?: { __typename: 'Variant', id: number, name: string, deprecated: boolean, deprecationReason?: DeprecationReason | undefined, variantAliases: Array, deprecationComment?: { __typename: 'Comment', id: number, title?: string | undefined, comment: string, createdAt: any, commenter: { __typename: 'User', id: number, username: string, displayName: string, name?: string | undefined, role: UserRole, profileImagePath?: string | undefined, organizations: Array<{ __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined }> }, parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined, gene: { __typename: 'Gene', id: number, name: string, link: string }, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number } } | undefined }; +export type VariantDetailQuery = { __typename: 'Query', variant?: { __typename: 'Variant', id: number, name: string, deprecated: boolean, deprecationReason?: VariantDeprecationReason | undefined, variantAliases: Array, deprecationActivity?: { __typename: 'DeprecateVariantActivity', parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined, gene: { __typename: 'Gene', id: number, name: string, link: string }, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number } } | undefined }; -export type VariantDetailFieldsFragment = { __typename: 'Variant', id: number, name: string, deprecated: boolean, deprecationReason?: DeprecationReason | undefined, variantAliases: Array, deprecationComment?: { __typename: 'Comment', id: number, title?: string | undefined, comment: string, createdAt: any, commenter: { __typename: 'User', id: number, username: string, displayName: string, name?: string | undefined, role: UserRole, profileImagePath?: string | undefined, organizations: Array<{ __typename: 'Organization', id: number, name: string, profileImagePath?: string | undefined }> }, parsedComment: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined, gene: { __typename: 'Gene', id: number, name: string, link: string }, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number } }; +export type VariantDetailFieldsFragment = { __typename: 'Variant', id: number, name: string, deprecated: boolean, deprecationReason?: VariantDeprecationReason | undefined, variantAliases: Array, deprecationActivity?: { __typename: 'DeprecateVariantActivity', parsedNote: Array<{ __typename: 'CommentTagSegment', entityId: number, displayName: string, tagType: TaggableEntity, status?: EvidenceStatus | undefined, deprecated?: boolean | undefined, link: string, revisionSetId?: number | undefined } | { __typename: 'CommentTextSegment', text: string } | { __typename: 'User', id: number, displayName: string, role: UserRole }> } | undefined, gene: { __typename: 'Gene', id: number, name: string, link: string }, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number } }; export type VariantSummaryQueryVariables = Exact<{ variantId: Scalars['Int']; }>; -export type VariantSummaryQuery = { __typename: 'Query', variant?: { __typename: 'Variant', id: number, name: string, variantAliases: Array, alleleRegistryId?: string | undefined, openCravatUrl?: string | undefined, maneSelectTranscript?: string | undefined, hgvsDescriptions: Array, clinvarIds: Array, referenceBuild?: ReferenceBuild | undefined, ensemblVersion?: number | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, gene: { __typename: 'Gene', id: number, name: string, link: string }, variantTypes: Array<{ __typename: 'VariantType', id: number, link: string, soid: string, name: string }>, primaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, myVariantInfo?: { __typename: 'MyVariantInfo', myVariantInfoId: string, caddConsequence: Array, caddDetail: Array, caddScore?: number | undefined, caddPhred?: number | undefined, clinvarClinicalSignificance: Array, clinvarHgvsCoding: Array, clinvarHgvsGenomic: Array, clinvarHgvsNonCoding: Array, clinvarHgvsProtein: Array, clinvarId?: number | undefined, clinvarOmim?: string | undefined, cosmicId?: string | undefined, dbnsfpInterproDomain: Array, dbsnpRsid?: string | undefined, eglClass?: string | undefined, eglHgvs: Array, eglProtein?: string | undefined, eglTranscript?: string | undefined, exacAlleleCount?: number | undefined, exacAlleleFrequency?: number | undefined, exacAlleleNumber?: number | undefined, fathmmMklPrediction?: string | undefined, fathmmMklScore?: number | undefined, fathmmPrediction: Array, fathmmScore: Array, fitconsScore?: number | undefined, gerp?: number | undefined, gnomadExomeAlleleCount?: number | undefined, gnomadExomeAlleleFrequency?: number | undefined, gnomadExomeAlleleNumber?: number | undefined, gnomadExomeFilter?: string | undefined, gnomadGenomeAlleleCount?: number | undefined, gnomadGenomeAlleleFrequency?: number | undefined, gnomadGenomeAlleleNumber?: number | undefined, gnomadGenomeFilter?: string | undefined, lrtPrediction?: string | undefined, lrtScore?: number | undefined, metalrPrediction?: string | undefined, metalrScore?: number | undefined, metasvmPrediction?: string | undefined, metasvmScore?: number | undefined, mutationassessorPrediction: Array, mutationassessorScore: Array, mutationtasterPrediction: Array, mutationtasterScore: Array, phastcons100way?: number | undefined, phastcons30way?: number | undefined, phyloP100way?: number | undefined, phyloP30way?: number | undefined, polyphen2HdivPrediction: Array, polyphen2HdivScore: Array, polyphen2HvarPrediction: Array, polyphen2HvarScore: Array, proveanPrediction: Array, proveanScore: Array, revelScore?: Array | undefined, siftPrediction: Array, siftScore: Array, siphy?: number | undefined, snpeffSnpEffect: Array, snpeffSnpImpact: Array } | undefined, lastSubmittedRevisionEvent?: { __typename: 'Event', originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, lastAcceptedRevisionEvent?: { __typename: 'Event', originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined } | undefined }; +export type VariantSummaryQuery = { __typename: 'Query', variant?: { __typename: 'Variant', id: number, name: string, variantAliases: Array, alleleRegistryId?: string | undefined, openCravatUrl?: string | undefined, maneSelectTranscript?: string | undefined, hgvsDescriptions: Array, clinvarIds: Array, referenceBuild?: ReferenceBuild | undefined, ensemblVersion?: number | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, gene: { __typename: 'Gene', id: number, name: string, link: string }, variantTypes: Array<{ __typename: 'VariantType', id: number, link: string, soid: string, name: string }>, primaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, myVariantInfo?: { __typename: 'MyVariantInfo', myVariantInfoId: string, caddConsequence: Array, caddDetail: Array, caddScore?: number | undefined, caddPhred?: number | undefined, clinvarClinicalSignificance: Array, clinvarHgvsCoding: Array, clinvarHgvsGenomic: Array, clinvarHgvsNonCoding: Array, clinvarHgvsProtein: Array, clinvarId?: number | undefined, clinvarOmim?: string | undefined, cosmicId?: string | undefined, dbnsfpInterproDomain: Array, dbsnpRsid?: string | undefined, eglClass?: string | undefined, eglHgvs: Array, eglProtein?: string | undefined, eglTranscript?: string | undefined, exacAlleleCount?: number | undefined, exacAlleleFrequency?: number | undefined, exacAlleleNumber?: number | undefined, fathmmMklPrediction?: string | undefined, fathmmMklScore?: number | undefined, fathmmPrediction: Array, fathmmScore: Array, fitconsScore?: number | undefined, gerp?: number | undefined, gnomadExomeAlleleCount?: number | undefined, gnomadExomeAlleleFrequency?: number | undefined, gnomadExomeAlleleNumber?: number | undefined, gnomadExomeFilter?: string | undefined, gnomadGenomeAlleleCount?: number | undefined, gnomadGenomeAlleleFrequency?: number | undefined, gnomadGenomeAlleleNumber?: number | undefined, gnomadGenomeFilter?: string | undefined, lrtPrediction?: string | undefined, lrtScore?: number | undefined, metalrPrediction?: string | undefined, metalrScore?: number | undefined, metasvmPrediction?: string | undefined, metasvmScore?: number | undefined, mutationassessorPrediction: Array, mutationassessorScore: Array, mutationtasterPrediction: Array, mutationtasterScore: Array, phastcons100way?: number | undefined, phastcons30way?: number | undefined, phyloP100way?: number | undefined, phyloP30way?: number | undefined, polyphen2HdivPrediction: Array, polyphen2HdivScore: Array, polyphen2HvarPrediction: Array, polyphen2HvarScore: Array, proveanPrediction: Array, proveanScore: Array, revelScore?: Array | undefined, siftPrediction: Array, siftScore: Array, siphy?: number | undefined, snpeffSnpEffect: Array, snpeffSnpImpact: Array } | undefined, lastSubmittedRevisionEvent?: { __typename: 'Event', originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, lastAcceptedRevisionEvent?: { __typename: 'Event', originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, creationActivity?: { __typename: 'CreateVariantActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, deprecationActivity?: { __typename: 'DeprecateVariantActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined } | undefined }; -export type VariantSummaryFieldsFragment = { __typename: 'Variant', id: number, name: string, variantAliases: Array, alleleRegistryId?: string | undefined, openCravatUrl?: string | undefined, maneSelectTranscript?: string | undefined, hgvsDescriptions: Array, clinvarIds: Array, referenceBuild?: ReferenceBuild | undefined, ensemblVersion?: number | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, gene: { __typename: 'Gene', id: number, name: string, link: string }, variantTypes: Array<{ __typename: 'VariantType', id: number, link: string, soid: string, name: string }>, primaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, myVariantInfo?: { __typename: 'MyVariantInfo', myVariantInfoId: string, caddConsequence: Array, caddDetail: Array, caddScore?: number | undefined, caddPhred?: number | undefined, clinvarClinicalSignificance: Array, clinvarHgvsCoding: Array, clinvarHgvsGenomic: Array, clinvarHgvsNonCoding: Array, clinvarHgvsProtein: Array, clinvarId?: number | undefined, clinvarOmim?: string | undefined, cosmicId?: string | undefined, dbnsfpInterproDomain: Array, dbsnpRsid?: string | undefined, eglClass?: string | undefined, eglHgvs: Array, eglProtein?: string | undefined, eglTranscript?: string | undefined, exacAlleleCount?: number | undefined, exacAlleleFrequency?: number | undefined, exacAlleleNumber?: number | undefined, fathmmMklPrediction?: string | undefined, fathmmMklScore?: number | undefined, fathmmPrediction: Array, fathmmScore: Array, fitconsScore?: number | undefined, gerp?: number | undefined, gnomadExomeAlleleCount?: number | undefined, gnomadExomeAlleleFrequency?: number | undefined, gnomadExomeAlleleNumber?: number | undefined, gnomadExomeFilter?: string | undefined, gnomadGenomeAlleleCount?: number | undefined, gnomadGenomeAlleleFrequency?: number | undefined, gnomadGenomeAlleleNumber?: number | undefined, gnomadGenomeFilter?: string | undefined, lrtPrediction?: string | undefined, lrtScore?: number | undefined, metalrPrediction?: string | undefined, metalrScore?: number | undefined, metasvmPrediction?: string | undefined, metasvmScore?: number | undefined, mutationassessorPrediction: Array, mutationassessorScore: Array, mutationtasterPrediction: Array, mutationtasterScore: Array, phastcons100way?: number | undefined, phastcons30way?: number | undefined, phyloP100way?: number | undefined, phyloP30way?: number | undefined, polyphen2HdivPrediction: Array, polyphen2HdivScore: Array, polyphen2HvarPrediction: Array, polyphen2HvarScore: Array, proveanPrediction: Array, proveanScore: Array, revelScore?: Array | undefined, siftPrediction: Array, siftScore: Array, siphy?: number | undefined, snpeffSnpEffect: Array, snpeffSnpImpact: Array } | undefined, lastSubmittedRevisionEvent?: { __typename: 'Event', originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, lastAcceptedRevisionEvent?: { __typename: 'Event', originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined }; +export type VariantSummaryFieldsFragment = { __typename: 'Variant', id: number, name: string, variantAliases: Array, alleleRegistryId?: string | undefined, openCravatUrl?: string | undefined, maneSelectTranscript?: string | undefined, hgvsDescriptions: Array, clinvarIds: Array, referenceBuild?: ReferenceBuild | undefined, ensemblVersion?: number | undefined, referenceBases?: string | undefined, variantBases?: string | undefined, gene: { __typename: 'Gene', id: number, name: string, link: string }, variantTypes: Array<{ __typename: 'VariantType', id: number, link: string, soid: string, name: string }>, primaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, secondaryCoordinates?: { __typename: 'Coordinate', representativeTranscript?: string | undefined, chromosome?: string | undefined, start?: number | undefined, stop?: number | undefined } | undefined, flags: { __typename: 'FlagConnection', totalCount: number }, revisions: { __typename: 'RevisionConnection', totalCount: number }, comments: { __typename: 'CommentConnection', totalCount: number }, myVariantInfo?: { __typename: 'MyVariantInfo', myVariantInfoId: string, caddConsequence: Array, caddDetail: Array, caddScore?: number | undefined, caddPhred?: number | undefined, clinvarClinicalSignificance: Array, clinvarHgvsCoding: Array, clinvarHgvsGenomic: Array, clinvarHgvsNonCoding: Array, clinvarHgvsProtein: Array, clinvarId?: number | undefined, clinvarOmim?: string | undefined, cosmicId?: string | undefined, dbnsfpInterproDomain: Array, dbsnpRsid?: string | undefined, eglClass?: string | undefined, eglHgvs: Array, eglProtein?: string | undefined, eglTranscript?: string | undefined, exacAlleleCount?: number | undefined, exacAlleleFrequency?: number | undefined, exacAlleleNumber?: number | undefined, fathmmMklPrediction?: string | undefined, fathmmMklScore?: number | undefined, fathmmPrediction: Array, fathmmScore: Array, fitconsScore?: number | undefined, gerp?: number | undefined, gnomadExomeAlleleCount?: number | undefined, gnomadExomeAlleleFrequency?: number | undefined, gnomadExomeAlleleNumber?: number | undefined, gnomadExomeFilter?: string | undefined, gnomadGenomeAlleleCount?: number | undefined, gnomadGenomeAlleleFrequency?: number | undefined, gnomadGenomeAlleleNumber?: number | undefined, gnomadGenomeFilter?: string | undefined, lrtPrediction?: string | undefined, lrtScore?: number | undefined, metalrPrediction?: string | undefined, metalrScore?: number | undefined, metasvmPrediction?: string | undefined, metasvmScore?: number | undefined, mutationassessorPrediction: Array, mutationassessorScore: Array, mutationtasterPrediction: Array, mutationtasterScore: Array, phastcons100way?: number | undefined, phastcons30way?: number | undefined, phyloP100way?: number | undefined, phyloP30way?: number | undefined, polyphen2HdivPrediction: Array, polyphen2HdivScore: Array, polyphen2HvarPrediction: Array, polyphen2HvarScore: Array, proveanPrediction: Array, proveanScore: Array, revelScore?: Array | undefined, siftPrediction: Array, siftScore: Array, siphy?: number | undefined, snpeffSnpEffect: Array, snpeffSnpImpact: Array } | undefined, lastSubmittedRevisionEvent?: { __typename: 'Event', originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, lastAcceptedRevisionEvent?: { __typename: 'Event', originatingUser: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, creationActivity?: { __typename: 'CreateVariantActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined, deprecationActivity?: { __typename: 'DeprecateVariantActivity', createdAt: any, user: { __typename: 'User', id: number, displayName: string, role: UserRole, profileImagePath?: string | undefined } } | undefined }; export type MyVariantInfoFieldsFragment = { __typename: 'MyVariantInfo', myVariantInfoId: string, caddConsequence: Array, caddDetail: Array, caddScore?: number | undefined, caddPhred?: number | undefined, clinvarClinicalSignificance: Array, clinvarHgvsCoding: Array, clinvarHgvsGenomic: Array, clinvarHgvsNonCoding: Array, clinvarHgvsProtein: Array, clinvarId?: number | undefined, clinvarOmim?: string | undefined, cosmicId?: string | undefined, dbnsfpInterproDomain: Array, dbsnpRsid?: string | undefined, eglClass?: string | undefined, eglHgvs: Array, eglProtein?: string | undefined, eglTranscript?: string | undefined, exacAlleleCount?: number | undefined, exacAlleleFrequency?: number | undefined, exacAlleleNumber?: number | undefined, fathmmMklPrediction?: string | undefined, fathmmMklScore?: number | undefined, fathmmPrediction: Array, fathmmScore: Array, fitconsScore?: number | undefined, gerp?: number | undefined, gnomadExomeAlleleCount?: number | undefined, gnomadExomeAlleleFrequency?: number | undefined, gnomadExomeAlleleNumber?: number | undefined, gnomadExomeFilter?: string | undefined, gnomadGenomeAlleleCount?: number | undefined, gnomadGenomeAlleleFrequency?: number | undefined, gnomadGenomeAlleleNumber?: number | undefined, gnomadGenomeFilter?: string | undefined, lrtPrediction?: string | undefined, lrtScore?: number | undefined, metalrPrediction?: string | undefined, metalrScore?: number | undefined, metasvmPrediction?: string | undefined, metasvmScore?: number | undefined, mutationassessorPrediction: Array, mutationassessorScore: Array, mutationtasterPrediction: Array, mutationtasterScore: Array, phastcons100way?: number | undefined, phastcons30way?: number | undefined, phyloP100way?: number | undefined, phyloP30way?: number | undefined, polyphen2HdivPrediction: Array, polyphen2HdivScore: Array, polyphen2HvarPrediction: Array, polyphen2HvarScore: Array, proveanPrediction: Array, proveanScore: Array, revelScore?: Array | undefined, siftPrediction: Array, siftScore: Array, siphy?: number | undefined, snpeffSnpEffect: Array, snpeffSnpImpact: Array }; +export const ActivityCardFragmentDoc = gql` + fragment ActivityCard on ActivityInterface { + id + verbiage +} + `; +export const ActivityFeedNodeFragmentDoc = gql` + fragment activityFeedNode on ActivityInterface { + id + verbiage + createdAt + organization { + id + name + profileImagePath(size: 32) + } + user { + id + username + displayName + role + profileImagePath(size: 32) + } + subject { + name + id + link + ... on Source { + citation + sourceType + } + ... on EvidenceItem { + status + } + ... on Assertion { + status + } + ... on Revision { + revisionSetId + } + ... on Variant { + deprecated + } + ... on MolecularProfile { + deprecated + } + __typename + } + ... on FlagEntityActivity { + flag { + id + name + link + } + } +} + `; +export const ActivityFeedFragmentDoc = gql` + fragment activityFeed on ActivityInterfaceConnection { + pageInfo { + startCursor + endCursor + hasNextPage + hasPreviousPage + } + edges { + cursor + node { + ...activityFeedNode + } + } +} + ${ActivityFeedNodeFragmentDoc}`; export const MolecularProfileParsedNameFragmentDoc = gql` fragment MolecularProfileParsedName on MolecularProfileSegment { __typename @@ -7246,6 +7823,53 @@ export const BrowseClinicalTrialsRowFieldsFragmentDoc = gql` link } `; +export const ParsedCommentFragmentFragmentDoc = gql` + fragment parsedCommentFragment on CommentBodySegment { + __typename + ... on CommentTagSegment { + entityId + displayName + tagType + status + deprecated + link + revisionSetId + __typename + } + ... on CommentTextSegment { + text + } + ... on User { + id + displayName + role + } +} + `; +export const CommentListNodeFragmentDoc = gql` + fragment commentListNode on Comment { + id + title + comment + createdAt + commenter { + id + username + displayName + name + role + profileImagePath(size: 32) + organizations { + id + name + profileImagePath(size: 32) + } + } + parsedComment { + ...parsedCommentFragment + } +} + ${ParsedCommentFragmentFragmentDoc}`; export const CommentPopoverFragmentDoc = gql` fragment commentPopover on Comment { id @@ -7463,69 +8087,39 @@ export const FlagFragmentDoc = gql` fragment flag on Flag { id state - createdAt - resolvedAt flaggable { id name link } - flaggingUser { + openActivity { id - displayName - role - profileImagePath(size: 32) + createdAt + parsedNote { + ...parsedCommentFragment + } + user { + id + displayName + role + profileImagePath(size: 32) + } } - resolvingUser { + resolutionActivity { id - displayName - role - profileImagePath(size: 32) - } - openComment { - __typename - parsedComment { - __typename - ... on CommentTagSegment { - entityId - displayName - tagType - link - __typename - } - ... on CommentTextSegment { - text - } - ... on User { - id - displayName - role - } + createdAt + parsedNote { + ...parsedCommentFragment } - } - resolutionComment { - __typename - parsedComment { - __typename - ... on CommentTagSegment { - entityId - displayName - tagType - link - __typename - } - ... on CommentTextSegment { - text - } - ... on User { - id - displayName - role - } + user { + id + displayName + role + profileImagePath(size: 32) } } } - `; + ${ParsedCommentFragmentFragmentDoc}`; export const FlagListFragmentDoc = gql` fragment flagList on FlagConnection { pageInfo { @@ -7569,11 +8163,13 @@ export const FlagPopoverFragmentDoc = gql` name } createdAt - openComment { - comment + openActivity { + parsedNote { + ...parsedCommentFragment + } } } - `; + ${ParsedCommentFragmentFragmentDoc}`; export const GenePopoverFragmentDoc = gql` fragment genePopover on Gene { id @@ -7765,10 +8361,15 @@ export const RevisionPopoverFragmentDoc = gql` name link status - revisor { - id - displayName - role + creationActivity { + user { + id + displayName + role + } + parsedNote { + ...parsedCommentFragment + } } subject { id @@ -7779,17 +8380,13 @@ export const RevisionPopoverFragmentDoc = gql` linkoutData { name } - creationComment { - comment - } } - `; + ${ParsedCommentFragmentFragmentDoc}`; export const RevisionFragmentDoc = gql` fragment revision on Revision { id revisionSetId createdAt - resolvedAt fieldName currentValue suggestedValue @@ -7844,59 +8441,31 @@ export const RevisionFragmentDoc = gql` } } } - revisor { - id - displayName - role - } - resolver { - id - displayName - role - } - creationComment { - parsedComment { - __typename - ... on CommentTagSegment { - entityId - displayName - tagType - link - __typename - } - ... on CommentTextSegment { - text - } - ... on User { - id - displayName - role - } + creationActivity { + createdAt + user { + id + displayName + role + } + parsedNote { + ...parsedCommentFragment } } - resolutionComment { - parsedComment { - __typename - ... on CommentTagSegment { - entityId - displayName - tagType - link - __typename - } - ... on CommentTextSegment { - text - } - ... on User { - id - displayName - role - } + resolutionActivity { + createdAt + user { + id + displayName + role + } + parsedNote { + ...parsedCommentFragment } } status } - `; + ${ParsedCommentFragmentFragmentDoc}`; export const ContributorFieldsFragmentDoc = gql` fragment ContributorFields on ContributingUser { user { @@ -7953,12 +8522,21 @@ export const BrowseSourceSuggestionRowFieldsFragmentDoc = gql` role profileImagePath(size: 32) } - initialComment + creationActivity { + parsedNote { + ...parsedCommentFragment + } + } + lastStatusUpdateActivity { + parsedNote { + ...parsedCommentFragment + } + } status reason createdAt } - `; + ${ParsedCommentFragmentFragmentDoc}`; export const SourcePopoverFragmentDoc = gql` fragment sourcePopover on SourcePopover { id @@ -8655,7 +9233,7 @@ export const VariantSelectTypeaheadFieldsFragmentDoc = gql` } `; export const QuickAddVariantFieldsFragmentDoc = gql` - fragment QuickAddVariantFields on AddVariantPayload { + fragment QuickAddVariantFields on CreateVariantPayload { clientMutationId new variant { @@ -8671,6 +9249,21 @@ export const VariantTypeSelectTypeaheadFieldsFragmentDoc = gql` soid } `; +export const AssertionSubmissionActivityFragmentDoc = gql` + fragment assertionSubmissionActivity on Assertion { + submissionActivity { + createdAt + parsedNote { + ...parsedCommentFragment + } + user { + id + displayName + profileImagePath(size: 32) + } + } +} + ${ParsedCommentFragmentFragmentDoc}`; export const AssertionDetailFieldsFragmentDoc = gql` fragment AssertionDetailFields on Assertion { id @@ -8695,8 +9288,9 @@ export const AssertionDetailFieldsFragmentDoc = gql` comments { totalCount } + ...assertionSubmissionActivity } - `; + ${AssertionSubmissionActivityFragmentDoc}`; export const AssertionSummaryFieldsFragmentDoc = gql` fragment AssertionSummaryFields on Assertion { id @@ -8770,6 +9364,7 @@ export const AssertionSummaryFieldsFragmentDoc = gql` profileImagePath(size: 32) } } + ...assertionSubmissionActivity submissionEvent { createdAt originatingUser { @@ -8789,7 +9384,8 @@ export const AssertionSummaryFieldsFragmentDoc = gql` } } } - ${MolecularProfileParsedNameFragmentDoc}`; + ${MolecularProfileParsedNameFragmentDoc} +${AssertionSubmissionActivityFragmentDoc}`; export const MyDiseaseInfoFieldsFragmentDoc = gql` fragment MyDiseaseInfoFields on MyDiseaseInfo { diseaseOntologyExactSynonyms @@ -8818,6 +9414,21 @@ export const DiseasesSummaryFieldsFragmentDoc = gql` } } ${MyDiseaseInfoFieldsFragmentDoc}`; +export const EvidenceSubmissionActivityFragmentDoc = gql` + fragment evidenceSubmissionActivity on EvidenceItem { + submissionActivity { + createdAt + parsedNote { + ...parsedCommentFragment + } + user { + id + displayName + profileImagePath(size: 32) + } + } +} + ${ParsedCommentFragmentFragmentDoc}`; export const EvidenceDetailFieldsFragmentDoc = gql` fragment EvidenceDetailFields on EvidenceItem { id @@ -8847,8 +9458,9 @@ export const EvidenceDetailFieldsFragmentDoc = gql` comments { totalCount } + ...evidenceSubmissionActivity } - `; + ${EvidenceSubmissionActivityFragmentDoc}`; export const EvidenceSummaryFieldsFragmentDoc = gql` fragment EvidenceSummaryFields on EvidenceItem { id @@ -8909,6 +9521,18 @@ export const EvidenceSummaryFieldsFragmentDoc = gql` comments { totalCount } + submissionActivity { + createdAt + parsedNote { + ...parsedCommentFragment + } + user { + displayName + profileImagePath(size: 32) + id + role + } + } acceptanceEvent { createdAt originatingUser { @@ -8937,7 +9561,8 @@ export const EvidenceSummaryFieldsFragmentDoc = gql` } } } - ${MolecularProfileParsedNameFragmentDoc}`; + ${MolecularProfileParsedNameFragmentDoc} +${ParsedCommentFragmentFragmentDoc}`; export const GeneDetailFieldsFragmentDoc = gql` fragment GeneDetailFields on Gene { id @@ -8998,57 +9623,23 @@ export const GeneSummaryFieldsFragmentDoc = gql` } } `; -export const CommentListNodeFragmentDoc = gql` - fragment commentListNode on Comment { - id - title - comment - createdAt - commenter { - id - username - displayName - name - role - profileImagePath(size: 32) - organizations { - id - name - profileImagePath(size: 32) - } - } - parsedComment { - __typename - ... on CommentTagSegment { - entityId - displayName - tagType - status - deprecated - link - revisionSetId - __typename - } - ... on CommentTextSegment { - text - } - ... on User { - id - displayName - role - } - } -} - `; export const MolecularProfileDetailFieldsFragmentDoc = gql` fragment MolecularProfileDetailFields on MolecularProfile { id name deprecated + deprecationReason + complexMolecularProfileDeprecationActivity { + parsedNote { + ...parsedCommentFragment + } + } deprecatedVariants { deprecationReason - deprecationComment { - ...commentListNode + deprecationActivity { + parsedNote { + ...parsedCommentFragment + } } id deprecated @@ -9065,8 +9656,11 @@ export const MolecularProfileDetailFieldsFragmentDoc = gql` comments { totalCount } + variants { + id + } } - ${CommentListNodeFragmentDoc}`; + ${ParsedCommentFragmentFragmentDoc}`; export const VariantMolecularProfileCardFieldsFragmentDoc = gql` fragment VariantMolecularProfileCardFields on Variant { id @@ -9134,6 +9728,33 @@ export const MolecularProfileSummaryFieldsFragmentDoc = gql` parsedName { ...MolecularProfileParsedName } + complexMolecularProfileCreationActivity { + createdAt + user { + id + displayName + role + profileImagePath(size: 32) + } + } + variantDeprecationActivity { + createdAt + user { + id + displayName + role + profileImagePath(size: 32) + } + } + complexMolecularProfileDeprecationActivity { + createdAt + user { + id + displayName + role + profileImagePath(size: 32) + } + } } ${VariantMolecularProfileCardFieldsFragmentDoc} ${MolecularProfileParsedNameFragmentDoc}`; @@ -9498,8 +10119,10 @@ export const VariantDetailFieldsFragmentDoc = gql` name deprecated deprecationReason - deprecationComment { - ...commentListNode + deprecationActivity { + parsedNote { + ...parsedCommentFragment + } } gene { id @@ -9517,7 +10140,7 @@ export const VariantDetailFieldsFragmentDoc = gql` totalCount } } - ${CommentListNodeFragmentDoc}`; + ${ParsedCommentFragmentFragmentDoc}`; export const MyVariantInfoFieldsFragmentDoc = gql` fragment MyVariantInfoFields on MyVariantInfo { myVariantInfoId @@ -9649,8 +10272,68 @@ export const VariantSummaryFieldsFragmentDoc = gql` profileImagePath(size: 32) } } + creationActivity { + user { + id + displayName + role + profileImagePath(size: 32) + } + createdAt + } + deprecationActivity { + user { + id + displayName + role + profileImagePath(size: 32) + } + createdAt + } } ${MyVariantInfoFieldsFragmentDoc}`; +export const ActivityCardDocument = gql` + query ActivityCard($activityId: Int!) { + activity(id: $activityId) { + ...ActivityCard + } +} + ${ActivityCardFragmentDoc}`; + + @Injectable({ + providedIn: 'root' + }) + export class ActivityCardGQL extends Apollo.Query { + document = ActivityCardDocument; + + constructor(apollo: Apollo.Apollo) { + super(apollo); + } + } +export const ActivityFeedDocument = gql` + query ActivityFeed($first: Int, $last: Int, $before: String, $after: String, $userId: Int) { + activities( + first: $first + last: $last + before: $before + after: $after + userId: $userId + ) { + ...activityFeed + } +} + ${ActivityFeedFragmentDoc}`; + + @Injectable({ + providedIn: 'root' + }) + export class ActivityFeedGQL extends Apollo.Query { + document = ActivityFeedDocument; + + constructor(apollo: Apollo.Apollo) { + super(apollo); + } + } export const AssertionPopoverDocument = gql` query AssertionPopover($assertionId: Int!) { assertion(id: $assertionId) { @@ -11645,6 +12328,53 @@ export const EntityTypeaheadDocument = gql` export class EntityTypeaheadGQL extends Apollo.Query { document = EntityTypeaheadDocument; + constructor(apollo: Apollo.Apollo) { + super(apollo); + } + } +export const DeprecateComplexMolecularProfileDocument = gql` + mutation DeprecateComplexMolecularProfile($molecularProfileId: Int!, $deprecationReason: MolecularProfileDeprecationReasonMutationInput!, $comment: String!, $organizationId: Int) { + deprecateComplexMolecularProfile( + input: {molecularProfileId: $molecularProfileId, deprecationReason: $deprecationReason, comment: $comment, organizationId: $organizationId} + ) { + molecularProfile { + id + name + } + } +} + `; + + @Injectable({ + providedIn: 'root' + }) + export class DeprecateComplexMolecularProfileGQL extends Apollo.Mutation { + document = DeprecateComplexMolecularProfileDocument; + + constructor(apollo: Apollo.Apollo) { + super(apollo); + } + } +export const EvidenceCountsForMolecularProfileDocument = gql` + query EvidenceCountsForMolecularProfile($molecularProfileId: Int!) { + molecularProfile(id: $molecularProfileId) { + id + name + link + evidenceCountsByStatus { + submittedCount + acceptedCount + } + } +} + `; + + @Injectable({ + providedIn: 'root' + }) + export class EvidenceCountsForMolecularProfileGQL extends Apollo.Query { + document = EvidenceCountsForMolecularProfileDocument; + constructor(apollo: Apollo.Apollo) { super(apollo); } @@ -11833,7 +12563,7 @@ export const CountriesDocument = gql` } } export const DeprecateVariantDocument = gql` - mutation DeprecateVariant($variantId: Int!, $deprecationReason: DeprecationReason!, $comment: String!, $organizationId: Int) { + mutation DeprecateVariant($variantId: Int!, $deprecationReason: VariantDeprecationReason!, $comment: String!, $organizationId: Int) { deprecateVariant( input: {variantId: $variantId, deprecationReason: $deprecationReason, comment: $comment, organizationId: $organizationId} ) { @@ -12754,8 +13484,10 @@ export const MpExpressionEditorPrepopulateDocument = gql` } } export const CreateMolecularProfile2Document = gql` - mutation CreateMolecularProfile2($mpStructure: MolecularProfileComponentInput!) { - createMolecularProfile(input: {structure: $mpStructure}) { + mutation CreateMolecularProfile2($mpStructure: MolecularProfileComponentInput!, $organizationId: Int) { + createMolecularProfile( + input: {structure: $mpStructure, organizationId: $organizationId} + ) { molecularProfile { id name @@ -13021,8 +13753,10 @@ export const VariantManagerDocument = gql` } } export const QuickAddVariantDocument = gql` - mutation QuickAddVariant($name: String!, $geneId: Int!) { - addVariant(input: {name: $name, geneId: $geneId}) { + mutation QuickAddVariant($name: String!, $geneId: Int!, $organizationId: Int) { + createVariant( + input: {name: $name, geneId: $geneId, organizationId: $organizationId} + ) { ...QuickAddVariantFields } } @@ -13686,87 +14420,6 @@ export const VariantGroupDetailDocument = gql` export class VariantGroupDetailGQL extends Apollo.Query { document = VariantGroupDetailDocument; - constructor(apollo: Apollo.Apollo) { - super(apollo); - } - } -export const VariantGroupRevisionsDocument = gql` - query VariantGroupRevisions($variantGroupId: Int!, $first: Int, $last: Int, $before: String, $after: String, $fieldName: String, $originatingUserId: Int) { - variantGroup(id: $variantGroupId) { - id - revisions( - first: $first - last: $last - before: $before - after: $after - fieldName: $fieldName - originatingUserId: $originatingUserId - ) { - totalCount - uniqueRevisors { - username - id - profileImagePath(size: 32) - } - revisedFieldNames { - name - displayName - } - edges { - node { - id - revisionSetId - createdAt - fieldName - currentValue - suggestedValue - linkoutData { - name - diffValue { - ... on ObjectFieldDiff { - addedObjects { - id - displayName - displayType - entityType - } - removedObjects { - id - displayName - displayType - entityType - } - keptObjects { - id - displayName - displayType - entityType - } - } - ... on ScalarFieldDiff { - left - right - } - } - } - revisor { - id - name - } - status - } - } - } - } -} - `; - - @Injectable({ - providedIn: 'root' - }) - export class VariantGroupRevisionsGQL extends Apollo.Query { - document = VariantGroupRevisionsDocument; - constructor(apollo: Apollo.Apollo) { super(apollo); } diff --git a/client/src/app/generated/civic.possible-types.ts b/client/src/app/generated/civic.possible-types.ts index 3b3d7069d..fa5093bb1 100644 --- a/client/src/app/generated/civic.possible-types.ts +++ b/client/src/app/generated/civic.possible-types.ts @@ -6,6 +6,24 @@ } const result: PossibleTypesResultData = { "possibleTypes": { + "ActivityInterface": [ + "AcceptRevisionsActivity", + "CommentActivity", + "CreateComplexMolecularProfileActivity", + "CreateVariantActivity", + "DeprecateComplexMolecularProfileActivity", + "DeprecateVariantActivity", + "FlagEntityActivity", + "ModerateAssertionActivity", + "ModerateEvidenceItemActivity", + "RejectRevisionsActivity", + "ResolveFlagActivity", + "SubmitAssertionActivity", + "SubmitEvidenceItemActivity", + "SuggestRevisionSetActivity", + "SuggestSourceActivity", + "UpdateSourceSuggestionStatusActivity" + ], "CommentBodySegment": [ "CommentTagSegment", "CommentTextSegment", @@ -36,9 +54,11 @@ "EventSubject": [ "Assertion", "EvidenceItem", + "Flag", "Gene", "MolecularProfile", "Revision", + "RevisionSet", "Source", "SourcePopover", "SourceSuggestion", diff --git a/client/src/app/generated/server.model.graphql b/client/src/app/generated/server.model.graphql index 880e92287..5d3661992 100644 --- a/client/src/app/generated/server.model.graphql +++ b/client/src/app/generated/server.model.graphql @@ -1,3 +1,17 @@ +type AcceptRevisionsActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + revisions: [Revision!]! + subject: EventSubject! + supersededRevisions: [Revision!]! + user: User! + verbiage: String! +} + """ Autogenerated input type of AcceptRevisions """ @@ -59,6 +73,66 @@ type AcmgCode { tooltip: String! } +""" +An activity done by a curator or editor +""" +interface ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + subject: EventSubject! + user: User! + verbiage: String! +} + +""" +The connection type for ActivityInterface. +""" +type ActivityInterfaceConnection { + """ + A list of edges. + """ + edges: [ActivityInterfaceEdge!]! + + """ + A list of nodes. + """ + nodes: [ActivityInterface!]! + + """ + Total number of pages, based on filtered count and pagesize. + """ + pageCount: Int! + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + + """ + The total number of records in this filtered collection. + """ + totalCount: Int! +} + +""" +An edge in a connection. +""" +type ActivityInterfaceEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: ActivityInterface +} + """ Autogenerated input type of AddComment """ @@ -222,51 +296,6 @@ type AddTherapyPayload { therapy: Therapy! } -""" -Autogenerated input type of AddVariant -""" -input AddVariantInput { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The CIViC ID of the Gene to which the new variant belongs. - """ - geneId: Int! - - """ - The name of the variant to add. - """ - name: String! -} - -""" -Autogenerated return type of AddVariant -""" -type AddVariantPayload { - """ - A unique identifier for the client performing the mutation. - """ - clientMutationId: String - - """ - The newly created molecular profile for the new variant. - """ - molecularProfile: MolecularProfile! - - """ - True if the variant was newly created. False if the returned variant was already in the database. - """ - new: Boolean! - - """ - The newly created Variant. - """ - variant: Variant! -} - type AdvancedSearchResult { permalinkId: String resultIds: [Int!]! @@ -496,6 +525,7 @@ type Assertion implements Commentable & EventOriginObject & EventSubject & Flagg ): RevisionConnection! significance: AssertionSignificance! status: EvidenceStatus! + submissionActivity: SubmitAssertionActivity! submissionEvent: Event! summary: String! therapies: [Therapy!]! @@ -1530,6 +1560,19 @@ type Comment implements EventOriginObject { title: String } +type CommentActivity implements ActivityInterface { + comment: Comment! + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + subject: EventSubject! + user: User! + verbiage: String! +} + """ Segment of a comment that can either be text or an object to be rendered as a tag """ @@ -1744,6 +1787,18 @@ type Country { name: String! } +type CreateComplexMolecularProfileActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + subject: EventSubject! + user: User! + verbiage: String! +} + """ Autogenerated input type of CreateMolecularProfile """ @@ -1753,6 +1808,14 @@ input CreateMolecularProfileInput { """ clientMutationId: String + """ + The ID of the organization to credit the user's contributions to. + If the user belongs to a single organization or no organizations, this field is not required. + This field is required if the user belongs to more than one organization. + The user must belong to the organization provided. + """ + organizationId: Int + """ Representation of the constituent parts of the Molecular Profile along with the logic used to combine them. """ @@ -1774,6 +1837,72 @@ type CreateMolecularProfilePayload { molecularProfile: MolecularProfile! } +type CreateVariantActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + molecularProfile: MolecularProfile! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + subject: EventSubject! + user: User! + verbiage: String! +} + +""" +Autogenerated input type of CreateVariant +""" +input CreateVariantInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The CIViC ID of the Gene to which the new variant belongs. + """ + geneId: Int! + + """ + The name of the variant to create. + """ + name: String! + + """ + The ID of the organization to credit the user's contributions to. + If the user belongs to a single organization or no organizations, this field is not required. + This field is required if the user belongs to more than one organization. + The user must belong to the organization provided. + """ + organizationId: Int +} + +""" +Autogenerated return type of CreateVariant +""" +type CreateVariantPayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The newly created molecular profile for the new variant. + """ + molecularProfile: MolecularProfile! + + """ + True if the variant was newly created. False if the returned variant was already in the database. + """ + new: Boolean! + + """ + The newly created Variant. + """ + variant: Variant! +} + type DataRelease { acceptedAndSubmittedVariantsVcf: DownloadableFile acceptedVariantsVcf: DownloadableFile @@ -1803,6 +1932,79 @@ enum DateSortColumns { LAST_MODIFIED } +type DeprecateComplexMolecularProfileActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + subject: EventSubject! + user: User! + verbiage: String! +} + +""" +Autogenerated input type of DeprecateComplexMolecularProfile +""" +input DeprecateComplexMolecularProfileInput { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + Text giving more context for deprecating this complex molecular profile. + """ + comment: String! + + """ + The reason for deprecating this molecular profile. + """ + deprecationReason: MolecularProfileDeprecationReasonMutationInput! + + """ + The CIViC ID of the complex molecular profile to deprecate. + """ + molecularProfileId: Int! + + """ + The ID of the organization to credit the user's contributions to. + If the user belongs to a single organization or no organizations, this field is not required. + This field is required if the user belongs to more than one organization. + The user must belong to the organization provided. + """ + organizationId: Int +} + +""" +Autogenerated return type of DeprecateComplexMolecularProfile +""" +type DeprecateComplexMolecularProfilePayload { + """ + A unique identifier for the client performing the mutation. + """ + clientMutationId: String + + """ + The deprecated complex Molecular Profile. + """ + molecularProfile: MolecularProfile +} + +type DeprecateVariantActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + molecularProfiles: [MolecularProfile!]! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + subject: EventSubject! + user: User! + verbiage: String! +} + """ Autogenerated input type of DeprecateVariant """ @@ -1820,7 +2022,7 @@ input DeprecateVariantInput { """ The reason for deprecation this variant. """ - deprecationReason: DeprecationReason! + deprecationReason: VariantDeprecationReason! """ The ID of the organization to credit the user's contributions to. @@ -1857,12 +2059,6 @@ type DeprecateVariantPayload { variant: Variant } -enum DeprecationReason { - DUPLICATE - INVALID - OTHER -} - type Disease { diseaseAliases: [String!]! diseaseUrl: String @@ -2009,6 +2205,7 @@ enum EventAction { ASSERTION_REVERTED ASSERTION_SUBMITTED COMMENTED + COMPLEX_MOLECULAR_PROFILE_CREATED CURATED_SOURCE_SUGGESTION DEPRECATED_MOLECULAR_PROFILE DEPRECATED_VARIANT @@ -2024,6 +2221,7 @@ enum EventAction { REVISION_SUGGESTED REVISION_SUPERSEDED SUBMITTED + VARIANT_CREATED } """ @@ -2371,6 +2569,7 @@ type EvidenceItem implements Commentable & EventOriginObject & EventSubject & Fl significance: EvidenceSignificance! source: Source! status: EvidenceStatus! + submissionActivity: SubmitEvidenceItemActivity! submissionEvent: Event! therapies: [Therapy!]! therapyInteractionType: TherapyInteraction @@ -2500,6 +2699,16 @@ type EvidenceItemsByStatus { submittedCount: Int! } +type EvidenceItemsByType { + diagnosticCount: Int! + functionalCount: Int! + molecularProfileId: Int! + oncogenicCount: Int! + predictiveCount: Int! + predisposingCount: Int! + prognosticCount: Int! +} + enum EvidenceLevel { A B @@ -2604,7 +2813,7 @@ type FieldValidationError { fieldName: String! } -type Flag implements Commentable & EventOriginObject { +type Flag implements Commentable & EventOriginObject & EventSubject { """ List and filter comments. """ @@ -2655,15 +2864,47 @@ type Flag implements Commentable & EventOriginObject { sortBy: DateSort ): CommentConnection! createdAt: ISO8601DateTime! + + """ + List and filter events for an object + """ + events( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + eventType: EventAction + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + organizationId: Int + originatingUserId: Int + + """ + Sort order for the events. Defaults to most recent. + """ + sortBy: DateSort + ): EventConnection! flaggable: Flaggable! flaggingUser: User! id: Int! lastCommentEvent: Event link: String! name: String! - openComment: Comment! - resolutionComment: Comment - resolvedAt: ISO8601DateTime + openActivity: FlagEntityActivity! + resolutionActivity: ResolveFlagActivity resolvingUser: User state: FlagState! } @@ -2729,6 +2970,19 @@ type FlagEdge { node: Flag } +type FlagEntityActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + flag: Flag! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + subject: EventSubject! + user: User! + verbiage: String! +} + """ Autogenerated input type of FlagEntity """ @@ -3488,6 +3742,18 @@ type LinkoutData { suggestedValue: ModeratedField! } +type ModerateAssertionActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + subject: EventSubject! + user: User! + verbiage: String! +} + """ Autogenerated input type of ModerateAssertion """ @@ -3531,6 +3797,18 @@ type ModerateAssertionPayload { clientMutationId: String } +type ModerateEvidenceItemActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + subject: EventSubject! + user: User! + verbiage: String! +} + """ Autogenerated input type of ModerateEvidenceItem """ @@ -3695,9 +3973,11 @@ type MolecularProfile implements Commentable & EventOriginObject & EventSubject """ sortBy: DateSort ): CommentConnection! + complexMolecularProfileCreationActivity: CreateComplexMolecularProfileActivity + complexMolecularProfileDeprecationActivity: DeprecateComplexMolecularProfileActivity deprecated: Boolean! deprecatedVariants: [Variant!]! - deprecationEvent: Event + deprecationReason: MolecularProfileDeprecationReason description: String """ @@ -3733,6 +4013,7 @@ type MolecularProfile implements Commentable & EventOriginObject & EventSubject sortBy: DateSort ): EventConnection! evidenceCountsByStatus: EvidenceItemsByStatus! + evidenceCountsByType: EvidenceItemsByType! """ The collection of evidence items associated with this molecular profile. @@ -3806,6 +4087,7 @@ type MolecularProfile implements Commentable & EventOriginObject & EventSubject ): FlagConnection! id: Int! isComplex: Boolean! + isMultiVariant: Boolean! lastAcceptedRevisionEvent: Event lastCommentEvent: Event lastSubmittedRevisionEvent: Event @@ -3878,6 +4160,8 @@ type MolecularProfile implements Commentable & EventOriginObject & EventSubject status: RevisionStatus ): RevisionConnection! sources: [Source!]! + variantCreationActivity: CreateVariantActivity + variantDeprecationActivity: DeprecateVariantActivity """ The collection of variants included in this molecular profile. Please note the name for their relation to each other. @@ -3945,6 +4229,19 @@ type MolecularProfileConnection { totalCount: Int! } +enum MolecularProfileDeprecationReason { + DUPLICATE + INVALID + OTHER + VARIANT_DEPRECATED +} + +enum MolecularProfileDeprecationReasonMutationInput { + DUPLICATE + INVALID + OTHER +} + enum MolecularProfileDisplayFilter { """ Display all molecular profiles regardless of attached evidence status. @@ -4097,16 +4394,6 @@ type Mutation { input: AddTherapyInput! ): AddTherapyPayload - """ - Add a new Variant to the database. - """ - addVariant( - """ - Parameters for AddVariant - """ - input: AddVariantInput! - ): AddVariantPayload - """ Create a new Molecular Profile in order to attach Evidence Items to it. """ @@ -4117,6 +4404,26 @@ type Mutation { input: CreateMolecularProfileInput! ): CreateMolecularProfilePayload + """ + Create a new Variant to the database. + """ + createVariant( + """ + Parameters for CreateVariant + """ + input: CreateVariantInput! + ): CreateVariantPayload + + """ + Deprecate a complex molecular profile to prevent it from being used in the future. + """ + deprecateComplexMolecularProfile( + """ + Parameters for DeprecateComplexMolecularProfile + """ + input: DeprecateComplexMolecularProfileInput! + ): DeprecateComplexMolecularProfilePayload + """ Deprecate a variant to prevent it from being used in the future and implicitly deprecate all the molecular profiles linked to this variant. @@ -5000,6 +5307,37 @@ type Query { """ acmgCodesTypeahead(queryTerm: String!): [AcmgCode!]! + """ + List and filter activities + """ + activities( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + userId: Int + ): ActivityInterfaceConnection! + + """ + Find a CIViC activity record by CIViC ID + """ + activity(id: Int!): ActivityInterface + """ Find an assertion by CIViC ID """ @@ -6377,6 +6715,19 @@ enum ReferenceBuild { NCBI36 } +type RejectRevisionsActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + revisions: [Revision!]! + subject: EventSubject! + user: User! + verbiage: String! +} + """ Autogenerated input type of RejectRevisions """ @@ -6425,6 +6776,19 @@ type RejectRevisionsPayload { revisions: [Revision!]! } +type ResolveFlagActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + flag: Flag! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + subject: EventSubject! + user: User! + verbiage: String! +} + """ Autogenerated input type of ResolveFlag """ @@ -6465,6 +6829,8 @@ type ResolveFlagPayload { } type Revision implements Commentable & EventOriginObject & EventSubject { + acceptanceActivity: AcceptRevisionsActivity + """ List and filter comments. """ @@ -6515,8 +6881,7 @@ type Revision implements Commentable & EventOriginObject & EventSubject { sortBy: DateSort ): CommentConnection! createdAt: ISO8601DateTime! - creationComment: Comment - creationEvent: Event + creationActivity: SuggestRevisionSetActivity currentValue: JSON """ @@ -6557,15 +6922,13 @@ type Revision implements Commentable & EventOriginObject & EventSubject { link: String! linkoutData: LinkoutData! name: String! - resolutionComment: Comment - resolvedAt: ISO8601DateTime - resolver: User - resolvingEvent: Event + rejectionActivity: RejectRevisionsActivity + resolutionActivity: ActivityInterface revisionSetId: Int! - revisor: User status: RevisionStatus! subject: EventSubject! suggestedValue: JSON + supersedingActivity: AcceptRevisionsActivity updatedAt: ISO8601DateTime! } @@ -6657,6 +7020,49 @@ type RevisionResult { revisionSetId: Int! } +type RevisionSet implements EventSubject { + createdAt: ISO8601DateTime! + displayName: String! + + """ + List and filter events for an object + """ + events( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + eventType: EventAction + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + organizationId: Int + originatingUserId: Int + + """ + Sort order for the events. Defaults to most recent. + """ + sortBy: DateSort + ): EventConnection! + id: Int! + link: String! + name: String! + revisions: [Revision!]! + updatedAt: ISO8601DateTime! +} + enum RevisionStatus { ACCEPTED NEW @@ -6928,6 +7334,7 @@ type SourceStub { type SourceSuggestion implements EventOriginObject & EventSubject { createdAt: ISO8601DateTime! + creationActivity: SuggestSourceActivity! disease: Disease """ @@ -6964,6 +7371,7 @@ type SourceSuggestion implements EventOriginObject & EventSubject { ): EventConnection! id: Int! initialComment: String! + lastStatusUpdateActivity: UpdateSourceSuggestionStatusActivity link: String! molecularProfile: MolecularProfile name: String! @@ -7108,6 +7516,18 @@ enum StringSearchOperator { STARTS_WITH } +type SubmitAssertionActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + subject: EventSubject! + user: User! + verbiage: String! +} + """ Autogenerated input type of SubmitAssertion """ @@ -7151,6 +7571,18 @@ type SubmitAssertionPayload { clientMutationId: String } +type SubmitEvidenceItemActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + subject: EventSubject! + user: User! + verbiage: String! +} + """ Autogenerated input type of SubmitEvidenceItem """ @@ -7574,6 +8006,33 @@ type SuggestMolecularProfileRevisionPayload { results: [RevisionResult!]! } +type SuggestRevisionSetActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + revisionSet: RevisionSet! + revisions: [Revision!]! + subject: EventSubject! + user: User! + verbiage: String! +} + +type SuggestSourceActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + sourceSuggestion: SourceSuggestion! + subject: EventSubject! + user: User! + verbiage: String! +} + """ Autogenerated input type of SuggestSource """ @@ -7933,6 +8392,19 @@ type UpdateNotificationStatusPayload { notifications: [Notification!]! } +type UpdateSourceSuggestionStatusActivity implements ActivityInterface { + createdAt: ISO8601DateTime! + events: [Event!]! + id: Int! + note: String + organization: Organization + parsedNote: [CommentBodySegment!]! + sourceSuggestion: SourceSuggestion! + subject: EventSubject! + user: User! + verbiage: String! +} + """ Autogenerated input type of UpdateSourceSuggestionStatus """ @@ -8299,10 +8771,10 @@ type Variant implements Commentable & EventOriginObject & EventSubject & Flaggab """ sortBy: DateSort ): CommentConnection! + creationActivity: CreateVariantActivity deprecated: Boolean! - deprecationComment: Comment - deprecationEvent: Event - deprecationReason: DeprecationReason + deprecationActivity: DeprecateVariantActivity + deprecationReason: VariantDeprecationReason ensemblVersion: Int """ @@ -8525,6 +8997,12 @@ type VariantConnection { totalCount: Int! } +enum VariantDeprecationReason { + DUPLICATE + INVALID + OTHER +} + """ An edge in a connection. """ diff --git a/client/src/app/generated/server.schema.json b/client/src/app/generated/server.schema.json index 35ceeb728..649d76a90 100644 --- a/client/src/app/generated/server.schema.json +++ b/client/src/app/generated/server.schema.json @@ -10,104 +10,93 @@ "subscriptionType": null, "types": [ { - "kind": "INPUT_OBJECT", - "name": "AcceptRevisionsInput", - "description": "Autogenerated input type of AcceptRevisions", - "fields": null, - "inputFields": [ + "kind": "OBJECT", + "name": "AcceptRevisionsActivity", + "description": null, + "fields": [ { - "name": "organizationId", - "description": "The ID of the organization to credit the user's contributions to.\nIf the user belongs to a single organization or no organizations, this field is not required.\nThis field is required if the user belongs to more than one organization.\nThe user must belong to the organization provided.", + "name": "createdAt", + "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "ids", - "description": "A list of IDs of the Revisions to accept.", + "name": "events", + "description": null, + "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + } } } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "revisionSetId", - "description": "The ID of a revision set.", + "name": "id", + "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "comment", - "description": "Body of an optional comment to attach to the revision on acceptance.", + "name": "note", + "description": null, + "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "AcceptRevisionsPayload", - "description": "Autogenerated return type of AcceptRevisions", - "fields": [ - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", + "name": "organization", + "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "Organization", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "revisions", - "description": "A list of newly accepted Revisions.", + "name": "parsedNote", + "description": null, "args": [], "type": { "kind": "NON_NULL", @@ -119,8 +108,8 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Revision", + "kind": "UNION", + "name": "CommentBodySegment", "ofType": null } } @@ -130,8 +119,8 @@ "deprecationReason": null }, { - "name": "supersededRevisions", - "description": "A list of any revisions that were superseded by the acceptance of this one.", + "name": "revisions", + "description": null, "args": [], "type": { "kind": "NON_NULL", @@ -152,44 +141,17 @@ }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "AcmgCode", - "description": null, - "fields": [ - { - "name": "code", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null }, { - "name": "description", + "name": "subject", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "INTERFACE", + "name": "EventSubject", "ofType": null } }, @@ -197,31 +159,39 @@ "deprecationReason": null }, { - "name": "id", + "name": "supersededRevisions", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Revision", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "user", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "User", "ofType": null } }, @@ -229,7 +199,7 @@ "deprecationReason": null }, { - "name": "tooltip", + "name": "verbiage", "description": null, "args": [], "type": { @@ -246,14 +216,20 @@ } ], "inputFields": null, - "interfaces": [], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], "enumValues": null, "possibleTypes": null }, { "kind": "INPUT_OBJECT", - "name": "AddCommentInput", - "description": "Autogenerated input type of AddComment", + "name": "AcceptRevisionsInput", + "description": "Autogenerated input type of AcceptRevisions", "fields": null, "inputFields": [ { @@ -269,44 +245,44 @@ "deprecationReason": null }, { - "name": "title", - "description": "Optional title for the comment.", + "name": "ids", + "description": "A list of IDs of the Revisions to accept.", "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + } }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "body", - "description": "Text of the comment.", + "name": "revisionSetId", + "description": "The ID of a revision set.", "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "subject", - "description": "The commentable to attach the comment to. Specified by ID and Type.", + "name": "comment", + "description": "Body of an optional comment to attach to the revision on acceptance.", "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CommentableInput", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "defaultValue": null, "isDeprecated": false, @@ -331,8 +307,8 @@ }, { "kind": "OBJECT", - "name": "AddCommentPayload", - "description": "Autogenerated return type of AddComment", + "name": "AcceptRevisionsPayload", + "description": "Autogenerated return type of AcceptRevisions", "fields": [ { "name": "clientMutationId", @@ -347,101 +323,90 @@ "deprecationReason": null }, { - "name": "comment", - "description": "The newly created comment.", + "name": "revisions", + "description": "A list of newly accepted Revisions.", "args": [], - "type": { - "kind": "OBJECT", - "name": "Comment", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "AddDiseaseInput", - "description": "Autogenerated input type of AddDisease", - "fields": null, - "inputFields": [ - { - "name": "name", - "description": "The name of the disease.", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Revision", + "ofType": null + } + } } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "doid", - "description": "The DOID of the disease, if the disease is present in the Disease Ontology.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", + "name": "supersededRevisions", + "description": "A list of any revisions that were superseded by the acceptance of this one.", + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Revision", + "ofType": null + } + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "AddDiseasePayload", - "description": "Autogenerated return type of AddDisease", + "name": "AcmgCode", + "description": null, "fields": [ { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", + "name": "code", + "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "disease", - "description": "The newly created disease.", + "name": "description", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Disease", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -449,36 +414,25 @@ "deprecationReason": null }, { - "name": "new", - "description": "True if the disease was newly created. False if the returned disease was already in the database.", + "name": "id", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "Int", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "AddRemoteCitationInput", - "description": "Autogenerated input type of AddRemoteCitation", - "fields": null, - "inputFields": [ + }, { - "name": "citationId", - "description": "The external id for the source to add.", + "name": "name", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, @@ -488,160 +442,150 @@ "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "sourceType", - "description": "The origin of the external source.", + "name": "tooltip", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "SourceSource", + "kind": "SCALAR", + "name": "String", "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { - "kind": "OBJECT", - "name": "AddRemoteCitationPayload", - "description": "Autogenerated return type of AddRemoteCitation", + "kind": "INTERFACE", + "name": "ActivityInterface", + "description": "An activity done by a curator or editor", "fields": [ { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", + "name": "createdAt", + "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "newSource", - "description": "The stubbed in record for the newly created source.", + "name": "events", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "SourceStub", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "AddTherapyInput", - "description": "Autogenerated input type of AddTherapy", - "fields": null, - "inputFields": [ + }, { - "name": "name", - "description": "The name of the therapy.", + "name": "id", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "ncitId", - "description": "The NCIt ID of the therapy, if the therapy is present in the NCIthesaurus.", + "name": "note", + "description": null, + "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", + "name": "organization", + "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "Organization", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "AddTherapyPayload", - "description": "Autogenerated return type of AddTherapy", - "fields": [ + }, { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", + "name": "parsedNote", + "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "CommentBodySegment", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "new", - "description": "True if the therapy was newly created. False if the returned therapy was already in the database.", + "name": "subject", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Boolean", + "kind": "INTERFACE", + "name": "EventSubject", "ofType": null } }, @@ -649,36 +593,25 @@ "deprecationReason": null }, { - "name": "therapy", - "description": "The newly created therapy.", + "name": "user", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "OBJECT", - "name": "Therapy", + "name": "User", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "AddVariantInput", - "description": "Autogenerated input type of AddVariant", - "fields": null, - "inputFields": [ + }, { - "name": "name", - "description": "The name of the variant to add.", + "name": "verbiage", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, @@ -688,70 +621,159 @@ "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "AcceptRevisionsActivity", + "ofType": null }, { - "name": "geneId", - "description": "The CIViC ID of the Gene to which the new variant belongs.", + "kind": "OBJECT", + "name": "CommentActivity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CreateComplexMolecularProfileActivity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CreateVariantActivity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "DeprecateComplexMolecularProfileActivity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "DeprecateVariantActivity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "FlagEntityActivity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ModerateAssertionActivity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ModerateEvidenceItemActivity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "RejectRevisionsActivity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "ResolveFlagActivity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "SubmitAssertionActivity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "SubmitEvidenceItemActivity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "SuggestRevisionSetActivity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "SuggestSourceActivity", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "UpdateSourceSuggestionStatusActivity", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "ActivityInterfaceConnection", + "description": "The connection type for ActivityInterface.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ActivityInterfaceEdge", + "ofType": null + } + } } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "AddVariantPayload", - "description": "Autogenerated return type of AddVariant", - "fields": [ - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", + "name": "nodes", + "description": "A list of nodes.", "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "molecularProfile", - "description": "The newly created molecular profile for the new variant.", + "name": "pageCount", + "description": "Total number of pages, based on filtered count and pagesize.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "MolecularProfile", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, @@ -759,15 +781,15 @@ "deprecationReason": null }, { - "name": "new", - "description": "True if the variant was newly created. False if the returned variant was already in the database.", + "name": "pageInfo", + "description": "Information to aid in pagination.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Boolean", + "kind": "OBJECT", + "name": "PageInfo", "ofType": null } }, @@ -775,15 +797,15 @@ "deprecationReason": null }, { - "name": "variant", - "description": "The newly created Variant.", + "name": "totalCount", + "description": "The total number of records in this filtered collection.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Variant", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, @@ -798,57 +820,33 @@ }, { "kind": "OBJECT", - "name": "AdvancedSearchResult", - "description": null, + "name": "ActivityInterfaceEdge", + "description": "An edge in a connection.", "fields": [ { - "name": "permalinkId", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "resultIds", - "description": null, + "name": "cursor", + "description": "A cursor for use in pagination.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "searchEndpoint", - "description": null, + "name": "node", + "description": "The item at the end of the edge.", "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -860,210 +858,693 @@ "possibleTypes": null }, { - "kind": "ENUM", - "name": "AmpLevel", - "description": null, + "kind": "INPUT_OBJECT", + "name": "AddCommentInput", + "description": "Autogenerated input type of AddComment", "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ + "inputFields": [ { - "name": "TIER_I_LEVEL_A", - "description": null, + "name": "organizationId", + "description": "The ID of the organization to credit the user's contributions to.\nIf the user belongs to a single organization or no organizations, this field is not required.\nThis field is required if the user belongs to more than one organization.\nThe user must belong to the organization provided.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "TIER_I_LEVEL_B", - "description": null, + "name": "title", + "description": "Optional title for the comment.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "TIER_II_LEVEL_C", - "description": null, + "name": "body", + "description": "Text of the comment.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "TIER_II_LEVEL_D", - "description": null, + "name": "subject", + "description": "The commentable to attach the comment to. Specified by ID and Type.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CommentableInput", + "ofType": null + } + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "TIER_III", - "description": null, + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddCommentPayload", + "description": "Autogenerated return type of AddComment", + "fields": [ { - "name": "TIER_IV", - "description": null, + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "NA", - "description": null, + "name": "comment", + "description": "The newly created comment.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Comment", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null } ], + "inputFields": null, + "interfaces": [], + "enumValues": null, "possibleTypes": null }, { - "kind": "ENUM", - "name": "AreaOfExpertise", - "description": null, + "kind": "INPUT_OBJECT", + "name": "AddDiseaseInput", + "description": "Autogenerated input type of AddDisease", "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ + "inputFields": [ { - "name": "PATIENT_ADVOCATE", - "description": null, + "name": "name", + "description": "The name of the disease.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "CLINICAL_SCIENTIST", - "description": null, + "name": "doid", + "description": "The DOID of the disease, if the disease is present in the Disease Ontology.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "RESEARCH_SCIENTIST", - "description": null, + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], + "interfaces": null, + "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "Assertion", - "description": null, + "name": "AddDiseasePayload", + "description": "Autogenerated return type of AddDisease", "fields": [ { - "name": "acceptanceEvent", - "description": null, + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", "args": [], "type": { - "kind": "OBJECT", - "name": "Event", + "kind": "SCALAR", + "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "acmgCodes", - "description": null, + "name": "disease", + "description": "The newly created disease.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "AcmgCode", - "ofType": null - } - } + "kind": "OBJECT", + "name": "Disease", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "ampLevel", - "description": null, + "name": "new", + "description": "True if the disease was newly created. False if the returned disease was already in the database.", "args": [], "type": { - "kind": "ENUM", - "name": "AmpLevel", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AddRemoteCitationInput", + "description": "Autogenerated input type of AddRemoteCitation", + "fields": null, + "inputFields": [ { - "name": "assertionDirection", - "description": null, - "args": [], + "name": "citationId", + "description": "The external id for the source to add.", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "AssertionDirection", + "kind": "SCALAR", + "name": "String", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "assertionType", - "description": null, - "args": [], + "name": "sourceType", + "description": "The origin of the external source.", "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "ENUM", - "name": "AssertionType", + "name": "SourceSource", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "clingenCodes", - "description": null, + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddRemoteCitationPayload", + "description": "Autogenerated return type of AddRemoteCitation", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "newSource", + "description": "The stubbed in record for the newly created source.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ClingenCode", - "ofType": null - } - } + "kind": "OBJECT", + "name": "SourceStub", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AddTherapyInput", + "description": "Autogenerated input type of AddTherapy", + "fields": null, + "inputFields": [ { - "name": "comments", - "description": "List and filter comments.", - "args": [ - { - "name": "originatingUserId", - "description": "Limit to comments by a certain user", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, + "name": "name", + "description": "The name of the therapy.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ncitId", + "description": "The NCIt ID of the therapy, if the therapy is present in the NCIthesaurus.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AddTherapyPayload", + "description": "Autogenerated return type of AddTherapy", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "new", + "description": "True if the therapy was newly created. False if the returned therapy was already in the database.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "therapy", + "description": "The newly created therapy.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Therapy", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AdvancedSearchResult", + "description": null, + "fields": [ + { + "name": "permalinkId", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resultIds", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "searchEndpoint", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AmpLevel", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "TIER_I_LEVEL_A", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TIER_I_LEVEL_B", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TIER_II_LEVEL_C", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TIER_II_LEVEL_D", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TIER_III", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TIER_IV", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AreaOfExpertise", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PATIENT_ADVOCATE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CLINICAL_SCIENTIST", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RESEARCH_SCIENTIST", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Assertion", + "description": null, + "fields": [ + { + "name": "acceptanceEvent", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "acmgCodes", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AcmgCode", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ampLevel", + "description": null, + "args": [], + "type": { + "kind": "ENUM", + "name": "AmpLevel", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "assertionDirection", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AssertionDirection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "assertionType", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AssertionType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "clingenCodes", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ClingenCode", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "comments", + "description": "List and filter comments.", + "args": [ + { + "name": "originatingUserId", + "description": "Limit to comments by a certain user", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, "deprecationReason": null }, { @@ -1550,300 +2031,1299 @@ "deprecationReason": null }, { - "name": "lastSubmittedRevisionEvent", + "name": "lastSubmittedRevisionEvent", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "link", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "molecularProfile", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MolecularProfile", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nccnGuideline", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "NccnGuideline", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nccnGuidelineVersion", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "phenotypes", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Phenotype", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "regulatoryApproval", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "regulatoryApprovalLastUpdated", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "rejectionEvent", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "revisions", + "description": "List and filter revisions.", + "args": [ + { + "name": "originatingUserId", + "description": "Limit to revisions by a certain user", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": "Limit to revisions with a certain status", + "type": { + "kind": "ENUM", + "name": "RevisionStatus", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort order for the comments. Defaults to most recent.", + "type": { + "kind": "INPUT_OBJECT", + "name": "DateSort", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fieldName", + "description": "Limit to revisions on a particular field.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "revisionSetId", + "description": "Limit to revisions suggested as part of a single Revision Set.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RevisionConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "significance", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AssertionSignificance", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EvidenceStatus", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "submissionActivity", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SubmitAssertionActivity", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "submissionEvent", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "summary", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "therapies", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Therapy", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "therapyInteractionType", + "description": null, + "args": [], + "type": { + "kind": "ENUM", + "name": "TherapyInteraction", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantOrigin", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "VariantOrigin", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Commentable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "Flaggable", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "WithRevisions", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "EventSubject", + "ofType": null + }, + { + "kind": "INTERFACE", + "name": "EventOriginObject", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AssertionConnection", + "description": "The connection type for Assertion.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "AssertionEdge", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Assertion", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageCount", + "description": "Total number of pages, based on filtered count and pagesize.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": "The total number of records in this filtered collection.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AssertionDirection", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "SUPPORTS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DOES_NOT_SUPPORT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AssertionEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Assertion", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AssertionFields", + "description": "Fields on an Assertion that curators may propose revisions to.", + "fields": null, + "inputFields": [ + { + "name": "description", + "description": "A detailed description of the Assertion including practice guidelines and approved tests.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NullableStringInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "summary", + "description": "A brief single sentence statement summarizing the clinical significance of this Assertion.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NullableStringInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "molecularProfileId", + "description": "The ID of the Molecular Profile to which this Assertion belongs", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantOrigin", + "description": "The Variant Origin for this Assertion.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "VariantOrigin", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "assertionType", + "description": "The Type of the Assertion", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AssertionType", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "significance", + "description": "The Clinical Significance of the Assertion", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AssertionSignificance", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "diseaseId", + "description": "The ID of the disease (if applicable) for this Assertion", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NullableIntInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "assertionDirection", + "description": "The evidence direction for this Assertion.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AssertionDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "phenotypeIds", + "description": "List of IDs of CIViC Phenotype entries for this Assertion. An empty list indicates none.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "therapyIds", + "description": "List of IDs of CIViC Therapy entries for this Assertion. An empty list indicates none.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "therapyInteractionType", + "description": "Therapy interaction type for cases where more than one therapy ID is provided.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NullableTherapyInteractionTypeInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ampLevel", + "description": "The AMP/ASCO/CAP Category for this assertion.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NullableAmpLevelTypeInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "evidenceItemIds", + "description": "IDs of evidence items that are included in this Assertion.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nccnGuidelineId", + "description": "The internal CIViC ID of the NCCN guideline associated with this Assertion", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NullableIntInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nccnGuidelineVersion", + "description": "The version of the NCCN Guideline specified", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NullableStringInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "acmgCodeIds", + "description": "List of CIViC IDs for the ACMG/AMP codes associated with this Assertion", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "clingenCodeIds", + "description": "List of CIViC IDs for the ClinGen/CGC/VICC codes associated with this Assertion", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fdaCompanionTest", + "description": "Is an FDA companion test available that pertains to this Assertion.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NullableBooleanInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fdaRegulatoryApproval", + "description": "Does the Assertion have FDA regulatory approval.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NullableBooleanInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AssertionSignificance", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "SENSITIVITYRESPONSE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RESISTANCE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ADVERSE_RESPONSE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "REDUCED_SENSITIVITY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NA", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "POSITIVE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NEGATIVE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BETTER_OUTCOME", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "POOR_OUTCOME", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PATHOGENIC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LIKELY_PATHOGENIC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "BENIGN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LIKELY_BENIGN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNCERTAIN_SIGNIFICANCE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ONCOGENIC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "LIKELY_ONCOGENIC", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AssertionSort", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "column", + "description": "Available columns for sorting", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "AssertionSortColumns", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "direction", + "description": "Sort direction", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "SortDirection", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AssertionSortColumns", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "DISEASE_NAME", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SUMMARY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "THERAPY_NAME", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "STATUS", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ASSERTION_TYPE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "ASSERTION_DIRECTION", "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "Event", - "ofType": null - }, "isDeprecated": false, "deprecationReason": null }, { - "name": "link", + "name": "SIGNIFICANCE", "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, "isDeprecated": false, "deprecationReason": null }, { - "name": "molecularProfile", + "name": "AMP_LEVEL", "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "MolecularProfile", - "ofType": null - } - }, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "EVIDENCE_ITEMS_COUNT", "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "AssertionType", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ { - "name": "nccnGuideline", + "name": "DIAGNOSTIC", "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "NccnGuideline", - "ofType": null - }, "isDeprecated": false, "deprecationReason": null }, { - "name": "nccnGuidelineVersion", + "name": "PROGNOSTIC", "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, "isDeprecated": false, "deprecationReason": null }, { - "name": "phenotypes", + "name": "PREDICTIVE", "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Phenotype", - "ofType": null - } - } - } - }, "isDeprecated": false, "deprecationReason": null }, { - "name": "regulatoryApproval", + "name": "PREDISPOSING", "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, "isDeprecated": false, "deprecationReason": null }, { - "name": "regulatoryApprovalLastUpdated", + "name": "ONCOGENIC", "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "ISO8601DateTime", - "ofType": null - }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "Boolean", + "description": "Represents `true` or `false` values.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "BooleanOperator", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ { - "name": "rejectionEvent", + "name": "AND", "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "Event", - "ofType": null - }, "isDeprecated": false, "deprecationReason": null }, { - "name": "revisions", - "description": "List and filter revisions.", - "args": [ - { - "name": "originatingUserId", - "description": "Limit to revisions by a certain user", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "status", - "description": "Limit to revisions with a certain status", - "type": { - "kind": "ENUM", - "name": "RevisionStatus", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "sortBy", - "description": "Sort order for the comments. Defaults to most recent.", - "type": { - "kind": "INPUT_OBJECT", - "name": "DateSort", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "fieldName", - "description": "Limit to revisions on a particular field.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "revisionSetId", - "description": "Limit to revisions suggested as part of a single Revision Set.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "after", - "description": "Returns the elements in the list that come after the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "before", - "description": "Returns the elements in the list that come before the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "first", - "description": "Returns the first _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "last", - "description": "Returns the last _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "RevisionConnection", - "ofType": null - } - }, + "name": "OR", + "description": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "BooleanSearchInput", + "description": null, + "fields": null, + "inputFields": [ { - "name": "significance", + "name": "value", "description": null, - "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "AssertionSignificance", + "kind": "SCALAR", + "name": "Boolean", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "BrowseClinicalTrial", + "description": null, + "fields": [ { - "name": "status", + "name": "evidenceCount", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "EvidenceStatus", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, @@ -1851,15 +3331,15 @@ "deprecationReason": null }, { - "name": "submissionEvent", + "name": "id", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Event", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, @@ -1867,7 +3347,7 @@ "deprecationReason": null }, { - "name": "summary", + "name": "link", "description": null, "args": [], "type": { @@ -1883,93 +3363,71 @@ "deprecationReason": null }, { - "name": "therapies", + "name": "name", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Therapy", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "therapyInteractionType", + "name": "nctId", "description": null, "args": [], "type": { - "kind": "ENUM", - "name": "TherapyInteraction", + "kind": "SCALAR", + "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "variantOrigin", + "name": "sourceCount", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "VariantOrigin", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [ - { - "kind": "INTERFACE", - "name": "Commentable", - "ofType": null - }, - { - "kind": "INTERFACE", - "name": "Flaggable", - "ofType": null }, { - "kind": "INTERFACE", - "name": "WithRevisions", - "ofType": null - }, - { - "kind": "INTERFACE", - "name": "EventSubject", - "ofType": null - }, - { - "kind": "INTERFACE", - "name": "EventOriginObject", - "ofType": null + "name": "url", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "AssertionConnection", - "description": "The connection type for Assertion.", + "name": "BrowseClinicalTrialConnection", + "description": "The connection type for BrowseClinicalTrial.", "fields": [ { "name": "edges", @@ -1986,7 +3444,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "AssertionEdge", + "name": "BrowseClinicalTrialEdge", "ofType": null } } @@ -1995,6 +3453,38 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "filteredCount", + "description": "The total number of records in this set.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lastUpdated", + "description": "The last time the data in this browse table was refreshed", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "nodes", "description": "A list of nodes.", @@ -2010,7 +3500,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "Assertion", + "name": "BrowseClinicalTrial", "ofType": null } } @@ -2053,7 +3543,7 @@ }, { "name": "totalCount", - "description": "The total number of records in this filtered collection.", + "description": "The total number of records of this type, regardless of any filtering.", "args": [], "type": { "kind": "NON_NULL", @@ -2073,32 +3563,9 @@ "enumValues": null, "possibleTypes": null }, - { - "kind": "ENUM", - "name": "AssertionDirection", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "SUPPORTS", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "DOES_NOT_SUPPORT", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, { "kind": "OBJECT", - "name": "AssertionEdge", + "name": "BrowseClinicalTrialEdge", "description": "An edge in a connection.", "fields": [ { @@ -2123,7 +3590,7 @@ "args": [], "type": { "kind": "OBJECT", - "name": "Assertion", + "name": "BrowseClinicalTrial", "ofType": null }, "isDeprecated": false, @@ -2136,46 +3603,14 @@ "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "AssertionFields", - "description": "Fields on an Assertion that curators may propose revisions to.", - "fields": null, - "inputFields": [ - { - "name": "description", - "description": "A detailed description of the Assertion including practice guidelines and approved tests.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "NullableStringInput", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "summary", - "description": "A brief single sentence statement summarizing the clinical significance of this Assertion.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "NullableStringInput", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, + "kind": "OBJECT", + "name": "BrowseDisease", + "description": null, + "fields": [ { - "name": "molecularProfileId", - "description": "The ID of the Molecular Profile to which this Assertion belongs", + "name": "assertionCount", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, @@ -2185,93 +3620,85 @@ "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "variantOrigin", - "description": "The Variant Origin for this Assertion.", + "name": "diseaseUrl", + "description": null, + "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "VariantOrigin", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "assertionType", - "description": "The Type of the Assertion", + "name": "displayName", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "AssertionType", + "kind": "SCALAR", + "name": "String", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "significance", - "description": "The Clinical Significance of the Assertion", + "name": "doid", + "description": null, + "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "AssertionSignificance", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "diseaseId", - "description": "The ID of the disease (if applicable) for this Assertion", + "name": "evidenceItemCount", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "NullableIntInput", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "assertionDirection", - "description": "The evidence direction for this Assertion.", + "name": "geneCount", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "AssertionDirection", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "phenotypeIds", - "description": "List of IDs of CIViC Phenotype entries for this Assertion. An empty list indicates none.", + "name": "geneNames", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, @@ -2283,75 +3710,94 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } } } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "therapyIds", - "description": "List of IDs of CIViC Therapy entries for this Assertion. An empty list indicates none.", + "name": "id", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Int", + "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "therapyInteractionType", - "description": "Therapy interaction type for cases where more than one therapy ID is provided.", + "name": "link", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "NullableTherapyInteractionTypeInput", + "kind": "SCALAR", + "name": "String", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "ampLevel", - "description": "The AMP/ASCO/CAP Category for this assertion.", + "name": "name", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "NullableAmpLevelTypeInput", + "kind": "SCALAR", + "name": "String", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "evidenceItemIds", - "description": "IDs of evidence items that are included in this Assertion.", + "name": "variantCount", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "BrowseDiseaseConnection", + "description": "The connection type for BrowseDisease.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], "type": { "kind": "NON_NULL", "name": null, @@ -2362,52 +3808,52 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", + "kind": "OBJECT", + "name": "BrowseDiseaseEdge", "ofType": null } } } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "nccnGuidelineId", - "description": "The internal CIViC ID of the NCCN guideline associated with this Assertion", + "name": "filteredCount", + "description": "The total number of records in this set.", + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "NullableIntInput", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "nccnGuidelineVersion", - "description": "The version of the NCCN Guideline specified", + "name": "lastUpdated", + "description": "The last time the data in this browse table was refreshed", + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "NullableStringInput", + "kind": "SCALAR", + "name": "ISO8601DateTime", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "acmgCodeIds", - "description": "List of CIViC IDs for the ACMG/AMP codes associated with this Assertion", + "name": "nodes", + "description": "A list of nodes.", + "args": [], "type": { "kind": "NON_NULL", "name": null, @@ -2418,407 +3864,708 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", + "kind": "OBJECT", + "name": "BrowseDisease", "ofType": null } } } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "clingenCodeIds", - "description": "List of CIViC IDs for the ClinGen/CGC/VICC codes associated with this Assertion", + "name": "pageCount", + "description": "Total number of pages, based on filtered count and pagesize.", + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Int", + "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "fdaCompanionTest", - "description": "Is an FDA companion test available that pertains to this Assertion.", + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "NullableBooleanInput", + "kind": "OBJECT", + "name": "PageInfo", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "fdaRegulatoryApproval", - "description": "Does the Assertion have FDA regulatory approval.", + "name": "totalCount", + "description": "The total number of records of this type, regardless of any filtering.", + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "NullableBooleanInput", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { - "kind": "ENUM", - "name": "AssertionSignificance", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "SENSITIVITYRESPONSE", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "RESISTANCE", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ADVERSE_RESPONSE", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, + "kind": "OBJECT", + "name": "BrowseDiseaseEdge", + "description": "An edge in a connection.", + "fields": [ { - "name": "REDUCED_SENSITIVITY", - "description": null, + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "NA", - "description": null, + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "BrowseDisease", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "BrowseGene", + "description": null, + "fields": [ { - "name": "POSITIVE", + "name": "assertionCount", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "NEGATIVE", + "name": "description", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "BETTER_OUTCOME", + "name": "diseases", "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Disease", + "ofType": null + } + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "POOR_OUTCOME", + "name": "entrezId", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "PATHOGENIC", + "name": "evidenceItemCount", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "LIKELY_PATHOGENIC", + "name": "flagged", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "BENIGN", - "description": null, + "name": "flags", + "description": "List and filter flags.", + "args": [ + { + "name": "flaggingUserId", + "description": "Limit to flags added by a certain user", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "resolvingUserId", + "description": "Limit to flags resolved by a certain user", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "state", + "description": "Limit to flags in a particular state", + "type": { + "kind": "ENUM", + "name": "FlagState", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort order for the flags. Defaults to most recent.", + "type": { + "kind": "INPUT_OBJECT", + "name": "DateSort", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "FlagConnection", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "LIKELY_BENIGN", + "name": "geneAliases", "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "UNCERTAIN_SIGNIFICANCE", + "name": "id", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "ONCOGENIC", + "name": "link", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "LIKELY_ONCOGENIC", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "AssertionSort", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "column", - "description": "Available columns for sorting", + "name": "molecularProfileCount", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "AssertionSortColumns", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "direction", - "description": "Sort direction", + "name": "name", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "SortDirection", + "kind": "SCALAR", + "name": "String", "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "AssertionSortColumns", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "ID", - "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "DISEASE_NAME", + "name": "therapies", "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Therapy", + "ofType": null + } + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "SUMMARY", + "name": "variantCount", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [ { - "name": "THERAPY_NAME", - "description": null, + "kind": "INTERFACE", + "name": "Flaggable", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "BrowseGeneConnection", + "description": "The connection type for BrowseGene.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "BrowseGeneEdge", + "ofType": null + } + } + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "STATUS", - "description": null, + "name": "filteredCount", + "description": "The total number of records in this set.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "ASSERTION_TYPE", - "description": null, + "name": "lastUpdated", + "description": "The last time the data in this browse table was refreshed", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "ASSERTION_DIRECTION", - "description": null, + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "BrowseGene", + "ofType": null + } + } + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "SIGNIFICANCE", - "description": null, + "name": "pageCount", + "description": "Total number of pages, based on filtered count and pagesize.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "AMP_LEVEL", - "description": null, + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "EVIDENCE_ITEMS_COUNT", - "description": null, + "name": "totalCount", + "description": "The total number of records of this type, regardless of any filtering.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null } ], + "inputFields": null, + "interfaces": [], + "enumValues": null, "possibleTypes": null }, { - "kind": "ENUM", - "name": "AssertionType", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "DIAGNOSTIC", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "PROGNOSTIC", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "PREDICTIVE", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, + "kind": "OBJECT", + "name": "BrowseGeneEdge", + "description": "An edge in a connection.", + "fields": [ { - "name": "PREDISPOSING", - "description": null, + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "ONCOGENIC", - "description": null, + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "BrowseGene", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null } ], - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Boolean", - "description": "Represents `true` or `false` values.", - "fields": null, "inputFields": null, - "interfaces": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { - "kind": "ENUM", - "name": "BooleanOperator", + "kind": "OBJECT", + "name": "BrowseMolecularProfile", "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ + "fields": [ { - "name": "AND", + "name": "aliases", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MolecularProfileAlias", + "ofType": null + } + } + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "OR", + "name": "assertionCount", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "BooleanSearchInput", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "value", + "name": "diseases", "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LinkableDisease", + "ofType": null + } + } } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "BrowseClinicalTrial", - "description": null, - "fields": [ + }, { - "name": "evidenceCount", + "name": "evidenceItemCount", "description": null, "args": [], "type": { @@ -2833,6 +4580,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "genes", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LinkableGene", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": null, @@ -2865,6 +4636,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "molecularProfileScore", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Float", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "name", "description": null, @@ -2882,19 +4669,31 @@ "deprecationReason": null }, { - "name": "nctId", + "name": "therapies", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LinkableTherapy", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "sourceCount", + "name": "variantCount", "description": null, "args": [], "type": { @@ -2910,13 +4709,25 @@ "deprecationReason": null }, { - "name": "url", + "name": "variants", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LinkableVariant", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null @@ -2929,8 +4740,8 @@ }, { "kind": "OBJECT", - "name": "BrowseClinicalTrialConnection", - "description": "The connection type for BrowseClinicalTrial.", + "name": "BrowseMolecularProfileConnection", + "description": "The connection type for BrowseMolecularProfile.", "fields": [ { "name": "edges", @@ -2947,7 +4758,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowseClinicalTrialEdge", + "name": "BrowseMolecularProfileEdge", "ofType": null } } @@ -3003,7 +4814,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowseClinicalTrial", + "name": "BrowseMolecularProfile", "ofType": null } } @@ -3068,7 +4879,7 @@ }, { "kind": "OBJECT", - "name": "BrowseClinicalTrialEdge", + "name": "BrowseMolecularProfileEdge", "description": "An edge in a connection.", "fields": [ { @@ -3093,7 +4904,7 @@ "args": [], "type": { "kind": "OBJECT", - "name": "BrowseClinicalTrial", + "name": "BrowseMolecularProfile", "ofType": null }, "isDeprecated": false, @@ -3107,7 +4918,7 @@ }, { "kind": "OBJECT", - "name": "BrowseDisease", + "name": "BrowsePhenotype", "description": null, "fields": [ { @@ -3127,47 +4938,7 @@ "deprecationReason": null }, { - "name": "diseaseUrl", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "displayName", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "doid", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "evidenceItemCount", + "name": "evidenceCount", "description": null, "args": [], "type": { @@ -3183,7 +4954,7 @@ "deprecationReason": null }, { - "name": "geneCount", + "name": "hpoId", "description": null, "args": [], "type": { @@ -3191,37 +4962,13 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, - { - "name": "geneNames", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "id", "description": null, @@ -3271,7 +5018,7 @@ "deprecationReason": null }, { - "name": "variantCount", + "name": "url", "description": null, "args": [], "type": { @@ -3279,7 +5026,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, @@ -3294,8 +5041,8 @@ }, { "kind": "OBJECT", - "name": "BrowseDiseaseConnection", - "description": "The connection type for BrowseDisease.", + "name": "BrowsePhenotypeConnection", + "description": "The connection type for BrowsePhenotype.", "fields": [ { "name": "edges", @@ -3312,7 +5059,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowseDiseaseEdge", + "name": "BrowsePhenotypeEdge", "ofType": null } } @@ -3368,7 +5115,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowseDisease", + "name": "BrowsePhenotype", "ofType": null } } @@ -3433,7 +5180,7 @@ }, { "kind": "OBJECT", - "name": "BrowseDiseaseEdge", + "name": "BrowsePhenotypeEdge", "description": "An edge in a connection.", "fields": [ { @@ -3458,7 +5205,7 @@ "args": [], "type": { "kind": "OBJECT", - "name": "BrowseDisease", + "name": "BrowsePhenotype", "ofType": null }, "isDeprecated": false, @@ -3472,27 +5219,35 @@ }, { "kind": "OBJECT", - "name": "BrowseGene", + "name": "BrowseSource", "description": null, "fields": [ { - "name": "assertionCount", + "name": "authors", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "description", + "name": "citation", "description": null, "args": [], "type": { @@ -3508,43 +5263,47 @@ "deprecationReason": null }, { - "name": "diseases", + "name": "citationId", "description": null, "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Disease", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "entrezId", + "name": "clinicalTrials", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ClinicalTrial", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "evidenceItemCount", + "name": "displayType", "description": null, "args": [], "type": { @@ -3552,7 +5311,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, @@ -3560,7 +5319,7 @@ "deprecationReason": null }, { - "name": "flagged", + "name": "evidenceItemCount", "description": null, "args": [], "type": { @@ -3568,7 +5327,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "Int", "ofType": null } }, @@ -3576,112 +5335,15 @@ "deprecationReason": null }, { - "name": "flags", - "description": "List and filter flags.", - "args": [ - { - "name": "flaggingUserId", - "description": "Limit to flags added by a certain user", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "resolvingUserId", - "description": "Limit to flags resolved by a certain user", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "state", - "description": "Limit to flags in a particular state", - "type": { - "kind": "ENUM", - "name": "FlagState", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "sortBy", - "description": "Sort order for the flags. Defaults to most recent.", - "type": { - "kind": "INPUT_OBJECT", - "name": "DateSort", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "after", - "description": "Returns the elements in the list that come after the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "before", - "description": "Returns the elements in the list that come before the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "first", - "description": "Returns the first _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "last", - "description": "Returns the last _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "name": "id", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "FlagConnection", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, @@ -3689,27 +5351,19 @@ "deprecationReason": null }, { - "name": "geneAliases", + "name": "journal", "description": null, "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "link", "description": null, "args": [], "type": { @@ -3717,7 +5371,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, @@ -3725,23 +5379,19 @@ "deprecationReason": null }, { - "name": "link", + "name": "name", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "molecularProfileCount", + "name": "openAccess", "description": null, "args": [], "type": { @@ -3749,7 +5399,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "Boolean", "ofType": null } }, @@ -3757,7 +5407,19 @@ "deprecationReason": null }, { - "name": "name", + "name": "publicationYear", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sourceSuggestionCount", "description": null, "args": [], "type": { @@ -3765,7 +5427,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null } }, @@ -3773,27 +5435,23 @@ "deprecationReason": null }, { - "name": "therapies", + "name": "sourceType", "description": null, "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Therapy", - "ofType": null - } + "kind": "ENUM", + "name": "SourceSource", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "variantCount", + "name": "sourceUrl", "description": null, "args": [], "type": { @@ -3801,7 +5459,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, @@ -3810,20 +5468,14 @@ } ], "inputFields": null, - "interfaces": [ - { - "kind": "INTERFACE", - "name": "Flaggable", - "ofType": null - } - ], + "interfaces": [], "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "BrowseGeneConnection", - "description": "The connection type for BrowseGene.", + "name": "BrowseSourceConnection", + "description": "The connection type for BrowseSource.", "fields": [ { "name": "edges", @@ -3840,7 +5492,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowseGeneEdge", + "name": "BrowseSourceEdge", "ofType": null } } @@ -3896,7 +5548,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowseGene", + "name": "BrowseSource", "ofType": null } } @@ -3961,7 +5613,7 @@ }, { "kind": "OBJECT", - "name": "BrowseGeneEdge", + "name": "BrowseSourceEdge", "description": "An edge in a connection.", "fields": [ { @@ -3986,7 +5638,7 @@ "args": [], "type": { "kind": "OBJECT", - "name": "BrowseGene", + "name": "BrowseSource", "ofType": null }, "isDeprecated": false, @@ -4000,33 +5652,9 @@ }, { "kind": "OBJECT", - "name": "BrowseMolecularProfile", + "name": "BrowseTherapy", "description": null, "fields": [ - { - "name": "aliases", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "MolecularProfileAlias", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "assertionCount", "description": null, @@ -4044,31 +5672,7 @@ "deprecationReason": null }, { - "name": "diseases", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "LinkableDisease", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "evidenceItemCount", + "name": "evidenceCount", "description": null, "args": [], "type": { @@ -4083,30 +5687,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "genes", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "LinkableGene", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "id", "description": null, @@ -4139,22 +5719,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "molecularProfileScore", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Float", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "name", "description": null, @@ -4172,65 +5736,25 @@ "deprecationReason": null }, { - "name": "therapies", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "LinkableTherapy", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "variantCount", + "name": "ncitId", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "variants", + "name": "therapyUrl", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "LinkableVariant", - "ofType": null - } - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -4243,8 +5767,8 @@ }, { "kind": "OBJECT", - "name": "BrowseMolecularProfileConnection", - "description": "The connection type for BrowseMolecularProfile.", + "name": "BrowseTherapyConnection", + "description": "The connection type for BrowseTherapy.", "fields": [ { "name": "edges", @@ -4261,7 +5785,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowseMolecularProfileEdge", + "name": "BrowseTherapyEdge", "ofType": null } } @@ -4317,7 +5841,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowseMolecularProfile", + "name": "BrowseTherapy", "ofType": null } } @@ -4382,7 +5906,7 @@ }, { "kind": "OBJECT", - "name": "BrowseMolecularProfileEdge", + "name": "BrowseTherapyEdge", "description": "An edge in a connection.", "fields": [ { @@ -4407,7 +5931,7 @@ "args": [], "type": { "kind": "OBJECT", - "name": "BrowseMolecularProfile", + "name": "BrowseTherapy", "ofType": null }, "isDeprecated": false, @@ -4421,11 +5945,59 @@ }, { "kind": "OBJECT", - "name": "BrowsePhenotype", + "name": "BrowseVariant", "description": null, "fields": [ { - "name": "assertionCount", + "name": "aliases", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "VariantAlias", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "diseases", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Disease", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "geneId", "description": null, "args": [], "type": { @@ -4441,7 +6013,7 @@ "deprecationReason": null }, { - "name": "evidenceCount", + "name": "geneLink", "description": null, "args": [], "type": { @@ -4449,7 +6021,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, @@ -4457,7 +6029,7 @@ "deprecationReason": null }, { - "name": "hpoId", + "name": "geneName", "description": null, "args": [], "type": { @@ -4521,16 +6093,48 @@ "deprecationReason": null }, { - "name": "url", + "name": "therapies", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Therapy", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantTypes", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LinkableVariantType", + "ofType": null + } + } } }, "isDeprecated": false, @@ -4544,8 +6148,8 @@ }, { "kind": "OBJECT", - "name": "BrowsePhenotypeConnection", - "description": "The connection type for BrowsePhenotype.", + "name": "BrowseVariantConnection", + "description": "The connection type for BrowseVariant.", "fields": [ { "name": "edges", @@ -4562,7 +6166,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowsePhenotypeEdge", + "name": "BrowseVariantEdge", "ofType": null } } @@ -4618,7 +6222,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowsePhenotype", + "name": "BrowseVariant", "ofType": null } } @@ -4683,7 +6287,7 @@ }, { "kind": "OBJECT", - "name": "BrowsePhenotypeEdge", + "name": "BrowseVariantEdge", "description": "An edge in a connection.", "fields": [ { @@ -4708,7 +6312,7 @@ "args": [], "type": { "kind": "OBJECT", - "name": "BrowsePhenotype", + "name": "BrowseVariant", "ofType": null }, "isDeprecated": false, @@ -4722,51 +6326,11 @@ }, { "kind": "OBJECT", - "name": "BrowseSource", + "name": "BrowseVariantGroup", "description": null, "fields": [ { - "name": "authors", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "citation", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "citationId", + "name": "evidenceItemCount", "description": null, "args": [], "type": { @@ -4782,7 +6346,7 @@ "deprecationReason": null }, { - "name": "clinicalTrials", + "name": "geneNames", "description": null, "args": [], "type": { @@ -4795,8 +6359,8 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ClinicalTrial", + "kind": "SCALAR", + "name": "String", "ofType": null } } @@ -4805,38 +6369,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "displayType", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "evidenceItemCount", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "id", "description": null, @@ -4853,18 +6385,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "journal", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "link", "description": null, @@ -4885,24 +6405,12 @@ "name": "name", "description": null, "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "openAccess", - "description": null, - "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "String", "ofType": null } }, @@ -4910,19 +6418,7 @@ "deprecationReason": null }, { - "name": "publicationYear", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "sourceSuggestionCount", + "name": "variantCount", "description": null, "args": [], "type": { @@ -4938,32 +6434,24 @@ "deprecationReason": null }, { - "name": "sourceType", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "SourceSource", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "sourceUrl", + "name": "variantNames", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } } }, "isDeprecated": false, @@ -4977,8 +6465,8 @@ }, { "kind": "OBJECT", - "name": "BrowseSourceConnection", - "description": "The connection type for BrowseSource.", + "name": "BrowseVariantGroupConnection", + "description": "The connection type for BrowseVariantGroup.", "fields": [ { "name": "edges", @@ -4995,7 +6483,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowseSourceEdge", + "name": "BrowseVariantGroupEdge", "ofType": null } } @@ -5051,7 +6539,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowseSource", + "name": "BrowseVariantGroup", "ofType": null } } @@ -5116,7 +6604,7 @@ }, { "kind": "OBJECT", - "name": "BrowseSourceEdge", + "name": "BrowseVariantGroupEdge", "description": "An edge in a connection.", "fields": [ { @@ -5141,7 +6629,7 @@ "args": [], "type": { "kind": "OBJECT", - "name": "BrowseSource", + "name": "BrowseVariantGroup", "ofType": null }, "isDeprecated": false, @@ -5155,27 +6643,11 @@ }, { "kind": "OBJECT", - "name": "BrowseTherapy", + "name": "BrowseVariantType", "description": null, "fields": [ { - "name": "assertionCount", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "evidenceCount", + "name": "id", "description": null, "args": [], "type": { @@ -5191,7 +6663,7 @@ "deprecationReason": null }, { - "name": "id", + "name": "link", "description": null, "args": [], "type": { @@ -5199,7 +6671,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, @@ -5207,7 +6679,7 @@ "deprecationReason": null }, { - "name": "link", + "name": "name", "description": null, "args": [], "type": { @@ -5223,7 +6695,7 @@ "deprecationReason": null }, { - "name": "name", + "name": "soid", "description": null, "args": [], "type": { @@ -5239,7 +6711,7 @@ "deprecationReason": null }, { - "name": "ncitId", + "name": "url", "description": null, "args": [], "type": { @@ -5251,13 +6723,17 @@ "deprecationReason": null }, { - "name": "therapyUrl", + "name": "variantCount", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null @@ -5270,8 +6746,8 @@ }, { "kind": "OBJECT", - "name": "BrowseTherapyConnection", - "description": "The connection type for BrowseTherapy.", + "name": "BrowseVariantTypeConnection", + "description": "The connection type for BrowseVariantType.", "fields": [ { "name": "edges", @@ -5288,7 +6764,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowseTherapyEdge", + "name": "BrowseVariantTypeEdge", "ofType": null } } @@ -5344,7 +6820,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowseTherapy", + "name": "BrowseVariantType", "ofType": null } } @@ -5409,7 +6885,7 @@ }, { "kind": "OBJECT", - "name": "BrowseTherapyEdge", + "name": "BrowseVariantTypeEdge", "description": "An edge in a connection.", "fields": [ { @@ -5434,7 +6910,7 @@ "args": [], "type": { "kind": "OBJECT", - "name": "BrowseTherapy", + "name": "BrowseVariantType", "ofType": null }, "isDeprecated": false, @@ -5448,28 +6924,36 @@ }, { "kind": "OBJECT", - "name": "BrowseVariant", - "description": null, + "name": "CivicTimepointStats", + "description": "Counts of CIViC activity over time, used for the homepage", "fields": [ { - "name": "aliases", + "name": "assertions", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "VariantAlias", - "ofType": null - } - } + "kind": "OBJECT", + "name": "TimePointCounts", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "comments", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TimePointCounts", + "ofType": null } }, "isDeprecated": false, @@ -5483,32 +6967,120 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Disease", - "ofType": null - } - } + "kind": "OBJECT", + "name": "TimePointCounts", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "geneId", + "name": "evidenceItems", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", + "kind": "OBJECT", + "name": "TimePointCounts", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "genes", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TimePointCounts", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "molecularProfiles", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TimePointCounts", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "revisions", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TimePointCounts", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sources", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TimePointCounts", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "therapies", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TimePointCounts", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "users", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TimePointCounts", "ofType": null } }, @@ -5516,7 +7088,34 @@ "deprecationReason": null }, { - "name": "geneLink", + "name": "variants", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TimePointCounts", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ClingenCode", + "description": null, + "fields": [ + { + "name": "code", "description": null, "args": [], "type": { @@ -5532,7 +7131,7 @@ "deprecationReason": null }, { - "name": "geneName", + "name": "description", "description": null, "args": [], "type": { @@ -5548,7 +7147,7 @@ "deprecationReason": null }, { - "name": "id", + "name": "exclusive", "description": null, "args": [], "type": { @@ -5556,7 +7155,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "Boolean", "ofType": null } }, @@ -5564,7 +7163,7 @@ "deprecationReason": null }, { - "name": "link", + "name": "id", "description": null, "args": [], "type": { @@ -5572,7 +7171,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null } }, @@ -5596,48 +7195,16 @@ "deprecationReason": null }, { - "name": "therapies", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Therapy", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "variantTypes", + "name": "tooltip", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "LinkableVariantType", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, @@ -5651,36 +7218,28 @@ }, { "kind": "OBJECT", - "name": "BrowseVariantConnection", - "description": "The connection type for BrowseVariant.", + "name": "ClinicalTrial", + "description": null, "fields": [ { - "name": "edges", - "description": "A list of edges.", + "name": "description", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "BrowseVariantEdge", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "filteredCount", - "description": "The total number of records in this set.", + "name": "id", + "description": null, "args": [], "type": { "kind": "NON_NULL", @@ -5695,15 +7254,15 @@ "deprecationReason": null }, { - "name": "lastUpdated", - "description": "The last time the data in this browse table was refreshed", + "name": "link", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "ISO8601DateTime", + "name": "String", "ofType": null } }, @@ -5711,39 +7270,31 @@ "deprecationReason": null }, { - "name": "nodes", - "description": "A list of nodes.", + "name": "name", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "BrowseVariant", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "pageCount", - "description": "Total number of pages, based on filtered count and pagesize.", + "name": "nctId", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, @@ -5751,89 +7302,163 @@ "deprecationReason": null }, { - "name": "pageInfo", - "description": "Information to aid in pagination.", + "name": "url", + "description": null, "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ClinicalTrialSort", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "column", + "description": "Available columns for sorting", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "PageInfo", + "kind": "ENUM", + "name": "ClinicalTrialSortColumns", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "totalCount", - "description": "The total number of records of this type, regardless of any filtering.", - "args": [], + "name": "direction", + "description": "Sort direction", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", + "kind": "ENUM", + "name": "SortDirection", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, "possibleTypes": null }, { - "kind": "OBJECT", - "name": "BrowseVariantEdge", - "description": "An edge in a connection.", - "fields": [ + "kind": "ENUM", + "name": "ClinicalTrialSortColumns", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ { - "name": "cursor", - "description": "A cursor for use in pagination.", - "args": [], + "name": "NAME", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "NCT_ID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EVIDENCE_ITEM_COUNT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SOURCE_COUNT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "ClinvarInput", + "description": "An input object representing possible ClinVar ID states.\nYou may specify either one or more Integer IDs OR either none found or not applicable.", + "fields": null, + "inputFields": [ + { + "name": "ids", + "description": "The ClinVar ID(s)", "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "node", - "description": "The item at the end of the edge.", - "args": [], + "name": "noneFound", + "description": null, "type": { - "kind": "OBJECT", - "name": "BrowseVariant", + "kind": "SCALAR", + "name": "Boolean", "ofType": null }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "notApplicable", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "BrowseVariantGroup", + "name": "Coi", "description": null, "fields": [ { - "name": "evidenceItemCount", + "name": "coiPresent", "description": null, "args": [], "type": { @@ -5841,7 +7466,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "Boolean", "ofType": null } }, @@ -5849,39 +7474,27 @@ "deprecationReason": null }, { - "name": "geneNames", + "name": "coiStatement", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "coiStatus", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", + "kind": "ENUM", + "name": "CoiStatus", "ofType": null } }, @@ -5889,23 +7502,19 @@ "deprecationReason": null }, { - "name": "link", + "name": "createdAt", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "expiresAt", "description": null, "args": [], "type": { @@ -5913,7 +7522,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ISO8601DateTime", "ofType": null } }, @@ -5921,7 +7530,7 @@ "deprecationReason": null }, { - "name": "variantCount", + "name": "id", "description": null, "args": [], "type": { @@ -5935,76 +7544,79 @@ }, "isDeprecated": false, "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "CoiStatus", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "MISSING", + "description": null, + "isDeprecated": false, + "deprecationReason": null }, { - "name": "variantNames", + "name": "EXPIRED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "CONFLICT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VALID", "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - } - }, "isDeprecated": false, "deprecationReason": null } ], - "inputFields": null, - "interfaces": [], - "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "BrowseVariantGroupConnection", - "description": "The connection type for BrowseVariantGroup.", + "name": "Comment", + "description": null, "fields": [ { - "name": "edges", - "description": "A list of edges.", + "name": "comment", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "BrowseVariantGroupEdge", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "filteredCount", - "description": "The total number of records in this set.", + "name": "commentable", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", + "kind": "INTERFACE", + "name": "Commentable", "ofType": null } }, @@ -6012,15 +7624,15 @@ "deprecationReason": null }, { - "name": "lastUpdated", - "description": "The last time the data in this browse table was refreshed", + "name": "commenter", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ISO8601DateTime", + "kind": "OBJECT", + "name": "User", "ofType": null } }, @@ -6028,32 +7640,36 @@ "deprecationReason": null }, { - "name": "nodes", - "description": "A list of nodes.", + "name": "createdAt", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "BrowseVariantGroup", - "ofType": null - } - } + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "pageCount", - "description": "Total number of pages, based on filtered count and pagesize.", + "name": "creationEvent", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, "args": [], "type": { "kind": "NON_NULL", @@ -6068,15 +7684,15 @@ "deprecationReason": null }, { - "name": "pageInfo", - "description": "Information to aid in pagination.", + "name": "link", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "PageInfo", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -6084,55 +7700,52 @@ "deprecationReason": null }, { - "name": "totalCount", - "description": "The total number of records of this type, regardless of any filtering.", + "name": "name", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "BrowseVariantGroupEdge", - "description": "An edge in a connection.", - "fields": [ + }, { - "name": "cursor", - "description": "A cursor for use in pagination.", + "name": "parsedComment", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "CommentBodySegment", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "node", - "description": "The item at the end of the edge.", + "name": "title", + "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "BrowseVariantGroup", + "kind": "SCALAR", + "name": "String", "ofType": null }, "isDeprecated": false, @@ -6140,57 +7753,31 @@ } ], "inputFields": null, - "interfaces": [], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "EventOriginObject", + "ofType": null + } + ], "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "BrowseVariantType", + "name": "CommentActivity", "description": null, "fields": [ { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "link", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", + "name": "comment", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "Comment", "ofType": null } }, @@ -6198,7 +7785,7 @@ "deprecationReason": null }, { - "name": "soid", + "name": "createdAt", "description": null, "args": [], "type": { @@ -6206,7 +7793,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ISO8601DateTime", "ofType": null } }, @@ -6214,48 +7801,9 @@ "deprecationReason": null }, { - "name": "url", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "variantCount", + "name": "events", "description": null, "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "BrowseVariantTypeConnection", - "description": "The connection type for BrowseVariantType.", - "fields": [ - { - "name": "edges", - "description": "A list of edges.", - "args": [], "type": { "kind": "NON_NULL", "name": null, @@ -6267,7 +7815,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "BrowseVariantTypeEdge", + "name": "Event", "ofType": null } } @@ -6277,8 +7825,8 @@ "deprecationReason": null }, { - "name": "filteredCount", - "description": "The total number of records in this set.", + "name": "id", + "description": null, "args": [], "type": { "kind": "NON_NULL", @@ -6293,24 +7841,32 @@ "deprecationReason": null }, { - "name": "lastUpdated", - "description": "The last time the data in this browse table was refreshed", + "name": "note", + "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ISO8601DateTime", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "nodes", - "description": "A list of nodes.", + "name": "organization", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parsedNote", + "description": null, "args": [], "type": { "kind": "NON_NULL", @@ -6322,8 +7878,8 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "BrowseVariantType", + "kind": "UNION", + "name": "CommentBodySegment", "ofType": null } } @@ -6333,15 +7889,15 @@ "deprecationReason": null }, { - "name": "pageCount", - "description": "Total number of pages, based on filtered count and pagesize.", + "name": "subject", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", + "kind": "INTERFACE", + "name": "EventSubject", "ofType": null } }, @@ -6349,15 +7905,15 @@ "deprecationReason": null }, { - "name": "pageInfo", - "description": "Information to aid in pagination.", + "name": "user", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "OBJECT", - "name": "PageInfo", + "name": "User", "ofType": null } }, @@ -6365,15 +7921,15 @@ "deprecationReason": null }, { - "name": "totalCount", - "description": "The total number of records of this type, regardless of any filtering.", + "name": "verbiage", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, @@ -6382,128 +7938,177 @@ } ], "inputFields": null, - "interfaces": [], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], "enumValues": null, "possibleTypes": null }, + { + "kind": "UNION", + "name": "CommentBodySegment", + "description": "Segment of a comment that can either be text or an object to be rendered as a tag", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "CommentTagSegment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "CommentTextSegment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + ] + }, { "kind": "OBJECT", - "name": "BrowseVariantTypeEdge", - "description": "An edge in a connection.", + "name": "CommentConnection", + "description": "The connection type for Comment.", "fields": [ { - "name": "cursor", - "description": "A cursor for use in pagination.", + "name": "edges", + "description": "A list of edges.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CommentEdge", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "node", - "description": "The item at the end of the edge.", - "args": [], - "type": { - "kind": "OBJECT", - "name": "BrowseVariantType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "CivicTimepointStats", - "description": "Counts of CIViC activity over time, used for the homepage", - "fields": [ - { - "name": "assertions", - "description": null, + "name": "mentionedEntities", + "description": "List of entities mentioned in this comment thread.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "TimePointCounts", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CommentTagSegment", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "comments", - "description": null, + "name": "mentionedRoles", + "description": "List of roles mentioned in this comment thread", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "TimePointCounts", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "CommentTagSegment", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "diseases", - "description": null, + "name": "mentionedUsers", + "description": "List of users mentioned in this comment thread.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "TimePointCounts", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "evidenceItems", - "description": null, + "name": "nodes", + "description": "A list of nodes.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "TimePointCounts", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Comment", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "genes", - "description": null, + "name": "pageCount", + "description": "Total number of pages, based on filtered count and pagesize.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "TimePointCounts", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, @@ -6511,15 +8116,15 @@ "deprecationReason": null }, { - "name": "molecularProfiles", - "description": null, + "name": "pageInfo", + "description": "Information to aid in pagination.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "OBJECT", - "name": "TimePointCounts", + "name": "PageInfo", "ofType": null } }, @@ -6527,15 +8132,15 @@ "deprecationReason": null }, { - "name": "revisions", - "description": null, + "name": "totalCount", + "description": "The total number of records in this filtered collection.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "TimePointCounts", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, @@ -6543,47 +8148,62 @@ "deprecationReason": null }, { - "name": "sources", - "description": null, + "name": "unfilteredCountForSubject", + "description": "When filtered on a subject, the total number of comments for that subject, irregardless of other filters. Returns null when there is no subject.", "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "TimePointCounts", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "therapies", - "description": null, + "name": "uniqueCommenters", + "description": "List of all users that have commented on this entity.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "TimePointCounts", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CommentEdge", + "description": "An edge in a connection.", + "fields": [ { - "name": "users", - "description": null, + "name": "cursor", + "description": "A cursor for use in pagination.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "TimePointCounts", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -6591,17 +8211,13 @@ "deprecationReason": null }, { - "name": "variants", - "description": null, + "name": "node", + "description": "The item at the end of the edge.", "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "TimePointCounts", - "ofType": null - } + "kind": "OBJECT", + "name": "Comment", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -6614,27 +8230,23 @@ }, { "kind": "OBJECT", - "name": "ClingenCode", + "name": "CommentTagSegment", "description": null, "fields": [ { - "name": "code", + "name": "deprecated", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "description", + "name": "displayName", "description": null, "args": [], "type": { @@ -6650,7 +8262,7 @@ "deprecationReason": null }, { - "name": "exclusive", + "name": "entityId", "description": null, "args": [], "type": { @@ -6658,7 +8270,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "Int", "ofType": null } }, @@ -6666,7 +8278,7 @@ "deprecationReason": null }, { - "name": "id", + "name": "link", "description": null, "args": [], "type": { @@ -6674,7 +8286,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, @@ -6682,23 +8294,58 @@ "deprecationReason": null }, { - "name": "name", + "name": "revisionSetId", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "status", + "description": null, + "args": [], + "type": { + "kind": "ENUM", + "name": "EvidenceStatus", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tagType", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "ENUM", + "name": "TaggableEntity", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CommentTextSegment", + "description": null, + "fields": [ { - "name": "tooltip", + "name": "text", "description": null, "args": [], "type": { @@ -6709,31 +8356,140 @@ "name": "String", "ofType": null } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ClinicalTrial", - "description": null, - "fields": [ - { - "name": "description", - "description": null, - "args": [], + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INTERFACE", + "name": "Commentable", + "description": "A CIViC entity that can have comments on it.", + "fields": [ + { + "name": "comments", + "description": "List and filter comments.", + "args": [ + { + "name": "originatingUserId", + "description": "Limit to comments by a certain user", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort order for the comments. Defaults to most recent.", + "type": { + "kind": "INPUT_OBJECT", + "name": "DateSort", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mentionedUserId", + "description": "Limit to comments that mention a certain user", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mentionedRole", + "description": "Limit to comments that mention a certain user role", + "type": { + "kind": "ENUM", + "name": "UserRole", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "mentionedEntity", + "description": "Limit to comments that mention a certain entity", + "type": { + "kind": "INPUT_OBJECT", + "name": "TaggableEntityInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "CommentConnection", "ofType": null } }, @@ -6757,23 +8513,19 @@ "deprecationReason": null }, { - "name": "link", + "name": "lastCommentEvent", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "Event", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "link", "description": null, "args": [], "type": { @@ -6789,7 +8541,7 @@ "deprecationReason": null }, { - "name": "nctId", + "name": "name", "description": null, "args": [], "type": { @@ -6803,96 +8555,110 @@ }, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "url", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null } ], "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "ClinicalTrialSort", - "description": null, - "fields": null, - "inputFields": [ + "possibleTypes": [ { - "name": "column", - "description": "Available columns for sorting", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "ClinicalTrialSortColumns", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "kind": "OBJECT", + "name": "Assertion", + "ofType": null }, { - "name": "direction", - "description": "Sort direction", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "SortDirection", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "kind": "OBJECT", + "name": "EvidenceItem", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Flag", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Gene", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MolecularProfile", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Revision", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Source", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "SourcePopover", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Variant", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "VariantGroup", + "ofType": null } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null + ] }, { "kind": "ENUM", - "name": "ClinicalTrialSortColumns", + "name": "CommentableEntities", "description": null, "fields": null, "inputFields": null, "interfaces": null, "enumValues": [ { - "name": "NAME", + "name": "GENE", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "NCT_ID", + "name": "VARIANT", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "EVIDENCE_ITEM_COUNT", + "name": "EVIDENCE_ITEM", "description": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "SOURCE_COUNT", + "name": "ASSERTION", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VARIANT_GROUP", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SOURCE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MOLECULAR_PROFILE", "description": null, "isDeprecated": false, "deprecationReason": null @@ -6902,24 +8668,20 @@ }, { "kind": "INPUT_OBJECT", - "name": "ClinvarInput", - "description": "An input object representing possible ClinVar ID states.\nYou may specify either one or more Integer IDs OR either none found or not applicable.", + "name": "CommentableInput", + "description": "Entity to comment on", "fields": null, "inputFields": [ { - "name": "ids", - "description": "The ClinVar ID(s)", + "name": "id", + "description": "ID of the entity to comment on.", "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null } }, "defaultValue": null, @@ -6927,24 +8689,16 @@ "deprecationReason": null }, { - "name": "noneFound", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "notApplicable", - "description": null, + "name": "entityType", + "description": "The type of the entity to comment on.", "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "CommentableEntities", + "ofType": null + } }, "defaultValue": null, "isDeprecated": false, @@ -6957,11 +8711,11 @@ }, { "kind": "OBJECT", - "name": "Coi", - "description": null, + "name": "ContributingUser", + "description": "A user with all the unique kinds of actions they've performed on a given entity", "fields": [ { - "name": "coiPresent", + "name": "lastActionDate", "description": null, "args": [], "type": { @@ -6969,7 +8723,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "ISO8601DateTime", "ofType": null } }, @@ -6977,72 +8731,115 @@ "deprecationReason": null }, { - "name": "coiStatement", + "name": "totalActionCount", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "coiStatus", + "name": "uniqueActions", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "CoiStatus", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Contribution", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "createdAt", + "name": "user", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "ISO8601DateTime", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ContributingUsersSummary", + "description": null, + "fields": [ { - "name": "expiresAt", + "name": "curators", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ISO8601DateTime", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ContributingUser", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "editors", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ContributingUser", + "ofType": null + } + } } }, "isDeprecated": false, @@ -7055,155 +8852,173 @@ "possibleTypes": null }, { - "kind": "ENUM", - "name": "CoiStatus", + "kind": "OBJECT", + "name": "Contribution", "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "MISSING", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "EXPIRED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, + "fields": [ { - "name": "CONFLICT", + "name": "action", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "EventAction", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "VALID", + "name": "count", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null } ], + "inputFields": null, + "interfaces": [], + "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "Comment", + "name": "Coordinate", "description": null, "fields": [ { - "name": "comment", + "name": "chromosome", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "commentable", + "name": "representativeTranscript", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INTERFACE", - "name": "Commentable", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "commenter", + "name": "start", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "User", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "createdAt", + "name": "stop", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ISO8601DateTime", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CoordinateInput", + "description": null, + "fields": null, + "inputFields": [ { - "name": "creationEvent", + "name": "representativeTranscript", "description": null, - "args": [], "type": { - "kind": "OBJECT", - "name": "Event", + "kind": "SCALAR", + "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "chromosome", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "link", + "name": "start", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "stop", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Country", + "description": null, + "fields": [ + { + "name": "id", "description": null, "args": [], "type": { @@ -7211,7 +9026,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null } }, @@ -7219,111 +9034,67 @@ "deprecationReason": null }, { - "name": "parsedComment", + "name": "iso", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "UNION", - "name": "CommentBodySegment", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "title", + "name": "name", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null } ], "inputFields": null, - "interfaces": [ - { - "kind": "INTERFACE", - "name": "EventOriginObject", - "ofType": null - } - ], + "interfaces": [], "enumValues": null, "possibleTypes": null }, - { - "kind": "UNION", - "name": "CommentBodySegment", - "description": "Segment of a comment that can either be text or an object to be rendered as a tag", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "CommentTagSegment", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "CommentTextSegment", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "User", - "ofType": null - } - ] - }, { "kind": "OBJECT", - "name": "CommentConnection", - "description": "The connection type for Comment.", + "name": "CreateComplexMolecularProfileActivity", + "description": null, "fields": [ { - "name": "edges", - "description": "A list of edges.", + "name": "createdAt", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "CommentEdge", - "ofType": null - } - } + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "mentionedEntities", - "description": "List of entities mentioned in this comment thread.", + "name": "events", + "description": null, "args": [], "type": { "kind": "NON_NULL", @@ -7336,7 +9107,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "CommentTagSegment", + "name": "Event", "ofType": null } } @@ -7346,56 +9117,48 @@ "deprecationReason": null }, { - "name": "mentionedRoles", - "description": "List of roles mentioned in this comment thread", + "name": "id", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "CommentTagSegment", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Int", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "mentionedUsers", - "description": "List of users mentioned in this comment thread.", + "name": "note", + "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "User", - "ofType": null - } - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "nodes", - "description": "A list of nodes.", + "name": "organization", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parsedNote", + "description": null, "args": [], "type": { "kind": "NON_NULL", @@ -7407,8 +9170,8 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Comment", + "kind": "UNION", + "name": "CommentBodySegment", "ofType": null } } @@ -7418,15 +9181,15 @@ "deprecationReason": null }, { - "name": "pageCount", - "description": "Total number of pages, based on filtered count and pagesize.", + "name": "subject", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", + "kind": "INTERFACE", + "name": "EventSubject", "ofType": null } }, @@ -7434,15 +9197,15 @@ "deprecationReason": null }, { - "name": "pageInfo", - "description": "Information to aid in pagination.", + "name": "user", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "OBJECT", - "name": "PageInfo", + "name": "User", "ofType": null } }, @@ -7450,92 +9213,113 @@ "deprecationReason": null }, { - "name": "totalCount", - "description": "The total number of records in this filtered collection.", + "name": "verbiage", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [ { - "name": "unfilteredCountForSubject", - "description": "When filtered on a subject, the total number of comments for that subject, irregardless of other filters. Returns null when there is no subject.", - "args": [], + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "CreateMolecularProfileInput", + "description": "Autogenerated input type of CreateMolecularProfile", + "fields": null, + "inputFields": [ + { + "name": "organizationId", + "description": "The ID of the organization to credit the user's contributions to.\nIf the user belongs to a single organization or no organizations, this field is not required.\nThis field is required if the user belongs to more than one organization.\nThe user must belong to the organization provided.", "type": { "kind": "SCALAR", "name": "Int", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "uniqueCommenters", - "description": "List of all users that have commented on this entity.", - "args": [], + "name": "structure", + "description": "Representation of the constituent parts of the Molecular Profile along with the logic used to combine them.", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "User", - "ofType": null - } - } + "kind": "INPUT_OBJECT", + "name": "MolecularProfileComponentInput", + "ofType": null } }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "CommentEdge", - "description": "An edge in a connection.", + "name": "CreateMolecularProfilePayload", + "description": "Autogenerated return type of CreateMolecularProfile", "fields": [ { - "name": "cursor", - "description": "A cursor for use in pagination.", + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "node", - "description": "The item at the end of the edge.", + "name": "molecularProfile", + "description": "The newly created (or already existing) Molecular Profile.", "args": [], "type": { - "kind": "OBJECT", - "name": "Comment", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MolecularProfile", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null @@ -7548,39 +9332,51 @@ }, { "kind": "OBJECT", - "name": "CommentTagSegment", + "name": "CreateVariantActivity", "description": null, "fields": [ { - "name": "deprecated", + "name": "createdAt", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "displayName", + "name": "events", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "entityId", + "name": "id", "description": null, "args": [], "type": { @@ -7596,15 +9392,15 @@ "deprecationReason": null }, { - "name": "link", + "name": "molecularProfile", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "MolecularProfile", "ofType": null } }, @@ -7612,58 +9408,87 @@ "deprecationReason": null }, { - "name": "revisionSetId", + "name": "note", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "status", + "name": "organization", "description": null, "args": [], "type": { - "kind": "ENUM", - "name": "EvidenceStatus", + "kind": "OBJECT", + "name": "Organization", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "tagType", + "name": "parsedNote", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "TaggableEntity", + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "CommentBodySegment", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "EventSubject", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "CommentTextSegment", - "description": null, - "fields": [ + }, { - "name": "text", + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "verbiage", "description": null, "args": [], "type": { @@ -7680,144 +9505,53 @@ } ], "inputFields": null, - "interfaces": [], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], "enumValues": null, "possibleTypes": null }, { - "kind": "INTERFACE", - "name": "Commentable", - "description": "A CIViC entity that can have comments on it.", - "fields": [ + "kind": "INPUT_OBJECT", + "name": "CreateVariantInput", + "description": "Autogenerated input type of CreateVariant", + "fields": null, + "inputFields": [ { - "name": "comments", - "description": "List and filter comments.", - "args": [ - { - "name": "originatingUserId", - "description": "Limit to comments by a certain user", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "sortBy", - "description": "Sort order for the comments. Defaults to most recent.", - "type": { - "kind": "INPUT_OBJECT", - "name": "DateSort", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "mentionedUserId", - "description": "Limit to comments that mention a certain user", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "mentionedRole", - "description": "Limit to comments that mention a certain user role", - "type": { - "kind": "ENUM", - "name": "UserRole", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "mentionedEntity", - "description": "Limit to comments that mention a certain entity", - "type": { - "kind": "INPUT_OBJECT", - "name": "TaggableEntityInput", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "after", - "description": "Returns the elements in the list that come after the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "before", - "description": "Returns the elements in the list that come before the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "first", - "description": "Returns the first _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "last", - "description": "Returns the last _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "name": "organizationId", + "description": "The ID of the organization to credit the user's contributions to.\nIf the user belongs to a single organization or no organizations, this field is not required.\nThis field is required if the user belongs to more than one organization.\nThe user must belong to the organization provided.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The name of the variant to create.", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "CommentConnection", + "kind": "SCALAR", + "name": "String", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", - "description": null, - "args": [], + "name": "geneId", + "description": "The CIViC ID of the Gene to which the new variant belongs.", "type": { "kind": "NON_NULL", "name": null, @@ -7827,31 +9561,54 @@ "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastCommentEvent", - "description": null, + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CreateVariantPayload", + "description": "Autogenerated return type of CreateVariant", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", "args": [], "type": { - "kind": "OBJECT", - "name": "Event", + "kind": "SCALAR", + "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "link", - "description": null, + "name": "molecularProfile", + "description": "The newly created molecular profile for the new variant.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "MolecularProfile", "ofType": null } }, @@ -7859,15 +9616,31 @@ "deprecationReason": null }, { - "name": "name", - "description": null, + "name": "new", + "description": "True if the variant was newly created. False if the returned variant was already in the database.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variant", + "description": "The newly created Variant.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Variant", "ofType": null } }, @@ -7876,129 +9649,148 @@ } ], "inputFields": null, - "interfaces": null, + "interfaces": [], "enumValues": null, - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "Assertion", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "EvidenceItem", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "Flag", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "Gene", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "MolecularProfile", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "Revision", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "Source", - "ofType": null - }, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DataRelease", + "description": null, + "fields": [ { - "kind": "OBJECT", - "name": "SourcePopover", - "ofType": null + "name": "acceptedAndSubmittedVariantsVcf", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "DownloadableFile", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null }, { - "kind": "OBJECT", - "name": "Variant", - "ofType": null + "name": "acceptedVariantsVcf", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "DownloadableFile", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null }, { - "kind": "OBJECT", - "name": "VariantGroup", - "ofType": null - } - ] - }, - { - "kind": "ENUM", - "name": "CommentableEntities", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "GENE", + "name": "assertionTsv", "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "DownloadableFile", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "VARIANT", + "name": "evidenceTsv", "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "DownloadableFile", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "EVIDENCE_ITEM", + "name": "geneTsv", "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "DownloadableFile", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "ASSERTION", + "name": "molecularProfileTsv", "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "DownloadableFile", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "VARIANT_GROUP", + "name": "name", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "SOURCE", + "name": "variantGroupTsv", "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "DownloadableFile", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "MOLECULAR_PROFILE", + "name": "variantTsv", "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "DownloadableFile", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null } ], + "inputFields": null, + "interfaces": [], + "enumValues": null, "possibleTypes": null }, { "kind": "INPUT_OBJECT", - "name": "CommentableInput", - "description": "Entity to comment on", + "name": "DateSort", + "description": null, "fields": null, "inputFields": [ { - "name": "id", - "description": "ID of the entity to comment on.", + "name": "column", + "description": "Value to sort by.", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", + "kind": "ENUM", + "name": "DateSortColumns", "ofType": null } }, @@ -8007,14 +9799,14 @@ "deprecationReason": null }, { - "name": "entityType", - "description": "The type of the entity to comment on.", + "name": "direction", + "description": "Sort direction.", "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "ENUM", - "name": "CommentableEntities", + "name": "SortDirection", "ofType": null } }, @@ -8028,28 +9820,35 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "ContributingUser", - "description": "A user with all the unique kinds of actions they've performed on a given entity", - "fields": [ + "kind": "ENUM", + "name": "DateSortColumns", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ { - "name": "lastActionDate", + "name": "CREATED", "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ISO8601DateTime", - "ofType": null - } - }, "isDeprecated": false, "deprecationReason": null }, { - "name": "totalActionCount", + "name": "LAST_MODIFIED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeprecateComplexMolecularProfileActivity", + "description": null, + "fields": [ + { + "name": "createdAt", "description": null, "args": [], "type": { @@ -8057,7 +9856,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "ISO8601DateTime", "ofType": null } }, @@ -8065,7 +9864,7 @@ "deprecationReason": null }, { - "name": "uniqueActions", + "name": "events", "description": null, "args": [], "type": { @@ -8079,7 +9878,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "Contribution", + "name": "Event", "ofType": null } } @@ -8089,58 +9888,47 @@ "deprecationReason": null }, { - "name": "user", + "name": "id", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "User", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ContributingUsersSummary", - "description": null, - "fields": [ + }, { - "name": "curators", + "name": "note", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ContributingUser", - "ofType": null - } - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "editors", + "name": "organization", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parsedNote", "description": null, "args": [], "type": { @@ -8153,8 +9941,8 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ContributingUser", + "kind": "UNION", + "name": "CommentBodySegment", "ofType": null } } @@ -8162,28 +9950,17 @@ }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Contribution", - "description": null, - "fields": [ + }, { - "name": "action", + "name": "subject", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "EventAction", + "kind": "INTERFACE", + "name": "EventSubject", "ofType": null } }, @@ -8191,119 +9968,58 @@ "deprecationReason": null }, { - "name": "count", + "name": "user", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", + "kind": "OBJECT", + "name": "User", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Coordinate", - "description": null, - "fields": [ - { - "name": "chromosome", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "representativeTranscript", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "start", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null }, { - "name": "stop", + "name": "verbiage", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null } ], "inputFields": null, - "interfaces": [], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], "enumValues": null, "possibleTypes": null }, { "kind": "INPUT_OBJECT", - "name": "CoordinateInput", - "description": null, + "name": "DeprecateComplexMolecularProfileInput", + "description": "Autogenerated input type of DeprecateComplexMolecularProfile", "fields": null, "inputFields": [ { - "name": "representativeTranscript", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "chromosome", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "start", - "description": null, + "name": "organizationId", + "description": "The ID of the organization to credit the user's contributions to.\nIf the user belongs to a single organization or no organizations, this field is not required.\nThis field is required if the user belongs to more than one organization.\nThe user must belong to the organization provided.", "type": { "kind": "SCALAR", "name": "Int", @@ -8314,31 +10030,8 @@ "deprecationReason": null }, { - "name": "stop", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Country", - "description": null, - "fields": [ - { - "name": "id", - "description": null, - "args": [], + "name": "molecularProfileId", + "description": "The CIViC ID of the complex molecular profile to deprecate.", "type": { "kind": "NON_NULL", "name": null, @@ -8348,29 +10041,29 @@ "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "iso", - "description": null, - "args": [], + "name": "deprecationReason", + "description": "The reason for deprecating this molecular profile.", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "ENUM", + "name": "MolecularProfileDeprecationReasonMutationInput", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", - "description": null, - "args": [], + "name": "comment", + "description": "Text giving more context for deprecating this complex molecular profile.", "type": { "kind": "NON_NULL", "name": null, @@ -8380,33 +10073,6 @@ "ofType": null } }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "CreateMolecularProfileInput", - "description": "Autogenerated input type of CreateMolecularProfile", - "fields": null, - "inputFields": [ - { - "name": "structure", - "description": "Representation of the constituent parts of the Molecular Profile along with the logic used to combine them.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MolecularProfileComponentInput", - "ofType": null - } - }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null @@ -8430,8 +10096,8 @@ }, { "kind": "OBJECT", - "name": "CreateMolecularProfilePayload", - "description": "Autogenerated return type of CreateMolecularProfile", + "name": "DeprecateComplexMolecularProfilePayload", + "description": "Autogenerated return type of DeprecateComplexMolecularProfile", "fields": [ { "name": "clientMutationId", @@ -8447,16 +10113,12 @@ }, { "name": "molecularProfile", - "description": "The newly created (or already existing) Molecular Profile.", + "description": "The deprecated complex Molecular Profile.", "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "MolecularProfile", - "ofType": null - } + "kind": "OBJECT", + "name": "MolecularProfile", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -8469,191 +10131,195 @@ }, { "kind": "OBJECT", - "name": "DataRelease", + "name": "DeprecateVariantActivity", "description": null, "fields": [ { - "name": "acceptedAndSubmittedVariantsVcf", + "name": "createdAt", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "DownloadableFile", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "acceptedVariantsVcf", + "name": "events", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "DownloadableFile", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "assertionTsv", + "name": "id", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "DownloadableFile", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "evidenceTsv", + "name": "molecularProfiles", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "DownloadableFile", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MolecularProfile", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "geneTsv", + "name": "note", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "DownloadableFile", + "kind": "SCALAR", + "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "molecularProfileTsv", + "name": "organization", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "DownloadableFile", + "name": "Organization", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "parsedNote", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "CommentBodySegment", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "variantGroupTsv", + "name": "subject", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "DownloadableFile", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "EventSubject", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "variantTsv", + "name": "user", "description": null, "args": [], - "type": { - "kind": "OBJECT", - "name": "DownloadableFile", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "DateSort", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "column", - "description": "Value to sort by.", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "DateSortColumns", + "kind": "OBJECT", + "name": "User", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "direction", - "description": "Sort direction.", + "name": "verbiage", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "SortDirection", + "kind": "SCALAR", + "name": "String", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "DateSortColumns", - "description": null, - "fields": null, "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "CREATED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, + "interfaces": [ { - "name": "LAST_MODIFIED", - "description": null, - "isDeprecated": false, - "deprecationReason": null + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null } ], + "enumValues": null, "possibleTypes": null }, { @@ -8698,7 +10364,7 @@ "name": null, "ofType": { "kind": "ENUM", - "name": "DeprecationReason", + "name": "VariantDeprecationReason", "ofType": null } }, @@ -8794,35 +10460,6 @@ "enumValues": null, "possibleTypes": null }, - { - "kind": "ENUM", - "name": "DeprecationReason", - "description": null, - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "DUPLICATE", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INVALID", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OTHER", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, { "kind": "OBJECT", "name": "Disease", @@ -9756,6 +11393,18 @@ "description": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "VARIANT_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "COMPLEX_MOLECULAR_PROFILE_CREATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null } ], "possibleTypes": null @@ -10092,11 +11741,219 @@ "name": "Assertion", "ofType": null }, - { - "kind": "OBJECT", - "name": "Comment", - "ofType": null - }, + { + "kind": "OBJECT", + "name": "Comment", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "EvidenceItem", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Flag", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "MolecularProfile", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Revision", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "SourceSuggestion", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Variant", + "ofType": null + } + ] + }, + { + "kind": "INTERFACE", + "name": "EventSubject", + "description": "The subject of an event log event.", + "fields": [ + { + "name": "events", + "description": "List and filter events for an object", + "args": [ + { + "name": "eventType", + "description": null, + "type": { + "kind": "ENUM", + "name": "EventAction", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "originatingUserId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organizationId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort order for the events. Defaults to most recent.", + "type": { + "kind": "INPUT_OBJECT", + "name": "DateSort", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EventConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "link", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Assertion", + "ofType": null + }, { "kind": "OBJECT", "name": "EvidenceItem", @@ -10109,220 +11966,22 @@ }, { "kind": "OBJECT", - "name": "MolecularProfile", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "Revision", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "SourceSuggestion", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "Variant", - "ofType": null - } - ] - }, - { - "kind": "INTERFACE", - "name": "EventSubject", - "description": "The subject of an event log event.", - "fields": [ - { - "name": "events", - "description": "List and filter events for an object", - "args": [ - { - "name": "eventType", - "description": null, - "type": { - "kind": "ENUM", - "name": "EventAction", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "originatingUserId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "organizationId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "sortBy", - "description": "Sort order for the events. Defaults to most recent.", - "type": { - "kind": "INPUT_OBJECT", - "name": "DateSort", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "after", - "description": "Returns the elements in the list that come after the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "before", - "description": "Returns the elements in the list that come before the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "first", - "description": "Returns the first _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "last", - "description": "Returns the last _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "EventConnection", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "link", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "Assertion", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "EvidenceItem", + "name": "Gene", "ofType": null }, { "kind": "OBJECT", - "name": "Gene", + "name": "MolecularProfile", "ofType": null }, { "kind": "OBJECT", - "name": "MolecularProfile", + "name": "Revision", "ofType": null }, { "kind": "OBJECT", - "name": "Revision", + "name": "RevisionSet", "ofType": null }, { @@ -11225,6 +12884,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "submissionActivity", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SubmitEvidenceItemActivity", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "submissionEvent", "description": null, @@ -11797,6 +13472,129 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "EvidenceItemsByType", + "description": null, + "fields": [ + { + "name": "diagnosticCount", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "functionalCount", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "molecularProfileId", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "oncogenicCount", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "predictiveCount", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "predisposingCount", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "prognosticCount", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "ENUM", "name": "EvidenceLevel", @@ -12493,6 +14291,119 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "events", + "description": "List and filter events for an object", + "args": [ + { + "name": "eventType", + "description": null, + "type": { + "kind": "ENUM", + "name": "EventAction", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "originatingUserId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organizationId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort order for the events. Defaults to most recent.", + "type": { + "kind": "INPUT_OBJECT", + "name": "DateSort", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EventConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "flaggable", "description": null, @@ -12586,7 +14497,7 @@ "deprecationReason": null }, { - "name": "openComment", + "name": "openActivity", "description": null, "args": [], "type": { @@ -12594,7 +14505,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "Comment", + "name": "FlagEntityActivity", "ofType": null } }, @@ -12602,24 +14513,12 @@ "deprecationReason": null }, { - "name": "resolutionComment", + "name": "resolutionActivity", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "Comment", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "resolvedAt", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "ISO8601DateTime", + "name": "ResolveFlagActivity", "ofType": null }, "isDeprecated": false, @@ -12665,6 +14564,11 @@ "kind": "INTERFACE", "name": "EventOriginObject", "ofType": null + }, + { + "kind": "INTERFACE", + "name": "EventSubject", + "ofType": null } ], "enumValues": null, @@ -12872,6 +14776,191 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "FlagEntityActivity", + "description": null, + "fields": [ + { + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "flag", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Flag", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organization", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parsedNote", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "CommentBodySegment", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "EventSubject", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "verbiage", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "FlagEntityInput", @@ -16288,6 +18377,175 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "ModerateAssertionActivity", + "description": null, + "fields": [ + { + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organization", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parsedNote", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "CommentBodySegment", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "EventSubject", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "verbiage", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "ModerateAssertionInput", @@ -16394,6 +18652,175 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "ModerateEvidenceItemActivity", + "description": null, + "fields": [ + { + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organization", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parsedNote", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "CommentBodySegment", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "EventSubject", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "verbiage", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "ModerateEvidenceItemInput", @@ -16922,6 +19349,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "complexMolecularProfileCreationActivity", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "CreateComplexMolecularProfileActivity", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "complexMolecularProfileDeprecationActivity", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "DeprecateComplexMolecularProfileActivity", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "deprecated", "description": null, @@ -16963,12 +19414,12 @@ "deprecationReason": null }, { - "name": "deprecationEvent", + "name": "deprecationReason", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "Event", + "kind": "ENUM", + "name": "MolecularProfileDeprecationReason", "ofType": null }, "isDeprecated": false, @@ -17115,6 +19566,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "evidenceCountsByType", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EvidenceItemsByType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "evidenceItems", "description": "The collection of evidence items associated with this molecular profile.", @@ -17341,6 +19808,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "isMultiVariant", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "lastAcceptedRevisionEvent", "description": null, @@ -17638,6 +20121,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "variantCreationActivity", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "CreateVariantActivity", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "variantDeprecationActivity", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "DeprecateVariantActivity", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "variants", "description": "The collection of variants included in this molecular profile. Please note the name for their relation to each other.", @@ -17961,6 +20468,70 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "ENUM", + "name": "MolecularProfileDeprecationReason", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DUPLICATE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OTHER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "VARIANT_DEPRECATED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "MolecularProfileDeprecationReasonMutationInput", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DUPLICATE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OTHER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "ENUM", "name": "MolecularProfileDisplayFilter", @@ -18463,18 +21034,18 @@ "deprecationReason": null }, { - "name": "addVariant", - "description": "Add a new Variant to the database.", + "name": "createMolecularProfile", + "description": "Create a new Molecular Profile in order to attach Evidence Items to it.", "args": [ { "name": "input", - "description": "Parameters for AddVariant", + "description": "Parameters for CreateMolecularProfile", "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "INPUT_OBJECT", - "name": "AddVariantInput", + "name": "CreateMolecularProfileInput", "ofType": null } }, @@ -18485,25 +21056,25 @@ ], "type": { "kind": "OBJECT", - "name": "AddVariantPayload", + "name": "CreateMolecularProfilePayload", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "createMolecularProfile", - "description": "Create a new Molecular Profile in order to attach Evidence Items to it.", + "name": "createVariant", + "description": "Create a new Variant to the database.", "args": [ { "name": "input", - "description": "Parameters for CreateMolecularProfile", + "description": "Parameters for CreateVariant", "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "INPUT_OBJECT", - "name": "CreateMolecularProfileInput", + "name": "CreateVariantInput", "ofType": null } }, @@ -18514,7 +21085,36 @@ ], "type": { "kind": "OBJECT", - "name": "CreateMolecularProfilePayload", + "name": "CreateVariantPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deprecateComplexMolecularProfile", + "description": "Deprecate a complex molecular profile to prevent it from being used in the future.", + "args": [ + { + "name": "input", + "description": "Parameters for DeprecateComplexMolecularProfile", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DeprecateComplexMolecularProfileInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DeprecateComplexMolecularProfilePayload", "ofType": null }, "isDeprecated": false, @@ -23004,6 +25604,112 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "activities", + "description": "List and filter activities", + "args": [ + { + "name": "userId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ActivityInterfaceConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "activity", + "description": "Find a CIViC activity record by CIViC ID", + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "assertion", "description": "Find an assertion by CIViC ID", @@ -28369,6 +31075,199 @@ ], "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "RejectRevisionsActivity", + "description": null, + "fields": [ + { + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organization", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parsedNote", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "CommentBodySegment", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "revisions", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Revision", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "EventSubject", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "verbiage", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "RejectRevisionsInput", @@ -28499,6 +31398,191 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "ResolveFlagActivity", + "description": null, + "fields": [ + { + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "flag", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Flag", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organization", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parsedNote", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "CommentBodySegment", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "EventSubject", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "verbiage", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "ResolveFlagInput", @@ -28606,6 +31690,18 @@ "name": "Revision", "description": null, "fields": [ + { + "name": "acceptanceActivity", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "AcceptRevisionsActivity", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "comments", "description": "List and filter comments.", @@ -28748,24 +31844,12 @@ "deprecationReason": null }, { - "name": "creationComment", + "name": "creationActivity", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "Comment", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creationEvent", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "Event", + "name": "SuggestRevisionSetActivity", "ofType": null }, "isDeprecated": false, @@ -28989,48 +32073,24 @@ "deprecationReason": null }, { - "name": "resolutionComment", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "Comment", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "resolvedAt", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "ISO8601DateTime", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "resolver", + "name": "rejectionActivity", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "User", + "name": "RejectRevisionsActivity", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "resolvingEvent", + "name": "resolutionActivity", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "Event", + "kind": "INTERFACE", + "name": "ActivityInterface", "ofType": null }, "isDeprecated": false, @@ -29052,18 +32112,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "revisor", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "status", "description": null, @@ -29108,6 +32156,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "supersedingActivity", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "AcceptRevisionsActivity", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "updatedAt", "description": null, @@ -29451,6 +32511,256 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "RevisionSet", + "description": null, + "fields": [ + { + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "displayName", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": "List and filter events for an object", + "args": [ + { + "name": "eventType", + "description": null, + "type": { + "kind": "ENUM", + "name": "EventAction", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "originatingUserId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organizationId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort order for the events. Defaults to most recent.", + "type": { + "kind": "INPUT_OBJECT", + "name": "DateSort", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EventConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "link", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "revisions", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Revision", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "EventSubject", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "ENUM", "name": "RevisionStatus", @@ -30938,34 +34248,207 @@ "deprecationReason": null }, { - "name": "sourceType", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "SourceSource", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SourceSuggestion", - "description": null, - "fields": [ - { - "name": "createdAt", + "name": "sourceType", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "SourceSource", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SourceSuggestion", + "description": null, + "fields": [ + { + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "creationActivity", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SuggestSourceActivity", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "disease", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Disease", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": "List and filter events for an object", + "args": [ + { + "name": "eventType", + "description": null, + "type": { + "kind": "ENUM", + "name": "EventAction", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "originatingUserId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organizationId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sortBy", + "description": "Sort order for the events. Defaults to most recent.", + "type": { + "kind": "INPUT_OBJECT", + "name": "DateSort", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EventConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "initialComment", "description": null, "args": [], "type": { @@ -30973,7 +34456,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "ISO8601DateTime", + "name": "String", "ofType": null } }, @@ -30981,162 +34464,17 @@ "deprecationReason": null }, { - "name": "disease", + "name": "lastStatusUpdateActivity", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "Disease", + "name": "UpdateSourceSuggestionStatusActivity", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, - { - "name": "events", - "description": "List and filter events for an object", - "args": [ - { - "name": "eventType", - "description": null, - "type": { - "kind": "ENUM", - "name": "EventAction", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "originatingUserId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "organizationId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "sortBy", - "description": "Sort order for the events. Defaults to most recent.", - "type": { - "kind": "INPUT_OBJECT", - "name": "DateSort", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "after", - "description": "Returns the elements in the list that come after the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "before", - "description": "Returns the elements in the list that come before the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "first", - "description": "Returns the first _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "last", - "description": "Returns the last _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "EventConnection", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "initialComment", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "link", "description": null, @@ -31929,6 +35267,175 @@ ], "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "SubmitAssertionActivity", + "description": null, + "fields": [ + { + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organization", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parsedNote", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "CommentBodySegment", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "EventSubject", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "verbiage", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "SubmitAssertionInput", @@ -32031,6 +35538,175 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "SubmitEvidenceItemActivity", + "description": null, + "fields": [ + { + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "note", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organization", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parsedNote", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "CommentBodySegment", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "EventSubject", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "verbiage", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "SubmitEvidenceItemInput", @@ -33071,26 +36747,200 @@ "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "SuggestMolecularProfileRevisionInput", - "description": "Autogenerated input type of SuggestMolecularProfileRevision", - "fields": null, - "inputFields": [ + "kind": "INPUT_OBJECT", + "name": "SuggestMolecularProfileRevisionInput", + "description": "Autogenerated input type of SuggestMolecularProfileRevision", + "fields": null, + "inputFields": [ + { + "name": "organizationId", + "description": "The ID of the organization to credit the user's contributions to.\nIf the user belongs to a single organization or no organizations, this field is not required.\nThis field is required if the user belongs to more than one organization.\nThe user must belong to the organization provided.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": "The ID of the MolecularProfile to suggest a Revision to.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fields", + "description": "The desired state of the Molecular Profile's editable fields if the change were applied.\nIf no change is desired for a particular field, pass in the current value of that field.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MolecularProfileFields", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "comment", + "description": "Text describing the reason for the change. Will be attached to the Revision as a comment.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SuggestMolecularProfileRevisionPayload", + "description": "Autogenerated return type of SuggestMolecularProfileRevision", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "molecularProfile", + "description": "The MolecularProfile the user has proposed a Revision to.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MolecularProfile", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "results", + "description": "A list of Revisions generated as a result of this suggestion.\nIf an existing Revision exactly matches the proposed one, it will be returned instead.\nThis is indicated via the 'newlyCreated' Boolean.\nRevisions are stored on a per-field basis.\nThe changesetId can be used to group Revisions proposed at the same time.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RevisionResult", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SuggestRevisionSetActivity", + "description": null, + "fields": [ { - "name": "organizationId", - "description": "The ID of the organization to credit the user's contributions to.\nIf the user belongs to a single organization or no organizations, this field is not required.\nThis field is required if the user belongs to more than one organization.\nThe user must belong to the organization provided.", + "name": "createdAt", + "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + } + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { "name": "id", - "description": "The ID of the MolecularProfile to suggest a Revision to.", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, @@ -33100,86 +36950,212 @@ "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "fields", - "description": "The desired state of the Molecular Profile's editable fields if the change were applied.\nIf no change is desired for a particular field, pass in the current value of that field.", + "name": "note", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organization", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parsedNote", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "MolecularProfileFields", + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "CommentBodySegment", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "revisionSet", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RevisionSet", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "comment", - "description": "Text describing the reason for the change. Will be attached to the Revision as a comment.", + "name": "revisions", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Revision", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "EventSubject", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", + "name": "user", + "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "verbiage", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "SuggestMolecularProfileRevisionPayload", - "description": "Autogenerated return type of SuggestMolecularProfileRevision", + "name": "SuggestSourceActivity", + "description": null, "fields": [ { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", + "name": "createdAt", + "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "molecularProfile", - "description": "The MolecularProfile the user has proposed a Revision to.", + "name": "events", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "MolecularProfile", + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Event", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", "ofType": null } }, @@ -33187,8 +37163,32 @@ "deprecationReason": null }, { - "name": "results", - "description": "A list of Revisions generated as a result of this suggestion.\nIf an existing Revision exactly matches the proposed one, it will be returned instead.\nThis is indicated via the 'newlyCreated' Boolean.\nRevisions are stored on a per-field basis.\nThe changesetId can be used to group Revisions proposed at the same time.", + "name": "note", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "organization", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Organization", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "parsedNote", + "description": null, "args": [], "type": { "kind": "NON_NULL", @@ -33200,8 +37200,8 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "RevisionResult", + "kind": "UNION", + "name": "CommentBodySegment", "ofType": null } } @@ -33209,10 +37209,80 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "sourceSuggestion", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SourceSuggestion", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "EventSubject", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "verbiage", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, - "interfaces": [], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], "enumValues": null, "possibleTypes": null }, @@ -34300,8 +38370,106 @@ }, { "kind": "OBJECT", - "name": "UnsubscribePayload", - "description": "Autogenerated return type of Unsubscribe", + "name": "UnsubscribePayload", + "description": "Autogenerated return type of Unsubscribe", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "unsubscribedEntities", + "description": "The entities that were unsubscribed from.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Subscribable", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateCoiInput", + "description": "Autogenerated input type of UpdateCoi", + "fields": null, + "inputFields": [ + { + "name": "coiPresent", + "description": "Does the user report having a conflict of interest? Mark true if so.", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "statement", + "description": "If the user reports a potential conflict of interest please provide a brief summary of it.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdateCoiPayload", + "description": "Autogenerated return type of UpdateCoi", "fields": [ { "name": "clientMutationId", @@ -34316,24 +38484,16 @@ "deprecationReason": null }, { - "name": "unsubscribedEntities", - "description": "The entities that were unsubscribed from.", + "name": "coiStatement", + "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Subscribable", - "ofType": null - } - } + "kind": "OBJECT", + "name": "Coi", + "ofType": null } }, "isDeprecated": false, @@ -34347,20 +38507,28 @@ }, { "kind": "INPUT_OBJECT", - "name": "UpdateCoiInput", - "description": "Autogenerated input type of UpdateCoi", + "name": "UpdateNotificationStatusInput", + "description": "Autogenerated input type of UpdateNotificationStatus", "fields": null, "inputFields": [ { - "name": "coiPresent", - "description": "Does the user report having a conflict of interest? Mark true if so.", + "name": "ids", + "description": "A list of one or more Notification IDs.", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + } } }, "defaultValue": null, @@ -34368,12 +38536,16 @@ "deprecationReason": null }, { - "name": "statement", - "description": "If the user reports a potential conflict of interest please provide a brief summary of it.", + "name": "newStatus", + "description": "The new status of the selected notifications.", "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ReadStatus", + "ofType": null + } }, "defaultValue": null, "isDeprecated": false, @@ -34398,8 +38570,8 @@ }, { "kind": "OBJECT", - "name": "UpdateCoiPayload", - "description": "Autogenerated return type of UpdateCoi", + "name": "UpdateNotificationStatusPayload", + "description": "Autogenerated return type of UpdateNotificationStatus", "fields": [ { "name": "clientMutationId", @@ -34414,16 +38586,24 @@ "deprecationReason": null }, { - "name": "coiStatement", - "description": null, + "name": "notifications", + "description": "A list of the notifications in their new state.", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Coi", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Notification", + "ofType": null + } + } } }, "isDeprecated": false, @@ -34436,14 +38616,30 @@ "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "UpdateNotificationStatusInput", - "description": "Autogenerated input type of UpdateNotificationStatus", - "fields": null, - "inputFields": [ + "kind": "OBJECT", + "name": "UpdateSourceSuggestionStatusActivity", + "description": null, + "fields": [ { - "name": "ids", - "description": "A list of one or more Notification IDs.", + "name": "createdAt", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ISO8601DateTime", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "events", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, @@ -34454,70 +38650,59 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", + "kind": "OBJECT", + "name": "Event", "ofType": null } } } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "newStatus", - "description": "The new status of the selected notifications.", + "name": "id", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "ReadStatus", + "kind": "SCALAR", + "name": "Int", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", + "name": "note", + "description": null, + "args": [], "type": { "kind": "SCALAR", "name": "String", "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "UpdateNotificationStatusPayload", - "description": "Autogenerated return type of UpdateNotificationStatus", - "fields": [ + }, { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", + "name": "organization", + "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "Organization", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "notifications", - "description": "A list of the notifications in their new state.", + "name": "parsedNote", + "description": null, "args": [], "type": { "kind": "NON_NULL", @@ -34529,8 +38714,8 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "Notification", + "kind": "UNION", + "name": "CommentBodySegment", "ofType": null } } @@ -34538,10 +38723,80 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "sourceSuggestion", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SourceSuggestion", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INTERFACE", + "name": "EventSubject", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "User", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "verbiage", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, - "interfaces": [], + "interfaces": [ + { + "kind": "INTERFACE", + "name": "ActivityInterface", + "ofType": null + } + ], "enumValues": null, "possibleTypes": null }, @@ -36055,40 +40310,40 @@ "deprecationReason": null }, { - "name": "deprecated", + "name": "creationActivity", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } + "kind": "OBJECT", + "name": "CreateVariantActivity", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "deprecationComment", + "name": "deprecated", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "Comment", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "deprecationEvent", + "name": "deprecationActivity", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "Event", + "name": "DeprecateVariantActivity", "ofType": null }, "isDeprecated": false, @@ -36100,7 +40355,7 @@ "args": [], "type": { "kind": "ENUM", - "name": "DeprecationReason", + "name": "VariantDeprecationReason", "ofType": null }, "isDeprecated": false, @@ -37064,6 +41319,35 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "ENUM", + "name": "VariantDeprecationReason", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "DUPLICATE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INVALID", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "OTHER", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "OBJECT", "name": "VariantEdge", diff --git a/client/src/app/layout/layout-routing.module.ts b/client/src/app/layout/layout-routing.module.ts index 3dc20af42..b1120623f 100644 --- a/client/src/app/layout/layout-routing.module.ts +++ b/client/src/app/layout/layout-routing.module.ts @@ -196,7 +196,7 @@ const routes: Routes = [ (m) => m.TestPagesModule ), data: { - breadcrumb: 'Forms2', + breadcrumb: 'Forms Dev', }, }, ], diff --git a/client/src/app/views/assertions/assertions-detail/assertions-comments/assertions-comments.page.html b/client/src/app/views/assertions/assertions-detail/assertions-comments/assertions-comments.page.html index 548a74c31..2dedd53ec 100644 --- a/client/src/app/views/assertions/assertions-detail/assertions-comments/assertions-comments.page.html +++ b/client/src/app/views/assertions/assertions-detail/assertions-comments/assertions-comments.page.html @@ -1 +1 @@ - + diff --git a/client/src/app/views/assertions/assertions-detail/assertions-comments/assertions-comments.page.ts b/client/src/app/views/assertions/assertions-detail/assertions-comments/assertions-comments.page.ts index 920bc82cc..36494452e 100644 --- a/client/src/app/views/assertions/assertions-detail/assertions-comments/assertions-comments.page.ts +++ b/client/src/app/views/assertions/assertions-detail/assertions-comments/assertions-comments.page.ts @@ -1,23 +1,45 @@ -import { Component } from '@angular/core' +import { Component, OnInit } from '@angular/core' import { ActivatedRoute } from '@angular/router' import { CommentableEntities, CommentableInput, + AssertionSubmissionActivityFragmentDoc, } from '@app/generated/civic.apollo' +import { Apollo } from 'apollo-angular' +import { CommentInterface } from '../../../../components/comments/comment-display/comment-display.component' @Component({ selector: 'cvc-assertions-comments', templateUrl: './assertions-comments.page.html', styleUrls: ['./assertions-comments.page.less'], }) -export class AssertionsCommentsPage { +export class AssertionsCommentsPage implements OnInit { commentable: CommentableInput + submissionComment?: CommentInterface - constructor(private route: ActivatedRoute) { + constructor(private route: ActivatedRoute, private apollo: Apollo) { const assertionId: number = +this.route.snapshot.params['assertionId'] this.commentable = { id: assertionId, entityType: CommentableEntities.Assertion, } } + + ngOnInit() { + const fragment = { + id: `Assertion:${this.commentable.id}`, + fragment: AssertionSubmissionActivityFragmentDoc, + fragmentName: 'assertionSubmissionActivity' + } + try { + const entity = this.apollo.client.readFragment(fragment) as any; + this.submissionComment = { + createdAt: entity.submissionActivity.createdAt, + parsedComment: entity.submissionActivity.parsedNote, + commenter: entity.submissionActivity.user + } + } catch(err) { + console.log(err) + } + } } diff --git a/client/src/app/views/assertions/assertions-detail/assertions-detail.query.gql b/client/src/app/views/assertions/assertions-detail/assertions-detail.query.gql index ca38ddc48..e57743989 100644 --- a/client/src/app/views/assertions/assertions-detail/assertions-detail.query.gql +++ b/client/src/app/views/assertions/assertions-detail/assertions-detail.query.gql @@ -27,4 +27,19 @@ fragment AssertionDetailFields on Assertion { comments { totalCount } + ...assertionSubmissionActivity +} + +fragment assertionSubmissionActivity on Assertion { + submissionActivity { + createdAt + parsedNote { + ...parsedCommentFragment + } + user { + id + displayName + profileImagePath(size: 32) + } + } } diff --git a/client/src/app/views/assertions/assertions-detail/assertions-summary/assertions-summary.module.ts b/client/src/app/views/assertions/assertions-detail/assertions-summary/assertions-summary.module.ts index f3aa83fe7..36609f67d 100644 --- a/client/src/app/views/assertions/assertions-detail/assertions-summary/assertions-summary.module.ts +++ b/client/src/app/views/assertions/assertions-detail/assertions-summary/assertions-summary.module.ts @@ -22,6 +22,8 @@ import { CvcMolecularProfileTagModule } from '@app/components/molecular-profiles import { CvcMolecularProfileTagNameModule } from '@app/components/molecular-profiles/molecular-profile-tag-name/molecular-profile-tag-name.module' import { CvcTherapyTagModule } from '@app/components/therapies/cvc-therapy-tag/cvc-therapy-tag.module' import { CvcEmptyValueModule } from '@app/components/shared/empty-value/empty-value.module' +import { CvcCommentBodyModule } from '@app/components/comments/comment-body/comment-body.module' +import { NzPopoverModule } from 'ng-zorro-antd/popover' @NgModule({ declarations: [AssertionsSummaryPage], @@ -38,6 +40,7 @@ import { CvcEmptyValueModule } from '@app/components/shared/empty-value/empty-va NzIconModule, NzDescriptionsModule, NzToolTipModule, + NzPopoverModule, CvcEmptyValueModule, CvcPipesModule, CvcStatusTagModule, @@ -50,6 +53,7 @@ import { CvcEmptyValueModule } from '@app/components/shared/empty-value/empty-va CvcAttributeTagModule, CvcMolecularProfileTagModule, CvcMolecularProfileTagNameModule, + CvcCommentBodyModule, ], exports: [AssertionsSummaryPage], }) diff --git a/client/src/app/views/assertions/assertions-detail/assertions-summary/assertions-summary.page.html b/client/src/app/views/assertions/assertions-detail/assertions-summary/assertions-summary.page.html index 5913ddf0c..ecc3b52a7 100644 --- a/client/src/app/views/assertions/assertions-detail/assertions-summary/assertions-summary.page.html +++ b/client/src/app/views/assertions/assertions-detail/assertions-summary/assertions-summary.page.html @@ -197,6 +197,22 @@ by + + + + + + + Submitted diff --git a/client/src/app/views/assertions/assertions-detail/assertions-summary/assertions-summary.query.gql b/client/src/app/views/assertions/assertions-detail/assertions-summary/assertions-summary.query.gql index b6a188ace..25fa770be 100644 --- a/client/src/app/views/assertions/assertions-detail/assertions-summary/assertions-summary.query.gql +++ b/client/src/app/views/assertions/assertions-detail/assertions-summary/assertions-summary.query.gql @@ -76,6 +76,7 @@ fragment AssertionSummaryFields on Assertion { profileImagePath(size: 32) } } + ...assertionSubmissionActivity submissionEvent { createdAt originatingUser { diff --git a/client/src/app/views/curation/curation-activity/curation-timeline/curation-timeline.module.ts b/client/src/app/views/curation/curation-activity/curation-timeline/curation-timeline.module.ts index d42b4dbfc..2d3c3cb1c 100644 --- a/client/src/app/views/curation/curation-activity/curation-timeline/curation-timeline.module.ts +++ b/client/src/app/views/curation/curation-activity/curation-timeline/curation-timeline.module.ts @@ -4,9 +4,16 @@ import { NzGridModule } from 'ng-zorro-antd/grid' import { NzCardModule } from 'ng-zorro-antd/card' import { CvcEventFeedModule } from '@app/components/events/event-feed/event-feed.module' import { CurationTimelinePage } from './curation-timeline.page' +import { CvcActivityFeedModule } from '@app/components/activities/activity-feed/activity-feed.module' @NgModule({ declarations: [CurationTimelinePage], - imports: [CommonModule, NzGridModule, NzCardModule, CvcEventFeedModule], + imports: [ + CommonModule, + NzGridModule, + NzCardModule, + CvcEventFeedModule, + CvcActivityFeedModule + ], }) export class CurationTimelineModule {} diff --git a/client/src/app/views/curation/curation-activity/curation-timeline/curation-timeline.page.html b/client/src/app/views/curation/curation-activity/curation-timeline/curation-timeline.page.html index d2652c7a2..531797ecb 100644 --- a/client/src/app/views/curation/curation-activity/curation-timeline/curation-timeline.page.html +++ b/client/src/app/views/curation/curation-activity/curation-timeline/curation-timeline.page.html @@ -1,3 +1,4 @@ + + diff --git a/client/src/app/views/evidence/evidence-detail/evidence-comments/evidence-comments.page.ts b/client/src/app/views/evidence/evidence-detail/evidence-comments/evidence-comments.page.ts index 8b683c122..30ad758bb 100644 --- a/client/src/app/views/evidence/evidence-detail/evidence-comments/evidence-comments.page.ts +++ b/client/src/app/views/evidence/evidence-detail/evidence-comments/evidence-comments.page.ts @@ -1,23 +1,46 @@ -import { Component } from '@angular/core' +import { Component, OnInit } from '@angular/core' import { ActivatedRoute } from '@angular/router' import { CommentableEntities, CommentableInput, + EvidenceSubmissionActivityFragmentDoc, } from '@app/generated/civic.apollo' +import { Apollo } from 'apollo-angular' +import { CommentInterface } from '../../../../components/comments/comment-display/comment-display.component' @Component({ selector: 'cvc-evidence-comments', templateUrl: './evidence-comments.page.html', styleUrls: ['./evidence-comments.page.less'], }) -export class EvidenceCommentsPage { +export class EvidenceCommentsPage implements OnInit { commentable: CommentableInput + submissionComment?: CommentInterface - constructor(private route: ActivatedRoute) { + constructor(private route: ActivatedRoute, private apollo: Apollo) { const evidenceId: number = +this.route.snapshot.params['evidenceId'] + this.commentable = { id: evidenceId, entityType: CommentableEntities.EvidenceItem, } } + + ngOnInit() { + const fragment = { + id: `EvidenceItem:${this.commentable.id}`, + fragment: EvidenceSubmissionActivityFragmentDoc, + fragmentName: 'evidenceSubmissionActivity' + } + try { + const entity = this.apollo.client.readFragment(fragment) as any; + this.submissionComment = { + createdAt: entity.submissionActivity.createdAt, + parsedComment: entity.submissionActivity.parsedNote, + commenter: entity.submissionActivity.user + } + } catch(err) { + console.log(err) + } + } } diff --git a/client/src/app/views/evidence/evidence-detail/evidence-detail.query.gql b/client/src/app/views/evidence/evidence-detail/evidence-detail.query.gql index 902b70d20..477ce6966 100644 --- a/client/src/app/views/evidence/evidence-detail/evidence-detail.query.gql +++ b/client/src/app/views/evidence/evidence-detail/evidence-detail.query.gql @@ -32,4 +32,19 @@ fragment EvidenceDetailFields on EvidenceItem { comments { totalCount } + ...evidenceSubmissionActivity +} + +fragment evidenceSubmissionActivity on EvidenceItem { + submissionActivity { + createdAt + parsedNote { + ...parsedCommentFragment + } + user { + id + displayName + profileImagePath(size: 32) + } + } } diff --git a/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.module.ts b/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.module.ts index a1fd23f05..6673955ab 100644 --- a/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.module.ts +++ b/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.module.ts @@ -26,6 +26,8 @@ import { NzToolTipModule } from 'ng-zorro-antd/tooltip' import { NzTypographyModule } from 'ng-zorro-antd/typography' import { EvidenceSummaryPage } from './evidence-summary.page' import { CvcEmptyValueModule } from '@app/components/shared/empty-value/empty-value.module' +import { NzPopoverModule } from 'ng-zorro-antd/popover' +import { CvcCommentBodyModule } from '@app/components/comments/comment-body/comment-body.module' @NgModule({ declarations: [EvidenceSummaryPage], @@ -42,6 +44,7 @@ import { CvcEmptyValueModule } from '@app/components/shared/empty-value/empty-va NzIconModule, NzDescriptionsModule, NzToolTipModule, + NzPopoverModule, CvcEmptyValueModule, CvcPipesModule, CvcEvidenceRatingModule, @@ -57,6 +60,7 @@ import { CvcEmptyValueModule } from '@app/components/shared/empty-value/empty-va CvcAttributeTagModule, CvcMolecularProfileTagModule, CvcMolecularProfileTagNameModule, + CvcCommentBodyModule, ], }) export class EvidenceSummaryModule {} diff --git a/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.page.html b/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.page.html index 2700bb02c..5ca71d25b 100644 --- a/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.page.html +++ b/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.page.html @@ -148,6 +148,22 @@ [user]=" evidence.submissionEvent.originatingUser ">
+ + + + + + + Submitted diff --git a/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.page.less b/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.page.less index 04e8bfe5a..eab8325ef 100644 --- a/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.page.less +++ b/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.page.less @@ -8,4 +8,4 @@ .summary-block { max-height: 200px; overflow-y: auto; -} +} \ No newline at end of file diff --git a/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.query.gql b/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.query.gql index 045546b2a..9cb621465 100644 --- a/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.query.gql +++ b/client/src/app/views/evidence/evidence-detail/evidence-summary/evidence-summary.query.gql @@ -63,6 +63,18 @@ fragment EvidenceSummaryFields on EvidenceItem { comments { totalCount } + submissionActivity { + createdAt + parsedNote { + ...parsedCommentFragment + } + user { + displayName + profileImagePath(size: 32) + id + role + } + } acceptanceEvent { createdAt originatingUser { diff --git a/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-detail.module.ts b/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-detail.module.ts index c19c94135..9437c6001 100644 --- a/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-detail.module.ts +++ b/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-detail.module.ts @@ -18,6 +18,8 @@ import { CvcVariantTagModule } from '@app/components/variants/variant-tag/varian import { CvcPipesModule } from '@app/core/pipes/pipes.module' import { NzAlertModule } from 'ng-zorro-antd/alert' import { CvcCommentBodyModule } from '@app/components/comments/comment-body/comment-body.module' +import { ComplexMolecularProfileDeprecateFormModule } from '@app/forms/components/complex-molecular-profile-deprecate/complex-molecular-profile-deprecate.module' +import { NzPopoverModule } from 'ng-zorro-antd/popover' @NgModule({ declarations: [MolecularProfilesDetailView], @@ -32,6 +34,7 @@ import { CvcCommentBodyModule } from '@app/components/comments/comment-body/comm NzSpaceModule, NzGridModule, NzAlertModule, + NzPopoverModule, CvcContributorAvatarsModule, CvcTabNavigationModule, @@ -42,6 +45,7 @@ import { CvcCommentBodyModule } from '@app/components/comments/comment-body/comm CvcVariantTagModule, CvcPipesModule, CvcCommentBodyModule, + ComplexMolecularProfileDeprecateFormModule, ], }) export class MolecularProfilesDetailModule {} diff --git a/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-detail.query.gql b/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-detail.query.gql index 39627acd1..410ce3f42 100644 --- a/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-detail.query.gql +++ b/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-detail.query.gql @@ -8,10 +8,18 @@ fragment MolecularProfileDetailFields on MolecularProfile { id name deprecated + deprecationReason + complexMolecularProfileDeprecationActivity { + parsedNote { + ...parsedCommentFragment + } + } deprecatedVariants { deprecationReason - deprecationComment { - ...commentListNode + deprecationActivity { + parsedNote { + ...parsedCommentFragment + } } id deprecated @@ -28,4 +36,7 @@ fragment MolecularProfileDetailFields on MolecularProfile { comments { totalCount } + variants { + id + } } diff --git a/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-detail.view.html b/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-detail.view.html index 396ead19f..76d02d95a 100644 --- a/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-detail.view.html +++ b/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-detail.view.html @@ -76,6 +76,29 @@ + + + + + + - This Molecular Profile has been deprecated because one or more of its - underlying variants are deprecated - -
- - {{ v.deprecationReason | enumToTitle }}. - + + This Molecular Profile has been deprecated because one or more of its + underlying variants are deprecated + +
+ + {{ v.deprecationReason | enumToTitle }}. + +
+ + This Molecular Profile has been deprecated for reason: {{ + mp.deprecationReason | enumToTitle }}. + +
diff --git a/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.page.html b/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.page.html index 9c7180c5e..df595f31e 100644 --- a/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.page.html +++ b/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.page.html @@ -8,13 +8,53 @@ + nzTitle="MP Expression"> + + + by + + + + Created + + ({{ mp.complexMolecularProfileCreationActivity.createdAt | timeAgo }}) + + + + + + by + + + + Deprecated + + ({{ mp.complexMolecularProfileDeprecationActivity.createdAt | timeAgo }}) + + + + + + by + + + + Deprecated + + ({{ mp.variantDeprecationActivity.createdAt | timeAgo }}) + + + diff --git a/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.query.gql b/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.query.gql index b196590b7..20749ec38 100644 --- a/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.query.gql +++ b/client/src/app/views/molecular-profiles/molecular-profiles-detail/molecular-profiles-summary/molecular-profiles-summary.query.gql @@ -22,6 +22,33 @@ fragment MolecularProfileSummaryFields on MolecularProfile { parsedName { ...MolecularProfileParsedName } + complexMolecularProfileCreationActivity { + createdAt + user { + id + displayName + role + profileImagePath(size: 32) + } + } + variantDeprecationActivity{ + createdAt + user { + id + displayName + role + profileImagePath(size: 32) + } + } + complexMolecularProfileDeprecationActivity{ + createdAt + user { + id + displayName + role + profileImagePath(size: 32) + } + } } fragment MolecularProfileParsedName on MolecularProfileSegment { diff --git a/client/src/app/views/molecular-profiles/molecular-profiles-home/molecular-profiles-home.page.html b/client/src/app/views/molecular-profiles/molecular-profiles-home/molecular-profiles-home.page.html index 086c46ddc..943d8dd64 100644 --- a/client/src/app/views/molecular-profiles/molecular-profiles-home/molecular-profiles-home.page.html +++ b/client/src/app/views/molecular-profiles/molecular-profiles-home/molecular-profiles-home.page.html @@ -1,26 +1,5 @@ - diff --git a/client/src/app/views/variant-groups/variant-groups-detail/variant-groups-revisions/variant-groups-revisions.page.ts b/client/src/app/views/variant-groups/variant-groups-detail/variant-groups-revisions/variant-groups-revisions.page.ts index b3963f60a..1efeb55d4 100644 --- a/client/src/app/views/variant-groups/variant-groups-detail/variant-groups-revisions/variant-groups-revisions.page.ts +++ b/client/src/app/views/variant-groups/variant-groups-detail/variant-groups-revisions/variant-groups-revisions.page.ts @@ -1,9 +1,7 @@ -import { Component, OnDestroy, OnInit } from '@angular/core' +import { Component, OnDestroy } from '@angular/core' import { ActivatedRoute } from '@angular/router' import { - Maybe, ModeratedEntities, - Organization, } from '@app/generated/civic.apollo' import { Subscription } from 'rxjs' diff --git a/client/src/app/views/variant-groups/variant-groups-detail/variant-groups-revisions/variant-groups-revisions.query.gql b/client/src/app/views/variant-groups/variant-groups-detail/variant-groups-revisions/variant-groups-revisions.query.gql deleted file mode 100644 index d8b3cea17..000000000 --- a/client/src/app/views/variant-groups/variant-groups-detail/variant-groups-revisions/variant-groups-revisions.query.gql +++ /dev/null @@ -1,76 +0,0 @@ -query VariantGroupRevisions( - $variantGroupId: Int! - $first: Int - $last: Int - $before: String - $after: String - $fieldName: String - $originatingUserId: Int -) { - variantGroup(id: $variantGroupId) { - id - revisions( - first: $first - last: $last - before: $before - after: $after - fieldName: $fieldName - originatingUserId: $originatingUserId - ) { - totalCount - uniqueRevisors { - username - id - profileImagePath(size: 32) - } - revisedFieldNames { - name - displayName - } - edges { - node { - id - revisionSetId - createdAt - fieldName - currentValue - suggestedValue - linkoutData { - name - diffValue { - ... on ObjectFieldDiff { - addedObjects { - id - displayName - displayType - entityType - } - removedObjects { - id - displayName - displayType - entityType - } - keptObjects { - id - displayName - displayType - entityType - } - } - ... on ScalarFieldDiff { - left - right - } - } - } - revisor { - id - name - } - status - } - } - } - } -} diff --git a/client/src/app/views/variants/variants-detail/variants-detail.query.gql b/client/src/app/views/variants/variants-detail/variants-detail.query.gql index c84c926ef..0ea9f0210 100644 --- a/client/src/app/views/variants/variants-detail/variants-detail.query.gql +++ b/client/src/app/views/variants/variants-detail/variants-detail.query.gql @@ -9,8 +9,10 @@ fragment VariantDetailFields on Variant { name deprecated deprecationReason - deprecationComment { - ...commentListNode + deprecationActivity { + parsedNote { + ...parsedCommentFragment + } } gene { id diff --git a/client/src/app/views/variants/variants-detail/variants-detail.view.html b/client/src/app/views/variants/variants-detail/variants-detail.view.html index ea603b189..4934fe48b 100644 --- a/client/src/app/views/variants/variants-detail/variants-detail.view.html +++ b/client/src/app/views/variants/variants-detail/variants-detail.view.html @@ -123,7 +123,7 @@ variant.deprecationReason | enumToTitle }}. diff --git a/client/src/app/views/variants/variants-detail/variants-summary/variants-summary.module.ts b/client/src/app/views/variants/variants-detail/variants-summary/variants-summary.module.ts index a18f56e84..dff5ba62f 100644 --- a/client/src/app/views/variants/variants-detail/variants-summary/variants-summary.module.ts +++ b/client/src/app/views/variants/variants-detail/variants-summary/variants-summary.module.ts @@ -13,8 +13,6 @@ import { CvcMyVariantInfoModule } from '@app/components/variants/my-variant-info import { CvcEmptyRevisableModule } from '@app/components/shared/empty-revisable/empty-revisable.module' import { CvcEventFeedModule } from '@app/components/events/event-feed/event-feed.module' import { NzCardModule } from 'ng-zorro-antd/card' -import { CvcEvidenceTableModule } from '@app/components/evidence/evidence-table/evidence-table.module' -import { CvcAssertionsTableModule } from '@app/components/assertions/assertions-table/assertions-table.module' import { NzTypographyModule } from 'ng-zorro-antd/typography' import { CvcPipesModule } from '@app/core/pipes/pipes.module' import { NzIconModule } from 'ng-zorro-antd/icon' diff --git a/client/src/app/views/variants/variants-detail/variants-summary/variants-summary.page.html b/client/src/app/views/variants/variants-detail/variants-summary/variants-summary.page.html index 83b442f94..a0303b7d7 100644 --- a/client/src/app/views/variants/variants-detail/variants-summary/variants-summary.page.html +++ b/client/src/app/views/variants/variants-detail/variants-summary/variants-summary.page.html @@ -98,6 +98,44 @@ + + + + + + + + by + + + + Created + + ({{ variant.creationActivity.createdAt | timeAgo }}) + + + + + + by + + + + Deprecated + + ({{ variant.deprecationActivity.createdAt | timeAgo }}) + + + + + + 0 + raise GraphQL::ExecutionError, "Molecular Profile has accepted or submitted Evidence Items. Move its Evidence Items to a different Molecular Profile and try again." + end + + return true + end + + def authorized?(organization_id: nil, **kwargs) + current_user = context[:current_user] + + validate_user_acting_as_org(user: current_user, organization_id: organization_id) + + if !Role.user_is_at_least_a?(current_user, :editor) + raise GraphQL::ExecutionError, 'User must be an editor in order to deprecate Molecular Profiles.' + end + + return true + end + + def resolve(organization_id: nil, deprecation_reason:, comment:, **kwargs) + cmd = Activities::DeprecateComplexMolecularProfile.new( + deprecating_user: context[:current_user], + molecular_profile: molecular_profile, + organization_id: organization_id, + deprecation_reason: deprecation_reason, + note: comment + ) + + res = cmd.perform + + if res.succeeded? + { + molecular_profile: molecular_profile, + } + else + raise GraphQL::ExecutionError, res.errors.join(', ') + end + end +end diff --git a/server/app/graphql/mutations/deprecate_variant.rb b/server/app/graphql/mutations/deprecate_variant.rb index fb774c22c..7ff0b24c5 100644 --- a/server/app/graphql/mutations/deprecate_variant.rb +++ b/server/app/graphql/mutations/deprecate_variant.rb @@ -5,7 +5,7 @@ class Mutations::DeprecateVariant < Mutations::MutationWithOrg required: true, description: 'The CIViC ID of the variant to deprecate.' - argument :deprecation_reason, Types::DeprecationReasonType, + argument :deprecation_reason, Types::VariantDeprecationReasonType, required: true, description: "The reason for deprecation this variant." @@ -53,19 +53,19 @@ def authorized?(organization_id: nil, **kwargs) validate_user_acting_as_org(user: current_user, organization_id: organization_id) if !Role.user_is_at_least_a?(current_user, :editor) - raise GraphQL::ExecutionError, 'User must be an editor in order to moderate Assertions.' + raise GraphQL::ExecutionError, 'User must be an editor in order to deprecate Variants.' end return true end def resolve(organization_id: nil, deprecation_reason:, comment:, **kwargs) - cmd = Actions::DeprecateVariant.new( + cmd = Activities::DeprecateVariant.new( deprecating_user: context[:current_user], variant: variant, organization_id: organization_id, deprecation_reason: deprecation_reason, - comment: comment + note: comment ) res = cmd.perform diff --git a/server/app/graphql/mutations/flag_entity.rb b/server/app/graphql/mutations/flag_entity.rb index 47dd987f9..69d2be48d 100644 --- a/server/app/graphql/mutations/flag_entity.rb +++ b/server/app/graphql/mutations/flag_entity.rb @@ -28,11 +28,11 @@ def authorized?(organization_id: nil, **kwargs) end def resolve(subject:, organization_id: nil, comment:) - cmd = Actions::FlagEntity.new( + cmd = Activities::FlagEntity.new( flagging_user: context[:current_user], flaggable: subject, organization_id: organization_id, - comment: comment + note: comment ) res = cmd.perform diff --git a/server/app/graphql/mutations/moderate_assertion.rb b/server/app/graphql/mutations/moderate_assertion.rb index 68443b4ce..274748c5b 100644 --- a/server/app/graphql/mutations/moderate_assertion.rb +++ b/server/app/graphql/mutations/moderate_assertion.rb @@ -51,7 +51,7 @@ def authorized?(organization_id: nil, new_status:, **_) end def resolve(organization_id: nil, new_status:, **_) - cmd = Actions::ModerateAssertion.new( + cmd = Activities::ModerateAssertion.new( assertion: assertion, originating_user: context[:current_user], organization_id: organization_id, diff --git a/server/app/graphql/mutations/moderate_evidence_item.rb b/server/app/graphql/mutations/moderate_evidence_item.rb index 382851622..ce6547d94 100644 --- a/server/app/graphql/mutations/moderate_evidence_item.rb +++ b/server/app/graphql/mutations/moderate_evidence_item.rb @@ -51,7 +51,7 @@ def authorized?(organization_id: nil, new_status:, **_) end def resolve(organization_id: nil, new_status:, **_) - cmd = Actions::ModerateEvidenceItem.new( + cmd = Activities::ModerateEvidenceItem.new( evidence_item: evidence_item, originating_user: context[:current_user], organization_id: organization_id, diff --git a/server/app/graphql/mutations/reject_revisions.rb b/server/app/graphql/mutations/reject_revisions.rb index 6198a5b63..c0d9c3de2 100644 --- a/server/app/graphql/mutations/reject_revisions.rb +++ b/server/app/graphql/mutations/reject_revisions.rb @@ -42,6 +42,11 @@ def ready?(organization_id: nil, ids: nil, revision_set_id: nil, **_) end end + subjects = revisions.map(&:subject).uniq + if subjects.size > 1 + raise GraphQL::ExecutionError, "Revisions span multiple subjects" + end + return true end @@ -64,11 +69,11 @@ def authorized?(organization_id: nil, **_) end def resolve(organization_id: nil, comment:, **_) - cmd = Actions::RejectRevisions.new( + cmd = Activities::RejectRevisions.new( revisions: revisions, rejecting_user: context[:current_user], organization_id: organization_id, - comment: comment + note: comment ) res = cmd.perform diff --git a/server/app/graphql/mutations/resolve_flag.rb b/server/app/graphql/mutations/resolve_flag.rb index 7b4695e3f..731dd5d39 100644 --- a/server/app/graphql/mutations/resolve_flag.rb +++ b/server/app/graphql/mutations/resolve_flag.rb @@ -45,11 +45,11 @@ def authorized?(organization_id: nil, **_) end def resolve(organization_id: nil, comment:, **_) - cmd = Actions::ResolveFlag.new( + cmd = Activities::ResolveFlag.new( flag: flag, resolving_user: context[:current_user], organization_id: organization_id, - comment: comment + note: comment ) res = cmd.perform diff --git a/server/app/graphql/mutations/submit_assertion.rb b/server/app/graphql/mutations/submit_assertion.rb index 54a70c416..3cf942ecd 100644 --- a/server/app/graphql/mutations/submit_assertion.rb +++ b/server/app/graphql/mutations/submit_assertion.rb @@ -37,11 +37,11 @@ def resolve(fields:, organization_id: nil, comment: nil) assertion = InputAdaptors::AssertionInputAdaptor.new(assertion_input_object: fields).perform - cmd = Actions::SubmitAssertion.new( + cmd = Activities::SubmitAssertion.new( assertion: assertion, originating_user: context[:current_user], organization_id: organization_id, - comment_body: comment + note: comment ) res = cmd.perform diff --git a/server/app/graphql/mutations/submit_evidence_item.rb b/server/app/graphql/mutations/submit_evidence_item.rb index 1d2ef9223..affdda746 100644 --- a/server/app/graphql/mutations/submit_evidence_item.rb +++ b/server/app/graphql/mutations/submit_evidence_item.rb @@ -36,11 +36,11 @@ def resolve(fields:, organization_id: nil, comment: nil) evidence_item = InputAdaptors::EvidenceItemInputAdaptor.new(evidence_input_object: fields).perform - cmd = Actions::SubmitEvidenceItem.new( + cmd = Activities::SubmitEvidenceItem.new( evidence_item: evidence_item, originating_user: context[:current_user], organization_id: organization_id, - comment_body: comment + note: comment ) res = cmd.perform diff --git a/server/app/graphql/mutations/suggest_assertion_revision.rb b/server/app/graphql/mutations/suggest_assertion_revision.rb index 45f4d9526..4ced1bc2c 100644 --- a/server/app/graphql/mutations/suggest_assertion_revision.rb +++ b/server/app/graphql/mutations/suggest_assertion_revision.rb @@ -56,19 +56,19 @@ def authorized?(organization_id: nil, **kwargs) def resolve(fields:, id:, organization_id: nil, comment:) updated_assertion = InputAdaptors::AssertionInputAdaptor.new(assertion_input_object: fields).perform - cmd = Actions::SuggestAssertionRevision.new( + cmd = Activities::SuggestRevisionSet.new( existing_obj: assertion, updated_obj: updated_assertion, originating_user: context[:current_user], organization_id: organization_id, - comment: comment + note: comment ) res = cmd.perform if res.succeeded? { assertion: assertion, - results: res.revisions + results: res.revision_results } else raise GraphQL::ExecutionError, res.errors.join(', ') diff --git a/server/app/graphql/mutations/suggest_evidence_item_revision.rb b/server/app/graphql/mutations/suggest_evidence_item_revision.rb index 78e819332..f56350361 100644 --- a/server/app/graphql/mutations/suggest_evidence_item_revision.rb +++ b/server/app/graphql/mutations/suggest_evidence_item_revision.rb @@ -55,19 +55,19 @@ def authorized?(organization_id: nil, **kwargs) def resolve(fields:, id:, organization_id: nil, comment:) updated_evidence = InputAdaptors::EvidenceItemInputAdaptor.new(evidence_input_object: fields).perform - cmd = Actions::SuggestEvidenceItemRevision.new( + cmd = Activities::SuggestRevisionSet.new( existing_obj: evidence_item, updated_obj: updated_evidence, originating_user: context[:current_user], organization_id: organization_id, - comment: comment + note: comment ) res = cmd.perform if res.succeeded? { evidence_item: evidence_item, - results: res.revisions + results: res.revision_results } else raise GraphQL::ExecutionError, res.errors.join(', ') diff --git a/server/app/graphql/mutations/suggest_gene_revision.rb b/server/app/graphql/mutations/suggest_gene_revision.rb index 712584831..4b34607a1 100644 --- a/server/app/graphql/mutations/suggest_gene_revision.rb +++ b/server/app/graphql/mutations/suggest_gene_revision.rb @@ -54,19 +54,19 @@ def authorized?(organization_id: nil, **kwargs) def resolve(fields:, id:, organization_id: nil, comment:) updated_gene = InputAdaptors::GeneInputAdaptor.new(gene_input_object: fields).perform - cmd = Actions::SuggestGeneRevision.new( + cmd = Activities::SuggestRevisionSet.new( existing_obj: gene, updated_obj: updated_gene, originating_user: context[:current_user], organization_id: organization_id, - comment: comment + note: comment ) res = cmd.perform if res.succeeded? { gene: gene, - results: res.revisions + results: res.revision_results } else raise GraphQL::ExecutionError, res.errors.join(', ') diff --git a/server/app/graphql/mutations/suggest_molecular_profile_revision.rb b/server/app/graphql/mutations/suggest_molecular_profile_revision.rb index 598d9992a..a8629d124 100644 --- a/server/app/graphql/mutations/suggest_molecular_profile_revision.rb +++ b/server/app/graphql/mutations/suggest_molecular_profile_revision.rb @@ -54,19 +54,19 @@ def authorized?(organization_id: nil, **kwargs) def resolve(fields:, id:, organization_id: nil, comment:) updated_mp = InputAdaptors::MolecularProfileInputAdaptor.new(mp_input_object: fields, existing_name: mp.name).perform - cmd = Actions::SuggestMolecularProfileRevision.new( + cmd = Activities::SuggestRevisionSet.new( existing_obj: mp, updated_obj: updated_mp, originating_user: context[:current_user], organization_id: organization_id, - comment: comment + note: comment ) res = cmd.perform if res.succeeded? { molecular_profile: mp, - results: res.revisions + results: res.revision_results } else raise GraphQL::ExecutionError, res.errors.join(', ') diff --git a/server/app/graphql/mutations/suggest_source.rb b/server/app/graphql/mutations/suggest_source.rb index f5dc82287..2de12090d 100644 --- a/server/app/graphql/mutations/suggest_source.rb +++ b/server/app/graphql/mutations/suggest_source.rb @@ -55,11 +55,11 @@ def authorized?(organization_id: nil, **kwargs) def resolve(organization_id: nil, source_id:, molecular_profile_id: nil, disease_id: nil, comment:, **kwargs) - cmd = Actions::SuggestSource.new( + cmd = Activities::SuggestSource.new( source_id: source_id, originating_user: context[:current_user], organization_id: organization_id, - comment_body: comment, + note: comment, disease_id: disease_id, molecular_profile_id: molecular_profile_id ) diff --git a/server/app/graphql/mutations/suggest_variant_group_revision.rb b/server/app/graphql/mutations/suggest_variant_group_revision.rb index 3312d30d5..ff454a875 100644 --- a/server/app/graphql/mutations/suggest_variant_group_revision.rb +++ b/server/app/graphql/mutations/suggest_variant_group_revision.rb @@ -66,19 +66,19 @@ def resolve(fields:, id:, organization_id: nil, comment:) variant_ids: fields.variant_ids ) - cmd = Actions::SuggestVariantGroupRevision.new( + cmd = Activities::SuggestRevisionSet.new( existing_obj: variant_group, updated_obj: updated_variant_group, originating_user: context[:current_user], organization_id: organization_id, - comment: comment + note: comment ) res = cmd.perform if res.succeeded? { variant_group: variant_group, - results: res.revisions + results: res.revision_results } else raise GraphQL::ExecutionError, res.errors.join(', ') diff --git a/server/app/graphql/mutations/suggest_variant_revision.rb b/server/app/graphql/mutations/suggest_variant_revision.rb index a6cd62ebb..8ceec2730 100644 --- a/server/app/graphql/mutations/suggest_variant_revision.rb +++ b/server/app/graphql/mutations/suggest_variant_revision.rb @@ -1,6 +1,5 @@ class Mutations::SuggestVariantRevision < Mutations::MutationWithOrg description 'Suggest a Revision to a Variant entity.' - argument :id, Int, required: true, description: 'The ID of the Variant to suggest a Revision to.' @@ -60,19 +59,19 @@ def resolve(fields:, id:, organization_id: nil, comment: nil) updated_variant = InputAdaptors::VariantInputAdaptor.new(variant_input_object: fields).perform updated_variant.single_variant_molecular_profile_id = variant.single_variant_molecular_profile_id - cmd = Actions::SuggestVariantRevision.new( + cmd = Activities::SuggestRevisionSet.new( existing_obj: variant, updated_obj: updated_variant, originating_user: context[:current_user], organization_id: organization_id, - comment: comment + note: comment ) res = cmd.perform if res.succeeded? { variant: variant, - results: res.revisions + results: res.revision_results } else raise GraphQL::ExecutionError, res.errors.join(', ') diff --git a/server/app/graphql/mutations/update_source_suggestion_status.rb b/server/app/graphql/mutations/update_source_suggestion_status.rb index 53b52e982..9fa909ef2 100644 --- a/server/app/graphql/mutations/update_source_suggestion_status.rb +++ b/server/app/graphql/mutations/update_source_suggestion_status.rb @@ -40,9 +40,9 @@ def authorized?(organization_id: nil, **_) def resolve(id:, organization_id: nil, new_status:, reason: nil, **_) if new_status != source_suggestion.status - cmd = Actions::UpdateSourceSuggestionStatus.new( + cmd = Activities::UpdateSourceSuggestionStatus.new( source_suggestion: source_suggestion, - updating_user: context[:current_user], + originating_user: context[:current_user], organization_id: organization_id, new_status: new_status, reason: reason diff --git a/server/app/graphql/resolvers/activities.rb b/server/app/graphql/resolvers/activities.rb new file mode 100644 index 000000000..ddb06089d --- /dev/null +++ b/server/app/graphql/resolvers/activities.rb @@ -0,0 +1,22 @@ +require 'search_object' +require 'search_object/plugin/graphql' + +module Resolvers + class Activities < GraphQL::Schema::Resolver + include SearchObject.module(:graphql) + + type Types::Interfaces::ActivityInterface.connection_type, null: false + + description 'List and filter activities' + + scope do + Activity.order(created_at: :desc).distinct + end + + option(:user_id, type: Int) do |scope, value| + scope.where(user_id: value) + end + + end + +end diff --git a/server/app/graphql/resolvers/top_level_revisions.rb b/server/app/graphql/resolvers/top_level_revisions.rb index 2e2dbc9e1..fbc49fe51 100644 --- a/server/app/graphql/resolvers/top_level_revisions.rb +++ b/server/app/graphql/resolvers/top_level_revisions.rb @@ -11,11 +11,11 @@ class Resolvers::TopLevelRevisions < GraphQL::Schema::Resolver scope { Revision.all.order('revisions.created_at DESC') } option(:originating_user_id, type: Int, description: 'Limit to revisions by a certain user') do |scope, value| - scope.joins(:creation_event).where('events.originating_user_id = ?', value) + scope.joins(:activities).where('activities.user_id = ?', value).where('activities.type = ?', 'SuggestRevisionSetActivity') end option(:resolving_user_id, type: Int, description: 'Limit to revisions accepted, rejected, or superseded by a certain user') do |scope, value| - scope.joins(:resolving_event).where('events.originating_user_id = ?', value) + scope.joins(:activities).where('activities.user_id = ?', value).where('activities.type IN (?)', ['AcceptRevisionsActivity', 'RejectRevisionsActivity']) end option(:status, type: Types::Revisions::RevisionStatus, description: 'Limit to revisions with a certain status') do |scope, value| diff --git a/server/app/graphql/types/activities/accept_revisions_activity_type.rb b/server/app/graphql/types/activities/accept_revisions_activity_type.rb new file mode 100644 index 000000000..8cb3d6a9d --- /dev/null +++ b/server/app/graphql/types/activities/accept_revisions_activity_type.rb @@ -0,0 +1,16 @@ +module Types::Activities + class AcceptRevisionsActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + + field :revisions, [Types::Revisions::RevisionType], null: false + field :superseded_revisions, [Types::Revisions::RevisionType], null: false + + def revisions + Loaders::AssociationLoader.for(AcceptRevisionsActivity, :linked_revisions).load(object) + end + + def superseded_revisions + Loaders::AssociationLoader.for(AcceptRevisionsActivity, :linked_superseded_revisions).load(object) + end + end +end diff --git a/server/app/graphql/types/activities/comment_activity_type.rb b/server/app/graphql/types/activities/comment_activity_type.rb new file mode 100644 index 000000000..d901e8c5f --- /dev/null +++ b/server/app/graphql/types/activities/comment_activity_type.rb @@ -0,0 +1,11 @@ +module Types::Activities + class CommentActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + + field :comment, Types::Entities::CommentType, null: false + + def comment + Loaders::AssociationLoader.for(CommentActivity, :linked_comment).load(object) + end + end +end diff --git a/server/app/graphql/types/activities/create_complex_molecular_profile_activity_type.rb b/server/app/graphql/types/activities/create_complex_molecular_profile_activity_type.rb new file mode 100644 index 000000000..2b714503c --- /dev/null +++ b/server/app/graphql/types/activities/create_complex_molecular_profile_activity_type.rb @@ -0,0 +1,5 @@ +module Types::Activities + class CreateComplexMolecularProfileActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + end +end diff --git a/server/app/graphql/types/activities/create_variant_activity_type.rb b/server/app/graphql/types/activities/create_variant_activity_type.rb new file mode 100644 index 000000000..675890116 --- /dev/null +++ b/server/app/graphql/types/activities/create_variant_activity_type.rb @@ -0,0 +1,11 @@ +module Types::Activities + class CreateVariantActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + + field :molecular_profile, Types::Entities::MolecularProfileType, null: false + + def molecular_profile + Loaders::AssociationLoader.for(CreateVariantActivity, :linked_molecular_profile).load(object) + end + end +end diff --git a/server/app/graphql/types/activities/deprecate_complex_molecular_profile_activity_type.rb b/server/app/graphql/types/activities/deprecate_complex_molecular_profile_activity_type.rb new file mode 100644 index 000000000..30582c09e --- /dev/null +++ b/server/app/graphql/types/activities/deprecate_complex_molecular_profile_activity_type.rb @@ -0,0 +1,5 @@ +module Types::Activities + class DeprecateComplexMolecularProfileActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + end +end diff --git a/server/app/graphql/types/activities/deprecate_variant_activity_type.rb b/server/app/graphql/types/activities/deprecate_variant_activity_type.rb new file mode 100644 index 000000000..87e956461 --- /dev/null +++ b/server/app/graphql/types/activities/deprecate_variant_activity_type.rb @@ -0,0 +1,11 @@ +module Types::Activities + class DeprecateVariantActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + + field :molecular_profiles, [Types::Entities::MolecularProfileType], null: false + + def molecular_profiles + Loaders::AssociationLoader.for(DeprecateVariantActivity, :linked_molecular_profiles).load(object) + end + end +end diff --git a/server/app/graphql/types/activities/flag_entity_activity_type.rb b/server/app/graphql/types/activities/flag_entity_activity_type.rb new file mode 100644 index 000000000..1263dbd57 --- /dev/null +++ b/server/app/graphql/types/activities/flag_entity_activity_type.rb @@ -0,0 +1,11 @@ +module Types::Activities + class FlagEntityActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + + field :flag, Types::Entities::FlagType, null: false + + def flag + Loaders::AssociationLoader.for(FlagEntityActivity, :linked_flag).load(object) + end + end +end diff --git a/server/app/graphql/types/activities/moderate_assertion_activity_type.rb b/server/app/graphql/types/activities/moderate_assertion_activity_type.rb new file mode 100644 index 000000000..557c42bc7 --- /dev/null +++ b/server/app/graphql/types/activities/moderate_assertion_activity_type.rb @@ -0,0 +1,5 @@ +module Types::Activities + class ModerateAssertionActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + end +end diff --git a/server/app/graphql/types/activities/moderate_evidence_item_activity_type.rb b/server/app/graphql/types/activities/moderate_evidence_item_activity_type.rb new file mode 100644 index 000000000..6697232e5 --- /dev/null +++ b/server/app/graphql/types/activities/moderate_evidence_item_activity_type.rb @@ -0,0 +1,5 @@ +module Types::Activities + class ModerateEvidenceItemActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + end +end diff --git a/server/app/graphql/types/activities/reject_revisions_activity_type.rb b/server/app/graphql/types/activities/reject_revisions_activity_type.rb new file mode 100644 index 000000000..7d679352b --- /dev/null +++ b/server/app/graphql/types/activities/reject_revisions_activity_type.rb @@ -0,0 +1,11 @@ +module Types::Activities + class RejectRevisionsActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + + field :revisions, [Types::Revisions::RevisionType], null: false + + def revisions + Loaders::AssociationLoader.for(RejectRevisionsActivity, :linked_revisions).load(object) + end + end +end diff --git a/server/app/graphql/types/activities/resolve_flag_activity_type.rb b/server/app/graphql/types/activities/resolve_flag_activity_type.rb new file mode 100644 index 000000000..5f3595b54 --- /dev/null +++ b/server/app/graphql/types/activities/resolve_flag_activity_type.rb @@ -0,0 +1,11 @@ +module Types::Activities + class ResolveFlagActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + + field :flag, Types::Entities::FlagType, null: false + + def flag + Loaders::AssociationLoader.for(ResolveFlagActivity, :linked_flag).load(object) + end + end +end diff --git a/server/app/graphql/types/activities/submit_assertion_activity_type.rb b/server/app/graphql/types/activities/submit_assertion_activity_type.rb new file mode 100644 index 000000000..76db385f0 --- /dev/null +++ b/server/app/graphql/types/activities/submit_assertion_activity_type.rb @@ -0,0 +1,5 @@ +module Types::Activities + class SubmitAssertionActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + end +end diff --git a/server/app/graphql/types/activities/submit_evidence_item_activity_type.rb b/server/app/graphql/types/activities/submit_evidence_item_activity_type.rb new file mode 100644 index 000000000..3c6b5d87d --- /dev/null +++ b/server/app/graphql/types/activities/submit_evidence_item_activity_type.rb @@ -0,0 +1,5 @@ +module Types::Activities + class SubmitEvidenceItemActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + end +end diff --git a/server/app/graphql/types/activities/suggest_revision_set_activity_type.rb b/server/app/graphql/types/activities/suggest_revision_set_activity_type.rb new file mode 100644 index 000000000..6df927a95 --- /dev/null +++ b/server/app/graphql/types/activities/suggest_revision_set_activity_type.rb @@ -0,0 +1,16 @@ +module Types::Activities + class SuggestRevisionSetActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + + field :revisions, [Types::Revisions::RevisionType], null: false + field :revision_set, Types::Entities::RevisionSetType, null: false + + def revisions + Loaders::AssociationLoader.for(SuggestRevisionSetActivity, :linked_revisions).load(object) + end + + def revision_set + Loaders::AssociationLoader.for(SuggestRevisionSetActivity, :linked_revision_set).load(object) + end + end +end diff --git a/server/app/graphql/types/activities/suggest_source_activity_type.rb b/server/app/graphql/types/activities/suggest_source_activity_type.rb new file mode 100644 index 000000000..acca9ddde --- /dev/null +++ b/server/app/graphql/types/activities/suggest_source_activity_type.rb @@ -0,0 +1,11 @@ +module Types::Activities + class SuggestSourceActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + + field :source_suggestion, Types::Entities::SourceSuggestionType, null: false + + def source_suggestion + Loaders::AssociationLoader.for(SuggestSourceActivity, :linked_source_suggestion).load(object) + end + end +end diff --git a/server/app/graphql/types/activities/update_source_suggestion_status_activity_type.rb b/server/app/graphql/types/activities/update_source_suggestion_status_activity_type.rb new file mode 100644 index 000000000..eeaf00aaf --- /dev/null +++ b/server/app/graphql/types/activities/update_source_suggestion_status_activity_type.rb @@ -0,0 +1,11 @@ +module Types::Activities + class UpdateSourceSuggestionStatusActivityType < Types::BaseObject + implements Types::Interfaces::ActivityInterface + + field :source_suggestion, Types::Entities::SourceSuggestionType, null: false + + def source_suggestion + Loaders::AssociationLoader.for(UpdateSourceSuggestionStatusActivity, :linked_source_suggestion).load(object) + end + end +end diff --git a/server/app/graphql/types/entities/assertion_type.rb b/server/app/graphql/types/entities/assertion_type.rb index d586afe57..31f48b956 100644 --- a/server/app/graphql/types/entities/assertion_type.rb +++ b/server/app/graphql/types/entities/assertion_type.rb @@ -31,6 +31,7 @@ class AssertionType < Types::BaseObject field :clingen_codes, [Types::Entities::ClingenCodeType], null: false field :amp_level, Types::AmpLevelType, null: true field :submission_event, Types::Entities::EventType, null: false + field :submission_activity, Types::Activities::SubmitAssertionActivityType, null: false field :acceptance_event, Types::Entities::EventType, null: true field :rejection_event, Types::Entities::EventType, null: true field :evidence_items, [Types::Entities::EvidenceItemType], null: false @@ -94,6 +95,10 @@ def submission_event Loaders::AssociationLoader.for(Assertion, :submission_event).load(object) end + def submission_activity + Loaders::AssociationLoader.for(Assertion, :submission_activity).load(object) + end + def acceptance_event Loaders::AssociationLoader.for(Assertion, :acceptance_event).load(object) end diff --git a/server/app/graphql/types/entities/event_type.rb b/server/app/graphql/types/entities/event_type.rb index b92430510..fd190a6ea 100644 --- a/server/app/graphql/types/entities/event_type.rb +++ b/server/app/graphql/types/entities/event_type.rb @@ -18,5 +18,9 @@ def originating_user def organization Loaders::RecordLoader.for(Organization).load(object.organization_id) end + + def subject + Loaders::AssociationLoader.for(Event, :subject).load(object) + end end end diff --git a/server/app/graphql/types/entities/evidence_item_type.rb b/server/app/graphql/types/entities/evidence_item_type.rb index 935894d3a..c39e40517 100644 --- a/server/app/graphql/types/entities/evidence_item_type.rb +++ b/server/app/graphql/types/entities/evidence_item_type.rb @@ -26,6 +26,7 @@ class EvidenceItemType < Types::BaseObject field :variant_hgvs, String, null: false field :variant_origin, Types::VariantOriginType, null: false field :submission_event, Types::Entities::EventType, null: false + field :submission_activity, Types::Activities::SubmitEvidenceItemActivityType, null: false field :acceptance_event, Types::Entities::EventType, null: true field :rejection_event, Types::Entities::EventType, null: true field :assertions, [Types::Entities::AssertionType], null: false @@ -62,6 +63,10 @@ def submission_event Loaders::AssociationLoader.for(EvidenceItem, :submission_event).load(object) end + def submission_activity + Loaders::AssociationLoader.for(EvidenceItem, :submission_activity).load(object) + end + def acceptance_event Loaders::AssociationLoader.for(EvidenceItem, :acceptance_event).load(object) end diff --git a/server/app/graphql/types/entities/flag_type.rb b/server/app/graphql/types/entities/flag_type.rb index dc459c473..3c30d0b42 100644 --- a/server/app/graphql/types/entities/flag_type.rb +++ b/server/app/graphql/types/entities/flag_type.rb @@ -4,16 +4,16 @@ class FlagType < Types::BaseObject implements Types::Interfaces::Commentable implements Types::Interfaces::EventOriginObject + implements Types::Interfaces::EventSubject field :id, Int, null: false field :state, Types::FlagStateType, null: false field :flagging_user, Types::Entities::UserType, null: false field :resolving_user, Types::Entities::UserType, null: true field :created_at, GraphQL::Types::ISO8601DateTime, null: false - field :resolved_at, GraphQL::Types::ISO8601DateTime, null: true field :flaggable, Types::Interfaces::Flaggable, null: false - field :open_comment, Types::Entities::CommentType, null: false - field :resolution_comment, Types::Entities::CommentType, null: true + field :open_activity, Types::Activities::FlagEntityActivityType, null: false + field :resolution_activity, Types::Activities::ResolveFlagActivityType, null: true def flagging_user Loaders::AssociationLoader.for(Flag, :flagging_user).load(object) @@ -23,25 +23,12 @@ def resolving_user Loaders::AssociationLoader.for(Flag, :resolving_user).load(object) end - def resolved_at - resolution_event ? resolution_event.created_at : nil + def open_activity + Loaders::AssociationLoader.for(Flag, :open_activity).load(object) end - def open_comment - object.comments.first - end - - def resolution_comment - if object.state == 'resolved' && object.comments.last != open_comment - object.comments.last - else - nil - end - end - - private - def resolution_event - Event.find_by(action: 'flag resolved', originating_object: object) + def resolution_activity + Loaders::AssociationLoader.for(Flag, :resolution_activity).load(object) end end end diff --git a/server/app/graphql/types/entities/molecular_profile_type.rb b/server/app/graphql/types/entities/molecular_profile_type.rb index b3bf05d05..72135dfed 100644 --- a/server/app/graphql/types/entities/molecular_profile_type.rb +++ b/server/app/graphql/types/entities/molecular_profile_type.rb @@ -23,11 +23,17 @@ class MolecularProfileType < Types::BaseObject field :description, String, null: true field :molecular_profile_aliases, [String], null: false field :deprecated, Boolean, null: false + field :deprecation_reason, Types::MolecularProfileDeprecationReasonType, null: true field :deprecated_variants, [Types::Entities::VariantType], null: false - field :deprecation_event, Types::Entities::EventType, null: true + field :variant_deprecation_activity, Types::Activities::DeprecateVariantActivityType, null: true + field :complex_molecular_profile_deprecation_activity, Types::Activities::DeprecateComplexMolecularProfileActivityType, null: true field :molecular_profile_score, Float, null: false field :evidence_counts_by_status, Types::MolecularProfile::EvidenceItemsByStatusType, null: false + field :evidence_counts_by_type, Types::MolecularProfile::EvidenceItemsByTypeType, null: false field :is_complex, Boolean, null: false + field :is_multi_variant, Boolean, null: false + field :variant_creation_activity, Types::Activities::CreateVariantActivityType, null: true + field :complex_molecular_profile_creation_activity, Types::Activities::CreateComplexMolecularProfileActivityType, null: true def raw_name object.name @@ -51,12 +57,24 @@ def variant Loaders::AssociationLoader.for(MolecularProfile, :variants).load(object) end - def deprecated_variant + def deprecated_variants Loaders::AssociationLoader.for(MolecularProfile, :deprecated_variants).load(object) end - def deprecation_event - Loaders::AssociationLoader.for(MolecularProfile, :deprecation_event).load(object) + def variant_deprecation_activity + Loaders::AssociationLoader.for(MolecularProfile, :variant_deprecation_activity).load(object) + end + + def complex_molecular_profile_deprecation_activity + Loaders::AssociationLoader.for(MolecularProfile, :complex_molecular_profile_deprecation_activity).load(object) + end + + def variant_creation_activity + Loaders::AssociationLoader.for(MolecularProfile, :variant_creation_activity).load(object) + end + + def complex_molecular_profile_creation_activity + Loaders::AssociationLoader.for(MolecularProfile, :complex_molecular_profile_creation_activity).load(object) end def assertions @@ -92,10 +110,38 @@ def evidence_counts_by_status end end - def is_complex + def evidence_counts_by_type + Loaders::AssociationLoader.for(MolecularProfile, :evidence_items_by_type).load(object).then do |type| + if type + type + else + { + molecular_profile_id: object.id, + diagnostic_count: 0, + prognostic_count: 0, + predictive_count: 0, + predisposing_count: 0, + functional_count: 0, + oncogenic_count: 0 + } + end + end + end + + def is_multi_variant Loaders::AssociationCountLoader.for(MolecularProfile, association: :variants).load(object.id).then do |count| count > 1 end end + + def is_complex + Loaders::AssociationCountLoader.for(MolecularProfile, association: :variants).load(object.id).then do |count| + if count > 1 + true + else + object.name.include? "NOT" + end + end + end end end diff --git a/server/app/graphql/types/entities/organization_type.rb b/server/app/graphql/types/entities/organization_type.rb index 628c052e8..5e52cd39c 100644 --- a/server/app/graphql/types/entities/organization_type.rb +++ b/server/app/graphql/types/entities/organization_type.rb @@ -29,6 +29,10 @@ def events Loaders::AssociationLoader.for(Organization, :events).load(object) end + def most_recent_event + Loaders::AssociationLoader.for(Organization, :most_recent_event).load(object) + end + def sub_groups Loaders::AssociationLoader.for(Organization, :groups).load(object) end diff --git a/server/app/graphql/types/entities/revision_set_type.rb b/server/app/graphql/types/entities/revision_set_type.rb new file mode 100644 index 000000000..878da9872 --- /dev/null +++ b/server/app/graphql/types/entities/revision_set_type.rb @@ -0,0 +1,16 @@ +module Types::Entities + class RevisionSetType < Types::BaseObject + implements Types::Interfaces::EventSubject + + field :id, Int, null: false + field :name, String, null: false + field :display_name, String, null: false + field :revisions, [Types::Revisions::RevisionType], null: false + field :created_at, GraphQL::Types::ISO8601DateTime, null: false + field :updated_at, GraphQL::Types::ISO8601DateTime, null: false + + def revisions + Loaders::AssociationLoader.for(RevisionSet, :revisions).load(object) + end + end +end diff --git a/server/app/graphql/types/entities/source_suggestion_type.rb b/server/app/graphql/types/entities/source_suggestion_type.rb index b17f56c88..e56050f1c 100644 --- a/server/app/graphql/types/entities/source_suggestion_type.rb +++ b/server/app/graphql/types/entities/source_suggestion_type.rb @@ -11,6 +11,8 @@ class SourceSuggestionType < Types::BaseObject field :molecular_profile, Types::Entities::MolecularProfileType, null: true field :disease, Types::Entities::DiseaseType, null: true field :initial_comment, String, null: false + field :creation_activity, Types::Activities::SuggestSourceActivityType, null: false + field :last_status_update_activity, Types::Activities::UpdateSourceSuggestionStatusActivityType, null: true field :status, Types::SourceSuggestionStatusType, null: false field :link, String, null: false field :reason, String, null: true @@ -32,6 +34,14 @@ def disease Loaders::AssociationLoader.for(SourceSuggestion, :disease).load(object) end + def creation_activity + Loaders::AssociationLoader.for(SourceSuggestion, :creation_activity).load(object) + end + + def last_status_update_activity + Loaders::AssociationLoader.for(SourceSuggestion, :last_status_update_activity).load(object) + end + def name "SSID#{object.id}" end diff --git a/server/app/graphql/types/entities/variant_type.rb b/server/app/graphql/types/entities/variant_type.rb index 4894a1eea..fdb470f4e 100644 --- a/server/app/graphql/types/entities/variant_type.rb +++ b/server/app/graphql/types/entities/variant_type.rb @@ -28,10 +28,10 @@ class VariantType < Types::BaseObject field :link, String, null: false field :single_variant_molecular_profile, Types::Entities::MolecularProfileType, null: false field :single_variant_molecular_profile_id, Int, null: false + field :deprecation_activity, Types::Activities::DeprecateVariantActivityType, null: true field :deprecated, Boolean, null: false - field :deprecation_reason, Types::DeprecationReasonType, null: true - field :deprecation_comment, Types::Entities::CommentType, null: true - field :deprecation_event, Types::Entities::EventType, null: true + field :deprecation_reason, Types::VariantDeprecationReasonType, null: true + field :creation_activity, Types::Activities::CreateVariantActivityType, null: true #TODO: should try to make this non-nullable if complete backfill is possible field :molecular_profiles, Types::Entities::MolecularProfileType.connection_type, null: false field :open_cravat_url, String, null: true @@ -51,12 +51,12 @@ def single_variant_molecular_profile Loaders::AssociationLoader.for(Variant, :single_variant_molecular_profile).load(object) end - def deprecation_comment - Loaders::AssociationLoader.for(Variant, :deprecation_comment).load(object) + def deprecation_activity + Loaders::AssociationLoader.for(Variant, :deprecation_activity).load(object) end - def deprecation_event - Loaders::AssociationLoader.for(Variant, :deprecation_event).load(object) + def creation_activity + Loaders::AssociationLoader.for(Variant, :creation_activity).load(object) end def primary_coordinates diff --git a/server/app/graphql/types/events/event_action_type.rb b/server/app/graphql/types/events/event_action_type.rb index 8918b1fde..6efb42d27 100644 --- a/server/app/graphql/types/events/event_action_type.rb +++ b/server/app/graphql/types/events/event_action_type.rb @@ -21,6 +21,8 @@ class EventActionType < Types::BaseEnum value 'REJECTED_SOURCE_SUGGESTION', value: 'rejected source suggestion' value 'DEPRECATED_VARIANT', value: 'deprecated variant' value 'DEPRECATED_MOLECULAR_PROFILE', value: 'deprecated molecular profile' + value 'VARIANT_CREATED', value: 'variant created' + value 'COMPLEX_MOLECULAR_PROFILE_CREATED', value: 'complex molecular profile created' end end diff --git a/server/app/graphql/types/interfaces/activity_interface.rb b/server/app/graphql/types/interfaces/activity_interface.rb new file mode 100644 index 000000000..1c6dc0361 --- /dev/null +++ b/server/app/graphql/types/interfaces/activity_interface.rb @@ -0,0 +1,100 @@ +module Types::Interfaces + module ActivityInterface + include Types::BaseInterface + + description 'An activity done by a curator or editor' + + field :id, Int, null: false + field :verbiage, String, null: false + field :note, String, null: true + field :parsed_note, [Types::Commentable::CommentBodySegment], null: false + field :events, [Types::Entities::EventType], null: false + field :subject, Types::Interfaces::EventSubject, null: false + field :user, Types::Entities::UserType, null: false + field :organization, Types::Entities::OrganizationType, null: true + field :created_at, GraphQL::Types::ISO8601DateTime, null: false + + def user + Loaders::AssociationLoader.for(Activity, :user).load(object) + end + + def organization + Loaders::AssociationLoader.for(Activity, :organization).load(object) + end + + def events + Loaders::AssociationLoader.for(Activity, :events).load(object) + end + + def subject + Loaders::AssociationLoader.for(Activity, :subject).load(object) + end + + def parsed_note + Rails.cache.fetch(hash_key_from_object(object)) do + Actions::FormatCommentText.get_segments(text: object.note) + end + end + + def hash_key_from_object(object) + "segments_#{object.class}_#{object.id}_#{object.updated_at}" + end + + orphan_types( + Types::Activities::FlagEntityActivityType, + Types::Activities::ResolveFlagActivityType, + Types::Activities::SubmitEvidenceItemActivityType, + Types::Activities::SubmitAssertionActivityType, + Types::Activities::ModerateAssertionActivityType, + Types::Activities::ModerateEvidenceItemActivityType, + Types::Activities::DeprecateVariantActivityType, + Types::Activities::SuggestSourceActivityType, + Types::Activities::CommentActivityType, + Types::Activities::SuggestRevisionSetActivityType, + Types::Activities::UpdateSourceSuggestionStatusActivityType, + Types::Activities::RejectRevisionsActivityType, + Types::Activities::AcceptRevisionsActivityType, + Types::Activities::CreateVariantActivityType, + Types::Activities::DeprecateComplexMolecularProfileActivityType, + ) + + definition_methods do + def resolve_type(object, context) + case object + when FlagEntityActivity + Types::Activities::FlagEntityActivityType + when ResolveFlagActivity + Types::Activities::ResolveFlagActivityType + when SubmitEvidenceItemActivity + Types::Activities::SubmitEvidenceItemActivityType + when ModerateEvidenceItemActivity + Types::Activities::ModerateEvidenceItemActivityType + when SubmitAssertionActivity + Types::Activities::SubmitAssertionActivityType + when ModerateAssertionActivity + Types::Activities::ModerateAssertionActivityType + when DeprecateVariantActivity + Types::Activities::DeprecateVariantActivityType + when SuggestSourceActivity + Types::Activities::SuggestSourceActivityType + when CommentActivity + Types::Activities::CommentActivityType + when SuggestRevisionSetActivity + Types::Activities::SuggestRevisionSetActivityType + when UpdateSourceSuggestionStatusActivity + Types::Activities::UpdateSourceSuggestionStatusActivityType + when RejectRevisionsActivity + Types::Activities::RejectRevisionsActivityType + when AcceptRevisionsActivity + Types::Activities::AcceptRevisionsActivityType + when CreateVariantActivity + Types::Activities::CreateVariantActivityType + when DeprecateComplexMolecularProfileActivity + Types::Activities::DeprecateComplexMolecularProfileActivityType + else + raise "Unexpected Activity type #{object.class}" + end + end + end + end +end diff --git a/server/app/graphql/types/interfaces/event_subject.rb b/server/app/graphql/types/interfaces/event_subject.rb index 2a82e60ec..f5461d601 100644 --- a/server/app/graphql/types/interfaces/event_subject.rb +++ b/server/app/graphql/types/interfaces/event_subject.rb @@ -31,6 +31,10 @@ def resolve_type(object, context) Types::Entities::VariantGroupType when MolecularProfile Types::Entities::MolecularProfileType + when Flag + Types::Entities::FlagType + when RevisionSet + Types::Entities::RevisionSetType else raise "Unexpected EventSubject type: #{object.class}" end diff --git a/server/app/graphql/types/molecular_profile/evidence_items_by_type_type.rb b/server/app/graphql/types/molecular_profile/evidence_items_by_type_type.rb new file mode 100644 index 000000000..5299de4d3 --- /dev/null +++ b/server/app/graphql/types/molecular_profile/evidence_items_by_type_type.rb @@ -0,0 +1,11 @@ +module Types::MolecularProfile + class EvidenceItemsByTypeType < Types::BaseObject + field :molecular_profile_id, Int, null: false + field :diagnostic_count, Int, null: false + field :prognostic_count, Int, null: false + field :predictive_count, Int, null: false + field :predisposing_count, Int, null: false + field :functional_count, Int, null: false + field :oncogenic_count, Int, null: false + end +end diff --git a/server/app/graphql/types/molecular_profile_deprecation_reason_mutation_input_type.rb b/server/app/graphql/types/molecular_profile_deprecation_reason_mutation_input_type.rb new file mode 100644 index 000000000..2f8e4c0d1 --- /dev/null +++ b/server/app/graphql/types/molecular_profile_deprecation_reason_mutation_input_type.rb @@ -0,0 +1,7 @@ +module Types + class MolecularProfileDeprecationReasonMutationInputType < Types::BaseEnum + value 'DUPLICATE', value: 'duplicate' + value 'INVALID', value: 'invalid_molecular_profile' + value 'OTHER', value: 'other' + end +end diff --git a/server/app/graphql/types/molecular_profile_deprecation_reason_type.rb b/server/app/graphql/types/molecular_profile_deprecation_reason_type.rb new file mode 100644 index 000000000..4d10fe753 --- /dev/null +++ b/server/app/graphql/types/molecular_profile_deprecation_reason_type.rb @@ -0,0 +1,8 @@ +module Types + class MolecularProfileDeprecationReasonType < Types::BaseEnum + value 'DUPLICATE', value: 'duplicate' + value 'INVALID', value: 'invalid_molecular_profile' + value 'OTHER', value: 'other' + value 'VARIANT_DEPRECATED', value: 'variant_deprecated' + end +end diff --git a/server/app/graphql/types/mutation_type.rb b/server/app/graphql/types/mutation_type.rb index 54415eb1b..8b136e968 100644 --- a/server/app/graphql/types/mutation_type.rb +++ b/server/app/graphql/types/mutation_type.rb @@ -24,6 +24,7 @@ class MutationType < Types::BaseObject #deprecation field :deprecate_variant, mutation: Mutations::DeprecateVariant + field :deprecate_complex_molecular_profile, mutation: Mutations::DeprecateComplexMolecularProfile #molecular profiles field :create_molecular_profile, mutation: Mutations::CreateMolecularProfile @@ -51,6 +52,6 @@ class MutationType < Types::BaseObject #non-moderated entity creation field :add_disease, mutation: Mutations::AddDisease field :add_therapy, mutation: Mutations::AddTherapy - field :add_variant, mutation: Mutations::AddVariant + field :create_variant, mutation: Mutations::CreateVariant end end diff --git a/server/app/graphql/types/query_type.rb b/server/app/graphql/types/query_type.rb index f2cdb430c..1d23d278a 100644 --- a/server/app/graphql/types/query_type.rb +++ b/server/app/graphql/types/query_type.rb @@ -138,6 +138,11 @@ def authorized?(object, args, context) description 'Fetch a list of countries for user profiles.' end + field :activity, Types::Interfaces::ActivityInterface, null: true do + description "Find a CIViC activity record by CIViC ID" + argument :id, Int, required: true + end + field :revisions, resolver: Resolvers::TopLevelRevisions field :validate_revisions_for_acceptance, resolver: Resolvers::ValidateRevisionsForAcceptance @@ -181,6 +186,9 @@ def authorized?(object, args, context) field :timepoint_stats, Types::CivicTimepointStats, null: false + field :activities, resolver: Resolvers::Activities + + def molecular_profile(id: ) ::MolecularProfile.find_by(id: id) end @@ -248,6 +256,10 @@ def revision(id: ) Revision.find_by(id: id) end + def activity(id: ) + Activity.find_by(id: id) + end + def subscription_for_entity(subscribable: ) if subscribable Subscription.find_by( diff --git a/server/app/graphql/types/revisions/revision_type.rb b/server/app/graphql/types/revisions/revision_type.rb index 7cd5184c2..8e79cf815 100644 --- a/server/app/graphql/types/revisions/revision_type.rb +++ b/server/app/graphql/types/revisions/revision_type.rb @@ -11,17 +11,15 @@ class RevisionType < Types::BaseObject field :current_value, GraphQL::Types::JSON, null: true field :suggested_value, GraphQL::Types::JSON, null: true field :field_name, String, null: false - field :creation_comment, Types::Entities::CommentType, null: true - field :resolution_comment, Types::Entities::CommentType, null: true field :created_at, GraphQL::Types::ISO8601DateTime, null: false - field :resolved_at, GraphQL::Types::ISO8601DateTime, null: true field :updated_at, GraphQL::Types::ISO8601DateTime, null: false field :revision_set_id, Int, null: false field :linkout_data, Types::Revisions::LinkoutData, null: false - field :revisor, Types::Entities::UserType, null: true - field :resolver, Types::Entities::UserType, null: true - field :creation_event, Types::Entities::EventType, null: true - field :resolving_event, Types::Entities::EventType, null: true + field :creation_activity, Types::Activities::SuggestRevisionSetActivityType, null: true + field :acceptance_activity, Types::Activities::AcceptRevisionsActivityType, null: true + field :superseding_activity, Types::Activities::AcceptRevisionsActivityType, null: true + field :rejection_activity, Types::Activities::RejectRevisionsActivityType, null: true + field :resolution_activity, Types::Interfaces::ActivityInterface, null: true field :subject, Types::Interfaces::EventSubject, null: false def comments @@ -32,51 +30,39 @@ def linkout_data Types::Revisions::LinkoutData.from_revision(object) end - def creation_event - Loaders::AssociationLoader.for(Revision, :creation_event).load(object) + def creation_activity + Loaders::AssociationLoader.for(Revision, :creation_activity).load(object) end - def resolving_event - Loaders::AssociationLoader.for(Revision, :resolving_event).load(object) - end - - def revisor - Loaders::AssociationLoader.for(Revision, :creation_event).load(object).then do |event| - if !event.nil? - Loaders::AssociationLoader.for(Event, :originating_user).load(event) - end - end - end - - def resolved_at - Loaders::AssociationLoader.for(Revision, :resolving_event).load(object).then do |event| - if !event.nil? - event.created_at - end + def acceptance_activity + if object.status == 'accepted' + Loaders::AssociationLoader.for(Revision, :acceptance_activity).load(object) + else + nil end end - def creation_comment - Loaders::AssociationLoader.for(Revision, :comments).load(object).then do |comments| - comments.first + def superseding_activity + if object.status == 'superseded' + Loaders::AssociationLoader.for(Revision, :acceptance_activity).load(object) + else + nil end end - def resolution_comment - Loaders::AssociationLoader.for(Revision, :comments).load(object).then do |comments| - if (comments.count > 1) - comments.last - else - nil - end + def rejection_activity + if object.status == 'rejected' + Loaders::AssociationLoader.for(Revision, :rejection_activity).load(object) + else + nil end end - def resolver - Loaders::AssociationLoader.for(Revision, :resolving_event).load(object).then do |event| - if !event.nil? - Loaders::AssociationLoader.for(Event, :originating_user).load(event) - end + def resolution_activity + if object.status != 'new' + Loaders::AssociationLoader.for(Revision, :resolution_activity).load(object) + else + nil end end end diff --git a/server/app/graphql/types/deprecation_reason_type.rb b/server/app/graphql/types/variant_deprecation_reason_type.rb similarity index 72% rename from server/app/graphql/types/deprecation_reason_type.rb rename to server/app/graphql/types/variant_deprecation_reason_type.rb index 11076c6b6..40f76c1a2 100644 --- a/server/app/graphql/types/deprecation_reason_type.rb +++ b/server/app/graphql/types/variant_deprecation_reason_type.rb @@ -1,5 +1,5 @@ module Types - class DeprecationReasonType < Types::BaseEnum + class VariantDeprecationReasonType < Types::BaseEnum value 'DUPLICATE', value: 'duplicate' value 'INVALID', value: 'invalid_variant' value 'OTHER', value: 'other' diff --git a/server/app/models/accept_revisions_activity.rb b/server/app/models/accept_revisions_activity.rb new file mode 100644 index 000000000..3ee76a6c7 --- /dev/null +++ b/server/app/models/accept_revisions_activity.rb @@ -0,0 +1,23 @@ +class AcceptRevisionsActivity < Activity + has_many :revision_links, + ->() { where(entity_type: 'Revision') }, + foreign_key: :activity_id, + class_name: 'ActivityLinkedEntity' + + has_many :linked_revisions, + ->() { where(status: 'accepted') }, + through: :revision_links, + source: :entity, + source_type: 'Revision' + + has_many :linked_superseded_revisions, + ->() { where(status: 'superseded') }, + through: :revision_links, + source: :entity, + source_type: 'Revision' + + def generate_verbiage + rev_count = linked_revisions.size + "accepted #{rev_count} #{'revision'.pluralize(rev_count)} on" + end +end diff --git a/server/app/models/actions/accept_revisions.rb b/server/app/models/actions/accept_revisions.rb index 03f6e22b8..1aefa64e2 100644 --- a/server/app/models/actions/accept_revisions.rb +++ b/server/app/models/actions/accept_revisions.rb @@ -2,14 +2,13 @@ class Actions::AcceptRevisions include Actions::Transactional include Actions::WithOriginatingOrganization - attr_reader :revisions, :accepting_user, :organization_id, :subject, :superseded_revisions, :comment + attr_reader :revisions, :accepting_user, :organization_id, :subject, :superseded_revisions - def initialize(revisions:, accepting_user:, organization_id: nil, comment: nil) + def initialize(revisions:, accepting_user:, organization_id: nil ) @revisions = revisions @accepting_user = accepting_user @organization_id = organization_id @subject = revisions.first.subject - @comment = comment end def execute @@ -26,16 +25,6 @@ def execute revision.save! supersede_conflicting_revisions(revision) create_event(revision) - unless comment.nil? - cmd = Actions::AddComment.new( - title: "", - body: comment, - commenter: accepting_user, - commentable: revision, - organization_id: organization_id - ) - cmd.perform - end end subject.on_revision_accepted @@ -50,7 +39,7 @@ def supersede_conflicting_revisions(revision) superseded_revisions.each do |sc| sc.status = 'superseded' sc.save! - Event.create!( + events << Event.new( action: 'revision superseded', originating_user: accepting_user, subject: subject, @@ -61,7 +50,7 @@ def supersede_conflicting_revisions(revision) end def create_event(revision) - Event.create!( + events << Event.new( action: 'revision accepted', originating_user: accepting_user, subject: subject, diff --git a/server/app/models/actions/add_comment.rb b/server/app/models/actions/add_comment.rb index e88233977..76e036c25 100644 --- a/server/app/models/actions/add_comment.rb +++ b/server/app/models/actions/add_comment.rb @@ -1,9 +1,8 @@ module Actions class AddComment include Actions::Transactional - include Actions::WithOriginatingOrganization attr_reader :comment, :commenter, :originating_user, :commentable, - :subject, :title, :body, :event, :organization_id + :subject, :title, :body, :organization_id def initialize(title: nil, body:, commenter:, commentable:, organization_id: nil) @title = title @@ -18,14 +17,14 @@ def initialize(title: nil, body:, commenter:, commentable:, organization_id: nil private def execute create_comment - @event = Event.create!( + event = Event.new( action: 'commented', originating_user: originating_user, subject: subject, - organization: resolve_organization(originating_user, organization_id), + organization_id: organization_id, originating_object: comment ) - handle_mentions + events << event subscribe_user end @@ -38,10 +37,6 @@ def create_comment ) end - def handle_mentions - ::CaptureMentionsAndNotify.perform_later(comment, event) - end - def subscribe_user SubscribeUser.perform_later(commentable, commenter, subscribe_to_children: false) end diff --git a/server/app/models/actions/create_complex_molecular_profile.rb b/server/app/models/actions/create_complex_molecular_profile.rb index d2d0c4b26..03c11c13b 100644 --- a/server/app/models/actions/create_complex_molecular_profile.rb +++ b/server/app/models/actions/create_complex_molecular_profile.rb @@ -2,11 +2,13 @@ module Actions class CreateComplexMolecularProfile include Actions::Transactional - attr_reader :variants, :structure, :molecular_profile, :mp_name + attr_reader :variants, :structure, :molecular_profile, :mp_name, :originating_user, :organization_id - def initialize(variants:, structure:) + def initialize(variants:, structure:, originating_user:, organization_id: nil) @variants = variants @structure = structure + @originating_user = originating_user + @organization_id = organization_id @mp_name = Actions::GenerateMolecularProfileName.generate_name(structure: structure) end @@ -20,11 +22,21 @@ def execute end else mp = MolecularProfile.where(name: mp_name).first_or_initialize - + mp.variants = variants mp.evidence_score = 0 mp.save! + event = Event.new( + action: 'complex molecular profile created', + originating_user: originating_user, + organization_id: organization_id, + subject: mp, + originating_object: mp, + ) + + events << event + @molecular_profile = mp end #TODO: do we want to subscribe the creating user to the mp? diff --git a/server/app/models/actions/create_variant.rb b/server/app/models/actions/create_variant.rb index e01e522f2..650c53363 100644 --- a/server/app/models/actions/create_variant.rb +++ b/server/app/models/actions/create_variant.rb @@ -2,10 +2,12 @@ module Actions class CreateVariant include Actions::Transactional - attr_reader :variant, :molecular_profile + attr_reader :variant, :molecular_profile, :originating_user, :organization_id - def initialize(variant_name:, gene_id:) + def initialize(variant_name:, gene_id:, originating_user:, organization_id: nil) @variant = Variant.new(name: variant_name, gene_id: gene_id) + @originating_user = originating_user + @organization_id = organization_id end private @@ -25,6 +27,16 @@ def execute mp.variants = [variant] mp.save! + event = Event.new( + action: 'variant created', + originating_user: originating_user, + subject: variant, + organization_id: organization_id, + originating_object: variant + ) + + events << event + @molecular_profile = mp end end diff --git a/server/app/models/actions/deprecate_complex_molecular_profile.rb b/server/app/models/actions/deprecate_complex_molecular_profile.rb new file mode 100644 index 000000000..dc7b92750 --- /dev/null +++ b/server/app/models/actions/deprecate_complex_molecular_profile.rb @@ -0,0 +1,36 @@ +module Actions + class DeprecateComplexMolecularProfile + include Actions::Transactional + attr_reader :deprecating_user, :molecular_profile, :organization_id, :deprecation_reason + + def initialize(deprecating_user:, molecular_profile:, organization_id: nil, deprecation_reason:) + @deprecating_user = deprecating_user + @molecular_profile = molecular_profile + @organization_id = organization_id + @deprecation_reason = deprecation_reason + end + + private + def execute + mark_molecular_profile_as_deprecated + create_events + end + + def mark_molecular_profile_as_deprecated + molecular_profile.deprecated = true + molecular_profile.deprecation_reason = deprecation_reason + molecular_profile.save! + end + + def create_events + events << Event.new( + action: 'deprecated molecular profile', + originating_user: deprecating_user, + subject: molecular_profile, + originating_object: molecular_profile, + organization_id: organization_id, + ) + end + end +end + diff --git a/server/app/models/actions/deprecate_variant.rb b/server/app/models/actions/deprecate_variant.rb index fe994c393..64247158d 100644 --- a/server/app/models/actions/deprecate_variant.rb +++ b/server/app/models/actions/deprecate_variant.rb @@ -1,15 +1,13 @@ module Actions class DeprecateVariant include Actions::Transactional - include Actions::WithOriginatingOrganization - attr_reader :deprecating_user, :variant, :newly_deprecated_molecular_profiles, :organization_id, :deprecation_reason, :comment + attr_reader :deprecating_user, :variant, :newly_deprecated_molecular_profiles, :organization_id, :deprecation_reason - def initialize(deprecating_user:, variant:, organization_id: nil, deprecation_reason:, comment:) + def initialize(deprecating_user:, variant:, organization_id: nil, deprecation_reason:) @deprecating_user = deprecating_user @variant = variant @organization_id = organization_id @deprecation_reason = deprecation_reason - @comment = comment @newly_deprecated_molecular_profiles = [] end @@ -17,14 +15,13 @@ def initialize(deprecating_user:, variant:, organization_id: nil, deprecation_re def execute mark_variant_as_deprecated mark_molecular_profiles_as_deprecated - create_comment create_events end def mark_variant_as_deprecated variant.deprecated = true variant.deprecation_reason = deprecation_reason - variant.save! + variant.save!(validate: false) end def mark_molecular_profiles_as_deprecated @@ -33,41 +30,29 @@ def mark_molecular_profiles_as_deprecated raise "Molecular Profile #{mp.id} can't be deprecated because it has evidence items that are in accepted or submitted state." elsif !mp.deprecated mp.deprecated = true + mp.deprecation_reason = 'variant_deprecated' mp.save! newly_deprecated_molecular_profiles.append(mp) end end end - def create_comment - cmd = Actions::AddComment.new( - title: "", - body: comment, - commenter: deprecating_user, - commentable: variant, - organization_id: organization_id - ) - cmd.perform - variant.deprecation_comment = cmd.comment - variant.save! - end - def create_events - Event.create!( + events << Event.new( action: 'deprecated variant', originating_user: deprecating_user, subject: variant, originating_object: variant, - organization: resolve_organization(deprecating_user, organization_id) + organization_id: organization_id, ) newly_deprecated_molecular_profiles.each do |mp| - Event.create!( + events << Event.new( action: 'deprecated molecular profile', originating_user: deprecating_user, subject: mp, originating_object: variant, - organization: resolve_organization(deprecating_user, organization_id) + organization_id: organization_id, ) end end diff --git a/server/app/models/actions/flag_entity.rb b/server/app/models/actions/flag_entity.rb index 5e3a29d95..343ff987d 100644 --- a/server/app/models/actions/flag_entity.rb +++ b/server/app/models/actions/flag_entity.rb @@ -1,21 +1,18 @@ module Actions class FlagEntity include Actions::Transactional - include Actions::WithOriginatingOrganization - attr_reader :flagging_user, :flaggable, :flag, :organization_id, :comment + attr_reader :flagging_user, :flaggable, :flag, :organization_id - def initialize(flagging_user:, flaggable:, organization_id: nil, comment:) + def initialize(flagging_user:, flaggable:, organization_id: nil) @flagging_user = flagging_user @flaggable = flaggable @organization_id = organization_id - @comment = comment end private def execute create_flag mark_as_flagged - create_comment create_event #subscribe_user end @@ -33,24 +30,13 @@ def mark_as_flagged flaggable.save!(validate: false) end - def create_comment - cmd = Actions::AddComment.new( - title: "", - body: comment, - commenter: flagging_user, - commentable: flag, - organization_id: organization_id - ) - cmd.perform - end - def create_event - Event.create!( + events << Event.new( action: 'flagged', originating_user: flagging_user, subject: flaggable, originating_object: flag, - organization: resolve_organization(flagging_user, organization_id) + organization_id: organization_id, ) end diff --git a/server/app/models/actions/format_comment_text.rb b/server/app/models/actions/format_comment_text.rb index 90a4a2f9b..8349ba6ab 100644 --- a/server/app/models/actions/format_comment_text.rb +++ b/server/app/models/actions/format_comment_text.rb @@ -4,6 +4,10 @@ module Actions class FormatCommentText def self.get_segments(text:) + if text.blank? + return [] + end + linked = Rinku.auto_link(text, :all, 'target="_blank"') sanitized = Sanitize.fragment(linked, Sanitize::Config::BASIC) .gsub("\n", "
") diff --git a/server/app/models/actions/moderate_assertion.rb b/server/app/models/actions/moderate_assertion.rb index 1f62f2f9b..96b5203ef 100644 --- a/server/app/models/actions/moderate_assertion.rb +++ b/server/app/models/actions/moderate_assertion.rb @@ -1,7 +1,6 @@ module Actions class ModerateAssertion include Actions::Transactional - include Actions::WithOriginatingOrganization attr_reader :assertion, :originating_user, :organization_id, :new_status @@ -37,11 +36,11 @@ def create_event end - Event.create!( + events << Event.new( action: action, originating_user: originating_user, subject: assertion, - organization: resolve_organization(originating_user, organization_id), + organization_id: organization_id, originating_object: assertion ) end diff --git a/server/app/models/actions/moderate_evidence_item.rb b/server/app/models/actions/moderate_evidence_item.rb index 9c311e996..5ef6941ae 100644 --- a/server/app/models/actions/moderate_evidence_item.rb +++ b/server/app/models/actions/moderate_evidence_item.rb @@ -1,7 +1,6 @@ module Actions class ModerateEvidenceItem include Actions::Transactional - include Actions::WithOriginatingOrganization attr_reader :evidence_item, :originating_user, :organization_id, :new_status @@ -42,11 +41,11 @@ def create_event end - Event.create!( + events << Event.new( action: action, originating_user: originating_user, subject: evidence_item, - organization: resolve_organization(originating_user, organization_id), + organization_id: organization_id, originating_object: evidence_item ) end diff --git a/server/app/models/actions/reject_revisions.rb b/server/app/models/actions/reject_revisions.rb index e5b95bd28..9d044f148 100644 --- a/server/app/models/actions/reject_revisions.rb +++ b/server/app/models/actions/reject_revisions.rb @@ -1,22 +1,19 @@ module Actions class RejectRevisions include Transactional - include Actions::WithOriginatingOrganization - attr_reader :revisions, :rejecting_user, :organization_id, :comment + attr_reader :revisions, :rejecting_user, :organization_id - def initialize(revisions:, rejecting_user:, organization_id:, comment:) + def initialize(revisions:, rejecting_user:, organization_id:) @revisions = revisions @rejecting_user = rejecting_user @organization_id = organization_id - @comment = comment end def execute revisions.each do |revision| update_revision_status(revision) create_event(revision) - create_comment(revision) end end @@ -27,24 +24,13 @@ def update_revision_status(revision) end def create_event(revision) - Event.create!( + events << Event.new( action: 'revision rejected', originating_user: rejecting_user, subject: revision.subject, originating_object: revision, - organization: resolve_organization(rejecting_user, organization_id) - ) - end - - def create_comment(revision) - cmd = Actions::AddComment.new( - title: "", - body: comment, - commenter: rejecting_user, - commentable: revision, organization_id: organization_id ) - cmd.perform end end end diff --git a/server/app/models/actions/resolve_flag.rb b/server/app/models/actions/resolve_flag.rb index 20fd3c71e..25a2f05cd 100644 --- a/server/app/models/actions/resolve_flag.rb +++ b/server/app/models/actions/resolve_flag.rb @@ -1,23 +1,19 @@ module Actions class ResolveFlag include Actions::Transactional - include Actions::WithOriginatingOrganization + attr_reader :flag, :resolving_user, :organization_id, :flaggable - attr_reader :flag, :resolving_user, :organization_id, :comment, :flaggable - - def initialize(flag:, resolving_user:, organization_id:, comment:) + def initialize(flag:, resolving_user:, organization_id:) @flag = flag @flaggable = flag.flaggable @resolving_user = resolving_user @organization_id = organization_id - @comment = comment end def execute resolve_flag update_flaggable_status create_event - create_comment end def resolve_flag @@ -35,23 +31,13 @@ def update_flaggable_status end def create_event - Event.create!( + events << Event.new( action: 'flag resolved', originating_user: resolving_user, subject: flaggable, originating_object: flag, - organization: resolve_organization(resolving_user, organization_id) - ) - end - - def create_comment - cmd = Actions::AddComment.new( - title: "", - body: comment, - commenter: resolving_user, - commentable: flag, organization_id: organization_id - ).perform + ) end end end diff --git a/server/app/models/actions/submit_assertion.rb b/server/app/models/actions/submit_assertion.rb index 26b025a3f..594eae778 100644 --- a/server/app/models/actions/submit_assertion.rb +++ b/server/app/models/actions/submit_assertion.rb @@ -1,14 +1,12 @@ module Actions class SubmitAssertion include Actions::Transactional - include Actions::WithOriginatingOrganization - attr_reader :assertion, :originating_user, :organization_id, :comment_body + attr_reader :assertion, :originating_user, :organization_id - def initialize(assertion:, originating_user:, organization_id:, comment_body: ) + def initialize(assertion:, originating_user:, organization_id: ) @assertion = assertion @originating_user = originating_user @organization_id = organization_id - @comment_body = comment_body end private @@ -18,33 +16,16 @@ def execute assertion.save! assertion.subscribe_user(originating_user) create_event - create_comment end def create_event - Event.create!( + events << Event.new( action: 'assertion submitted', originating_user: originating_user, subject: assertion, - organization: resolve_organization(originating_user, organization_id), + organization_id: organization_id, originating_object: assertion ) end - - def create_comment - if comment_body.present? - cmd = Actions::AddComment.new( - title: "", - body: comment_body, - commenter: originating_user, - commentable: assertion, - organization_id: organization_id - ) - cmd.perform - if !cmd.succeeded? - raise StandardError.new(cmd.errors.join(', ')) - end - end - end end end diff --git a/server/app/models/actions/submit_evidence_item.rb b/server/app/models/actions/submit_evidence_item.rb index e66deeb1e..bf9819e2e 100644 --- a/server/app/models/actions/submit_evidence_item.rb +++ b/server/app/models/actions/submit_evidence_item.rb @@ -1,14 +1,12 @@ module Actions class SubmitEvidenceItem include Actions::Transactional - include Actions::WithOriginatingOrganization - attr_reader :evidence_item, :originating_user, :organization_id, :comment_body + attr_reader :evidence_item, :originating_user, :organization_id - def initialize(evidence_item:, originating_user:, organization_id:, comment_body: ) + def initialize(evidence_item:, originating_user:, organization_id: ) @evidence_item = evidence_item @originating_user = originating_user @organization_id = organization_id - @comment_body = comment_body end private @@ -17,33 +15,16 @@ def execute evidence_item.save! evidence_item.subscribe_user(originating_user) create_event - create_comment end def create_event - Event.create!( + events << Event.new( action: 'submitted', originating_user: originating_user, subject: evidence_item, - organization: resolve_organization(originating_user, organization_id), + organization_id: organization_id, originating_object: evidence_item ) end - - def create_comment - if comment_body.present? - cmd = Actions::AddComment.new( - title: "", - body: comment_body, - commenter: originating_user, - commentable: evidence_item, - organization_id: organization_id - ) - cmd.perform - if !cmd.succeeded? - raise StandardError.new(cmd.errors.join(', ')) - end - end - end end end diff --git a/server/app/models/actions/suggest_assertion_revision.rb b/server/app/models/actions/suggest_assertion_revision.rb deleted file mode 100644 index e4b435ce4..000000000 --- a/server/app/models/actions/suggest_assertion_revision.rb +++ /dev/null @@ -1,25 +0,0 @@ -class Actions::SuggestAssertionRevision < Actions::SuggestRevisionSet - def editable_fields - [ - :molecular_profile_id, - :description, - :summary, - :variant_origin, - :assertion_type, - :significance, - :disease_id, - :assertion_direction, - :phenotype_ids, - :therapy_ids, - :therapy_interaction_type, - :amp_level, - :evidence_item_ids, - :nccn_guideline_id, - :nccn_guideline_version, - :acmg_code_ids, - :clingen_code_ids, - :fda_companion_test, - :fda_regulatory_approval, - ] - end -end diff --git a/server/app/models/actions/suggest_evidence_item_revision.rb b/server/app/models/actions/suggest_evidence_item_revision.rb deleted file mode 100644 index fdcd742e9..000000000 --- a/server/app/models/actions/suggest_evidence_item_revision.rb +++ /dev/null @@ -1,19 +0,0 @@ -class Actions::SuggestEvidenceItemRevision < Actions::SuggestRevisionSet - def editable_fields - [ - :molecular_profile_id, - :variant_origin, - :source_id, - :evidence_type, - :significance, - :disease_id, - :description, - :evidence_level, - :evidence_direction, - :phenotype_ids, - :rating, - :therapy_interaction_type, - :therapy_ids - ] - end -end diff --git a/server/app/models/actions/suggest_gene_revision.rb b/server/app/models/actions/suggest_gene_revision.rb deleted file mode 100644 index 1deff4d3b..000000000 --- a/server/app/models/actions/suggest_gene_revision.rb +++ /dev/null @@ -1,9 +0,0 @@ -class Actions::SuggestGeneRevision < Actions::SuggestRevisionSet - def editable_fields - [ - :description, - :source_ids - ] - end -end - diff --git a/server/app/models/actions/suggest_molecular_profile_revision.rb b/server/app/models/actions/suggest_molecular_profile_revision.rb deleted file mode 100644 index 091a0349c..000000000 --- a/server/app/models/actions/suggest_molecular_profile_revision.rb +++ /dev/null @@ -1,16 +0,0 @@ -class Actions::SuggestMolecularProfileRevision < Actions::SuggestRevisionSet - def editable_fields - if existing_obj.is_complex? - [ - :description, - :source_ids, - :molecular_profile_alias_ids, - ] - else - [ - :description, - :source_ids, - ] - end - end -end diff --git a/server/app/models/actions/suggest_revision.rb b/server/app/models/actions/suggest_revision.rb index f022b9969..db56d16cb 100644 --- a/server/app/models/actions/suggest_revision.rb +++ b/server/app/models/actions/suggest_revision.rb @@ -5,18 +5,16 @@ class Actions::SuggestRevision attr_reader :subject, :field_name, :current_value, :suggested_value, :originating_user, - :organization_id, :revision, - :comment, :revision_set_id, + :organization_id, :revision, :revision_set_id, :revisionset_id - def initialize(subject:, field_name:, current_value:, suggested_value:, originating_user:, organization_id:, comment:, revisionset_id:, revision_set_id:) + def initialize(subject:, field_name:, current_value:, suggested_value:, originating_user:, organization_id:, revisionset_id:, revision_set_id:) @subject = subject @field_name = field_name @current_value = current_value @suggested_value = suggested_value @originating_user = originating_user @organization_id = organization_id - @comment = comment @revision_created = false @revisionset_id = revisionset_id @revision_set_id = revision_set_id @@ -42,9 +40,6 @@ def execute else create_revision create_event - if !comment.nil? - create_comment - end @revision_created = true end end @@ -62,7 +57,7 @@ def create_revision end def create_event - Event.create!( + events << Event.new( action: 'revision suggested', originating_user: originating_user, subject: subject, @@ -71,20 +66,6 @@ def create_event ) end - def create_comment - cmd = Actions::AddComment.new( - title: "", - body: comment, - commenter: originating_user, - commentable: revision, - organization_id: organization_id - ) - cmd.perform - if !cmd.succeeded? - raise StandardError.new(cmd.errors.join(', ')) - end - end - def revision_created? @revision_created end diff --git a/server/app/models/actions/suggest_revision_set.rb b/server/app/models/actions/suggest_revision_set.rb index a2678db46..55af0973f 100644 --- a/server/app/models/actions/suggest_revision_set.rb +++ b/server/app/models/actions/suggest_revision_set.rb @@ -1,16 +1,16 @@ class Actions::SuggestRevisionSet include Actions::Transactional - attr_reader :existing_obj, :updated_obj, :originating_user, :organization_id, :revisions, :comment, :revision_set_id, :revisionset_id + attr_reader :existing_obj, :updated_obj, :originating_user, :organization_id, :revision_results, :revisions, :revision_set, :revisionset_id - def initialize(existing_obj:, updated_obj:, originating_user:, organization_id:, comment:) + def initialize(existing_obj:, updated_obj:, originating_user:, organization_id:) @existing_obj = existing_obj @updated_obj = updated_obj @originating_user = originating_user @organization_id = organization_id - @comment = comment + @revisionset_id = SecureRandom.uuid @revisions = [] - @revisionset_id = SecureRandom.uuid + @revision_results = [] end def execute @@ -20,10 +20,9 @@ def execute any_changes = false - #TODO: This should have its own Action that creates and Activity and a Comment as a side effect - revision_set = RevisionSet.create() + @revision_set = RevisionSet.create!() - editable_fields.each do |field_name| + existing_obj.editable_fields.each do |field_name| current_value = existing_obj.send(field_name) suggested_value = updated_obj.send(field_name) @@ -38,7 +37,6 @@ def execute next unless change_present any_changes = true - #TODO: remove comment creation cmd = Actions::SuggestRevision.new( subject: existing_obj, field_name: field_name, @@ -46,7 +44,6 @@ def execute suggested_value: suggested_value, originating_user: originating_user, organization_id: organization_id, - comment: comment, revisionset_id: revisionset_id, revision_set_id: revision_set.id ) @@ -55,12 +52,15 @@ def execute if res.errors.any? raise StandardError.new(res.errors.join(',')) else - revisions << { + revisions << res.revision + revision_results << { id: res.revision.id, field_name: res.revision.field_name, newly_created: res.revision_created?, - revision_set_id: revision_set.id + revision_set_id: revision_set.id, } + res.events.each { |e| events << e } + end end @@ -68,9 +68,5 @@ def execute raise StandardError.new("You must change at least one field in order to suggest a revision.") end end - - def editable_fields - raise StandardError.new('Implement in subclass!') - end end diff --git a/server/app/models/actions/suggest_source.rb b/server/app/models/actions/suggest_source.rb index 2afaba878..2d097124f 100644 --- a/server/app/models/actions/suggest_source.rb +++ b/server/app/models/actions/suggest_source.rb @@ -1,14 +1,12 @@ module Actions class SuggestSource include Actions::Transactional - include Actions::WithOriginatingOrganization - attr_reader :source, :originating_user, :organization_id, :comment_body, :molecular_profile_id, :disease_id, :source_suggestion + attr_reader :source, :originating_user, :organization_id, :molecular_profile_id, :disease_id, :source_suggestion - def initialize(source_id:, originating_user:, organization_id:, comment_body:, molecular_profile_id: nil, disease_id: nil ) - @source = Source.find(source_id) + def initialize(source:, originating_user:, organization_id:, molecular_profile_id: nil, disease_id: nil ) + @source = source @originating_user = originating_user @organization_id = organization_id - @comment_body = comment_body @molecular_profile_id = molecular_profile_id @disease_id = disease_id end @@ -18,37 +16,21 @@ def execute @source_suggestion = SourceSuggestion.create!( user: originating_user, source: source, - initial_comment: comment_body, status: 'new', molecular_profile_id: molecular_profile_id, disease_id: disease_id, ) create_event(source_suggestion) - create_comment end def create_event(suggestion) - Event.create!( + events << Event.new( action: 'publication suggested', originating_user: originating_user, subject: source, - organization: resolve_organization(originating_user, organization_id), + organization_id: organization_id, originating_object: suggestion ) end - - def create_comment - cmd = Actions::AddComment.new( - title: "", - body: comment_body, - commenter: originating_user, - commentable: source, - organization_id: organization_id - ) - cmd.perform - if !cmd.succeeded? - raise StandardError.new(cmd.errors.join(', ')) - end - end end end diff --git a/server/app/models/actions/suggest_variant_group_revision.rb b/server/app/models/actions/suggest_variant_group_revision.rb deleted file mode 100644 index f0d04719e..000000000 --- a/server/app/models/actions/suggest_variant_group_revision.rb +++ /dev/null @@ -1,11 +0,0 @@ -class Actions::SuggestVariantGroupRevision < Actions::SuggestRevisionSet - def editable_fields - [ - :description, - :source_ids, - :variant_ids, - :name - ] - end -end - diff --git a/server/app/models/actions/suggest_variant_revision.rb b/server/app/models/actions/suggest_variant_revision.rb deleted file mode 100644 index ebd56ddec..000000000 --- a/server/app/models/actions/suggest_variant_revision.rb +++ /dev/null @@ -1,24 +0,0 @@ -class Actions::SuggestVariantRevision < Actions::SuggestRevisionSet - def editable_fields - [ - :gene_id, - :name, - :variant_alias_ids, - :hgvs_description_ids, - :clinvar_entry_ids, - :variant_type_ids, - :reference_build, - :ensembl_version, - :chromosome, - :start, - :stop, - :reference_bases, - :variant_bases, - :representative_transcript, - :chromosome2, - :start2, - :stop2, - :representative_transcript2, - ] - end -end diff --git a/server/app/models/actions/transactional.rb b/server/app/models/actions/transactional.rb index a2c79f67c..18a47fd22 100644 --- a/server/app/models/actions/transactional.rb +++ b/server/app/models/actions/transactional.rb @@ -1,5 +1,9 @@ module Actions module Transactional + def events + @events ||= [] + end + def errors @errors ||= [] end diff --git a/server/app/models/actions/update_source_suggestion_status.rb b/server/app/models/actions/update_source_suggestion_status.rb index b504cca67..b269c86b6 100644 --- a/server/app/models/actions/update_source_suggestion_status.rb +++ b/server/app/models/actions/update_source_suggestion_status.rb @@ -1,6 +1,5 @@ class Actions::UpdateSourceSuggestionStatus include Actions::Transactional - include Actions::WithOriginatingOrganization attr_reader :source_suggestion, :updating_user, :organization_id, :new_status, :old_status, :reason @@ -27,12 +26,12 @@ def execute end def create_event - Event.create!( + events << Event.new( action: action, originating_user: updating_user, subject: source_suggestion.source, originating_object: source_suggestion, - organization: resolve_organization(updating_user, organization_id) + organization_id: organization_id ) end diff --git a/server/app/models/activities/accept_revisions.rb b/server/app/models/activities/accept_revisions.rb new file mode 100644 index 000000000..737e75ecb --- /dev/null +++ b/server/app/models/activities/accept_revisions.rb @@ -0,0 +1,39 @@ +module Activities + class AcceptRevisions < Base + attr_reader :revisions, :accepting_user, :superseded_revisions + + def initialize(accepting_user:, revisions:, organization_id: nil, note:) + super(organization_id: organization_id, user: accepting_user, note: note) + @revisions = revisions + @accepting_user = accepting_user + end + + private + def create_activity + @activity = AcceptRevisionsActivity.create!( + subject: revisions.first.subject, + user: accepting_user, + organization: organization, + note: note + ) + end + + def call_actions + cmd = Actions::AcceptRevisions.new( + revisions: revisions, + accepting_user: accepting_user, + organization_id: organization&.id, + ) + cmd.perform + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + events << cmd.events + @superseded_revisions = cmd.superseded_revisions + end + + def linked_entities + [revisions, superseded_revisions].flatten.compact + end + end +end diff --git a/server/app/models/activities/add_comment.rb b/server/app/models/activities/add_comment.rb new file mode 100644 index 000000000..36266aa38 --- /dev/null +++ b/server/app/models/activities/add_comment.rb @@ -0,0 +1,48 @@ +module Activities + class AddComment < Base + attr_reader :comment, :subject, :body, :title + + def initialize(subject:, originating_user:, organization_id:, body:, title: '') + super(organization_id: organization_id, user: originating_user) + @subject = subject + @body = body + @title = title + end + + private + def create_activity + @activity = CommentActivity.create!( + subject: subject, + user: user, + organization: organization, + ) + end + + def call_actions + cmd = Actions::AddComment.new( + title: title, + body: body, + commenter: user, + commentable: subject, + organization_id: organization&.id + ) + + cmd.perform + + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + + @comment = cmd.comment + events << cmd.events + end + + def linked_entities + comment + end + + def after_completed + ::CaptureMentionsAndNotify.perform_later(comment, events.first) + end + end +end diff --git a/server/app/models/activities/base.rb b/server/app/models/activities/base.rb new file mode 100644 index 000000000..ded6f7d47 --- /dev/null +++ b/server/app/models/activities/base.rb @@ -0,0 +1,54 @@ +module Activities + class Base + include Actions::Transactional + include Actions::WithOriginatingOrganization + + attr_reader :organization, :activity, :note, :user + + def initialize(organization_id:, user:, note: nil) + @user = user + @organization = resolve_organization(user, organization_id) + @note = note + end + + def execute + create_activity + call_actions + after_actions + link_activity + set_verbiage + after_completed + end + + def create_activity + raise NotImplementedError.new("Activity must implement create_activity") + end + + def call_actions + raise NotImplementedError.new("Activity must implement call_actions") + end + + def after_actions + #no op + end + + def linked_entities + raise NotImplementedError.new("Activity must implement linked_entities.") + end + + def link_activity + activity.link_entities!(linked_entities) + activity.events = events.flatten + events.flatten.each(&:save!) + end + + def set_verbiage + activity.verbiage = activity.generate_verbiage + activity.save! + end + + def after_completed + #no op + end + end +end diff --git a/server/app/models/activities/create_complex_molecular_profile.rb b/server/app/models/activities/create_complex_molecular_profile.rb new file mode 100644 index 000000000..34c484860 --- /dev/null +++ b/server/app/models/activities/create_complex_molecular_profile.rb @@ -0,0 +1,45 @@ +module Activities + class CreateComplexMolecularProfile < Base + attr_reader :variants, :structure, :molecular_profile + + def initialize(originating_user:, organization_id:, variants:, structure:) + super(organization_id: organization_id, user: originating_user) + @variants = variants + @structure = structure + end + + private + def create_activity + @activity = CreateComplexMolecularProfileActivity.new( + user: user, + organization: organization, + ) + end + + def call_actions + cmd = Actions::CreateComplexMolecularProfile.new( + variants: variants, + structure: structure, + originating_user: user, + organization_id: organization&.id + ) + + cmd.perform + + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + + @molecular_profile = cmd.molecular_profile + events << cmd.events + end + + def linked_entities + end + + def after_actions + activity.subject = molecular_profile + activity.save! + end + end +end diff --git a/server/app/models/activities/create_variant.rb b/server/app/models/activities/create_variant.rb new file mode 100644 index 000000000..125aedc00 --- /dev/null +++ b/server/app/models/activities/create_variant.rb @@ -0,0 +1,47 @@ +module Activities + class CreateVariant < Base + attr_reader :variant_name, :gene_id, :variant, :molecular_profile + + def initialize(originating_user:, organization_id:, variant_name:, gene_id:) + super(organization_id: organization_id, user: originating_user) + @variant_name = variant_name + @gene_id = gene_id + end + + private + def create_activity + @activity = CreateVariantActivity.new( + user: user, + organization: organization, + ) + end + + def call_actions + cmd = Actions::CreateVariant.new( + variant_name: variant_name, + gene_id: gene_id, + originating_user: user, + organization_id: organization&.id + ) + + cmd.perform + + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + + @variant = cmd.variant + @molecular_profile = cmd.molecular_profile + events << cmd.events + end + + def linked_entities + molecular_profile + end + + def after_actions + activity.subject = variant + activity.save! + end + end +end diff --git a/server/app/models/activities/deprecate_complex_molecular_profile.rb b/server/app/models/activities/deprecate_complex_molecular_profile.rb new file mode 100644 index 000000000..70fe592d1 --- /dev/null +++ b/server/app/models/activities/deprecate_complex_molecular_profile.rb @@ -0,0 +1,39 @@ +module Activities + class DeprecateComplexMolecularProfile < Base + attr_reader :molecular_profile, :deprecation_reason + + def initialize(deprecating_user: , molecular_profile:, organization_id: nil, deprecation_reason:, note:) + super(organization_id: organization_id, user: deprecating_user, note: note) + @molecular_profile = molecular_profile + @deprecation_reason = deprecation_reason + end + + private + def create_activity + @activity = DeprecateComplexMolecularProfileActivity.create!( + subject: molecular_profile, + user: user, + organization: organization, + note: note + ) + end + + def call_actions + cmd = Actions::DeprecateComplexMolecularProfile.new( + deprecating_user: user, + molecular_profile: molecular_profile, + organization_id: organization&.id, + deprecation_reason: deprecation_reason + ) + cmd.perform + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + events << cmd.events + end + + def linked_entities + [] + end + end +end diff --git a/server/app/models/activities/deprecate_variant.rb b/server/app/models/activities/deprecate_variant.rb new file mode 100644 index 000000000..e9962c266 --- /dev/null +++ b/server/app/models/activities/deprecate_variant.rb @@ -0,0 +1,40 @@ +module Activities + class DeprecateVariant < Base + attr_reader :variant, :newly_deprecated_molecular_profiles, :deprecation_reason + + def initialize(deprecating_user: , variant:, organization_id: nil, deprecation_reason:, note:) + super(organization_id: organization_id, user: deprecating_user, note: note) + @variant = variant + @deprecation_reason = deprecation_reason + end + + private + def create_activity + @activity = DeprecateVariantActivity.create!( + subject: variant, + user: user, + organization: organization, + note: note + ) + end + + def call_actions + cmd = Actions::DeprecateVariant.new( + deprecating_user: user, + variant: variant, + organization_id: organization&.id, + deprecation_reason: deprecation_reason + ) + cmd.perform + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + events << cmd.events + @newly_deprecated_molecular_profiles = cmd.newly_deprecated_molecular_profiles + end + + def linked_entities + newly_deprecated_molecular_profiles + end + end +end diff --git a/server/app/models/activities/flag_entity.rb b/server/app/models/activities/flag_entity.rb new file mode 100644 index 000000000..ca2603fd0 --- /dev/null +++ b/server/app/models/activities/flag_entity.rb @@ -0,0 +1,38 @@ +module Activities + class FlagEntity < Base + attr_reader :flaggable, :flag + + def initialize(flagging_user:, flaggable:, organization_id: nil, note:) + super(organization_id: organization_id, user: flagging_user, note: note) + @flaggable = flaggable + end + + private + def create_activity + @activity = FlagEntityActivity.create!( + subject: flaggable, + user: user, + organization: organization, + note: note + ) + end + + def call_actions + cmd = Actions::FlagEntity.new( + flagging_user: user, + flaggable: flaggable, + organization_id: organization&.id + ) + cmd.perform + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + @flag = cmd.flag + events << cmd.events + end + + def linked_entities + [flag] + end + end +end diff --git a/server/app/models/activities/moderate_assertion.rb b/server/app/models/activities/moderate_assertion.rb new file mode 100644 index 000000000..9c92f485b --- /dev/null +++ b/server/app/models/activities/moderate_assertion.rb @@ -0,0 +1,38 @@ +module Activities + class ModerateAssertion < Base + attr_reader :assertion, :new_status + + def initialize(originating_user:, assertion:, organization_id: nil, new_status:) + super(organization_id: organization_id, user: originating_user) + @assertion = assertion + @new_status = new_status + end + + private + def create_activity + @activity = ModerateAssertionActivity.create!( + subject: assertion, + user: user, + organization: organization, + ) + end + + def call_actions + cmd = Actions::ModerateAssertion.new( + originating_user: user, + assertion: assertion, + organization_id: organization&.id, + new_status: new_status + ) + cmd.perform + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + events << cmd.events + end + + def linked_entities + [] + end + end +end diff --git a/server/app/models/activities/moderate_evidence_item.rb b/server/app/models/activities/moderate_evidence_item.rb new file mode 100644 index 000000000..e0c6d60ae --- /dev/null +++ b/server/app/models/activities/moderate_evidence_item.rb @@ -0,0 +1,38 @@ +module Activities + class ModerateEvidenceItem < Base + attr_reader :evidence_item, :new_status + + def initialize(originating_user:, evidence_item:, organization_id: nil, new_status:) + super(organization_id: organization_id, user: originating_user) + @evidence_item = evidence_item + @new_status = new_status + end + + private + def create_activity + @activity = ModerateEvidenceItemActivity.create!( + subject: evidence_item, + user: user, + organization: organization, + ) + end + + def call_actions + cmd = Actions::ModerateEvidenceItem.new( + originating_user: user, + evidence_item: evidence_item, + organization_id: organization&.id, + new_status: new_status + ) + cmd.perform + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + events << cmd.events + end + + def linked_entities + [] + end + end +end diff --git a/server/app/models/activities/reject_revisions.rb b/server/app/models/activities/reject_revisions.rb new file mode 100644 index 000000000..bb537f3b2 --- /dev/null +++ b/server/app/models/activities/reject_revisions.rb @@ -0,0 +1,38 @@ +module Activities + class RejectRevisions < Base + attr_reader :rejecting_user, :revisions + + def initialize(rejecting_user:, revisions:, organization_id: nil, note:) + super(organization_id: organization_id, user: rejecting_user, note: note) + @rejecting_user = rejecting_user + @revisions = revisions + end + + private + def create_activity + @activity = RejectRevisionsActivity.create( + subject: revisions.first.subject, + user: rejecting_user, + organization_id: organization&.id, + note: note + ) + end + + def call_actions + cmd = Actions::RejectRevisions.new( + revisions: revisions, + rejecting_user: user, + organization_id: organization&.id, + ) + cmd.perform + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + events << cmd.events + end + + def linked_entities + [revisions] + end + end +end diff --git a/server/app/models/activities/resolve_flag.rb b/server/app/models/activities/resolve_flag.rb new file mode 100644 index 000000000..240ac8d69 --- /dev/null +++ b/server/app/models/activities/resolve_flag.rb @@ -0,0 +1,37 @@ +module Activities + class ResolveFlag < Base + attr_reader :resolving_user, :flag + + def initialize(resolving_user:, flag:, organization_id: nil, note:) + super(organization_id: organization_id, user: resolving_user, note: note) + @flag = flag + end + + private + def create_activity + @activity = ResolveFlagActivity.create!( + subject: flag.flaggable, + user: user, + organization: organization, + note: note + ) + end + + def call_actions + cmd = Actions::ResolveFlag.new( + resolving_user: user, + flag: flag, + organization_id: organization&.id + ) + cmd.perform + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + events << cmd.events + end + + def linked_entities + [flag] + end + end +end diff --git a/server/app/models/activities/submit_assertion.rb b/server/app/models/activities/submit_assertion.rb new file mode 100644 index 000000000..248b57734 --- /dev/null +++ b/server/app/models/activities/submit_assertion.rb @@ -0,0 +1,37 @@ +module Activities + class SubmitAssertion < Base + attr_reader :assertion + + def initialize(originating_user:, assertion:, organization_id: nil, note:) + super(organization_id: organization_id, user: originating_user, note: note) + @assertion = assertion + end + + private + def create_activity + @activity = SubmitAssertionActivity.create!( + subject: assertion, + user: user, + organization: organization, + note: note + ) + end + + def call_actions + cmd = Actions::SubmitAssertion.new( + originating_user: user, + assertion: assertion, + organization_id: organization&.id + ) + cmd.perform + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + events << cmd.events + end + + def linked_entities + [] + end + end +end diff --git a/server/app/models/activities/submit_evidence_item.rb b/server/app/models/activities/submit_evidence_item.rb new file mode 100644 index 000000000..989d895b1 --- /dev/null +++ b/server/app/models/activities/submit_evidence_item.rb @@ -0,0 +1,37 @@ +module Activities + class SubmitEvidenceItem < Base + attr_reader :evidence_item + + def initialize(originating_user:, evidence_item:, organization_id: nil, note:) + super(organization_id: organization_id, user: originating_user, note: note) + @evidence_item = evidence_item + end + + private + def create_activity + @activity = SubmitEvidenceItemActivity.create!( + subject: evidence_item, + user: user, + organization: organization, + note: note + ) + end + + def call_actions + cmd = Actions::SubmitEvidenceItem.new( + originating_user: user, + evidence_item: evidence_item, + organization_id: organization&.id + ) + cmd.perform + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + events << cmd.events + end + + def linked_entities + [] + end + end +end diff --git a/server/app/models/activities/suggest_revision_set.rb b/server/app/models/activities/suggest_revision_set.rb new file mode 100644 index 000000000..b740d3a97 --- /dev/null +++ b/server/app/models/activities/suggest_revision_set.rb @@ -0,0 +1,43 @@ +module Activities + class SuggestRevisionSet < Base + attr_reader :revision_set, :revisions, :revision_results, :existing_obj, :updated_obj + + def initialize(originating_user:, existing_obj:, updated_obj:, organization_id: nil, note:) + super(organization_id: organization_id, user: originating_user, note: note) + @existing_obj = existing_obj + @updated_obj = updated_obj + end + + private + def create_activity + @activity = SuggestRevisionSetActivity.create!( + subject: existing_obj, + user: user, + organization: organization, + note: note + ) + end + + def call_actions + cmd = Actions::SuggestRevisionSet.new( + existing_obj: existing_obj, + updated_obj: updated_obj, + originating_user: user, + organization_id: organization&.id + ) + cmd.perform + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + + events << cmd.events + @revision_set = cmd.revision_set + @revisions = cmd.revisions + @revision_results = cmd.revision_results + end + + def linked_entities + [revision_set, revisions].flatten + end + end +end diff --git a/server/app/models/activities/suggest_source.rb b/server/app/models/activities/suggest_source.rb new file mode 100644 index 000000000..5a0028897 --- /dev/null +++ b/server/app/models/activities/suggest_source.rb @@ -0,0 +1,42 @@ +module Activities + class SuggestSource < Base + attr_reader :source, :molecular_profile_id, :disease_id, :source_suggestion, :source_suggestion + + def initialize(source_id:, originating_user:, organization_id:, note:, molecular_profile_id: nil, disease_id: nil ) + super(organization_id: organization_id, user: originating_user, note: note) + @source = Source.find(source_id) + @molecular_profile_id = molecular_profile_id + @disease_id = disease_id + end + + private + def create_activity + @activity = SuggestSourceActivity.create!( + subject: source, + user: user, + organization: organization, + note: note + ) + end + + def call_actions + cmd = Actions::SuggestSource.new( + source: source, + originating_user: user, + organization_id: organization&.id, + molecular_profile_id: molecular_profile_id, + disease_id: disease_id, + ) + cmd.perform + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + events << cmd.events + @source_suggestion = cmd.source_suggestion + end + + def linked_entities + [source_suggestion] + end + end +end diff --git a/server/app/models/activities/update_source_suggestion_status.rb b/server/app/models/activities/update_source_suggestion_status.rb new file mode 100644 index 000000000..405cbdc00 --- /dev/null +++ b/server/app/models/activities/update_source_suggestion_status.rb @@ -0,0 +1,41 @@ +module Activities + class UpdateSourceSuggestionStatus < Base + attr_reader :source_suggestion, :new_status, :reason + + def initialize(originating_user:, source_suggestion:, organization_id: nil, new_status:, reason:) + super(organization_id: organization_id, user: originating_user) + @source_suggestion = source_suggestion + @new_status = new_status + @reason = reason + end + + private + def create_activity + @activity = UpdateSourceSuggestionStatusActivity.create!( + subject: source_suggestion.source, + user: user, + organization: organization, + note: reason + ) + end + + def call_actions + cmd = Actions::UpdateSourceSuggestionStatus.new( + updating_user: user, + source_suggestion: source_suggestion, + organization_id: organization&.id, + new_status: new_status, + reason: reason + ) + cmd.perform + if !cmd.succeeded? + raise StandardError.new(cmd.errors.join(', ')) + end + events << cmd.events + end + + def linked_entities + [source_suggestion] + end + end +end diff --git a/server/app/models/activity.rb b/server/app/models/activity.rb new file mode 100644 index 000000000..f5031cbcc --- /dev/null +++ b/server/app/models/activity.rb @@ -0,0 +1,76 @@ +class Activity < ApplicationRecord + belongs_to :subject, polymorphic: true + belongs_to :user + belongs_to :organization, required: false + + + has_many :activity_linked_entities + has_many :events + + + def generate_verbiage + raise NotImplementedError.new('Subclass must implement generate_verbiage for type') + end + + def linked_entities + activity_linked_entities.includes(:entity).map(&:entity) + end + + def link_entities!(entities) + Array(entities).each do |e| + ActivityLinkedEntity.where(activity: self, entity: e).first_or_create! + end + end + + private + def self.has_one_linked(entity_type) + class_name = entity_type.to_s.classify + link_name = "#{entity_type}_link".to_sym + entity_relation_name = "linked_#{entity_type}".to_sym + + has_one link_name, + ->() { where(entity_type: class_name) }, + foreign_key: :activity_id, + class_name: 'ActivityLinkedEntity' + + has_one entity_relation_name, + through: link_name, + source: :entity, + source_type: class_name + + define_method entity_type do + if activity_linked_entities.loaded? + activity_linked_entities.find { |e| e.entity_type == class_name }.entity + else + self.send(entity_relation_name) + end + end + end + + def self.has_many_linked(plural_entity_type) + class_name = plural_entity_type.to_s.classify + singular_entity_type = plural_entity_type.to_s.singularize + link_name = "#{singular_entity_type}_links".to_sym + entity_relation_name = "linked_#{plural_entity_type}".to_sym + + + has_many link_name, + ->() { where(entity_type: class_name) }, + foreign_key: :activity_id, + class_name: 'ActivityLinkedEntity' + + has_many entity_relation_name, + through: link_name, + source: :entity, + source_type: class_name + + + define_method plural_entity_type do + if activity_linked_entities.loaded? + activity_linked_entities.select { |e| e.entity_type == class_name }.map { |e| e.entity } + else + self.send(entity_relation_name) + end + end + end +end diff --git a/server/app/models/activity_linked_entity.rb b/server/app/models/activity_linked_entity.rb new file mode 100644 index 000000000..2d2fda6ca --- /dev/null +++ b/server/app/models/activity_linked_entity.rb @@ -0,0 +1,4 @@ +class ActivityLinkedEntity < ApplicationRecord + belongs_to :entity, polymorphic: true + belongs_to :activity +end diff --git a/server/app/models/assertion.rb b/server/app/models/assertion.rb index 3c6ce0451..ceef5ac19 100644 --- a/server/app/models/assertion.rb +++ b/server/app/models/assertion.rb @@ -40,6 +40,14 @@ class Assertion < ActiveRecord::Base class_name: 'Event' has_one :rejector, through: :rejection_event, source: :originating_user + has_many :activities, as: :subject, class_name: 'Activity' + + has_one :submission_activity, + ->() { where(type: 'SubmitAssertionActivity') }, + as: :subject, + class_name: 'Activity' + + searchkick highlight: [:id], callbacks: :async def search_data @@ -68,4 +76,29 @@ def on_revision_accepted self.evidence_items_count = self.evidence_items.count self.save! end + + + def editable_fields + [ + :molecular_profile_id, + :description, + :summary, + :variant_origin, + :assertion_type, + :significance, + :disease_id, + :assertion_direction, + :phenotype_ids, + :therapy_ids, + :therapy_interaction_type, + :amp_level, + :evidence_item_ids, + :nccn_guideline_id, + :nccn_guideline_version, + :acmg_code_ids, + :clingen_code_ids, + :fda_companion_test, + :fda_regulatory_approval, + ] + end end diff --git a/server/app/models/comment_activity.rb b/server/app/models/comment_activity.rb new file mode 100644 index 000000000..fcc612919 --- /dev/null +++ b/server/app/models/comment_activity.rb @@ -0,0 +1,7 @@ +class CommentActivity < Activity + has_one_linked :comment + + def generate_verbiage + 'commented on' + end +end diff --git a/server/app/models/concerns/with_activities.rb b/server/app/models/concerns/with_activities.rb new file mode 100644 index 000000000..f38717196 --- /dev/null +++ b/server/app/models/concerns/with_activities.rb @@ -0,0 +1,27 @@ +module WithActivities + extend ActiveSupport::Concern + + included do + class_name = self.to_s + + has_many :activities_linked_entities, + ->() { where(entity_type: class_name) }, + foreign_key: :entity_id, + class_name: 'ActivityLinkedEntity' + has_many :activities, through: :activities_linked_entities + + def self.has_activity(relation_name, activity_type:) + class_name = self.to_s + link_name = "#{relation_name}_link".to_sym + has_one link_name, + ->() { where(entity_type: class_name) + .eager_load(:activity) + .where(activities: {type: Array(activity_type).map(&:to_s)}) + .order('activities.created_at desc') + }, + foreign_key: :entity_id, + class_name: 'ActivityLinkedEntity' + has_one relation_name, through: link_name, source: :activity + end + end +end diff --git a/server/app/models/create_complex_molecular_profile_activity.rb b/server/app/models/create_complex_molecular_profile_activity.rb new file mode 100644 index 000000000..344205cdc --- /dev/null +++ b/server/app/models/create_complex_molecular_profile_activity.rb @@ -0,0 +1,9 @@ +class CreateComplexMolecularProfileActivity < Activity + def molecular_profile + self.subject + end + + def generate_verbiage + 'created complex molecular profile' + end +end diff --git a/server/app/models/create_variant_activity.rb b/server/app/models/create_variant_activity.rb new file mode 100644 index 000000000..25d3f4f2c --- /dev/null +++ b/server/app/models/create_variant_activity.rb @@ -0,0 +1,11 @@ +class CreateVariantActivity < Activity + has_one_linked :molecular_profile + + def variant + self.subject + end + + def generate_verbiage + 'created variant' + end +end diff --git a/server/app/models/deprecate_complex_molecular_profile_activity.rb b/server/app/models/deprecate_complex_molecular_profile_activity.rb new file mode 100644 index 000000000..8ac9dd132 --- /dev/null +++ b/server/app/models/deprecate_complex_molecular_profile_activity.rb @@ -0,0 +1,9 @@ +class DeprecateComplexMolecularProfileActivity < Activity + def molecular_profile + self.subject + end + + def generate_verbiage + 'deprecated complex molecular profile' + end +end diff --git a/server/app/models/deprecate_variant_activity.rb b/server/app/models/deprecate_variant_activity.rb new file mode 100644 index 000000000..ff2404e4b --- /dev/null +++ b/server/app/models/deprecate_variant_activity.rb @@ -0,0 +1,11 @@ +class DeprecateVariantActivity < Activity + has_many_linked :molecular_profiles + + def variant + self.subject + end + + def generate_verbiage + 'deprecated variant' + end +end diff --git a/server/app/models/event.rb b/server/app/models/event.rb index 2289d863b..33f9945aa 100644 --- a/server/app/models/event.rb +++ b/server/app/models/event.rb @@ -6,6 +6,8 @@ class Event < ActiveRecord::Base has_many :notifications + belongs_to :activity + validates :originating_object, :originating_user, :subject, :action, { presence: true } validate :subject_is_subscribable diff --git a/server/app/models/evidence_item.rb b/server/app/models/evidence_item.rb index b01711ada..522a4ef04 100644 --- a/server/app/models/evidence_item.rb +++ b/server/app/models/evidence_item.rb @@ -40,6 +40,13 @@ class EvidenceItem < ActiveRecord::Base class_name: 'Event' has_one :rejector, through: :rejection_event, source: :originating_user + has_many :activities, as: :subject, class_name: 'Activity' + + has_one :submission_activity, + ->() { where(type: 'SubmitEvidenceItemActivity') }, + as: :subject, + class_name: 'Activity' + validates :rating, inclusion: [1, 2, 3, 4, 5] @@ -71,4 +78,21 @@ def self.timepoint_query } end + def editable_fields + [ + :molecular_profile_id, + :variant_origin, + :source_id, + :evidence_type, + :significance, + :disease_id, + :description, + :evidence_level, + :evidence_direction, + :phenotype_ids, + :rating, + :therapy_interaction_type, + :therapy_ids + ] + end end diff --git a/server/app/models/evidence_items_by_type.rb b/server/app/models/evidence_items_by_type.rb new file mode 100644 index 000000000..399fe761a --- /dev/null +++ b/server/app/models/evidence_items_by_type.rb @@ -0,0 +1,10 @@ +class EvidenceItemsByType < ActiveRecord::Base + belongs_to :molecular_profile + + self.primary_key = :molecular_profile_id + + private + def readonly? + true + end +end diff --git a/server/app/models/flag.rb b/server/app/models/flag.rb index b3678caf8..0935c95bb 100644 --- a/server/app/models/flag.rb +++ b/server/app/models/flag.rb @@ -1,10 +1,15 @@ class Flag < ActiveRecord::Base + include Subscribable include Commentable + include WithActivities belongs_to :flaggable, polymorphic: true, validate: false belongs_to :flagging_user, class_name: 'User' belongs_to :resolving_user, class_name: 'User', required: false + has_activity :open_activity, activity_type: 'FlagEntityActivity' + has_activity :resolution_activity, activity_type: 'ResolveFlagActivity' + validates :state, inclusion: ['open', 'resolved'] def name diff --git a/server/app/models/flag_entity_activity.rb b/server/app/models/flag_entity_activity.rb new file mode 100644 index 000000000..f40370f66 --- /dev/null +++ b/server/app/models/flag_entity_activity.rb @@ -0,0 +1,12 @@ +class FlagEntityActivity < Activity + + has_one_linked :flag + + def flaggable + self.subject + end + + def generate_verbiage + 'flagged' + end +end diff --git a/server/app/models/gene.rb b/server/app/models/gene.rb index 9ed73a81b..6d5e7eda8 100644 --- a/server/app/models/gene.rb +++ b/server/app/models/gene.rb @@ -42,4 +42,11 @@ def self.timepoint_query .count } end + + def editable_fields + [ + :description, + :source_ids + ] + end end diff --git a/server/app/models/moderate_assertion_activity.rb b/server/app/models/moderate_assertion_activity.rb new file mode 100644 index 000000000..dfb4c105e --- /dev/null +++ b/server/app/models/moderate_assertion_activity.rb @@ -0,0 +1,10 @@ +class ModerateAssertionActivity < Activity + def assertion + self.subject + end + + def generate_verbiage + action = self.events[0].action + "#{action.split(" ")[1]} assertion" + end +end diff --git a/server/app/models/moderate_evidence_item_activity.rb b/server/app/models/moderate_evidence_item_activity.rb new file mode 100644 index 000000000..1667b8a81 --- /dev/null +++ b/server/app/models/moderate_evidence_item_activity.rb @@ -0,0 +1,10 @@ +class ModerateEvidenceItemActivity < Activity + def evidence_item + self.subject + end + + def generate_verbiage + action = self.events[0].action + "#{action} evidence item" + end +end diff --git a/server/app/models/molecular_profile.rb b/server/app/models/molecular_profile.rb index 279506a0a..1e962dc18 100644 --- a/server/app/models/molecular_profile.rb +++ b/server/app/models/molecular_profile.rb @@ -4,21 +4,32 @@ class MolecularProfile < ActiveRecord::Base include Flaggable include Commentable include WithTimepointCounts + include WithActivities has_and_belongs_to_many :variants has_and_belongs_to_many :sources has_many :assertions has_many :evidence_items has_one :evidence_items_by_status + has_one :evidence_items_by_type has_and_belongs_to_many :molecular_profile_aliases, join_table: :molecular_profile_aliases_molecular_profiles has_many :source_suggestions has_and_belongs_to_many :deprecated_variants, ->() { where('variants.deprecated = TRUE') }, class_name: 'Variant' - has_one :deprecation_event, - ->() { where(action: 'deprecated molecular profile').includes(:originating_user) }, + + has_activity :variant_deprecation_activity, activity_type: 'DeprecateVariantActivity' + has_one :complex_molecular_profile_deprecation_activity, + as: :subject, + class_name: 'DeprecateComplexMolecularProfileActivity' + + has_activity :variant_creation_activity, activity_type: 'CreateVariantActivity' + has_one :complex_molecular_profile_creation_activity, as: :subject, - class_name: 'Event' + class_name: 'CreateComplexMolecularProfileActivity' + has_one :creating_user, through: :complex_molecular_profile_creation_activity, source: :user + + enum deprecation_reason: ['duplicate', 'invalid_molecular_profile', 'other', 'variant_deprecated'] validates :name, presence: true @@ -40,8 +51,16 @@ def should_index? !deprecated end + def is_multi_variant? + return self.variants.count > 1 + end + def is_complex? - self.variants.count > 1 + if self.is_multi_variant? + return true + else + return self.name.include? 'NOT' + end end GENE_REGEX = /#GID(?\d+)/i @@ -85,6 +104,21 @@ def self.timepoint_query } end + def editable_fields + if is_complex? + [ + :description, + :source_ids, + :molecular_profile_alias_ids, + ] + else + [ + :description, + :source_ids, + ] + end + end + def unique_name_in_context base_query = self.class.where( deprecated: false, diff --git a/server/app/models/reject_revisions_activity.rb b/server/app/models/reject_revisions_activity.rb new file mode 100644 index 000000000..0ea54c4aa --- /dev/null +++ b/server/app/models/reject_revisions_activity.rb @@ -0,0 +1,8 @@ +class RejectRevisionsActivity < Activity + has_many_linked :revisions + + def generate_verbiage + rev_count = revisions.size + "rejected #{rev_count} #{'revision'.pluralize(rev_count)} on" + end +end diff --git a/server/app/models/resolve_flag_activity.rb b/server/app/models/resolve_flag_activity.rb new file mode 100644 index 000000000..0b378d0ad --- /dev/null +++ b/server/app/models/resolve_flag_activity.rb @@ -0,0 +1,11 @@ +class ResolveFlagActivity < Activity + has_one_linked :flag + + def flaggable + self.subject + end + + def generate_verbiage + 'resolved a flag on' + end +end diff --git a/server/app/models/revision.rb b/server/app/models/revision.rb index 26a35e839..39f97ce1f 100644 --- a/server/app/models/revision.rb +++ b/server/app/models/revision.rb @@ -2,6 +2,7 @@ class Revision < ApplicationRecord include Commentable include Subscribable include WithTimepointCounts + include WithActivities belongs_to :subject, polymorphic: true belongs_to :revision_set @@ -9,15 +10,10 @@ class Revision < ApplicationRecord has_many :events, as: :originating_object has_many :comment_mentions, foreign_key: :comment_id, class_name: 'EntityMention' - has_one :creation_event, - ->() { where(action: 'revision suggested') }, - as: :originating_object, - class_name: 'Event' - - has_one :resolving_event, - ->() { where("events.action = 'revision rejected' OR events.action = 'revision accepted' OR events.action = 'revision superseded'") }, - as: :originating_object, - class_name: 'Event' + has_activity :creation_activity, activity_type: 'SuggestRevisionSetActivity' + has_activity :rejection_activity, activity_type: 'RejectRevisionsActivity' + has_activity :acceptance_activity, activity_type: 'AcceptRevisionsActivity' + has_activity :resolution_activity, activity_type: ['AcceptRevisionsActivity', 'RejectRevisionsActivity'] validates :status, inclusion: { in: ['accepted', 'rejected', 'superseded', 'new'], @@ -28,14 +24,17 @@ class Revision < ApplicationRecord searchkick highlight: [:id], callbacks: :async def revisor - creation_event.originating_user + creation_activity.user end def resolver - resolving_event&.originating_user + if status == 'rejected' + rejection_activity.user + else + acceptance_activity.user + end end - def search_data { id: name diff --git a/server/app/models/revision_set.rb b/server/app/models/revision_set.rb index 12bac8056..51f7c7030 100644 --- a/server/app/models/revision_set.rb +++ b/server/app/models/revision_set.rb @@ -1,4 +1,9 @@ class RevisionSet < ApplicationRecord + include Subscribable + include WithActivities + + has_activity :creation_activity, activity_type: 'SuggestRevisionSetActivity' + has_many :revisions def display_name @@ -8,4 +13,8 @@ def display_name def name "RSID#{id}" end + + def link + "TODO" + end end diff --git a/server/app/models/source_suggestion.rb b/server/app/models/source_suggestion.rb index 2aeb379ba..bc914de5a 100644 --- a/server/app/models/source_suggestion.rb +++ b/server/app/models/source_suggestion.rb @@ -1,5 +1,6 @@ class SourceSuggestion < ActiveRecord::Base include Subscribable + include WithActivities belongs_to :source belongs_to :user @@ -7,4 +8,7 @@ class SourceSuggestion < ActiveRecord::Base belongs_to :molecular_profile, optional: true validates :status, inclusion: { in: ['new', 'curated', 'rejected' ] } + + has_activity :creation_activity, activity_type: 'SuggestSourceActivity' + has_activity :last_status_update_activity, activity_type: 'UpdateSourceSuggestionStatusActivity' end diff --git a/server/app/models/submit_assertion_activity.rb b/server/app/models/submit_assertion_activity.rb new file mode 100644 index 000000000..01d13493e --- /dev/null +++ b/server/app/models/submit_assertion_activity.rb @@ -0,0 +1,9 @@ +class SubmitAssertionActivity < Activity + def assertion + self.subject + end + + def generate_verbiage + 'submitted assertion' + end +end diff --git a/server/app/models/submit_evidence_item_activity.rb b/server/app/models/submit_evidence_item_activity.rb new file mode 100644 index 000000000..8d13a4cc4 --- /dev/null +++ b/server/app/models/submit_evidence_item_activity.rb @@ -0,0 +1,9 @@ +class SubmitEvidenceItemActivity < Activity + def evidence_item + self.subject + end + + def generate_verbiage + 'submitted evidence item' + end +end diff --git a/server/app/models/suggest_revision_set_activity.rb b/server/app/models/suggest_revision_set_activity.rb new file mode 100644 index 000000000..2013ecaa6 --- /dev/null +++ b/server/app/models/suggest_revision_set_activity.rb @@ -0,0 +1,9 @@ +class SuggestRevisionSetActivity < Activity + has_one_linked :revision_set + has_many_linked :revisions + + def generate_verbiage + rev_count = revisions.size + "suggested #{rev_count} #{'revisions'.pluralize(rev_count)} on #{subject.class.name.titleize}" + end +end diff --git a/server/app/models/suggest_source_activity.rb b/server/app/models/suggest_source_activity.rb new file mode 100644 index 000000000..8f764a9b8 --- /dev/null +++ b/server/app/models/suggest_source_activity.rb @@ -0,0 +1,11 @@ +class SuggestSourceActivity < Activity + has_one_linked :source_suggestion + + def source + self.subject + end + + def generate_verbiage + 'created a source suggestion for source' + end +end diff --git a/server/app/models/update_source_suggestion_status_activity.rb b/server/app/models/update_source_suggestion_status_activity.rb new file mode 100644 index 000000000..a7786b6a1 --- /dev/null +++ b/server/app/models/update_source_suggestion_status_activity.rb @@ -0,0 +1,11 @@ +class UpdateSourceSuggestionStatusActivity < Activity + has_one_linked :source_suggestion + + def source + self.subject + end + + def generate_verbiage + self.events[0].action + end +end diff --git a/server/app/models/variant.rb b/server/app/models/variant.rb index 213487c89..9299cc9a5 100644 --- a/server/app/models/variant.rb +++ b/server/app/models/variant.rb @@ -20,16 +20,31 @@ class Variant < ApplicationRecord class_name: "MolecularProfile", foreign_key: :single_variant_molecular_profile_id - has_one :deprecation_event, - ->() { where(action: 'deprecated variant').includes(:originating_user) }, + has_one :deprecation_activity, as: :subject, - class_name: 'Event' - has_one :deprecating_user, through: :deprecation_event, source: :originating_user - belongs_to :deprecation_comment, class_name: 'Comment', optional: true + class_name: 'DeprecateVariantActivity' + has_one :deprecating_user, through: :deprecation_activity, source: :user + + has_one :creation_activity, + as: :subject, + class_name: 'CreateVariantActivity' + has_one :creating_user, through: :creation_activity, source: :user enum reference_build: [:GRCh38, :GRCh37, :NCBI36] enum deprecation_reason: ['duplicate', 'invalid_variant', 'other'] + has_many :activities_linked_entities, + ->() { where(entity_type: 'Variant') }, + foreign_key: :entity_id, + class_name: 'ActivityLinkedEntity' + has_many :activities, through: :activities_linked_entities + + has_one :deprecate_activity_link, + ->() { where(entity_type: 'Variant').eager_load(:activity).where("activities.type = 'DeprecateVariantActivity'") }, + foreign_key: :entity_id, + class_name: 'ActivityLinkedEntity' + has_one :deprecate_activity, through: :deprecate_activity_link, source: :activity + after_commit :reindex_mps after_create -> { MaterializedViews::VariantBrowseTableRow.refresh_async } @@ -125,4 +140,27 @@ def unique_name_in_context errors.add(:name, 'must be unique within a Gene') end end + + def editable_fields + [ + :gene_id, + :name, + :variant_alias_ids, + :hgvs_description_ids, + :clinvar_entry_ids, + :variant_type_ids, + :reference_build, + :ensembl_version, + :chromosome, + :start, + :stop, + :reference_bases, + :variant_bases, + :representative_transcript, + :chromosome2, + :start2, + :stop2, + :representative_transcript2, + ] + end end diff --git a/server/app/models/variant_group.rb b/server/app/models/variant_group.rb index 45c3fa07e..48ffdf0d9 100644 --- a/server/app/models/variant_group.rb +++ b/server/app/models/variant_group.rb @@ -21,4 +21,13 @@ def search_data def link Rails.application.routes.url_helpers.url_for("/variant-groups/#{self.id}") end + + def editable_fields + [ + :description, + :source_ids, + :variant_ids, + :name + ] + end end diff --git a/server/app/validators/assertion_validator.rb b/server/app/validators/assertion_validator.rb index 9d01e6980..e29d8d93a 100644 --- a/server/app/validators/assertion_validator.rb +++ b/server/app/validators/assertion_validator.rb @@ -64,7 +64,7 @@ def validate(record) record.errors.add :nccn_guideline_version, "Assertions with NCCN guideline requires a NCCN guideline version." end - if record.variant_origin == 'Combined' && !record.molecular_profile.is_complex? + if record.variant_origin == 'Combined' && !record.molecular_profile.is_multi_variant? record.errors.add :variant_origin, "Combined variant origin can only apply when the Molecular Profile has multiple Variants." end end diff --git a/server/app/validators/evidence_item_validator.rb b/server/app/validators/evidence_item_validator.rb index efb43ba67..2ea8fdbe5 100644 --- a/server/app/validators/evidence_item_validator.rb +++ b/server/app/validators/evidence_item_validator.rb @@ -39,7 +39,7 @@ def validate(record) record.errors.add :molecular_profile_id, "Molecular Profile is deprecated." end - if record.variant_origin == 'Combined' && !record.molecular_profile.is_complex? + if record.variant_origin == 'Combined' && !record.molecular_profile.is_multi_variant? record.errors.add :variant_origin, "Combined variant origin can only apply when the Molecular Profile has multiple Variants." end end diff --git a/server/db/migrate/20230509160121_create_activites.rb b/server/db/migrate/20230509160121_create_activites.rb new file mode 100644 index 000000000..dd579b69a --- /dev/null +++ b/server/db/migrate/20230509160121_create_activites.rb @@ -0,0 +1,20 @@ +class CreateActivites < ActiveRecord::Migration[6.1] + def change + create_table :activities do |t| + t.text :type, null: false, index: true + t.references :user, null: false, index: true, foreign_key: true + t.references :organization, null: true, index: true, foreign_key: true + t.references :subject, null: false, polymorphic: true, index: true + t.timestamps + end + + create_table :activity_linked_entities do |t| + t.references :entity, null: false, polymorphic: true, index: true + t.references :activity, null: false, index: true + t.timestamps + end + + add_column :events, :activity_id, :integer, index: true + add_foreign_key :events, :activities + end +end diff --git a/server/db/migrate/20230517150839_add_verbiage_to_activities.rb b/server/db/migrate/20230517150839_add_verbiage_to_activities.rb new file mode 100644 index 000000000..cd724d66f --- /dev/null +++ b/server/db/migrate/20230517150839_add_verbiage_to_activities.rb @@ -0,0 +1,14 @@ +class AddVerbiageToActivities < ActiveRecord::Migration[6.1] + def up + add_column :activities, :verbiage, :text, null: true, index: true + + Activity.find_each do |a| + a.verbiage = a.generate_verbiage + a.save! + end + end + + def down + drop_column :activities, :verbiage + end +end diff --git a/server/db/migrate/20230926181807_add_note_to_activities.rb b/server/db/migrate/20230926181807_add_note_to_activities.rb new file mode 100644 index 000000000..628ec16ce --- /dev/null +++ b/server/db/migrate/20230926181807_add_note_to_activities.rb @@ -0,0 +1,5 @@ +class AddNoteToActivities < ActiveRecord::Migration[6.1] + def change + add_column :activities, :note, :text, null: true, index: true + end +end diff --git a/server/db/migrate/20230928171418_add_missing_event_indexes.rb b/server/db/migrate/20230928171418_add_missing_event_indexes.rb new file mode 100644 index 000000000..9d18ce1cc --- /dev/null +++ b/server/db/migrate/20230928171418_add_missing_event_indexes.rb @@ -0,0 +1,6 @@ +class AddMissingEventIndexes < ActiveRecord::Migration[6.1] + def change + add_index :events, :action + add_index :events, :activity_id + end +end diff --git a/server/db/migrate/20231116184536_add_deprecation_reason_column_to_mps.rb b/server/db/migrate/20231116184536_add_deprecation_reason_column_to_mps.rb new file mode 100644 index 000000000..4aa02a600 --- /dev/null +++ b/server/db/migrate/20231116184536_add_deprecation_reason_column_to_mps.rb @@ -0,0 +1,5 @@ +class AddDeprecationReasonColumnToMps < ActiveRecord::Migration[6.1] + def change + add_column :molecular_profiles, :deprecation_reason, :integer + end +end diff --git a/server/db/migrate/20231122204214_create_evidence_items_by_types.rb b/server/db/migrate/20231122204214_create_evidence_items_by_types.rb new file mode 100644 index 000000000..91371540d --- /dev/null +++ b/server/db/migrate/20231122204214_create_evidence_items_by_types.rb @@ -0,0 +1,5 @@ +class CreateEvidenceItemsByTypes < ActiveRecord::Migration[6.1] + def change + create_view :evidence_items_by_types + end +end diff --git a/server/db/schema.rb b/server/db/schema.rb index c24da084f..2a3b35054 100644 --- a/server/db/schema.rb +++ b/server/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2023_10_27_155450) do +ActiveRecord::Schema.define(version: 2023_11_22_204214) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -528,6 +528,7 @@ t.boolean "flagged", default: false, null: false t.float "evidence_score", null: false t.boolean "deprecated", default: false, null: false + t.integer "deprecation_reason" t.index ["description"], name: "index_molecular_profiles_on_description" t.index ["name"], name: "index_molecular_profiles_on_name", unique: true end @@ -1184,4 +1185,40 @@ SQL add_index "variant_browse_table_rows", ["id"], name: "index_variant_browse_table_rows_on_id", unique: true + create_view "evidence_items_by_types", sql_definition: <<-SQL + SELECT mp.id AS molecular_profile_id, + sum( + CASE + WHEN (ei.evidence_type = 0) THEN 1 + ELSE 0 + END) AS diagnostic_count, + sum( + CASE + WHEN (ei.evidence_type = 1) THEN 1 + ELSE 0 + END) AS prognostic_count, + sum( + CASE + WHEN (ei.evidence_type = 2) THEN 1 + ELSE 0 + END) AS predictive_count, + sum( + CASE + WHEN (ei.evidence_type = 3) THEN 1 + ELSE 0 + END) AS predisposing_count, + sum( + CASE + WHEN (ei.evidence_type = 4) THEN 1 + ELSE 0 + END) AS functional_count, + sum( + CASE + WHEN (ei.evidence_type = 5) THEN 1 + ELSE 0 + END) AS oncogenic_count + FROM (molecular_profiles mp + JOIN evidence_items ei ON (((mp.id = ei.molecular_profile_id) AND (ei.deleted = false) AND ((ei.status)::text <> 'rejected'::text)))) + GROUP BY mp.id; + SQL end diff --git a/server/db/views/evidence_items_by_types_v01.sql b/server/db/views/evidence_items_by_types_v01.sql new file mode 100644 index 000000000..83e1d903c --- /dev/null +++ b/server/db/views/evidence_items_by_types_v01.sql @@ -0,0 +1,11 @@ +SELECT + mp.id AS molecular_profile_id, + SUM(CASE WHEN ei.evidence_type = 0 THEN 1 ELSE 0 END) AS diagnostic_count, + SUM(CASE WHEN ei.evidence_type = 1 THEN 1 ELSE 0 END) AS prognostic_count, + SUM(CASE WHEN ei.evidence_type = 2 THEN 1 ELSE 0 END) AS predictive_count, + SUM(CASE WHEN ei.evidence_type = 3 THEN 1 ELSE 0 END) AS predisposing_count, + SUM(CASE WHEN ei.evidence_type = 4 THEN 1 ELSE 0 END) AS functional_count, + SUM(CASE WHEN ei.evidence_type = 5 THEN 1 ELSE 0 END) AS oncogenic_count +FROM molecular_profiles mp +INNER JOIN evidence_items ei ON mp.id = ei.molecular_profile_id AND ei.deleted = 'f' AND ei.status != 'rejected' +GROUP BY mp.id; diff --git a/server/misc_scripts/activity_backfill/backfill_accept_revisions_activities.rb b/server/misc_scripts/activity_backfill/backfill_accept_revisions_activities.rb new file mode 100644 index 000000000..6024e0b71 --- /dev/null +++ b/server/misc_scripts/activity_backfill/backfill_accept_revisions_activities.rb @@ -0,0 +1,60 @@ +Event.where(action: 'revision accepted', activity_id: nil) +.group("subject_id, subject_type, originating_user_id, organization_id, batch_timestamp") +.select("array_agg(events.id) as event_ids, min(events.id) as id, subject_id, subject_type, originating_user_id, organization_id, date_trunc('minute', created_at) as batch_timestamp") +.each do |e| + batch = Event.where(id: e.event_ids) + + activity = AcceptRevisionsActivity.where( + subject: e.subject, + user_id: e.originating_user_id, + organization_id: e.organization_id, + created_at: e.batch_timestamp + ).first_or_create! + + revisions = batch.map(&:originating_object) + + possible_superseded_revision_events = Event.where( + action: 'revision superseded', + subject: e.subject, + originating_user_id: e.originating_user_id, + organization_id: e.organization_id + ) + + superseded_revision_events = possible_superseded_revision_events.reject { |c| (c.created_at.to_i - e.batch_timestamp.to_i).abs > 60 } + + superseded_revision_events.each do |event| + event.activity_id = activity.id + event.save! + end + + activity.link_entities!([revisions, superseded_revision_events.map(&:originating_object)].flatten) + + batch.each do |event| + event.activity_id = activity.id + event.save! + + possible_comment = event.originating_object&.comments.reject { |c| (c.created_at.to_i - e.batch_timestamp.to_i).abs > 60 }.first + + if possible_comment + activity.link_entities!(possible_comment) + comment_event = Event.find_by(originating_object: possible_comment) + if comment_event + comment_event.activity_id = activity.id + comment_event.save! + else + Event.create!( + action: 'commented', + originating_user_id: possible_comment.user.id, + created_at: possible_comment.created_at, + subject: event.originating_object, + originating_object: possible_comment, + organization_id: event.organization_id, + activity_id: activity.id + ) + end + end + end + + activity.verbiage = activity.generate_verbiage + activity.save! +end diff --git a/server/misc_scripts/activity_backfill/backfill_comment_activities.rb b/server/misc_scripts/activity_backfill/backfill_comment_activities.rb new file mode 100644 index 000000000..9f75efe90 --- /dev/null +++ b/server/misc_scripts/activity_backfill/backfill_comment_activities.rb @@ -0,0 +1,24 @@ +#NOTE: cannot run this until last +Event.where(action: 'commented', activity_id: nil).find_each do |event| + if event.originating_object.blank? + Notification.where(event: event).destroy_all + event.destroy! + else + activity = CommentActivity.create( + subject: event.subject, + user_id: event.originating_user_id, + organization_id: event.organization_id, + created_at: event.created_at + ) + + event.activity_id = activity.id + event.save! + + activity.link_entities!(event.originating_object) + activity.verbiage = activity.generate_verbiage + activity.save! + end +end + + + diff --git a/server/misc_scripts/activity_backfill/backfill_deprecate_variant_activities.rb b/server/misc_scripts/activity_backfill/backfill_deprecate_variant_activities.rb new file mode 100644 index 000000000..cfa873002 --- /dev/null +++ b/server/misc_scripts/activity_backfill/backfill_deprecate_variant_activities.rb @@ -0,0 +1,30 @@ +Event.where(action: 'deprecated variant', activity_id: nil).find_each do |event| + activity = DeprecateVariantActivity.create( + subject: event.subject, + user_id: event.originating_user_id, + organization_id: event.organization_id, + created_at: event.created_at, + ) + + event.activity_id = activity.id + event.save! + + deprecate_mp_events = Event.where(action: 'deprecated molecular profile', originating_object: event.subject) + deprecate_mp_events.each do |e| + e.activity_id = activity.id + e.save! + end + + activity.link_entities!(deprecate_mp_events.map{|e| e.subject}) + + comment = event.subject.deprecation_comment + if comment + activity.link_entities!(comment) + comment_event = Event.find_by(originating_object: comment) + comment_event.activity_id = activity.id + comment_event.save! + end + + activity.verbiage = activity.generate_verbiage + activity.save! +end diff --git a/server/misc_scripts/activity_backfill/backfill_flag_activities.rb b/server/misc_scripts/activity_backfill/backfill_flag_activities.rb new file mode 100644 index 000000000..51536c9b3 --- /dev/null +++ b/server/misc_scripts/activity_backfill/backfill_flag_activities.rb @@ -0,0 +1,40 @@ +Event.where(action: 'flagged', activity_id: nil).find_each do |event| + activity = FlagEntityActivity.create( + subject: event.subject, + user_id: event.originating_user_id, + organization_id: event.organization_id, + created_at: event.created_at, + ) + + event.activity_id = activity.id + event.save! + + activity.link_entities!(event.originating_object) + + possible_comment = event.originating_object&.comments&.first + + if possible_comment + differential = (event.created_at.to_i - possible_comment.created_at.to_i).abs + if differential <= 30 + activity.link_entities!(possible_comment) + comment_event = Event.find_by(originating_object: possible_comment) + if comment_event + comment_event.activity_id = activity.id + comment_event.save! + else + Event.create!( + action: 'commented', + originating_user_id: possible_comment.user.id, + created_at: possible_comment.created_at, + subject: event.originating_object, + originating_object: possible_comment, + organization_id: event.organization_id, + activity_id: activity.id + ) + end + end + end + + activity.verbiage = activity.generate_verbiage + activity.save! +end diff --git a/server/misc_scripts/activity_backfill/backfill_moderate_assertion_activities.rb b/server/misc_scripts/activity_backfill/backfill_moderate_assertion_activities.rb new file mode 100644 index 000000000..4bd788891 --- /dev/null +++ b/server/misc_scripts/activity_backfill/backfill_moderate_assertion_activities.rb @@ -0,0 +1,16 @@ +Event.where(action: ['assertion accepted', 'assertion rejected', 'assertion reverted'], activity_id: nil).find_each do |event| + if !event.subject.nil? + activity = ModerateAssertionActivity.create( + subject: event.subject, + user_id: event.originating_user_id, + organization_id: event.organization_id, + created_at: event.created_at, + ) + + event.activity_id = activity.id + event.save! + + activity.verbiage = activity.generate_verbiage + activity.save! + end +end diff --git a/server/misc_scripts/activity_backfill/backfill_moderate_evidence_item_activities.rb b/server/misc_scripts/activity_backfill/backfill_moderate_evidence_item_activities.rb new file mode 100644 index 000000000..ac5c910b1 --- /dev/null +++ b/server/misc_scripts/activity_backfill/backfill_moderate_evidence_item_activities.rb @@ -0,0 +1,16 @@ +Event.where(action: ['accepted', 'rejected', 'reverted'], activity_id: nil).find_each do |event| + if !event.subject.nil? + activity = ModerateEvidenceItemActivity.create( + subject: event.subject, + user_id: event.originating_user_id, + organization_id: event.organization_id, + created_at: event.created_at, + ) + + event.activity_id = activity.id + event.save! + + activity.verbiage = activity.generate_verbiage + activity.save! + end +end diff --git a/server/misc_scripts/activity_backfill/backfill_notes.rb b/server/misc_scripts/activity_backfill/backfill_notes.rb new file mode 100644 index 000000000..2bcdc3505 --- /dev/null +++ b/server/misc_scripts/activity_backfill/backfill_notes.rb @@ -0,0 +1,37 @@ +Activity.where.not(type: ["CommentActivity", 'ModerateAssertionActivity', 'ModerateEvidenceItemActivity']) +.find_each do |a| + events = Event.where(action: 'commented', activity_id: a.id) + events.each do |e| + comment = e&.originating_object + if comment + a.note = comment.comment + a.save! + Notification.where(event: e).destroy_all + v = Variant.where(deprecation_comment_id: comment.id) + v.each do |variant| + variant.deprecation_comment_id = nil + variant.save!(validate: false) + end + EntityMention.where(comment: comment).destroy_all + UserMention.where(comment: comment).destroy_all + ActivityLinkedEntity.where(entity: comment).destroy_all + comment.destroy! + e.destroy! + elsif e.present? && comment.nil? + binding.pry + end + end +end + +SuggestSourceActivity.find_each do |a| + a.note = a.source_suggestion.initial_comment + a.save! +end + +SourceSuggestion.find_each do |s| + a = s.last_status_update_activity + if a + a.note = s.reason + a.save! + end +end diff --git a/server/misc_scripts/activity_backfill/backfill_reject_revisions_activities.rb b/server/misc_scripts/activity_backfill/backfill_reject_revisions_activities.rb new file mode 100644 index 000000000..1157e3bce --- /dev/null +++ b/server/misc_scripts/activity_backfill/backfill_reject_revisions_activities.rb @@ -0,0 +1,45 @@ +Event.where(action: 'revision rejected', activity_id: nil) +.group("subject_id, subject_type, originating_user_id, organization_id, batch_timestamp") +.select("array_agg(events.id) as event_ids, min(events.id) as id, subject_id, subject_type, originating_user_id, organization_id, date_trunc('minute', created_at) as batch_timestamp") +.each do |e| + batch = Event.where(id: e.event_ids) + + activity = RejectRevisionsActivity.where( + subject: e.subject, + user_id: e.originating_user_id, + organization_id: e.organization_id, + created_at: e.batch_timestamp + ).first_or_create! + + revisions = batch.map(&:originating_object) + activity.link_entities!(revisions) + + batch.each do |event| + event.activity_id = activity.id + event.save! + + possible_comment = event.originating_object&.comments.reject { |c| (c.created_at.to_i - e.batch_timestamp.to_i).abs > 60 }.first + + if possible_comment + activity.link_entities!(possible_comment) + comment_event = Event.find_by(originating_object: possible_comment) + if comment_event + comment_event.activity_id = activity.id + comment_event.save! + else + Event.create!( + action: 'commented', + originating_user_id: possible_comment.user.id, + created_at: possible_comment.created_at, + subject: event.originating_object, + originating_object: possible_comment, + organization_id: event.organization_id, + activity_id: activity.id + ) + end + end + end + + activity.verbiage = activity.generate_verbiage + activity.save! +end diff --git a/server/misc_scripts/activity_backfill/backfill_resolve_flag_activities.rb b/server/misc_scripts/activity_backfill/backfill_resolve_flag_activities.rb new file mode 100644 index 000000000..1f6f36b42 --- /dev/null +++ b/server/misc_scripts/activity_backfill/backfill_resolve_flag_activities.rb @@ -0,0 +1,40 @@ +Event.where(action: 'flag resolved', activity_id: nil).find_each do |event| + activity = ResolveFlagActivity.create( + subject: event.subject, + user_id: event.originating_user_id, + organization_id: event.organization_id, + created_at: event.created_at, + ) + + event.activity_id = activity.id + event.save! + + activity.link_entities!(event.originating_object) + + possible_comment = event.originating_object&.comments&.last + + if possible_comment + differential = (event.created_at.to_i - possible_comment.created_at.to_i).abs + if differential <= 30 + activity.link_entities!(possible_comment) + comment_event = Event.find_by(originating_object: possible_comment) + if comment_event + comment_event.activity_id = activity.id + comment_event.save! + else + Event.create!( + action: 'commented', + originating_user_id: possible_comment.user.id, + created_at: possible_comment.created_at, + subject: event.originating_object, + originating_object: possible_comment, + organization_id: event.organization_id, + activity_id: activity.id + ) + end + end + end + + activity.verbiage = activity.generate_verbiage + activity.save! +end diff --git a/server/misc_scripts/activity_backfill/backfill_source_suggestion_activities.rb b/server/misc_scripts/activity_backfill/backfill_source_suggestion_activities.rb new file mode 100644 index 000000000..1e90698c6 --- /dev/null +++ b/server/misc_scripts/activity_backfill/backfill_source_suggestion_activities.rb @@ -0,0 +1,34 @@ +Event.where(action: 'publication suggested', activity_id: nil).find_each do |event| + next if event.subject.nil? + + activity = SuggestSourceActivity.create( + subject: event.subject, + user_id: event.originating_user_id, + organization_id: event.organization_id, + created_at: event.created_at + ) + + source = event.subject + source_suggestion = event.originating_object + + event.activity_id = activity.id + event.save! + + possible_comment = if source_suggestion + Comment.find_by(commentable: source, comment: source_suggestion.initial_comment) + else + nil + end + + if possible_comment + comment_event = Event.find_by(originating_object: possible_comment) + if comment_event + comment_event.activity_id = activity.id + comment_event.save! + end + end + + activity.link_entities!([source_suggestion, possible_comment].compact) + activity.verbiage = activity.generate_verbiage + activity.save! +end diff --git a/server/misc_scripts/activity_backfill/backfill_submit_assertion_activities.rb b/server/misc_scripts/activity_backfill/backfill_submit_assertion_activities.rb new file mode 100644 index 000000000..2f2c99f3f --- /dev/null +++ b/server/misc_scripts/activity_backfill/backfill_submit_assertion_activities.rb @@ -0,0 +1,40 @@ +Event.where(action: 'assertion submitted', activity_id: nil).find_each do |event| + if !event.subject.nil? + activity = SubmitAssertionActivity.create( + subject: event.subject, + user_id: event.originating_user_id, + organization_id: event.organization_id, + created_at: event.created_at, + ) + + event.activity_id = activity.id + event.save! + + possible_comment = event.subject&.comments&.first + + if possible_comment + differential = (event.created_at.to_i - possible_comment.created_at.to_i).abs + if differential <= 30 + activity.link_entities!(possible_comment) + comment_event = Event.find_by(originating_object: possible_comment) + if comment_event + comment_event.activity_id = activity.id + comment_event.save! + else + Event.create!( + action: 'commented', + originating_user_id: possible_comment.user.id, + created_at: possible_comment.created_at, + subject: event.subject, + originating_object: possible_comment, + organization_id: event.organization_id, + activity_id: activity.id + ) + end + end + end + + activity.verbiage = activity.generate_verbiage + activity.save! + end +end diff --git a/server/misc_scripts/activity_backfill/backfill_submit_evidence_item_activities.rb b/server/misc_scripts/activity_backfill/backfill_submit_evidence_item_activities.rb new file mode 100644 index 000000000..187dbba0b --- /dev/null +++ b/server/misc_scripts/activity_backfill/backfill_submit_evidence_item_activities.rb @@ -0,0 +1,40 @@ +Event.where(action: 'submitted', activity_id: nil).find_each do |event| + if !event.subject.nil? + activity = SubmitEvidenceItemActivity.create( + subject: event.subject, + user_id: event.originating_user_id, + organization_id: event.organization_id, + created_at: event.created_at, + ) + + event.activity_id = activity.id + event.save! + + possible_comment = event.subject&.comments&.first + + if possible_comment + differential = (event.created_at.to_i - possible_comment.created_at.to_i).abs + if differential <= 30 + activity.link_entities!(possible_comment) + comment_event = Event.find_by(originating_object: possible_comment) + if comment_event + comment_event.activity_id = activity.id + comment_event.save! + else + Event.create!( + action: 'commented', + originating_user_id: possible_comment.user.id, + created_at: possible_comment.created_at, + subject: event.subject, + originating_object: possible_comment, + organization_id: event.organization_id, + activity_id: activity.id + ) + end + end + end + + activity.verbiage = activity.generate_verbiage + activity.save! + end +end diff --git a/server/misc_scripts/activity_backfill/backfill_suggest_revision_set_activities.rb b/server/misc_scripts/activity_backfill/backfill_suggest_revision_set_activities.rb new file mode 100644 index 000000000..06fe20034 --- /dev/null +++ b/server/misc_scripts/activity_backfill/backfill_suggest_revision_set_activities.rb @@ -0,0 +1,65 @@ +RevisionSet.find_each do |revision_set| + revisions = revision_set.revisions + + event = revisions.map{|r| r.creation_event}.compact.first + + if event + activity = SuggestRevisionSetActivity.where( + subject: event.subject, + user_id: event.originating_user_id, + organization_id: event.organization_id, + created_at: event.created_at, + ).first_or_create + + revisions.each do |revision| + e = revision.creation_event + if e.nil? + e = Event.create!( + action: 'revision suggested', + originating_user_id: event.originating_user.id, + created_at: event.created_at, + subject: event.subject, + originating_object: revision, + organization_id: event.organization_id, + activity_id: activity.id + ) + else + e.activity_id = activity.id + e.save! + end + + possible_comment = revision.comments&.first + + if possible_comment + differential = (e.created_at.to_i - possible_comment.created_at.to_i).abs + if differential <= 30 + activity.link_entities!(possible_comment) + if activity.note.nil? + activity.note = possible_comment.comment + activity.save! + end + comment_event = Event.find_by(originating_object: possible_comment) + if comment_event + comment_event.activity_id = activity.id + comment_event.save! + else + Event.create!( + action: 'commented', + originating_user_id: possible_comment.user.id, + created_at: possible_comment.created_at, + subject: event.subject, + originating_object: possible_comment, + organization_id: event.organization_id, + activity_id: activity.id + ) + end + end + end + end + + activity.link_entities!([revisions, revision_set].flatten) + + activity.verbiage = activity.generate_verbiage + activity.save! + end +end diff --git a/server/misc_scripts/activity_backfill/backfill_update_source_suggestion_status.rb b/server/misc_scripts/activity_backfill/backfill_update_source_suggestion_status.rb new file mode 100644 index 000000000..cc184ee30 --- /dev/null +++ b/server/misc_scripts/activity_backfill/backfill_update_source_suggestion_status.rb @@ -0,0 +1,16 @@ +Event.where(action: ['requeued source suggestion', 'curated source suggestion', 'rejected source suggestion'], activity_id: nil).find_each do |event| + activity = UpdateSourceSuggestionStatusActivity.create( + subject: event.subject, + user_id: event.originating_user_id, + organization_id: event.organization_id, + created_at: event.created_at + ) + + event.activity_id = activity.id + event.save! + + activity.link_entities!([event.originating_object]) + activity.verbiage = activity.generate_verbiage + activity.save! +end + diff --git a/server/misc_scripts/activity_backfill/cleanup_events.rb b/server/misc_scripts/activity_backfill/cleanup_events.rb new file mode 100644 index 000000000..2059e0f74 --- /dev/null +++ b/server/misc_scripts/activity_backfill/cleanup_events.rb @@ -0,0 +1,22 @@ +Event.where(action: ['revision accepted', 'revision suggested', 'revision rejected']).find_each do |event| + if event.subject != event.originating_object.subject + revision = event.originating_object + if event.state_params&.dig('suggested_change', 'id') == event.originating_object_id + Notification.where(event: event).delete_all + event.destroy! + elsif event.subject_type == "Variant" && revision.subject_type == 'MolecularProfile' && (revision.field_name == 'description' || revision.field_name == 'source_ids') + event.subject = revision.subject + event.save!(validate: false) + else + binding.pry + end + end +end + +events = Event.where(originating_object_type: 'Flag') + .find_each.reject { |x| x.subject == x.originating_object.flaggable }; + +events.each do |e| + e.subject = e.originating_object.flaggable + e.save!(validate: false) +end diff --git a/server/misc_scripts/backfill_complex_mp_creation_event.rb b/server/misc_scripts/backfill_complex_mp_creation_event.rb new file mode 100644 index 000000000..628d4076a --- /dev/null +++ b/server/misc_scripts/backfill_complex_mp_creation_event.rb @@ -0,0 +1,38 @@ +fout = File.open('complex_mps_without_creation_event', 'w') + +MolecularProfile.find_each do |mp| + if mp.variants.length == 1 + next + end + + if CreateComplexMolecularProfileActivity.find_by(subject: mp) + next + end + + e = mp.evidence_items.first + if e && e.submission_activity + submission_activity = e.submission_activity + + activity = CreateComplexMolecularProfileActivity.create!( + subject: mp, + user: submission_activity.user, + organization: submission_activity.organization, + created_at: submission_activity.created_at, + ) + + activity.verbiage = activity.generate_verbiage() + activity.save! + + event = Event.where( + action: 'complex molecular profile created', + originating_user: submission_activity.user, + subject: mp, + organization: submission_activity.organization, + originating_object: mp, + created_at: submission_activity.created_at, + activity: activity + ).first_or_create! + else + fout.puts "https://civicdb.org/molecular-profiles/#{mp.id}" + end +end diff --git a/server/misc_scripts/backfill_variant_creation_event.rb b/server/misc_scripts/backfill_variant_creation_event.rb new file mode 100644 index 000000000..e7d04fded --- /dev/null +++ b/server/misc_scripts/backfill_variant_creation_event.rb @@ -0,0 +1,35 @@ +fout = File.open('variants_without_creation_event', 'w') + +Variant.find_each do |v| + if CreateVariantActivity.find_by(subject: v) + next + end + + e = v.single_variant_molecular_profile.evidence_items.first + if e && e.submission_activity + submission_activity = e.submission_activity + + activity = CreateVariantActivity.create!( + subject: v, + user: submission_activity.user, + organization: submission_activity.organization, + created_at: submission_activity.created_at, + ) + + activity.linked_entities << v.single_variant_molecular_profile + activity.verbiage = activity.generate_verbiage() + activity.save! + + event = Event.where( + action: 'variant created', + originating_user: submission_activity.user, + subject: v, + organization: submission_activity.organization, + originating_object: v, + created_at: submission_activity.created_at, + activity: activity + ).first_or_create! + else + fout.puts "https://civicdb.org/variants/#{v.id}" + end +end