@lls/typings 24.1.41 → 24.1.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,13 @@
1
1
  import type { Filter } from '@typings/models'
2
2
  import type { ResourcesMenuType } from '@typings/models'
3
3
  type Collection = {
4
+ id?: number
4
5
  name?: string
5
6
  year?: number
6
7
  publisher?: string
7
8
  }
8
9
 
10
+ type Publisher = string
9
11
  export type Book = {
10
12
  id?: number
11
13
  uri?: string
@@ -20,4 +22,12 @@ export type Book = {
20
22
  chapters?: number[]
21
23
  collection?: Collection
22
24
  resourcesMenu?: ResourcesMenuType
25
+ renewalLabel?: string
26
+ urlLite?: string
27
+ isWorkplan?: boolean
28
+ isWorkbook?: boolean
29
+ hasNewDesign?: boolean
30
+ slug?: string
31
+ publishers?: Publisher[]
32
+ isRenewed?: boolean
23
33
  }
@@ -0,0 +1,26 @@
1
+ import type { Level } from './level'
2
+ import type { DocJson, Page } from './page'
3
+ import type { User } from './user'
4
+
5
+ type SharedCorrection = {
6
+ correctedUuids: { [uuid: string]: { [elementId: number]: string } }
7
+ pageId: number
8
+ updatedAt: string
9
+ userIds: number[]
10
+ uuids: string[]
11
+ }
12
+
13
+ export type Group = {
14
+ id: number
15
+ name: string
16
+ owner: User
17
+ students: NonNullable<User['id']>[]
18
+ sharedPages: Page[]
19
+ sharedCorrections: SharedCorrection[]
20
+ code: string
21
+ createdAt: string
22
+ updatedAt: string
23
+ isEnt: boolean
24
+ levels: Level[]
25
+ answeredExercises: DocJson[]
26
+ }
@@ -0,0 +1,18 @@
1
+ import type { Book } from './book'
2
+ import type { Level } from './level'
3
+ import type { Subject } from './subject'
4
+
5
+ export type News = {
6
+ id: number
7
+ title: string
8
+ displayTitle: string
9
+ cover: string
10
+ category: string
11
+ content: string
12
+ startDate: string
13
+ endDate: string
14
+ updatedAt: string
15
+ books: Book[]
16
+ levels: Level[]
17
+ subjects: Subject[]
18
+ }
@@ -0,0 +1,15 @@
1
+ export type Notification = {
2
+ id?: string
3
+ content?: {
4
+ title?: string
5
+ subtitle?: string
6
+ pageInterval?: string
7
+ thumbnail?: string
8
+ url?: string
9
+ appUrl?: string
10
+ }
11
+ type?: string
12
+ read?: boolean
13
+ updatedAt?: string
14
+ createdAt?: string
15
+ }
@@ -3,7 +3,7 @@ import type { TODO } from '@typings/utils'
3
3
 
4
4
  export type ScreenMode = 'grid-xs' | 'grid-md'
5
5
 
6
- export type SubzoneTypeCategory = 'picWord' | 'definition' | 'subZone'
6
+ export type SubzoneTypeCategory = 'picWord' | 'definition' | 'subZone' | 'mask'
7
7
 
8
8
  export type Rect = {
9
9
  x: number
@@ -22,8 +22,9 @@ export type PicWordType = ZoneType & {
22
22
  type: Extract<SubzoneTypeCategory, 'picWord'>
23
23
  word?: Word
24
24
  }
25
+ export type MaskType = ZoneType & { type: Extract<SubzoneTypeCategory, 'mask'> }
25
26
 
26
- export type SubZoneType = ZoomZoneType | DefinitionsType | PicWordType
27
+ export type SubZoneType = ZoomZoneType | DefinitionsType | PicWordType | MaskType
27
28
 
28
29
  export type DocJson<T extends 'primary' | 'default' = 'default'> = {
29
30
  id?: number
@@ -34,6 +35,7 @@ export type DocJson<T extends 'primary' | 'default' = 'default'> = {
34
35
  picWords?: PicWordType[]
35
36
  definitions?: DefinitionsType[]
36
37
  subZones?: ZoomZoneType[]
38
+ masks?: MaskType[]
37
39
  audios?: string[]
38
40
  videos?: string[]
39
41
  rives?: { src: string; stateMachines: string }[]
@@ -86,6 +88,7 @@ export type PrimaryLayoutItem = {
86
88
  id: string
87
89
  } & Rect
88
90
 
91
+ export type PageType = 'exercice' | 'page' | null
89
92
  export type Page<T extends 'primary' | 'default' = 'default'> = {
90
93
  id?: number
91
94
  contentMd?: string
@@ -100,6 +103,7 @@ export type Page<T extends 'primary' | 'default' = 'default'> = {
100
103
  premium?: boolean | null
101
104
  isPanorama?: boolean
102
105
  isCreatedFromScratch?: boolean
106
+ isLearningAssessment?: boolean
103
107
  isDraft?: boolean
104
108
  page?: number | null
105
109
  nbPages?: number
@@ -119,7 +123,9 @@ export type Page<T extends 'primary' | 'default' = 'default'> = {
119
123
  shouldRender?: boolean
120
124
  isCustomized?: boolean
121
125
  type?: string
126
+ isPrimary?: boolean
122
127
  metadata?: TODO | null
128
+ pageType?: PageType
123
129
  } & (T extends 'primary'
124
130
  ? {
125
131
  picture?: string
@@ -0,0 +1,26 @@
1
+ export type PremiumResourceCategory = {
2
+ title?: string
3
+ subtitle?: string
4
+ description?: string
5
+ imgUrl?: string
6
+ order?: number
7
+ comingSoon?: string
8
+ }
9
+
10
+ export type PremiumResourceMetaCategory = {
11
+ title?: string
12
+ subtitle?: string
13
+ }
14
+ export type PremiumResource = {
15
+ id?: number
16
+ title?: string
17
+ subtitle?: string
18
+ type?: string
19
+ url?: string
20
+ order?: number
21
+ comingSoon?: string
22
+ mediaType?: string
23
+ category?: PremiumResourceCategory
24
+ metaCategory?: PremiumResourceMetaCategory
25
+ downloadBlocked?: boolean
26
+ }
@@ -0,0 +1,24 @@
1
+ import type { Book } from './book'
2
+
3
+ export type Product = {
4
+ id?: string
5
+ ean?: string
6
+ productCode?: string
7
+ description?: string
8
+ picture?: string
9
+ gradientTop?: string
10
+ gradientBottom?: string
11
+ price?: number
12
+ name?: string
13
+ code?: string
14
+ pack?: number
15
+ isWorkbook?: number
16
+ isAdoptant?: number
17
+ isSupportPlus?: number
18
+ urlDistributor?: string
19
+ format?: string
20
+ productType?: string
21
+ urlPrint?: string
22
+ support?: string
23
+ books: Book[]
24
+ }
@@ -0,0 +1,13 @@
1
+ import type { Chapter } from './chapter'
2
+ import type { DocJson, Page } from './page'
3
+
4
+ export type Resource = {
5
+ categories?: string[]
6
+ chapter?: Chapter
7
+ document?: DocJson
8
+ id?: number
9
+ locked?: boolean
10
+ page?: Page
11
+ title?: string
12
+ url?: string
13
+ }
@@ -0,0 +1,15 @@
1
+ type RolesEnum = 'ROLE_PREMIUM' | 'ROLE_POWER_USER' | 'ROLE_USER'
2
+ type ProfilesEnum = 'teacher' | 'student'
3
+ export type Tool = {
4
+ id?: number
5
+ title?: string
6
+ description?: string
7
+ url?: string
8
+ picture?: string
9
+ color?: string
10
+ locked?: boolean
11
+ roles?: RolesEnum[]
12
+ profiles?: ProfilesEnum[]
13
+ isPremium?: boolean
14
+ order?: number
15
+ }
@@ -1,3 +1,4 @@
1
+ import type { School } from './school'
1
2
  import type { SchoolTypeName } from './schoolType'
2
3
 
3
4
  export type User = {
@@ -13,6 +14,7 @@ export type User = {
13
14
  firstname?: string | null
14
15
  lastname?: string | null
15
16
  email?: string | null
17
+ academicEmail?: string | null
16
18
  username?: string | null
17
19
  gender?: string | null
18
20
  functions?: string[] | null
@@ -24,6 +26,19 @@ export type User = {
24
26
  userPages?: number[] | null
25
27
  schoolTypes?: SchoolTypeName[] | null
26
28
  hasContentNewsletter?: boolean | null
29
+ picture?: string | null
30
+ garDivisions?: number[] | null
31
+ booksV2?: number[] | null
32
+ levels?: number[] | null
33
+ }
34
+ export type GarDivision = {
35
+ code?: string
36
+ createdAt?: string
37
+ id?: number
38
+ name?: string
39
+ school?: School
40
+ students?: User[]
41
+ updatedAt?: string
27
42
  }
28
43
 
29
44
  export type AdminUser = User & { isAdmin: true }
package/models.d.ts CHANGED
@@ -2,13 +2,20 @@ export * from './internal/book'
2
2
  export * from './internal/chapter'
3
3
  export * from './internal/department'
4
4
  export * from './internal/filter'
5
+ export * from './internal/group'
5
6
  export * from './internal/level'
6
7
  export * from './internal/license'
8
+ export * from './internal/news'
9
+ export * from './internal/notification'
7
10
  export * from './internal/page'
11
+ export * from './internal/premiumResource'
12
+ export * from './internal/product'
13
+ export * from './internal/resource'
8
14
  export * from './internal/school'
9
15
  export * from './internal/schoolType'
10
16
  export * from './internal/subject'
11
17
  export * from './internal/summary'
18
+ export * from './internal/tool'
12
19
  export * from './internal/user'
13
20
  export * from './internal/word'
14
21
  export * from './internal/resourcesMenu'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lls/typings",
3
- "version": "24.1.41",
3
+ "version": "24.1.42",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "keywords": [],
@@ -8,10 +8,10 @@
8
8
  "license": "ISC",
9
9
  "devDependencies": {
10
10
  "@types/domhandler": "2.4.5",
11
- "@types/lodash": "4.14.202",
12
- "@types/react": "18.2.73",
11
+ "@types/lodash": "4.17.6",
12
+ "@types/react": "18.3.3",
13
13
  "cheerio": "1.0.0-rc.12",
14
- "typescript": "5.4.5"
14
+ "typescript": "5.5.3"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@biomejs/biome": "*"