@la-main-verte/shared-types 1.0.66 → 1.0.68
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 +26 -0
- package/src/gardenMap.d.ts +2 -2
- package/src/home.api.d.ts +4 -0
- package/src/member.d.ts +7 -2
- package/src/selection.d.ts +3 -0
package/package.json
CHANGED
package/src/fertilizer.d.ts
CHANGED
|
@@ -17,4 +17,30 @@ 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
|
+
* Empty object {} 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 | Record<string, never>
|
|
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
|
|
20
46
|
}
|
package/src/gardenMap.d.ts
CHANGED
package/src/home.api.d.ts
CHANGED
|
@@ -209,6 +209,10 @@ export namespace HOME {
|
|
|
209
209
|
url: string
|
|
210
210
|
previewPlants?: WhenToSeedWhatPlantPreviewI[]
|
|
211
211
|
backgroundColor?: string
|
|
212
|
+
/** Show a red badge indicator (replaces the plant preview stack when true) */
|
|
213
|
+
showBadge?: boolean
|
|
214
|
+
/** Optional badge count to display */
|
|
215
|
+
badgeCount?: number
|
|
212
216
|
}
|
|
213
217
|
|
|
214
218
|
export type SectionI =
|
package/src/member.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NoteI } from './note'
|
|
2
|
-
import { SelectionI } from './selection'
|
|
1
|
+
import type { NoteI } from './note'
|
|
2
|
+
import type { SelectionI } from './selection'
|
|
3
3
|
|
|
4
4
|
export interface MemberI {
|
|
5
5
|
id: number
|
|
@@ -48,6 +48,11 @@ export interface MemberI {
|
|
|
48
48
|
unitSystem: 'imperial' | 'metric'
|
|
49
49
|
gardenZoneTimelessPreference?: boolean
|
|
50
50
|
subscriptionEndDate?: Date
|
|
51
|
+
/**
|
|
52
|
+
* Last fertilizer ID chosen by the user.
|
|
53
|
+
* Used as the default fertilizer for new garden zones.
|
|
54
|
+
*/
|
|
55
|
+
lastFertilizerIdChosen?: number
|
|
51
56
|
/**
|
|
52
57
|
* Virtual field to get the app badge count
|
|
53
58
|
* ----------------------------------------
|