@la-main-verte/shared-types 1.0.51 → 1.0.53

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@la-main-verte/shared-types",
3
- "version": "1.0.51",
3
+ "version": "1.0.53",
4
4
  "description": "Shared TypeScript interfaces for frontend of la-main-verte app",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
package/src/alert.d.ts CHANGED
@@ -23,3 +23,5 @@ export interface AlertTagI {
23
23
  */
24
24
  textColor: string
25
25
  }
26
+
27
+ export type AlertV14I = AlertI
@@ -1,3 +1,5 @@
1
+ import { PlantI } from './plant'
2
+
1
3
  export interface CalendarViewI {
2
4
  id: number
3
5
  title: string
@@ -1,6 +1,3 @@
1
- import { PlantSelectionI } from './plantSelection.d.ts'
2
- import { FertilizerI } from './fertilizer.d.ts'
3
-
4
1
  /**
5
2
  * A gardenMap is a collection of garden zones
6
3
  */
@@ -20,7 +17,7 @@ export interface GardenZoneI {
20
17
  diameterInMeters: number
21
18
  shape: 'rectangle' | 'circle'
22
19
  xPosition: number
23
- yPosition: number | null
20
+ yPosition: number
24
21
  zIndex: number
25
22
  order: number
26
23
  totalSurfaceInSquareMeters: number
@@ -28,6 +25,17 @@ export interface GardenZoneI {
28
25
  backgroundColor: string
29
26
  createdAt: Date
30
27
  updatedAt: Date
28
+ /**
29
+ * When set, the garden zone is a subdivision of another garden zone
30
+ * Parent zones are meant to be as eternal as possible.
31
+ * Subdivisions are meant to be created and destroyed on a yearly basis.
32
+ */
33
+ parent_garden_zone_id: number
34
+ /**
35
+ * Virtual field to check if the garden zone is a subdivision
36
+ * It is a renamed field from parent_garden_zone_id
37
+ */
38
+ is_subdivision: boolean
31
39
  /**
32
40
  * Orientation virtual field ONLY USE FOR RECTANGLES
33
41
  * --------------------------------
package/src/index.ts CHANGED
@@ -8,7 +8,6 @@ export * from './apiError'
8
8
  export * from './gardenMap'
9
9
  export * from './alert'
10
10
  export * from './image'
11
- export * from './fertilizer'
12
11
  import * as PlantsAPI from './plants.api'
13
12
  import * as UsersAPI from './users.api'
14
13
 
package/src/member.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import { NoteI } from './note'
2
+ import { SelectionI } from './selection'
3
+
1
4
  export interface MemberI {
2
5
  id: number
3
6
  email: string
package/src/note.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ import { ImageI } from './image.d.ts'
2
+ import { TaggedItemI } from './taggedItem.d.ts'
3
+
4
+ export interface NoteI {
5
+ id: number
6
+ memberId: number
7
+ title: string
8
+ contentInMarkdown: string
9
+ color?: string
10
+ agreedToShare: boolean
11
+ createdAt: Date
12
+ updatedAt: Date
13
+ /**
14
+ * Virtual field for the note thumbnail imageURL (absolute path) */
15
+ imageURL?: string
16
+ /**
17
+ * Virtual field indicating if the note content is short
18
+ * Used to alter the design of the note (likely with ContentInMarkdown replacing the title)
19
+ * */
20
+ hasShortContent?: boolean
21
+ /**
22
+ * Virtual field for the note sharing URL (relative path) */
23
+ sharingURL: string
24
+ darkColor: string
25
+ pastelColor: string
26
+ Images: ImageI[]
27
+ TaggedItems: TaggedItemI[]
28
+ }
package/src/plant.d.ts CHANGED
@@ -35,7 +35,7 @@ export interface PlantI {
35
35
  hasNoInformation: boolean
36
36
  createdAt: Date
37
37
  updatedAt: Date
38
- translatedSunRequirements: string
38
+ translatedSunRequirements: 'Plein soleil' | 'Mi-ombre' | 'Ombre' | null
39
39
  parent?: PlantI
40
40
  children?: PlantI[]
41
41
  PlantInventories?: PlantInventoryI[]
@@ -48,6 +48,8 @@ export interface PlantI {
48
48
  Selections?: SelectionI[]
49
49
  tasks?: TaskI[]
50
50
  Images?: ImageI[]
51
+ notes?: NoteI[]
52
+ rotationFamily?: string
51
53
  }
52
54
 
53
55
  interface PlantTagI {
@@ -1,4 +1,5 @@
1
1
  import { PlantI } from './plant.d.ts'
2
+ import { SelectionI } from './selection.d.ts'
2
3
 
3
4
  export interface PlantSelectionI {
4
5
  id: number
@@ -8,4 +9,5 @@ export interface PlantSelectionI {
8
9
  createdAt: Date
9
10
  updatedAt: Date
10
11
  Plant: PlantI
12
+ Selection: SelectionI
11
13
  }
@@ -1,3 +1,5 @@
1
+ import { PlantI } from './plant'
2
+
1
3
  export interface SelectionI {
2
4
  id: number
3
5
  memberId: number
package/src/tag.d.ts ADDED
File without changes
@@ -0,0 +1,12 @@
1
+ import { TagI } from './tag.d.ts'
2
+
3
+ export interface TaggedItemI {
4
+ id: number
5
+ noteId: number
6
+ tagId: number
7
+ itemType: 'plant' | 'task'
8
+ itemId: number
9
+ createdAt: Date
10
+ updatedAt: Date
11
+ Tag: TagI
12
+ }