@la-main-verte/shared-types 1.0.52 → 1.0.54

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.54",
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
@@ -8,6 +8,7 @@ export interface AlertI {
8
8
  */
9
9
  iconColor: string
10
10
  message: string
11
+ published_at?: Date
11
12
  }
12
13
 
13
14
  export interface AlertTagI {
@@ -23,3 +24,5 @@ export interface AlertTagI {
23
24
  */
24
25
  textColor: string
25
26
  }
27
+
28
+ export type AlertV14I = AlertI
package/src/device.d.ts CHANGED
@@ -7,12 +7,16 @@ export interface DeviceDataI {
7
7
  id: string
8
8
  /** Identifier for the user associated with the device (UUID) */
9
9
  memberId: string
10
- /** Optional push notification key */
10
+ /** Expo Push Notification Key */
11
11
  pushKey?: string
12
+ /** Apple Push Notification Service Token */
13
+ apnsToken?: string
14
+ /** Firebase (Android) Cloud Messaging Token */
15
+ fcmToken?: string
12
16
  /** Unique identifier for the device (UUID) */
13
17
  uuid: string
14
18
  /** RAW User agent string from the device */
15
- userAgent: string
19
+ userAgent?: string
16
20
  /** Optional platform (e.g., 'ios', 'android', 'windows') */
17
21
  platform?: 'ios' | 'android' | 'windows'
18
22
  /** Optional version of the device */
@@ -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,18 @@ 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
39
+ has_subdivisions: boolean
31
40
  /**
32
41
  * Orientation virtual field ONLY USE FOR RECTANGLES
33
42
  * --------------------------------
package/src/index.ts CHANGED
@@ -8,10 +8,9 @@ export * from './apiError'
8
8
  export * from './gardenMap'
9
9
  export * from './alert'
10
10
  export * from './image'
11
- export * from './fertilizer'
12
11
  export * from './note'
13
12
  export * from './taggedItem'
14
- export * from './tag'
13
+ export * from './fertilizer'
15
14
  import * as PlantsAPI from './plants.api'
16
15
  import * as UsersAPI from './users.api'
17
16
 
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
- }
@@ -31,6 +31,8 @@ export namespace USERS {
31
31
  name?: DeviceDataI['name']
32
32
  appVersion?: DeviceDataI['appVersion']
33
33
  pushKey?: DeviceDataI['pushKey']
34
+ apnsToken?: DeviceDataI['apnsToken']
35
+ fcmToken?: DeviceDataI['fcmToken']
34
36
  }
35
37
  }
36
38
  export type Response = DeviceDataI