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

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.49",
3
+ "version": "1.0.51",
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",
@@ -1,5 +1,3 @@
1
- import { PlantI } from './plant'
2
-
3
1
  export interface CalendarViewI {
4
2
  id: number
5
3
  title: string
package/src/device.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Raw Data returned by the device model
3
3
  * Device.toJSON() will return this data
4
4
  */
5
- type DeviceDataI = {
5
+ export interface DeviceDataI {
6
6
  /** Unique identifier for the device */
7
7
  id: string
8
8
  /** Identifier for the user associated with the device (UUID) */
@@ -38,4 +38,3 @@ type DeviceDataI = {
38
38
  /** Virtual field that combines the name and appVersion */
39
39
  fullName: string
40
40
  }
41
- export { DeviceDataI }
@@ -0,0 +1,20 @@
1
+ export interface FertilizerI {
2
+ id: number
3
+ name: string
4
+ slug: string
5
+ azotePercentage: number
6
+ phosphorePercentage: number
7
+ potassiumPercentage: number
8
+ /**
9
+ * The real azote percentage is the azote percentage multiplied by the azote efficiency.
10
+ */
11
+ realAzotePercentage: number
12
+ /**
13
+ * The azote efficiency is a percentage number between 0 and 1.
14
+ * Its how efficient the mineralization of the azote is.
15
+ */
16
+ azoteEfficiency: number
17
+ imageLocation: string
18
+ imageURL: string
19
+ quantitySuggested: string
20
+ }
@@ -1,4 +1,5 @@
1
1
  import { PlantSelectionI } from './plantSelection.d.ts'
2
+ import { FertilizerI } from './fertilizer.d.ts'
2
3
 
3
4
  /**
4
5
  * A gardenMap is a collection of garden zones
@@ -49,6 +50,7 @@ export interface GardenZoneCultureI {
49
50
  plantSelectionId: number
50
51
  seedQuantity: number
51
52
  densityMode: 'dense' | 'sparse' | 'custom'
53
+ fertilizerId: number
52
54
  /**
53
55
  * The year of the culture - do not use it yet.
54
56
  * @deprecated Potentially a mistake to have this field here
@@ -68,4 +70,5 @@ export interface GardenZoneCultureI {
68
70
  */
69
71
  numberOfSeedsPerAlley?: number
70
72
  fertilizerQuantitySuggested?: string
73
+ Fertilizer?: FertilizerI
71
74
  }
package/src/index.ts CHANGED
@@ -8,9 +8,7 @@ export * from './apiError'
8
8
  export * from './gardenMap'
9
9
  export * from './alert'
10
10
  export * from './image'
11
- export * from './note'
12
- export * from './taggedItem'
13
- export * from './tag'
11
+ export * from './fertilizer'
14
12
  import * as PlantsAPI from './plants.api'
15
13
  import * as UsersAPI from './users.api'
16
14
 
package/src/member.d.ts CHANGED
@@ -1,6 +1,3 @@
1
- import { NoteI } from './note'
2
- import { SelectionI } from './selection'
3
-
4
1
  export interface MemberI {
5
2
  id: number
6
3
  email: string
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
@@ -54,7 +48,6 @@ export interface PlantI {
54
48
  Selections?: SelectionI[]
55
49
  tasks?: TaskI[]
56
50
  Images?: ImageI[]
57
- notes?: NoteI[]
58
51
  }
59
52
 
60
53
  interface PlantTagI {
@@ -1,3 +1,5 @@
1
+ import { PlantI } from './plant.d.ts'
2
+
1
3
  export interface PlantSelectionI {
2
4
  id: number
3
5
  plantId: number
@@ -5,4 +7,5 @@ export interface PlantSelectionI {
5
7
  seedQuantity: number
6
8
  createdAt: Date
7
9
  updatedAt: Date
10
+ Plant: PlantI
8
11
  }
@@ -1,6 +1,7 @@
1
1
  import { PlantI, PlantTagI } from './plant.d'
2
2
  import { SelectionI } from './selection.d'
3
3
  import { ImageDataI } from './image.d'
4
+
4
5
  interface PlantExtendedDataI extends PlantI {
5
6
  /**
6
7
  * Future plant images gallery for now using notes as a proxy
@@ -1,5 +1,3 @@
1
- import { PlantI } from './plant'
2
-
3
1
  export interface SelectionI {
4
2
  id: number
5
3
  memberId: number
package/src/note.d.ts DELETED
@@ -1,28 +0,0 @@
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/tag.d.ts DELETED
@@ -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
- }
@@ -1,12 +0,0 @@
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
- }