@la-main-verte/shared-types 1.0.67 → 1.0.69
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 +1 -1
- package/src/fertilizer.d.ts +36 -0
- package/src/gardenMap.d.ts +24 -2
- package/src/member.d.ts +2 -2
- package/src/plant.d.ts +2 -0
package/package.json
CHANGED
package/src/fertilizer.d.ts
CHANGED
|
@@ -17,4 +17,40 @@ export interface FertilizerI {
|
|
|
17
17
|
imageLocation: string
|
|
18
18
|
imageURL: string
|
|
19
19
|
quantitySuggested: string
|
|
20
|
+
/**
|
|
21
|
+
* Blend composition when this fertilizer is a combination of two products.
|
|
22
|
+
* Null for single fertilizers.
|
|
23
|
+
* When populated, contains the IDs and ratios (as percentages) of the primary and secondary fertilizers.
|
|
24
|
+
* The NPK values should be calculated by fetching each fertilizer and applying the weighted average.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // For a blend:
|
|
28
|
+
* {
|
|
29
|
+
* "primary_fertilizer_id": 1, // Acti-Sol (70%)
|
|
30
|
+
* "primary_fertilizer_ratio": 70,
|
|
31
|
+
* "secondary_fertilizer_id": 12, // Bionik (30%)
|
|
32
|
+
* "secondary_fertilizer_ratio": 30
|
|
33
|
+
* }
|
|
34
|
+
*
|
|
35
|
+
* // For a single fertilizer:
|
|
36
|
+
* {}
|
|
37
|
+
*/
|
|
38
|
+
combination_details: BlendCompositionI | null
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface BlendCompositionI {
|
|
42
|
+
primary_fertilizer_id: number
|
|
43
|
+
primary_fertilizer_ratio: number
|
|
44
|
+
secondary_fertilizer_id: number
|
|
45
|
+
secondary_fertilizer_ratio: number
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface FertilizerSectionI {
|
|
49
|
+
sectionTitle: string
|
|
50
|
+
sectionSubtitle: string
|
|
51
|
+
fertilizers: FertilizerI[]
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface FertilizersInGridI {
|
|
55
|
+
fertilizerSection: FertilizerSectionI[]
|
|
20
56
|
}
|
package/src/gardenMap.d.ts
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { FertilizerI } from './fertilizer'
|
|
2
|
+
import type { PlantSelectionI } from './plantSelection'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Viewport corners with x/y coordinates
|
|
6
|
+
* Used by front-end to describe the visible area of the map
|
|
7
|
+
*/
|
|
8
|
+
export interface ViewportCornersI {
|
|
9
|
+
topLeft: { x: number; y: number } | null
|
|
10
|
+
topRight: { x: number; y: number } | null
|
|
11
|
+
bottomLeft: { x: number; y: number } | null
|
|
12
|
+
bottomRight: { x: number; y: number } | null
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Viewport as min/max boundaries
|
|
17
|
+
* Used by back-end placement logic for collision detection
|
|
18
|
+
*/
|
|
19
|
+
export interface ViewportBoundariesI {
|
|
20
|
+
minX: number
|
|
21
|
+
minY: number
|
|
22
|
+
maxX: number
|
|
23
|
+
maxY: number
|
|
24
|
+
}
|
|
3
25
|
|
|
4
26
|
/**
|
|
5
27
|
* Available garden map categories across the platform
|
package/src/member.d.ts
CHANGED
package/src/plant.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export interface PlantI {
|
|
|
50
50
|
cultivationInfo: string | null
|
|
51
51
|
parentId: number | null
|
|
52
52
|
memberId?: number
|
|
53
|
+
memberFirstName?: string | null
|
|
53
54
|
shared: boolean
|
|
54
55
|
hexColor: string | null
|
|
55
56
|
sunRequirements: 'partialShade' | 'fullSun' | 'fullShade' | null
|
|
@@ -72,6 +73,7 @@ export interface PlantI {
|
|
|
72
73
|
Selections?: SelectionI[]
|
|
73
74
|
tasks?: TaskI[]
|
|
74
75
|
Images?: ImageI[]
|
|
76
|
+
Member?: Partial<MemberI>
|
|
75
77
|
notes?: NoteI[]
|
|
76
78
|
rotationGroup?: string
|
|
77
79
|
// @deprecate once v1.8.1 is fully adopted
|