Skip to content

Commit

Permalink
fix: update types
Browse files Browse the repository at this point in the history
  • Loading branch information
maelgangloff committed May 3, 2024
1 parent f783407 commit 9855279
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/models/Calendar/HomeworkAssignment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface HomeworkAssignment {
title: string | null
html: string | null
dueDateTime: string | null
dueDate: string | null
dueDate?: string | null
done: boolean
deliverWorkOnline: boolean
onlineDeliveryUrl: null | string
Expand Down
2 changes: 1 addition & 1 deletion src/models/Results/Evaluation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Subject } from '../Common/Subject'

export interface Evaluation {
id: string
coefficient: number
coefficient: number | null
average: number | null
scale: number | null
studentAverage: number | null
Expand Down
2 changes: 1 addition & 1 deletion src/models/Results/EvaluationDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface EvaluationDetail {
title: string | null
topic: string | null
dateTime: string | null
coefficient: number
coefficient: number | null
min: number | null
max: number | null
average: number | null
Expand Down
2 changes: 1 addition & 1 deletion src/models/Results/EvaluationSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface EvaluationSettings {
skillsEnabled: boolean
evaluationsDetailsAvailable: boolean
periods: Period[]
skillsSetting: {
skillsSetting?: {
id: string
skillAcquisitionLevels: Array<{
label: string
Expand Down
4 changes: 2 additions & 2 deletions test/user.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import type { AuthConfig } from '../src/models/Common/Auth'
import type { Evaluation, EvaluationSettings } from '../src/models/Results'
import type { Agenda, HomeworkAssignment } from '../src/models/Calendar'
import type { AbsenceFile } from '../src/models/SchoolLife'
import type { SchoolInfo } from '../src/models/School'
import { Skolengo } from '../src/index'
import './common'
import type { SchoolInfo } from '../src/models/School'

const SKOLENGO_TOKENSET = process.env.SKOLENGO_TOKENSET
const describeAuthenticated = SKOLENGO_TOKENSET !== undefined ? describe : describe.skip
Expand Down Expand Up @@ -81,7 +81,7 @@ describeAuthenticated('Test of the Skolengo API types - Authenticated user', ()
})

it('should match type Attachment[]', async () => {
const response = await user.getPeriodicReportsFiles()
const response = await user.getPeriodicReportsFiles(undefined, 2)
for (const attachment of response) expect(attachment).toMatchSchema('Attachment')
})
})
Expand Down

0 comments on commit 9855279

Please sign in to comment.