@la-main-verte/shared-types 1.0.52 → 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.52",
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,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,10 +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
- export * from './note'
13
- export * from './taggedItem'
14
- export * from './tag'
15
11
  import * as PlantsAPI from './plants.api'
16
12
  import * as UsersAPI from './users.api'
17
13
 
package/src/plant.d.ts CHANGED
@@ -1,9 +1,3 @@
1
- import { ImageI } from './image.d.ts'
2
- import { SelectionI } from './selection.d.ts'
3
- import { TaskI } from './task.d.ts'
4
- import { TaggedItemI } from './taggedItem.d.ts'
5
- import { NoteI } from './note.js'
6
-
7
1
  export interface PlantI {
8
2
  id: number
9
3
  name: string
@@ -41,7 +35,7 @@ export interface PlantI {
41
35
  hasNoInformation: boolean
42
36
  createdAt: Date
43
37
  updatedAt: Date
44
- translatedSunRequirements: string
38
+ translatedSunRequirements: 'Plein soleil' | 'Mi-ombre' | 'Ombre' | null
45
39
  parent?: PlantI
46
40
  children?: PlantI[]
47
41
  PlantInventories?: PlantInventoryI[]
@@ -55,6 +49,7 @@ export interface PlantI {
55
49
  tasks?: TaskI[]
56
50
  Images?: ImageI[]
57
51
  notes?: NoteI[]
52
+ rotationFamily?: string
58
53
  }
59
54
 
60
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
  }
package/src/tag.d.ts CHANGED
@@ -1,9 +0,0 @@
1
- export interface TagI {
2
- id?: number
3
- name?: string
4
- tagType?: 'plant' | 'task'
5
- icon?: string
6
- color?: string
7
- createdAt: Date
8
- updatedAt: Date
9
- }