diff --git a/.github/workflows/js.yaml b/.github/workflows/js.yaml index 933148b904..5d63c529f6 100644 --- a/.github/workflows/js.yaml +++ b/.github/workflows/js.yaml @@ -2,7 +2,6 @@ name: Javascript on: push: branches: - - staging - production pull_request: jobs: diff --git a/apps/web/graphql.schema.json b/apps/web/graphql.schema.json index f4728f08ab..db014a9aa7 100644 --- a/apps/web/graphql.schema.json +++ b/apps/web/graphql.schema.json @@ -283,18 +283,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "subject", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "title", "description": null, @@ -694,6 +682,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metaDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metaTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "repository", "description": null, @@ -741,6 +753,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "url", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -3095,18 +3119,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "subject", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "taxonomyTerms", "description": null, @@ -4092,18 +4104,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "subject", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "taxonomyTerms", "description": null, @@ -4697,6 +4697,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "url", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -5804,18 +5816,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "subject", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "taxonomyTerms", "description": null, @@ -6330,18 +6330,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "subject", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "threads", "description": null, @@ -6697,6 +6685,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metaDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metaTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "repository", "description": null, @@ -6833,6 +6845,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "url", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -7152,6 +7176,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metaTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "repository", "description": null, @@ -7288,6 +7324,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "url", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -9664,18 +9712,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "subject", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "taxonomyTerms", "description": null, @@ -10269,6 +10305,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "url", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -10755,18 +10803,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "subject", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "taxonomyTerms", "description": null, @@ -11265,18 +11301,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "subject", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "taxonomyTerms", "description": null, @@ -11553,22 +11577,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "cohesive", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "content", "description": null, @@ -11718,6 +11726,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metaDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metaTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "repository", "description": null, @@ -11854,6 +11886,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "url", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -12224,6 +12268,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metaDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metaTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "repository", "description": null, @@ -12360,6 +12428,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "url", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -14699,39 +14779,6 @@ }, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "rejectRevision", - "description": null, - "args": [ - { - "name": "input", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "RejectRevisionInput", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "RejectRevisionResponse", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null } ], "inputFields": null, @@ -17358,22 +17405,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "cohesive", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "content", "description": null, @@ -18498,35 +18529,6 @@ "name": "SubjectQuery", "description": null, "fields": [ - { - "name": "subject", - "description": null, - "args": [ - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "subjects", "description": null, @@ -23856,18 +23858,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "subject", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "taxonomyTerms", "description": null, @@ -24293,6 +24283,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "metaDescription", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "metaTitle", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "repository", "description": null, diff --git a/apps/web/src/data/de/index.ts b/apps/web/src/data/de/index.ts index 63fa4ecee2..5209044993 100644 --- a/apps/web/src/data/de/index.ts +++ b/apps/web/src/data/de/index.ts @@ -974,8 +974,6 @@ export const loggedInData = { removeExercise: "Teilaufgabe entfernen", addExercise: "Teilaufgabe hinzufügen", kindOfExerciseGroup: "Art der Aufgabengruppe", - notCohesive: "nicht zusammenhängend", - cohesive: "zusammenhängend", addIntermediateTask: "Zwischentext hinzufügen", removeIntermediateTask: "Zwischentext entfernen", intermediateTask: "Zwischentext" diff --git a/apps/web/src/data/en/index.ts b/apps/web/src/data/en/index.ts index 5b1192fdac..6f3e3c7415 100644 --- a/apps/web/src/data/en/index.ts +++ b/apps/web/src/data/en/index.ts @@ -1056,8 +1056,6 @@ export const loggedInData = { removeExercise: 'Remove exercise', addExercise: 'Add exercise', kindOfExerciseGroup: 'Kind of exercise group', - notCohesive: 'not cohesive', - cohesive: 'cohesive', addIntermediateTask: 'Add Intermediate Task', removeIntermediateTask: 'Remove intermediate Task', intermediateTask: 'Intermediate Task', diff --git a/apps/web/src/data/es/index.ts b/apps/web/src/data/es/index.ts index 94a644be18..064e93cfcc 100644 --- a/apps/web/src/data/es/index.ts +++ b/apps/web/src/data/es/index.ts @@ -974,8 +974,6 @@ export const loggedInData = { removeExercise: "Eliminar ejercicio", addExercise: "Añadir ejercicio", kindOfExerciseGroup: "Tipo de grupo de ejercicios", - notCohesive: "no es cohesivo", - cohesive: "cohesivo", addIntermediateTask: 'Add Intermediate Task', removeIntermediateTask: 'Remove intermediate Task', intermediateTask: 'Intermediate Task' diff --git a/apps/web/src/data/fr/index.ts b/apps/web/src/data/fr/index.ts index 7c1a424a10..a77674bfda 100644 --- a/apps/web/src/data/fr/index.ts +++ b/apps/web/src/data/fr/index.ts @@ -974,8 +974,6 @@ export const loggedInData = { removeExercise: "Supprimer l'exercice", addExercise: "Ajouter un exercice", kindOfExerciseGroup: "Type de groupe d'exercice", - notCohesive: "pas cohérent", - cohesive: "cohérent", addIntermediateTask: 'Add Intermediate Task', removeIntermediateTask: 'Remove intermediate Task', intermediateTask: 'Intermediate Task' diff --git a/apps/web/src/data/hi/index.ts b/apps/web/src/data/hi/index.ts index 2c7ef34dc0..3694b080c4 100644 --- a/apps/web/src/data/hi/index.ts +++ b/apps/web/src/data/hi/index.ts @@ -974,8 +974,6 @@ export const loggedInData = { removeExercise: 'Remove exercise', addExercise: 'Add exercise', kindOfExerciseGroup: 'Kind of exercise group', - notCohesive: 'not cohesive', - cohesive: 'cohesive', addIntermediateTask: 'Add Intermediate Task', removeIntermediateTask: 'Remove intermediate Task', intermediateTask: 'Intermediate Task' diff --git a/apps/web/src/data/ta/index.ts b/apps/web/src/data/ta/index.ts index 6d08193e57..dae5e3f213 100644 --- a/apps/web/src/data/ta/index.ts +++ b/apps/web/src/data/ta/index.ts @@ -974,8 +974,6 @@ export const loggedInData = { removeExercise: 'Remove exercise', addExercise: 'Add exercise', kindOfExerciseGroup: 'Kind of exercise group', - notCohesive: 'not cohesive', - cohesive: 'cohesive', addIntermediateTask: 'Add Intermediate Task', removeIntermediateTask: 'Remove intermediate Task', intermediateTask: 'Intermediate Task' diff --git a/apps/web/src/fetcher/create-taxonomy.ts b/apps/web/src/fetcher/create-taxonomy.ts index 373a9fac76..48a15a2ad4 100644 --- a/apps/web/src/fetcher/create-taxonomy.ts +++ b/apps/web/src/fetcher/create-taxonomy.ts @@ -60,12 +60,22 @@ function collectExercises(children: TaxonomyTermChildrenLevel1[]) { if (child.__typename === UuidType.Exercise && child.currentRevision) { const exercise = createExercise({ ...child, + currentRevision: { + ...child.currentRevision, + alias: '', + }, revisions: { totalCount: 0, nodes: [] }, }) if (exercise) result.push(exercise) } if (child.__typename === UuidType.ExerciseGroup && child.currentRevision) { - const group = createExerciseGroup(child) + const group = createExerciseGroup({ + ...child, + currentRevision: { + ...child.currentRevision, + alias: '', + }, + }) if (group) result.push(group) } }) diff --git a/apps/web/src/fetcher/graphql-types/operations.ts b/apps/web/src/fetcher/graphql-types/operations.ts index ecf2873d69..a4356402fa 100644 --- a/apps/web/src/fetcher/graphql-types/operations.ts +++ b/apps/web/src/fetcher/graphql-types/operations.ts @@ -28,7 +28,6 @@ export interface AbstractEntity { instance: Instance; licenseId: Scalars['Int']['output']; revisions: AbstractEntityRevisionConnection; - subject?: Maybe; title: Scalars['String']['output']; trashed: Scalars['Boolean']['output']; } @@ -74,9 +73,12 @@ export interface AbstractEntityRevision { date: Scalars['DateTime']['output']; events: AbstractNotificationEventConnection; id: Scalars['Int']['output']; + metaDescription?: Maybe; + metaTitle?: Maybe; repository: AbstractEntity; title: Scalars['String']['output']; trashed: Scalars['Boolean']['output']; + url?: Maybe; } @@ -280,7 +282,6 @@ export interface Applet extends AbstractEntity, AbstractRepository, AbstractTaxo instance: Instance; licenseId: Scalars['Int']['output']; revisions: AppletRevisionConnection; - subject?: Maybe; taxonomyTerms: TaxonomyTermConnection; threads: ThreadsConnection; title: Scalars['String']['output']; @@ -381,7 +382,6 @@ export interface Article extends AbstractEntity, AbstractRepository, AbstractTax instance: Instance; licenseId: Scalars['Int']['output']; revisions: ArticleRevisionConnection; - subject?: Maybe; taxonomyTerms: TaxonomyTermConnection; threads: ThreadsConnection; title: Scalars['String']['output']; @@ -441,6 +441,7 @@ export interface ArticleRevision extends AbstractEntityRevision, AbstractRevisio threads: ThreadsConnection; title: Scalars['String']['output']; trashed: Scalars['Boolean']['output']; + url?: Maybe; } @@ -552,7 +553,6 @@ export interface Course extends AbstractEntity, AbstractRepository, AbstractTaxo licenseId: Scalars['Int']['output']; pages: Array; revisions: CourseRevisionConnection; - subject?: Maybe; taxonomyTerms: TaxonomyTermConnection; threads: ThreadsConnection; title: Scalars['String']['output']; @@ -614,7 +614,6 @@ export interface CoursePage extends AbstractEntity, AbstractRepository, Abstract instance: Instance; licenseId: Scalars['Int']['output']; revisions: CoursePageRevisionConnection; - subject?: Maybe; threads: ThreadsConnection; title: Scalars['String']['output']; trashed: Scalars['Boolean']['output']; @@ -659,10 +658,13 @@ export interface CoursePageRevision extends AbstractEntityRevision, AbstractRevi date: Scalars['DateTime']['output']; events: AbstractNotificationEventConnection; id: Scalars['Int']['output']; + metaDescription?: Maybe; + metaTitle?: Maybe; repository: CoursePage; threads: ThreadsConnection; title: Scalars['String']['output']; trashed: Scalars['Boolean']['output']; + url?: Maybe; } @@ -703,10 +705,12 @@ export interface CourseRevision extends AbstractEntityRevision, AbstractRevision events: AbstractNotificationEventConnection; id: Scalars['Int']['output']; metaDescription: Scalars['String']['output']; + metaTitle?: Maybe; repository: Course; threads: ThreadsConnection; title: Scalars['String']['output']; trashed: Scalars['Boolean']['output']; + url?: Maybe; } @@ -980,7 +984,6 @@ export interface Event extends AbstractEntity, AbstractRepository, AbstractTaxon instance: Instance; licenseId: Scalars['Int']['output']; revisions: EventRevisionConnection; - subject?: Maybe; taxonomyTerms: TaxonomyTermConnection; threads: ThreadsConnection; title: Scalars['String']['output']; @@ -1040,6 +1043,7 @@ export interface EventRevision extends AbstractEntityRevision, AbstractRevision, threads: ThreadsConnection; title: Scalars['String']['output']; trashed: Scalars['Boolean']['output']; + url?: Maybe; } @@ -1093,7 +1097,6 @@ export interface Exercise extends AbstractEntity, AbstractRepository, AbstractTa instance: Instance; licenseId: Scalars['Int']['output']; revisions: ExerciseRevisionConnection; - subject?: Maybe; taxonomyTerms: TaxonomyTermConnection; threads: ThreadsConnection; title: Scalars['String']['output']; @@ -1148,7 +1151,6 @@ export interface ExerciseGroup extends AbstractEntity, AbstractRepository, Abstr instance: Instance; licenseId: Scalars['Int']['output']; revisions: ExerciseGroupRevisionConnection; - subject?: Maybe; taxonomyTerms: TaxonomyTermConnection; threads: ThreadsConnection; title: Scalars['String']['output']; @@ -1198,15 +1200,17 @@ export interface ExerciseGroupRevision extends AbstractEntityRevision, AbstractR alias: Scalars['String']['output']; author: User; changes: Scalars['String']['output']; - cohesive: Scalars['Boolean']['output']; content: Scalars['String']['output']; date: Scalars['DateTime']['output']; events: AbstractNotificationEventConnection; id: Scalars['Int']['output']; + metaDescription?: Maybe; + metaTitle?: Maybe; repository: ExerciseGroup; threads: ThreadsConnection; title: Scalars['String']['output']; trashed: Scalars['Boolean']['output']; + url?: Maybe; } @@ -1253,10 +1257,13 @@ export interface ExerciseRevision extends AbstractEntityRevision, AbstractRevisi date: Scalars['DateTime']['output']; events: AbstractNotificationEventConnection; id: Scalars['Int']['output']; + metaDescription?: Maybe; + metaTitle?: Maybe; repository: Exercise; threads: ThreadsConnection; title: Scalars['String']['output']; trashed: Scalars['Boolean']['output']; + url?: Maybe; } @@ -1544,7 +1551,6 @@ export interface PageMutation { addRevision: AddRevisionResponse; checkoutRevision: CheckoutRevisionResponse; create: PageCreateResponse; - rejectRevision: RejectRevisionResponse; } @@ -1562,11 +1568,6 @@ export interface PageMutationCreateArgs { input: CreatePageInput; } - -export interface PageMutationRejectRevisionArgs { - input: RejectRevisionInput; -} - export interface PageQuery { __typename?: 'PageQuery'; pages: Array; @@ -1838,7 +1839,6 @@ export interface SetEventInput { export interface SetExerciseGroupInput { changes: Scalars['String']['input']; - cohesive: Scalars['Boolean']['input']; content: Scalars['String']['input']; entityId?: InputMaybe; needsReview: Scalars['Boolean']['input']; @@ -1940,16 +1940,10 @@ export interface SubjectUnrevisedEntitiesArgs { export interface SubjectQuery { __typename?: 'SubjectQuery'; - subject?: Maybe; subjects: Array; } -export interface SubjectQuerySubjectArgs { - id: Scalars['String']['input']; -} - - export interface SubjectQuerySubjectsArgs { instance: Instance; } @@ -2592,7 +2586,6 @@ export interface Video extends AbstractEntity, AbstractRepository, AbstractTaxon instance: Instance; licenseId: Scalars['Int']['output']; revisions: VideoRevisionConnection; - subject?: Maybe; taxonomyTerms: TaxonomyTermConnection; threads: ThreadsConnection; title: Scalars['String']['output']; @@ -2646,6 +2639,8 @@ export interface VideoRevision extends AbstractEntityRevision, AbstractRevision, date: Scalars['DateTime']['output']; events: AbstractNotificationEventConnection; id: Scalars['Int']['output']; + metaDescription?: Maybe; + metaTitle?: Maybe; repository: Video; threads: ThreadsConnection; title: Scalars['String']['output']; @@ -2750,35 +2745,43 @@ export type UsersRevisionsQueryVariables = Exact<{ export type UsersRevisionsQuery = { __typename?: 'Query', user: { __typename?: 'UserQuery', userByUsername?: { __typename?: 'User', unrevisedEntities: { __typename?: 'AbstractEntityConnection', totalCount: number, nodes: Array<{ __typename: 'Applet', id: number, alias: string, currentRevision?: { __typename?: 'AppletRevision', title: string, id: number } | null, revisions: { __typename?: 'AppletRevisionConnection', nodes: Array<{ __typename?: 'AppletRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } } | { __typename: 'Article', id: number, alias: string, currentRevision?: { __typename?: 'ArticleRevision', title: string, id: number } | null, revisions: { __typename?: 'ArticleRevisionConnection', nodes: Array<{ __typename?: 'ArticleRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } } | { __typename: 'Course', id: number, alias: string, currentRevision?: { __typename?: 'CourseRevision', title: string, id: number } | null, revisions: { __typename?: 'CourseRevisionConnection', nodes: Array<{ __typename?: 'CourseRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } } | { __typename: 'CoursePage', id: number, alias: string, currentRevision?: { __typename?: 'CoursePageRevision', title: string, id: number } | null, revisions: { __typename?: 'CoursePageRevisionConnection', nodes: Array<{ __typename?: 'CoursePageRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } } | { __typename: 'Event', id: number, alias: string, currentRevision?: { __typename?: 'EventRevision', title: string, id: number } | null, revisions: { __typename?: 'EventRevisionConnection', nodes: Array<{ __typename?: 'EventRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } } | { __typename: 'Exercise', id: number, alias: string, currentRevision?: { __typename?: 'ExerciseRevision', title: string, id: number } | null, revisions: { __typename?: 'ExerciseRevisionConnection', nodes: Array<{ __typename?: 'ExerciseRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } } | { __typename: 'ExerciseGroup', id: number, alias: string, currentRevision?: { __typename?: 'ExerciseGroupRevision', title: string, id: number } | null, revisions: { __typename?: 'ExerciseGroupRevisionConnection', nodes: Array<{ __typename?: 'ExerciseGroupRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } } | { __typename: 'Video', id: number, alias: string, currentRevision?: { __typename?: 'VideoRevision', title: string, id: number } | null, revisions: { __typename?: 'VideoRevisionConnection', nodes: Array<{ __typename?: 'VideoRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } }>, pageInfo: { __typename?: 'HasNextPageInfo', hasNextPage: boolean, endCursor?: string | null } } } | null } }; -type AnyRevision_AppletRevision_Fragment = { __typename?: 'AppletRevision', id: number, title: string, content: string, date: string }; +type AbstractRevision_AppletRevision_Fragment = { __typename?: 'AppletRevision', id: number, alias: string, title: string, content: string, date: string }; + +type AbstractRevision_ArticleRevision_Fragment = { __typename?: 'ArticleRevision', id: number, alias: string, title: string, content: string, date: string }; + +type AbstractRevision_CoursePageRevision_Fragment = { __typename?: 'CoursePageRevision', id: number, alias: string, title: string, content: string, date: string }; + +type AbstractRevision_CourseRevision_Fragment = { __typename?: 'CourseRevision', id: number, alias: string, title: string, content: string, date: string }; + +type AbstractRevision_EventRevision_Fragment = { __typename?: 'EventRevision', id: number, alias: string, title: string, content: string, date: string }; -type AnyRevision_ArticleRevision_Fragment = { __typename?: 'ArticleRevision', id: number, title: string, content: string, date: string }; +type AbstractRevision_ExerciseGroupRevision_Fragment = { __typename?: 'ExerciseGroupRevision', id: number, alias: string, title: string, content: string, date: string }; -type AnyRevision_CoursePageRevision_Fragment = { __typename?: 'CoursePageRevision', id: number, title: string, content: string, date: string }; +type AbstractRevision_ExerciseRevision_Fragment = { __typename?: 'ExerciseRevision', id: number, alias: string, title: string, content: string, date: string }; -type AnyRevision_CourseRevision_Fragment = { __typename?: 'CourseRevision', id: number, title: string, content: string, date: string }; +type AbstractRevision_PageRevision_Fragment = { __typename?: 'PageRevision', id: number, alias: string, title: string, content: string, date: string }; -type AnyRevision_EventRevision_Fragment = { __typename?: 'EventRevision', id: number, title: string, content: string, date: string }; +type AbstractRevision_VideoRevision_Fragment = { __typename?: 'VideoRevision', id: number, alias: string, title: string, content: string, date: string }; -type AnyRevision_ExerciseGroupRevision_Fragment = { __typename?: 'ExerciseGroupRevision', id: number, title: string, content: string, date: string }; +export type AbstractRevisionFragment = AbstractRevision_AppletRevision_Fragment | AbstractRevision_ArticleRevision_Fragment | AbstractRevision_CoursePageRevision_Fragment | AbstractRevision_CourseRevision_Fragment | AbstractRevision_EventRevision_Fragment | AbstractRevision_ExerciseGroupRevision_Fragment | AbstractRevision_ExerciseRevision_Fragment | AbstractRevision_PageRevision_Fragment | AbstractRevision_VideoRevision_Fragment; -type AnyRevision_ExerciseRevision_Fragment = { __typename?: 'ExerciseRevision', id: number, title: string, content: string, date: string }; +type AbstractEntityRevision_AppletRevision_Fragment = { __typename?: 'AppletRevision', metaTitle: string, metaDescription: string, url: string, id: number, alias: string, title: string, content: string, date: string }; -type AnyRevision_PageRevision_Fragment = { __typename?: 'PageRevision', id: number, title: string, content: string, date: string }; +type AbstractEntityRevision_ArticleRevision_Fragment = { __typename?: 'ArticleRevision', metaTitle: string, metaDescription: string, url?: string | null, id: number, alias: string, title: string, content: string, date: string }; -type AnyRevision_VideoRevision_Fragment = { __typename?: 'VideoRevision', id: number, title: string, content: string, date: string }; +type AbstractEntityRevision_CoursePageRevision_Fragment = { __typename?: 'CoursePageRevision', metaTitle?: string | null, metaDescription?: string | null, url?: string | null, id: number, alias: string, title: string, content: string, date: string }; -export type AnyRevisionFragment = AnyRevision_AppletRevision_Fragment | AnyRevision_ArticleRevision_Fragment | AnyRevision_CoursePageRevision_Fragment | AnyRevision_CourseRevision_Fragment | AnyRevision_EventRevision_Fragment | AnyRevision_ExerciseGroupRevision_Fragment | AnyRevision_ExerciseRevision_Fragment | AnyRevision_PageRevision_Fragment | AnyRevision_VideoRevision_Fragment; +type AbstractEntityRevision_CourseRevision_Fragment = { __typename?: 'CourseRevision', metaTitle?: string | null, metaDescription: string, url?: string | null, id: number, alias: string, title: string, content: string, date: string }; -export type ArticleRevisionFragment = { __typename?: 'ArticleRevision', metaTitle: string, metaDescription: string }; +type AbstractEntityRevision_EventRevision_Fragment = { __typename?: 'EventRevision', metaTitle: string, metaDescription: string, url?: string | null, id: number, alias: string, title: string, content: string, date: string }; -export type VideoRevisionFragment = { __typename?: 'VideoRevision', url: string }; +type AbstractEntityRevision_ExerciseGroupRevision_Fragment = { __typename?: 'ExerciseGroupRevision', metaTitle?: string | null, metaDescription?: string | null, url?: string | null, id: number, alias: string, title: string, content: string, date: string }; -export type AppletRevisionFragment = { __typename?: 'AppletRevision', url: string, metaTitle: string, metaDescription: string }; +type AbstractEntityRevision_ExerciseRevision_Fragment = { __typename?: 'ExerciseRevision', metaTitle?: string | null, metaDescription?: string | null, url?: string | null, id: number, alias: string, title: string, content: string, date: string }; -export type CoursePageRevisionFragment = { __typename?: 'CoursePageRevision', alias: string }; +type AbstractEntityRevision_VideoRevision_Fragment = { __typename?: 'VideoRevision', metaTitle?: string | null, metaDescription?: string | null, url: string, id: number, alias: string, title: string, content: string, date: string }; -export type ExerciseGroupRevisionFragment = { __typename?: 'ExerciseGroupRevision', cohesive: boolean, content: string }; +export type AbstractEntityRevisionFragment = AbstractEntityRevision_AppletRevision_Fragment | AbstractEntityRevision_ArticleRevision_Fragment | AbstractEntityRevision_CoursePageRevision_Fragment | AbstractEntityRevision_CourseRevision_Fragment | AbstractEntityRevision_EventRevision_Fragment | AbstractEntityRevision_ExerciseGroupRevision_Fragment | AbstractEntityRevision_ExerciseRevision_Fragment | AbstractEntityRevision_VideoRevision_Fragment; type EventData_CheckoutRevisionNotificationEvent_Fragment = { __typename: 'CheckoutRevisionNotificationEvent', reason: string, date: string, id: number, objectId: number, revision: { __typename?: 'AppletRevision', id: number } | { __typename?: 'ArticleRevision', id: number } | { __typename?: 'CoursePageRevision', id: number } | { __typename?: 'CourseRevision', id: number } | { __typename?: 'EventRevision', id: number } | { __typename?: 'ExerciseGroupRevision', id: number } | { __typename?: 'ExerciseRevision', id: number } | { __typename?: 'PageRevision', id: number } | { __typename?: 'VideoRevision', id: number }, repository: { __typename: 'Applet', id: number, title: string, alias: string } | { __typename: 'Article', id: number, title: string, alias: string } | { __typename: 'Course', id: number, title: string, alias: string } | { __typename: 'CoursePage', id: number, title: string, alias: string } | { __typename: 'Event', id: number, title: string, alias: string } | { __typename: 'Exercise', id: number, title: string, alias: string, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', type: TaxonomyTermType }> } } | { __typename: 'ExerciseGroup', id: number, title: string, alias: string, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', type: TaxonomyTermType }> } } | { __typename: 'Page', id: number, title: string, alias: string } | { __typename: 'Video', id: number, title: string, alias: string }, actor: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean } }; @@ -2912,7 +2915,7 @@ export type MainUuidQueryVariables = Exact<{ }>; -export type MainUuidQuery = { __typename?: 'Query', authorization: any, uuid?: { __typename: 'Applet', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'AppletRevision', id: number, title: string, content: string, date: string, url: string, metaTitle: string, metaDescription: string } | null, revisions: { __typename?: 'AppletRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'AppletRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } | { __typename: 'AppletRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'Article', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'ArticleRevision', id: number, title: string, content: string, date: string, metaTitle: string, metaDescription: string } | null, revisions: { __typename?: 'ArticleRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ArticleRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } | { __typename: 'ArticleRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'Comment', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'Course', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'CourseRevision', metaDescription: string, id: number, title: string, content: string, date: string } | null, revisions: { __typename?: 'CourseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CourseRevision', id: number, title: string, trashed: boolean }> }, pages: Array<{ __typename?: 'CoursePage', alias: string, id: number, currentRevision?: { __typename?: 'CoursePageRevision', id: number, title: string, content: string } | null }>, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } | { __typename: 'CoursePage', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'CoursePageRevision', id: number, title: string, content: string, date: string, alias: string } | null, revisions: { __typename?: 'CoursePageRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CoursePageRevision', id: number, title: string, trashed: boolean }> }, course: { __typename?: 'Course', id: number, licenseId: number, currentRevision?: { __typename?: 'CourseRevision', title: string } | null, revisions: { __typename?: 'CourseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CourseRevision', id: number, trashed: boolean, title: string }> }, pages: Array<{ __typename?: 'CoursePage', alias: string, id: number, currentRevision?: { __typename?: 'CoursePageRevision', title: string, trashed: boolean } | null }>, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | { __typename: 'CoursePageRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'CourseRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'Event', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'EventRevision', id: number, title: string, content: string, date: string } | null, revisions: { __typename?: 'EventRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'EventRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } | { __typename: 'EventRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'Exercise', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'ExerciseRevision', id: number, content: string, date: string, title: string } | null, revisions: { __typename?: 'ExerciseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } | { __typename: 'ExerciseGroup', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'ExerciseGroupRevision', id: number, title: string, content: string, date: string, cohesive: boolean } | null, revisions: { __typename?: 'ExerciseGroupRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseGroupRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } | { __typename: 'ExerciseGroupRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'ExerciseRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'Page', instance: Instance, licenseId: number, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'PageRevision', id: number, title: string, content: string, date: string } | null } | { __typename: 'PageRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'TaxonomyTerm', alias: string, title: string, instance: Instance, type: TaxonomyTermType, name: string, description?: string | null, weight: number, taxonomyId: number, trashed: boolean, id: number, parent?: { __typename?: 'TaxonomyTerm', id: number } | null, children: { __typename?: 'AbstractUuidConnection', nodes: Array<{ __typename: 'Applet', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'AppletRevision', title: string } | null, revisions: { __typename?: 'AppletRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'AppletRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'AppletRevision', trashed: boolean } | { __typename: 'Article', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'ArticleRevision', title: string } | null, revisions: { __typename?: 'ArticleRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ArticleRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'ArticleRevision', trashed: boolean } | { __typename: 'Comment', trashed: boolean } | { __typename: 'Course', trashed: boolean, alias: string, title: string, id: number, date: string, pages: Array<{ __typename?: 'CoursePage', id: number, currentRevision?: { __typename?: 'CoursePageRevision', id: number } | null }>, currentRevision?: { __typename?: 'CourseRevision', title: string } | null, revisions: { __typename?: 'CourseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CourseRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'CoursePage', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'CoursePageRevision', title: string } | null, revisions: { __typename?: 'CoursePageRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CoursePageRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'CoursePageRevision', trashed: boolean } | { __typename: 'CourseRevision', trashed: boolean } | { __typename: 'Event', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'EventRevision', title: string } | null, revisions: { __typename?: 'EventRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'EventRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'EventRevision', trashed: boolean } | { __typename: 'Exercise', trashed: boolean, id: number, alias: string, instance: Instance, date: string, licenseId: number, title: string, currentRevision?: { __typename?: 'ExerciseRevision', id: number, content: string, date: string, title: string } | null, revisions: { __typename?: 'ExerciseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'ExerciseGroup', id: number, alias: string, instance: Instance, licenseId: number, trashed: boolean, title: string, date: string, currentRevision?: { __typename?: 'ExerciseGroupRevision', content: string, id: number, date: string, cohesive: boolean, title: string } | null, revisions: { __typename?: 'ExerciseGroupRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseGroupRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'ExerciseGroupRevision', trashed: boolean } | { __typename: 'ExerciseRevision', trashed: boolean } | { __typename: 'Page', trashed: boolean } | { __typename: 'PageRevision', trashed: boolean } | { __typename: 'TaxonomyTerm', type: TaxonomyTermType, name: string, alias: string, id: number, description?: string | null, trashed: boolean, children: { __typename?: 'AbstractUuidConnection', nodes: Array<{ __typename: 'Applet', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'AppletRevision', title: string } | null, revisions: { __typename?: 'AppletRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'AppletRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'AppletRevision', trashed: boolean } | { __typename: 'Article', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'ArticleRevision', title: string } | null, revisions: { __typename?: 'ArticleRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ArticleRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'ArticleRevision', trashed: boolean } | { __typename: 'Comment', trashed: boolean } | { __typename: 'Course', trashed: boolean, alias: string, title: string, id: number, date: string, pages: Array<{ __typename?: 'CoursePage', id: number, currentRevision?: { __typename?: 'CoursePageRevision', id: number } | null }>, currentRevision?: { __typename?: 'CourseRevision', title: string } | null, revisions: { __typename?: 'CourseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CourseRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'CoursePage', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'CoursePageRevision', title: string } | null, revisions: { __typename?: 'CoursePageRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CoursePageRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'CoursePageRevision', trashed: boolean } | { __typename: 'CourseRevision', trashed: boolean } | { __typename: 'Event', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'EventRevision', title: string } | null, revisions: { __typename?: 'EventRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'EventRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'EventRevision', trashed: boolean } | { __typename: 'Exercise', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'ExerciseRevision', title: string } | null, revisions: { __typename?: 'ExerciseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'ExerciseGroup', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'ExerciseGroupRevision', title: string } | null, revisions: { __typename?: 'ExerciseGroupRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseGroupRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'ExerciseGroupRevision', trashed: boolean } | { __typename: 'ExerciseRevision', trashed: boolean } | { __typename: 'Page', trashed: boolean } | { __typename: 'PageRevision', trashed: boolean } | { __typename: 'TaxonomyTerm', id: number, alias: string, type: TaxonomyTermType, name: string, trashed: boolean } | { __typename: 'User', trashed: boolean } | { __typename: 'Video', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'VideoRevision', title: string } | null, revisions: { __typename?: 'VideoRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'VideoRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'VideoRevision', trashed: boolean }> } } | { __typename: 'User', trashed: boolean } | { __typename: 'Video', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'VideoRevision', title: string } | null, revisions: { __typename?: 'VideoRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'VideoRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'VideoRevision', trashed: boolean }> }, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> } | { __typename: 'User', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'Video', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'VideoRevision', id: number, title: string, content: string, date: string, url: string } | null, revisions: { __typename?: 'VideoRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'VideoRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } | { __typename: 'VideoRevision', id: number, title: string, trashed: boolean, alias: string } | null }; +export type MainUuidQuery = { __typename?: 'Query', authorization: any, uuid?: { __typename: 'Applet', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'AppletRevision', metaTitle: string, metaDescription: string, url: string, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'AppletRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'AppletRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } | { __typename: 'AppletRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'Article', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'ArticleRevision', metaTitle: string, metaDescription: string, url?: string | null, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'ArticleRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ArticleRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } | { __typename: 'ArticleRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'Comment', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'Course', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'CourseRevision', metaTitle?: string | null, metaDescription: string, url?: string | null, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'CourseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CourseRevision', id: number, title: string, trashed: boolean }> }, pages: Array<{ __typename?: 'CoursePage', alias: string, id: number, currentRevision?: { __typename?: 'CoursePageRevision', id: number, title: string, content: string } | null }>, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } | { __typename: 'CoursePage', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'CoursePageRevision', metaTitle?: string | null, metaDescription?: string | null, url?: string | null, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'CoursePageRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CoursePageRevision', id: number, title: string, trashed: boolean }> }, course: { __typename?: 'Course', id: number, licenseId: number, currentRevision?: { __typename?: 'CourseRevision', title: string } | null, revisions: { __typename?: 'CourseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CourseRevision', id: number, trashed: boolean, title: string }> }, pages: Array<{ __typename?: 'CoursePage', alias: string, id: number, currentRevision?: { __typename?: 'CoursePageRevision', title: string, trashed: boolean } | null }>, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | { __typename: 'CoursePageRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'CourseRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'Event', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'EventRevision', metaTitle: string, metaDescription: string, url?: string | null, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'EventRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'EventRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } | { __typename: 'EventRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'Exercise', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'ExerciseRevision', id: number, content: string, date: string, metaTitle?: string | null, metaDescription?: string | null, url?: string | null, alias: string, title: string } | null, revisions: { __typename?: 'ExerciseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } | { __typename: 'ExerciseGroup', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'ExerciseGroupRevision', metaTitle?: string | null, metaDescription?: string | null, url?: string | null, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'ExerciseGroupRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseGroupRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } | { __typename: 'ExerciseGroupRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'ExerciseRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'Page', instance: Instance, licenseId: number, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'PageRevision', id: number, alias: string, title: string, content: string, date: string } | null } | { __typename: 'PageRevision', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'TaxonomyTerm', alias: string, title: string, instance: Instance, type: TaxonomyTermType, name: string, description?: string | null, weight: number, taxonomyId: number, trashed: boolean, id: number, parent?: { __typename?: 'TaxonomyTerm', id: number } | null, children: { __typename?: 'AbstractUuidConnection', nodes: Array<{ __typename: 'Applet', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'AppletRevision', title: string } | null, revisions: { __typename?: 'AppletRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'AppletRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'AppletRevision', trashed: boolean } | { __typename: 'Article', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'ArticleRevision', title: string } | null, revisions: { __typename?: 'ArticleRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ArticleRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'ArticleRevision', trashed: boolean } | { __typename: 'Comment', trashed: boolean } | { __typename: 'Course', trashed: boolean, alias: string, title: string, id: number, date: string, pages: Array<{ __typename?: 'CoursePage', id: number, currentRevision?: { __typename?: 'CoursePageRevision', id: number } | null }>, currentRevision?: { __typename?: 'CourseRevision', title: string } | null, revisions: { __typename?: 'CourseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CourseRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'CoursePage', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'CoursePageRevision', title: string } | null, revisions: { __typename?: 'CoursePageRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CoursePageRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'CoursePageRevision', trashed: boolean } | { __typename: 'CourseRevision', trashed: boolean } | { __typename: 'Event', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'EventRevision', title: string } | null, revisions: { __typename?: 'EventRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'EventRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'EventRevision', trashed: boolean } | { __typename: 'Exercise', trashed: boolean, id: number, alias: string, instance: Instance, date: string, licenseId: number, title: string, currentRevision?: { __typename?: 'ExerciseRevision', id: number, content: string, date: string, title: string } | null, revisions: { __typename?: 'ExerciseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'ExerciseGroup', id: number, alias: string, instance: Instance, licenseId: number, trashed: boolean, title: string, date: string, currentRevision?: { __typename?: 'ExerciseGroupRevision', content: string, id: number, date: string, title: string } | null, revisions: { __typename?: 'ExerciseGroupRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseGroupRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'ExerciseGroupRevision', trashed: boolean } | { __typename: 'ExerciseRevision', trashed: boolean } | { __typename: 'Page', trashed: boolean } | { __typename: 'PageRevision', trashed: boolean } | { __typename: 'TaxonomyTerm', type: TaxonomyTermType, name: string, alias: string, id: number, description?: string | null, trashed: boolean, children: { __typename?: 'AbstractUuidConnection', nodes: Array<{ __typename: 'Applet', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'AppletRevision', title: string } | null, revisions: { __typename?: 'AppletRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'AppletRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'AppletRevision', trashed: boolean } | { __typename: 'Article', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'ArticleRevision', title: string } | null, revisions: { __typename?: 'ArticleRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ArticleRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'ArticleRevision', trashed: boolean } | { __typename: 'Comment', trashed: boolean } | { __typename: 'Course', trashed: boolean, alias: string, title: string, id: number, date: string, pages: Array<{ __typename?: 'CoursePage', id: number, currentRevision?: { __typename?: 'CoursePageRevision', id: number } | null }>, currentRevision?: { __typename?: 'CourseRevision', title: string } | null, revisions: { __typename?: 'CourseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CourseRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'CoursePage', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'CoursePageRevision', title: string } | null, revisions: { __typename?: 'CoursePageRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CoursePageRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'CoursePageRevision', trashed: boolean } | { __typename: 'CourseRevision', trashed: boolean } | { __typename: 'Event', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'EventRevision', title: string } | null, revisions: { __typename?: 'EventRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'EventRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'EventRevision', trashed: boolean } | { __typename: 'Exercise', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'ExerciseRevision', title: string } | null, revisions: { __typename?: 'ExerciseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'ExerciseGroup', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'ExerciseGroupRevision', title: string } | null, revisions: { __typename?: 'ExerciseGroupRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseGroupRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'ExerciseGroupRevision', trashed: boolean } | { __typename: 'ExerciseRevision', trashed: boolean } | { __typename: 'Page', trashed: boolean } | { __typename: 'PageRevision', trashed: boolean } | { __typename: 'TaxonomyTerm', id: number, alias: string, type: TaxonomyTermType, name: string, trashed: boolean } | { __typename: 'User', trashed: boolean } | { __typename: 'Video', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'VideoRevision', title: string } | null, revisions: { __typename?: 'VideoRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'VideoRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'VideoRevision', trashed: boolean }> } } | { __typename: 'User', trashed: boolean } | { __typename: 'Video', trashed: boolean, alias: string, title: string, id: number, date: string, currentRevision?: { __typename?: 'VideoRevision', title: string } | null, revisions: { __typename?: 'VideoRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'VideoRevision', title: string, trashed: boolean, id: number }> } } | { __typename: 'VideoRevision', trashed: boolean }> }, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> } | { __typename: 'User', id: number, title: string, trashed: boolean, alias: string } | { __typename: 'Video', instance: Instance, licenseId: number, date: string, id: number, title: string, trashed: boolean, alias: string, currentRevision?: { __typename?: 'VideoRevision', metaTitle?: string | null, metaDescription?: string | null, url: string, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'VideoRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'VideoRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } | { __typename: 'VideoRevision', id: number, title: string, trashed: boolean, alias: string } | null }; type TaxonomyTermsV2_Applet_Fragment = { __typename?: 'Applet', taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } }; @@ -2953,7 +2956,7 @@ export type RevisionUuidQueryVariables = Exact<{ }>; -export type RevisionUuidQuery = { __typename?: 'Query', authorization: any, uuid?: { __typename?: 'Applet' } | { __typename: 'AppletRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, content: string, url: string, metaTitle: string, metaDescription: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'Applet', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'AppletRevision', id: number, title: string, content: string, date: string, url: string, metaTitle: string, metaDescription: string } | null, revisions: { __typename?: 'AppletRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'AppletRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | { __typename?: 'Article' } | { __typename: 'ArticleRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, content: string, metaTitle: string, metaDescription: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'Article', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'ArticleRevision', id: number, title: string, content: string, date: string, metaTitle: string, metaDescription: string } | null, revisions: { __typename?: 'ArticleRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ArticleRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | { __typename?: 'Comment' } | { __typename?: 'Course' } | { __typename?: 'CoursePage' } | { __typename: 'CoursePageRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, content: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'CoursePage', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'CoursePageRevision', id: number, title: string, content: string, date: string, alias: string } | null, revisions: { __typename?: 'CoursePageRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CoursePageRevision', id: number, title: string, trashed: boolean }> }, course: { __typename?: 'Course', licenseId: number, id: number, revisions: { __typename?: 'CourseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CourseRevision', id: number, title: string, trashed: boolean }> }, currentRevision?: { __typename?: 'CourseRevision', title: string } | null, pages: Array<{ __typename?: 'CoursePage', id: number, alias: string, currentRevision?: { __typename?: 'CoursePageRevision', title: string, trashed: boolean } | null }>, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } } | { __typename: 'CourseRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, content: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'Course', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'CourseRevision', id: number, title: string, content: string, date: string } | null, revisions: { __typename?: 'CourseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CourseRevision', id: number, title: string, trashed: boolean }> }, pages: Array<{ __typename?: 'CoursePage', id: number, alias: string, currentRevision?: { __typename?: 'CoursePageRevision', id: number, title: string, content: string, date: string } | null }>, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | { __typename?: 'Event' } | { __typename: 'EventRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, content: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'Event', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'EventRevision', id: number, title: string, content: string, date: string } | null, revisions: { __typename?: 'EventRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'EventRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | { __typename?: 'Exercise' } | { __typename?: 'ExerciseGroup' } | { __typename: 'ExerciseGroupRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, content: string, cohesive: boolean, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'ExerciseGroup', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'ExerciseGroupRevision', id: number, title: string, content: string, date: string, cohesive: boolean } | null, revisions: { __typename?: 'ExerciseGroupRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseGroupRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | { __typename: 'ExerciseRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, content: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'Exercise', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'ExerciseRevision', id: number, title: string, content: string, date: string } | null, revisions: { __typename?: 'ExerciseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | { __typename?: 'Page' } | { __typename: 'PageRevision', title: string, id: number, alias: string, trashed: boolean, date: string, content: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'Page', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'PageRevision', id: number, title: string, content: string, date: string } | null, revisions: { __typename?: 'PageRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'PageRevision', id: number, title: string, trashed: boolean }> } } } | { __typename?: 'TaxonomyTerm' } | { __typename?: 'User' } | { __typename?: 'Video' } | { __typename: 'VideoRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, content: string, url: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'Video', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'VideoRevision', id: number, title: string, content: string, date: string, url: string } | null, revisions: { __typename?: 'VideoRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'VideoRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | null }; +export type RevisionUuidQuery = { __typename?: 'Query', authorization: any, uuid?: { __typename?: 'Applet' } | { __typename: 'AppletRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, metaTitle: string, metaDescription: string, url: string, content: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'Applet', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'AppletRevision', metaTitle: string, metaDescription: string, url: string, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'AppletRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'AppletRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | { __typename?: 'Article' } | { __typename: 'ArticleRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, metaTitle: string, metaDescription: string, url?: string | null, content: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'Article', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'ArticleRevision', metaTitle: string, metaDescription: string, url?: string | null, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'ArticleRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ArticleRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | { __typename?: 'Comment' } | { __typename?: 'Course' } | { __typename?: 'CoursePage' } | { __typename: 'CoursePageRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, metaTitle?: string | null, metaDescription?: string | null, url?: string | null, content: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'CoursePage', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'CoursePageRevision', metaTitle?: string | null, metaDescription?: string | null, url?: string | null, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'CoursePageRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CoursePageRevision', id: number, title: string, trashed: boolean }> }, course: { __typename?: 'Course', licenseId: number, id: number, revisions: { __typename?: 'CourseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CourseRevision', id: number, title: string, trashed: boolean }> }, currentRevision?: { __typename?: 'CourseRevision', title: string } | null, pages: Array<{ __typename?: 'CoursePage', id: number, alias: string, currentRevision?: { __typename?: 'CoursePageRevision', title: string, trashed: boolean } | null }>, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } } | { __typename: 'CourseRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, metaTitle?: string | null, metaDescription: string, url?: string | null, content: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'Course', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'CourseRevision', metaTitle?: string | null, metaDescription: string, url?: string | null, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'CourseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'CourseRevision', id: number, title: string, trashed: boolean }> }, pages: Array<{ __typename?: 'CoursePage', id: number, alias: string, currentRevision?: { __typename?: 'CoursePageRevision', metaTitle?: string | null, metaDescription?: string | null, url?: string | null, id: number, alias: string, title: string, content: string, date: string } | null }>, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | { __typename?: 'Event' } | { __typename: 'EventRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, metaTitle: string, metaDescription: string, url?: string | null, content: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'Event', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'EventRevision', metaTitle: string, metaDescription: string, url?: string | null, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'EventRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'EventRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | { __typename?: 'Exercise' } | { __typename?: 'ExerciseGroup' } | { __typename: 'ExerciseGroupRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, metaTitle?: string | null, metaDescription?: string | null, url?: string | null, content: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'ExerciseGroup', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'ExerciseGroupRevision', metaTitle?: string | null, metaDescription?: string | null, url?: string | null, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'ExerciseGroupRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseGroupRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | { __typename: 'ExerciseRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, metaTitle?: string | null, metaDescription?: string | null, url?: string | null, content: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'Exercise', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'ExerciseRevision', metaTitle?: string | null, metaDescription?: string | null, url?: string | null, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'ExerciseRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'ExerciseRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | { __typename?: 'Page' } | { __typename: 'PageRevision', title: string, id: number, alias: string, trashed: boolean, date: string, content: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'Page', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'PageRevision', id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'PageRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'PageRevision', id: number, title: string, trashed: boolean }> } } } | { __typename?: 'TaxonomyTerm' } | { __typename?: 'User' } | { __typename?: 'Video' } | { __typename: 'VideoRevision', title: string, id: number, alias: string, trashed: boolean, date: string, changes: string, metaTitle?: string | null, metaDescription?: string | null, url: string, content: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean }, repository: { __typename?: 'Video', licenseId: number, trashed: boolean, instance: Instance, id: number, alias: string, currentRevision?: { __typename?: 'VideoRevision', metaTitle?: string | null, metaDescription?: string | null, url: string, id: number, alias: string, title: string, content: string, date: string } | null, revisions: { __typename?: 'VideoRevisionConnection', totalCount: number, nodes: Array<{ __typename?: 'VideoRevision', id: number, title: string, trashed: boolean }> }, taxonomyTerms: { __typename?: 'TaxonomyTermConnection', nodes: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number, path: Array<{ __typename?: 'TaxonomyTerm', title: string, alias: string, id: number } | null> }> } } } | null }; export type UnrevisedEntitiesDataFragment = { __typename?: 'AbstractEntityConnection', totalCount: number, nodes: Array<{ __typename: 'Applet', id: number, alias: string, currentRevision?: { __typename?: 'AppletRevision', title: string, id: number } | null, revisions: { __typename?: 'AppletRevisionConnection', nodes: Array<{ __typename?: 'AppletRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } } | { __typename: 'Article', id: number, alias: string, currentRevision?: { __typename?: 'ArticleRevision', title: string, id: number } | null, revisions: { __typename?: 'ArticleRevisionConnection', nodes: Array<{ __typename?: 'ArticleRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } } | { __typename: 'Course', id: number, alias: string, currentRevision?: { __typename?: 'CourseRevision', title: string, id: number } | null, revisions: { __typename?: 'CourseRevisionConnection', nodes: Array<{ __typename?: 'CourseRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } } | { __typename: 'CoursePage', id: number, alias: string, currentRevision?: { __typename?: 'CoursePageRevision', title: string, id: number } | null, revisions: { __typename?: 'CoursePageRevisionConnection', nodes: Array<{ __typename?: 'CoursePageRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } } | { __typename: 'Event', id: number, alias: string, currentRevision?: { __typename?: 'EventRevision', title: string, id: number } | null, revisions: { __typename?: 'EventRevisionConnection', nodes: Array<{ __typename?: 'EventRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } } | { __typename: 'Exercise', id: number, alias: string, currentRevision?: { __typename?: 'ExerciseRevision', title: string, id: number } | null, revisions: { __typename?: 'ExerciseRevisionConnection', nodes: Array<{ __typename?: 'ExerciseRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } } | { __typename: 'ExerciseGroup', id: number, alias: string, currentRevision?: { __typename?: 'ExerciseGroupRevision', title: string, id: number } | null, revisions: { __typename?: 'ExerciseGroupRevisionConnection', nodes: Array<{ __typename?: 'ExerciseGroupRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } } | { __typename: 'Video', id: number, alias: string, currentRevision?: { __typename?: 'VideoRevision', title: string, id: number } | null, revisions: { __typename?: 'VideoRevisionConnection', nodes: Array<{ __typename?: 'VideoRevision', title: string, id: number, changes: string, date: string, author: { __typename?: 'User', id: number, username: string, isActiveAuthor: boolean, isActiveDonor: boolean, isActiveReviewer: boolean, isNewAuthor: boolean } }> } }>, pageInfo: { __typename?: 'HasNextPageInfo', hasNextPage: boolean, endCursor?: string | null } }; diff --git a/apps/web/src/fetcher/query-fragments.ts b/apps/web/src/fetcher/query-fragments.ts index 441d9bf5a0..4ac0151f5a 100644 --- a/apps/web/src/fetcher/query-fragments.ts +++ b/apps/web/src/fetcher/query-fragments.ts @@ -1,34 +1,20 @@ import { gql } from 'graphql-request' export const sharedRevisionFragments = gql` - fragment anyRevision on AbstractRevision { + fragment abstractRevision on AbstractRevision { id + alias title content date } + fragment abstractEntityRevision on AbstractEntityRevision { + ...abstractRevision - fragment articleRevision on ArticleRevision { metaTitle metaDescription - } - - fragment videoRevision on VideoRevision { - url - } - fragment appletRevision on AppletRevision { url - metaTitle - metaDescription - } - - fragment coursePageRevision on CoursePageRevision { - alias - } - - fragment exerciseGroupRevision on ExerciseGroupRevision { - cohesive } ` diff --git a/apps/web/src/fetcher/query.ts b/apps/web/src/fetcher/query.ts index f47816fe58..12d69a8ec1 100644 --- a/apps/web/src/fetcher/query.ts +++ b/apps/web/src/fetcher/query.ts @@ -28,7 +28,7 @@ export const dataQuery = gql` ... on AbstractEntity { date currentRevision { - ...anyRevision + ...abstractEntityRevision } revisions(unrevised: true) { totalCount @@ -42,32 +42,11 @@ export const dataQuery = gql` ... on Page { currentRevision { - ...anyRevision - } - } - - ... on Article { - currentRevision { - ...articleRevision - } - } - - ... on Video { - currentRevision { - ...videoRevision - } - } - - ... on Applet { - currentRevision { - ...appletRevision + ...abstractRevision } } ... on CoursePage { - currentRevision { - ...coursePageRevision - } course { id licenseId @@ -98,12 +77,6 @@ export const dataQuery = gql` ...exercise } - ... on ExerciseGroup { - currentRevision { - ...exerciseGroupRevision - } - } - ... on Course { pages(trashed: false) { alias @@ -114,9 +87,6 @@ export const dataQuery = gql` content } } - currentRevision { - metaDescription - } ...taxonomyTermsV2 } @@ -150,7 +120,6 @@ export const dataQuery = gql` content id date - cohesive } licenseId } diff --git a/apps/web/src/fetcher/revision/query.ts b/apps/web/src/fetcher/revision/query.ts index 2b3c41bd3f..f02dd982cd 100644 --- a/apps/web/src/fetcher/revision/query.ts +++ b/apps/web/src/fetcher/revision/query.ts @@ -25,7 +25,7 @@ export const revisionQuery = gql` } } ... on AbstractEntityRevision { - ...anyRevision + ...abstractEntityRevision changes repository { ...taxonomyTermsV2 @@ -35,7 +35,7 @@ export const revisionQuery = gql` id alias currentRevision { - ...anyRevision + ...abstractEntityRevision } revisions(unrevised: false) { totalCount @@ -47,39 +47,20 @@ export const revisionQuery = gql` } } } - ... on ArticleRevision { - ...articleRevision - repository { - currentRevision { - ...articleRevision - } - } - } - ... on AppletRevision { - ...appletRevision - repository { - currentRevision { - ...appletRevision - } - } - } + ... on CourseRevision { repository { pages(trashed: false, hasCurrentRevision: true) { id alias currentRevision { - ...anyRevision + ...abstractEntityRevision } } } } ... on CoursePageRevision { - ...coursePageRevision repository { - currentRevision { - ...coursePageRevision - } course { licenseId ...taxonomyTermsV2 @@ -106,24 +87,8 @@ export const revisionQuery = gql` } } } - ... on ExerciseGroupRevision { - ...exerciseGroupRevision - repository { - currentRevision { - ...exerciseGroupRevision - } - } - } - ... on VideoRevision { - ...videoRevision - repository { - currentRevision { - ...videoRevision - } - } - } ... on PageRevision { - ...anyRevision + ...abstractRevision repository { licenseId trashed @@ -131,7 +96,7 @@ export const revisionQuery = gql` id alias currentRevision { - ...anyRevision + ...abstractRevision } revisions(unrevised: false) { totalCount diff --git a/apps/web/src/fetcher/revision/request.ts b/apps/web/src/fetcher/revision/request.ts index fd90f194c9..c7c4f74769 100644 --- a/apps/web/src/fetcher/revision/request.ts +++ b/apps/web/src/fetcher/revision/request.ts @@ -61,6 +61,7 @@ export async function requestRevision( licenseId: uuid.repository.licenseId, currentRevision: { title: uuid.title, + alias: uuid.alias, content: uuid.content, id: uuid.id, date: uuid.date, @@ -119,15 +120,15 @@ export async function requestRevision( trashed: uuid.trashed, title: Object.hasOwn(uuid, 'title') ? uuid.title : undefined, metaTitle: Object.hasOwn(uuid, 'metaTitle') - ? uuid.metaTitle + ? uuid.metaTitle ?? '' : undefined, metaDescription: Object.hasOwn(uuid, 'metaDescription') - ? uuid.metaDescription + ? uuid.metaDescription ?? '' : undefined, content: thisExercise ? (thisExercise as unknown as EditorExerciseDocument) : parseDocumentString(uuid.content), - url: Object.hasOwn(uuid, 'url') ? uuid.url : undefined, + url: Object.hasOwn(uuid, 'url') ? uuid.url ?? '' : undefined, }, currentRevision: { id: uuid.repository.currentRevision?.id, @@ -137,18 +138,18 @@ export async function requestRevision( : undefined, metaTitle: currentRevision && Object.hasOwn(currentRevision, 'metaTitle') - ? currentRevision.metaTitle + ? currentRevision.metaTitle ?? '' : undefined, metaDescription: currentRevision && Object.hasOwn(currentRevision, 'metaDescription') - ? currentRevision.metaDescription + ? currentRevision.metaDescription ?? '' : undefined, content: currentExercise ? (currentExercise as unknown as EditorExerciseDocument) : parseDocumentString(uuid.repository.currentRevision?.content), url: currentRevision && Object.hasOwn(currentRevision, 'url') - ? currentRevision.url + ? currentRevision.url ?? '' : undefined, }, changes: Object.hasOwn(uuid, 'changes') ? uuid.changes : undefined, diff --git a/apps/web/src/helper/ai-generated-exercises/data-conversion.ts b/apps/web/src/helper/ai-generated-exercises/data-conversion.ts index 1385648725..343532b8bd 100644 --- a/apps/web/src/helper/ai-generated-exercises/data-conversion.ts +++ b/apps/web/src/helper/ai-generated-exercises/data-conversion.ts @@ -152,7 +152,6 @@ function createExerciseGroupDocument( state: [createExerciseHeadingTextDocument(heading)], }, exercises, - cohesive: false, intermediateTasks: undefined, }, } @@ -365,7 +364,6 @@ export function transformEditorDataToExerciseGroup( licenseId: license.id, changes: '[KI generiert]: ', revision: 0, - cohesive: false, //@ts-expect-error ignoring this while exercise group migration is going on content: JSON.stringify( createExerciseGroupDocument(editorData.heading, editorData.exercises) diff --git a/apps/web/src/mutations/use-set-entity-mutation/use-set-entity-mutation.ts b/apps/web/src/mutations/use-set-entity-mutation/use-set-entity-mutation.ts index 8057c174d4..0092035f37 100644 --- a/apps/web/src/mutations/use-set-entity-mutation/use-set-entity-mutation.ts +++ b/apps/web/src/mutations/use-set-entity-mutation/use-set-entity-mutation.ts @@ -275,7 +275,7 @@ function getAdditionalInputData( case UuidType.Exercise: return {} case UuidType.ExerciseGroup: - return { cohesive: data.cohesive === 'true' } + return {} case UuidType.Video: return { title: getRequiredString(mutationStrings, 'title', data.title), diff --git a/apps/web/src/serlo-editor-integration/convert-editor-response-to-state.ts b/apps/web/src/serlo-editor-integration/convert-editor-response-to-state.ts index c23710183a..6392cb26af 100644 --- a/apps/web/src/serlo-editor-integration/convert-editor-response-to-state.ts +++ b/apps/web/src/serlo-editor-integration/convert-editor-response-to-state.ts @@ -30,18 +30,23 @@ export function convertEditorResponseToState( const config: Record< string, - { convert: (state: any) => StaticDocument } + { + convert: ( + entityType: MainUuidType['__typename'], + state: any + ) => StaticDocument + } > = { - Applet: { convert: convertApplet }, - Article: { convert: convertArticle }, + Applet: { convert: convertAbstractEntity }, + Article: { convert: convertAbstractEntity }, Course: { convert: convertCourse }, CoursePage: { convert: convertCoursePage }, - Event: { convert: convertEvent }, + Event: { convert: convertAbstractEntity }, Page: { convert: convertPage }, - Exercise: { convert: convertTextExercise }, - ExerciseGroup: { convert: convertTextExerciseGroup }, + Exercise: { convert: convertAbstractEntity }, + ExerciseGroup: { convert: convertAbstractEntity }, User: { convert: convertUser }, - Video: { convert: convertVideo }, + Video: { convert: convertAbstractEntity }, TaxonomyTerm: { convert: convertTaxonomy }, } @@ -49,21 +54,22 @@ export function convertEditorResponseToState( ? uuid.licenseId : undefined - const { id } = uuid + const { id, title } = uuid const currentRev = 'currentRevision' in uuid ? uuid.currentRevision : undefined - const title = currentRev && 'title' in currentRev ? currentRev.title : '' const content = currentRev && 'content' in currentRev ? currentRev.content : '' const meta_title = - currentRev && Object.hasOwn(currentRev, 'metaTitle') + (currentRev && Object.hasOwn(currentRev, 'metaTitle') ? currentRev.metaTitle - : '' + : '') ?? '' const meta_description = - currentRev && Object.hasOwn(currentRev, 'metaDescription') + (currentRev && Object.hasOwn(currentRev, 'metaDescription') ? currentRev.metaDescription - : '' + : '') ?? '' + const url = + (currentRev && Object.hasOwn(currentRev, 'url') ? currentRev.url : '') ?? '' const revision = currentRev && Object.hasOwn(currentRev, 'id') ? currentRev.id : 0 @@ -79,7 +85,7 @@ export function convertEditorResponseToState( } } const { convert } = config[uuid.__typename] - return convert(uuid) + return convert(uuid.__typename, uuid) } catch (e) { // eslint-disable-next-line no-console console.error(e) @@ -93,29 +99,17 @@ export function convertEditorResponseToState( } } - function convertApplet( - uuid: Extract - ): StaticDocument { - stack.push({ id: uuid.id, type: 'applet' }) - return { - plugin: TemplatePluginType.Applet, - state: { - ...entityFields, - revision, - changes: '', - title, - url: uuid.currentRevision?.url || '', - content: serializeStaticDocument(parseStaticString(content)), - meta_title, - meta_description, - }, - } - } - - function convertArticle( - uuid: Extract - ): StaticDocument { - stack.push({ id: uuid.id, type: 'article' }) + function convertAbstractEntity( + entityType: MainUuidType['__typename'], + uuid: Extract + ): + | StaticDocument + | StaticDocument + | StaticDocument + | StaticDocument + | StaticDocument + | StaticDocument { + stack.push({ id: uuid.id, type: entityType }) return { plugin: TemplatePluginType.Article, state: { @@ -124,12 +118,16 @@ export function convertEditorResponseToState( changes: '', title, content: getContent(), - meta_title, - meta_description, + ...(url ? { url } : {}), + ...(meta_title ? { meta_title } : {}), + ...(meta_description ? { meta_description } : {}), }, } function getContent() { + if (entityType !== 'Article') + return serializeStaticDocument(parseStaticString(content)) + const convertedContent = parseStaticString(content) if (convertedContent?.plugin === EditorPluginType.Article) { @@ -155,9 +153,10 @@ export function convertEditorResponseToState( } function convertCourse( + entityType: MainUuidType['__typename'], uuid: Extract ): StaticDocument { - stack.push({ id: uuid.id, type: 'course' }) + stack.push({ id: uuid.id, type: entityType }) return { plugin: TemplatePluginType.Course, state: { @@ -170,7 +169,7 @@ export function convertEditorResponseToState( 'course-page': (uuid.pages || []) .filter((page) => page.currentRevision !== null) .map((page) => { - return convertCoursePage({ + return convertCoursePage('CoursePage', { ...page, currentRevision: { id: page.id, @@ -186,12 +185,13 @@ export function convertEditorResponseToState( } function convertCoursePage( + entityType: MainUuidType['__typename'], uuid: Pick< Extract, 'id' | 'currentRevision' > ): StaticDocument { - stack.push({ id: uuid.id, type: 'course-page' }) + stack.push({ id: uuid.id, type: entityType }) return { plugin: TemplatePluginType.CoursePage, state: { @@ -208,28 +208,11 @@ export function convertEditorResponseToState( } } - function convertEvent( - uuid: Extract - ): StaticDocument { - stack.push({ id: uuid.id, type: 'event' }) - return { - plugin: TemplatePluginType.Event, - state: { - ...entityFields, - revision, - changes: '', - title, - content: serializeStaticDocument(parseStaticString(content)), - meta_title, - meta_description, - }, - } - } - function convertPage( + entityType: MainUuidType['__typename'], uuid: Extract ): StaticDocument { - stack.push({ id: uuid.id, type: 'page' }) + stack.push({ id: uuid.id, type: entityType }) return { plugin: TemplatePluginType.Page, state: { @@ -241,9 +224,10 @@ export function convertEditorResponseToState( } function convertTaxonomy( + entityType: MainUuidType['__typename'], uuid: Extract ): StaticDocument { - stack.push({ id: uuid.id, type: 'taxonomy' }) + stack.push({ id: uuid.id, type: entityType }) return { plugin: TemplatePluginType.Taxonomy, state: { @@ -261,64 +245,13 @@ export function convertEditorResponseToState( } } - function convertTextExercise( - uuid: Extract - ): StaticDocument { - stack.push({ id: uuid.id, type: 'text-exercise' }) - - return { - plugin: TemplatePluginType.TextExercise, - state: { - id: uuid.id, - licenseId, - changes: '', - revision, - content: - serializeStaticDocument( - parseStaticString(uuid.currentRevision?.content) - ) ?? '', - }, - } - } - - function convertTextExerciseGroup( - uuid: Extract - ): StaticDocument { - stack.push({ id: uuid.id, type: 'text-exercise-group' }) - - return { - plugin: TemplatePluginType.TextExerciseGroup, - state: { - ...entityFields, - changes: '', - revision, - content: serializeStaticDocument(parseStaticString(content)), - cohesive: uuid.currentRevision?.cohesive ?? false, - }, - } - } - - function convertUser(uuid: User): StaticDocument { - stack.push({ id: uuid.id, type: 'user' }) + function convertUser( + entityType: MainUuidType['__typename'], + uuid: User + ): StaticDocument { + stack.push({ id: uuid.id, type: entityType }) return convertUserByDescription(uuid.description) } - - function convertVideo( - uuid: Extract - ): StaticDocument { - stack.push({ id: uuid.id, type: EditorPluginType.Video }) - return { - plugin: TemplatePluginType.Video, - state: { - ...entityFields, - changes: '', - title, - revision, - description: serializeStaticDocument(parseStaticString(content)), - content: uuid.currentRevision?.url ?? '', - }, - } - } } export function convertUserByDescription(description?: string | null) { @@ -425,7 +358,6 @@ interface InputType { export interface TextExerciseGroupSerializedState extends Entity { __typename?: UuidType.ExerciseGroup - cohesive?: string content: SerializedStaticState } diff --git a/apps/web/src/serlo-editor-integration/revision-response-to-response.ts b/apps/web/src/serlo-editor-integration/revision-response-to-response.ts index 4bd9d708a4..886c537ebd 100644 --- a/apps/web/src/serlo-editor-integration/revision-response-to-response.ts +++ b/apps/web/src/serlo-editor-integration/revision-response-to-response.ts @@ -26,164 +26,70 @@ export function revisionResponseToResponse( const { id, content } = uuid const title = uuid.title ?? '' const date = uuid.date ?? '' - const metaTitle = Object.hasOwn(uuid, 'metaTitle') ? uuid.metaTitle : '' - const metaDescription = Object.hasOwn(uuid, 'metaDescription') - ? uuid.metaDescription - : '' - if (uuid.__typename === UuidRevType.Applet) { - uuid.__typename - return { - __typename: UuidType.Applet, - title, - currentRevision: { - id, - url: uuid.url, - title, - content, - metaTitle, - metaDescription, - date, - }, - ...repositoryFields, - taxonomyTerms: uuid.repository.taxonomyTerms, - revisions: uuid.repository.revisions, - date, - } + const abstractRevisionData = { + id, + alias, + title, + date, + content, } - if (uuid.__typename === UuidRevType.Article) { - uuid.__typename + if (uuid.__typename === UuidRevType.Page) { return { - __typename: UuidType.Article, - date, + __typename: UuidType.Page, title, - currentRevision: { - id, - content, - title, - metaTitle, - metaDescription, - date, - }, - taxonomyTerms: uuid.repository.taxonomyTerms, + currentRevision: abstractRevisionData, ...repositoryFields, - revisions: uuid.repository.revisions, } } + const abstractEntityRevisionData = { + ...abstractRevisionData, + url: uuid.url ?? '', + metaTitle: uuid.metaTitle ?? '', + metaDescription: uuid.metaDescription ?? '', + } + if (uuid.__typename === UuidRevType.Course) { return { __typename: UuidType.Course, ...repositoryFields, title, + date, pages: uuid.repository.pages, taxonomyTerms: uuid.repository.taxonomyTerms, revisions: uuid.repository.revisions, - date: uuid.date, } } if (uuid.__typename === UuidRevType.CoursePage) { - uuid.__typename return { __typename: UuidType.CoursePage, title, - currentRevision: { - id, - alias: uuid.alias, - title, - content, - date, - }, - ...repositoryFields, - revisions: uuid.repository.revisions, - course: uuid.repository.course, date, - } - } - - if (uuid.__typename === UuidRevType.Event) { - return { - __typename: UuidType.Event, - title, - currentRevision: { - id, - title, - date, - content, - }, + currentRevision: abstractEntityRevisionData, ...repositoryFields, - date: uuid.date, - taxonomyTerms: uuid.repository.taxonomyTerms, revisions: uuid.repository.revisions, + course: uuid.repository.course, } } - if (uuid.__typename === UuidRevType.Exercise) { - return { - __typename: UuidType.Exercise, - title, - currentRevision: { - title, - content, - date, - id: -1, - }, - taxonomyTerms: uuid.repository.taxonomyTerms, - ...repositoryFields, - revisions: uuid.repository.revisions, - date, - } - } - - if (uuid.__typename === UuidRevType.ExerciseGroup) { + if ( + uuid.__typename === UuidRevType.Applet || + uuid.__typename === UuidRevType.Article || + uuid.__typename === UuidRevType.Event || + uuid.__typename === UuidRevType.Video || + uuid.__typename === UuidRevType.ExerciseGroup || + uuid.__typename === UuidRevType.Exercise + ) { return { - __typename: UuidType.ExerciseGroup, - title, - currentRevision: { - id, - content, - title, - cohesive: uuid.cohesive, - date, - }, - taxonomyTerms: uuid.repository.taxonomyTerms, - ...repositoryFields, - revisions: uuid.repository.revisions, + __typename: uuid.__typename, date, - } - } - - // probably not needed - if (uuid.__typename === UuidRevType.Page) { - return { - __typename: UuidType.Page, title, - currentRevision: { - id, - title, - date, - content, - }, + currentRevision: abstractEntityRevisionData, ...repositoryFields, - } - } - - if (uuid.__typename === UuidRevType.Video) { - return { - __typename: UuidType.Video, - title, - currentRevision: { - id, - url: uuid.url, - title, - date, - content, - }, taxonomyTerms: uuid.repository.taxonomyTerms, - date: uuid.date, - ...repositoryFields, revisions: uuid.repository.revisions, } } diff --git a/packages/editor/src/plugins/exercise-group/index.tsx b/packages/editor/src/plugins/exercise-group/index.tsx index 483fa954fc..fd4e02b347 100644 --- a/packages/editor/src/plugins/exercise-group/index.tsx +++ b/packages/editor/src/plugins/exercise-group/index.tsx @@ -4,7 +4,6 @@ import { child, list, object, - boolean, optional, number, } from '@editor/plugin' @@ -36,10 +35,6 @@ const exerciseGroupState = object({ }) ) ), - /* cohesive field would indicate whether the children of a grouped exercise are cohesive - this field might be used in the future, but currently it has no effect and can not be changed - */ - cohesive: boolean(false), }) export type ExerciseGroupPluginState = typeof exerciseGroupState diff --git a/packages/editor/src/plugins/serlo-template-plugins/exercise-group/text-exercise-group.tsx b/packages/editor/src/plugins/serlo-template-plugins/exercise-group/text-exercise-group.tsx index 3c0ce6ea3c..ac40d2c657 100644 --- a/packages/editor/src/plugins/serlo-template-plugins/exercise-group/text-exercise-group.tsx +++ b/packages/editor/src/plugins/serlo-template-plugins/exercise-group/text-exercise-group.tsx @@ -1,5 +1,4 @@ import { - boolean, type EditorPlugin, type EditorPluginProps, PrettyStaticState, @@ -21,10 +20,6 @@ export const textExerciseGroupTypeState = entityType( { ...entity, content: editorContent(EditorPluginType.ExerciseGroup), - /* cohesive field would indicate whether the children of a grouped exercise are cohesive - this field might be used in the future, but currently it has no effect and can not be changed - */ - cohesive: boolean(false), }, {} ) diff --git a/packages/editor/src/plugins/serlo-template-plugins/helpers/use-handle-save.ts b/packages/editor/src/plugins/serlo-template-plugins/helpers/use-handle-save.ts index a7d001adaa..a4e73d1397 100644 --- a/packages/editor/src/plugins/serlo-template-plugins/helpers/use-handle-save.ts +++ b/packages/editor/src/plugins/serlo-template-plugins/helpers/use-handle-save.ts @@ -1,6 +1,5 @@ import { store, selectStaticDocument } from '@editor/store' import { ROOT } from '@editor/store/root/constants' -import { TemplatePluginType } from '@editor/types/template-plugin-type' import type { SupportedTypesSerializedState } from '@serlo/frontend/src/mutations/use-set-entity-mutation/types' import { storeStateToLocalStorage } from '@serlo/frontend/src/serlo-editor-integration/components/local-storage-notice' import { SaveContext } from '@serlo/frontend/src/serlo-editor-integration/context/save-context' @@ -27,16 +26,6 @@ export function useHandleSave( // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const serialized = has('state', serializedRoot) ? serializedRoot.state : null - // Currently still needed - if ( - serialized !== null && - serializedRoot?.plugin === TemplatePluginType.TextExerciseGroup && - has('cohesive', serialized) - ) { - // backend can only handle string attributes - serialized.cohesive = String(serialized.cohesive) - } - const handleSave = ( notificationSubscription?: boolean, emailSubscription?: boolean,