@la-main-verte/shared-types 1.0.78 → 1.0.80
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 +55 -56
- package/src/plant.d.ts +20 -1
package/package.json
CHANGED
package/src/fertilizer.d.ts
CHANGED
|
@@ -1,56 +1,55 @@
|
|
|
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
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* "
|
|
30
|
-
* "
|
|
31
|
-
* "
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
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
|
+
* Nitrogen mineralization rate, between 0 and 1 (e.g. 0.9 for 90%).
|
|
14
|
+
*/
|
|
15
|
+
nitrogenMineralizationRate: number | null
|
|
16
|
+
imageLocation: string
|
|
17
|
+
imageURL: string
|
|
18
|
+
quantitySuggested: string
|
|
19
|
+
/**
|
|
20
|
+
* Blend composition when this fertilizer is a combination of two products.
|
|
21
|
+
* Null for single fertilizers.
|
|
22
|
+
* When populated, contains the IDs and ratios (as percentages) of the primary and secondary fertilizers.
|
|
23
|
+
* The NPK values should be calculated by fetching each fertilizer and applying the weighted average.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* // For a blend:
|
|
27
|
+
* {
|
|
28
|
+
* "primary_fertilizer_id": 1, // Acti-Sol (70%)
|
|
29
|
+
* "primary_fertilizer_ratio": 70,
|
|
30
|
+
* "secondary_fertilizer_id": 12, // Bionik (30%)
|
|
31
|
+
* "secondary_fertilizer_ratio": 30
|
|
32
|
+
* }
|
|
33
|
+
*
|
|
34
|
+
* // For a single fertilizer:
|
|
35
|
+
* {}
|
|
36
|
+
*/
|
|
37
|
+
combination_details: BlendCompositionI | null
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface BlendCompositionI {
|
|
41
|
+
primary_fertilizer_id: number
|
|
42
|
+
primary_fertilizer_ratio: number
|
|
43
|
+
secondary_fertilizer_id: number
|
|
44
|
+
secondary_fertilizer_ratio: number
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface FertilizerSectionI {
|
|
48
|
+
sectionTitle: string
|
|
49
|
+
sectionSubtitle: string
|
|
50
|
+
fertilizers: FertilizerI[]
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface FertilizersInGridI {
|
|
54
|
+
fertilizerSection: FertilizerSectionI[]
|
|
55
|
+
}
|
package/src/plant.d.ts
CHANGED
|
@@ -59,7 +59,26 @@ export interface PlantI {
|
|
|
59
59
|
isHardy: boolean | null
|
|
60
60
|
quantityForFiveInJardinVivrier?: number | null
|
|
61
61
|
imageURL: string
|
|
62
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Filename of the plant's 3D mesh asset stored on S3.
|
|
64
|
+
* - Ideally a `.webp` file (e.g. `ail.webp`).
|
|
65
|
+
* - Stored in S3 under the `images/meshes/` folder.
|
|
66
|
+
* - By default named after the `Plant.slug` (e.g. `ail.webp` for the garlic plant).
|
|
67
|
+
* - Only the filename is persisted; the public URL is exposed through the
|
|
68
|
+
* virtual `meshURL` field.
|
|
69
|
+
*/
|
|
70
|
+
meshFilename: string | null
|
|
71
|
+
/**
|
|
72
|
+
* Public ImageKit URL to the plant's 3D mesh asset.
|
|
73
|
+
* Virtual field computed from `meshFilename`. The underlying file is
|
|
74
|
+
* stored on S3 at `images/meshes/{meshFilename}` and rewritten to
|
|
75
|
+
* ImageKit for CDN delivery and transformations.
|
|
76
|
+
*
|
|
77
|
+
* Falls back to `imageURL` when `meshFilename` is not set.
|
|
78
|
+
*
|
|
79
|
+
* Example: `https://ik.imagekit.io/lamainverte/meshes/ail.webp`
|
|
80
|
+
*/
|
|
81
|
+
meshURL: string
|
|
63
82
|
totalWeeksToMaturity: number
|
|
64
83
|
hasNoInformation: boolean
|
|
65
84
|
createdAt: Date
|