@la-main-verte/shared-types 1.0.91 → 1.0.92

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.91",
3
+ "version": "1.0.92",
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
@@ -1,124 +1,137 @@
1
- export type IconNameI =
2
- | 'arrow-down'
3
- | 'arrow-down-a-z'
4
- | 'arrow-up-a-z'
5
- | 'arrow-left'
6
- | 'arrow-up'
7
- | 'arrow-up-short-wide'
8
- | 'arrow-up-91'
9
- | 'arrow-down-91'
10
- | 'arrow-up-square-triangle'
11
- | 'arrow-down-square-triangle'
12
- | 'arrow-up-big-small'
13
- | 'arrow-down-big-small'
14
- | 'bag-seedling'
15
- | 'bars'
16
- | 'bell'
17
- | 'broom-wide'
18
- | 'bug'
19
- | 'calendar-check'
20
- | 'calendar-day'
21
- | 'calendar-days'
22
- | 'calendar-minus'
23
- | 'calendar-pen'
24
- | 'calendar-plus'
25
- | 'camera'
26
- | 'chart-pie'
27
- | 'chart-tree-map'
28
- | 'check'
29
- | 'chevron-down'
30
- | 'chevron-left'
31
- | 'chevron-right'
32
- | 'circle-question'
33
- | 'city'
34
- | 'cog'
35
- | 'comment'
36
- | 'comment-dots'
37
- | 'comments-question-check'
38
- | 'copy'
39
- | 'columns-3'
40
- | 'distribute-spacing-horizontal'
41
- | 'distribute-spacing-vertical'
42
- | 'envelope'
43
- | 'eye'
44
- | 'eye-slash'
45
- | 'filter-circle-xmark'
46
- | 'filter-list'
47
- | 'flask'
48
- | 'gear'
49
- | 'heart'
50
- | 'home'
51
- | 'hand-back-point-up'
52
- | 'house-chimney-heart'
53
- | 'image'
54
- | 'info'
55
- | 'keyboard'
56
- | 'lightbulb-on'
57
- | 'lightbulb'
58
- | 'lock'
59
- | 'lock-open'
60
- | 'messages-question'
61
- | 'microphone'
62
- | 'minus'
63
- | 'note-medical'
64
- | 'note-sticky'
65
- | 'pencil'
66
- | 'plus'
67
- | 'pen-ruler'
68
- | 'podcast'
69
- | 'rotate'
70
- | 'ruler'
71
- | 'scissors'
72
- | 'satellite-dish'
73
- | 'search'
74
- | 'seedling'
75
- | 'sign-in-alt'
76
- | 'sign-out-alt'
77
- | 'share'
78
- | 'shovel'
79
- | 'snowflake'
80
- | 'star'
81
- | 'sun-bright'
82
- | 'temperature-snow'
83
- | 'thumbs-up'
84
- | 'tomato'
85
- | 'times'
86
- | 'trash'
87
- | 'trowel'
88
- | 'user-plus'
89
- | 'user-slash'
90
- | 'wand-sparkles'
91
- | 'wheat'
92
- | 'x'
93
- | string
94
-
95
- export interface AlertI {
96
- id: number
97
- tags?: AlertTagI[]
98
- icon: IconNameI
99
- /**
100
- * ColourCode of the icon
101
- * Ex: #ffffff
102
- */
103
- iconColor: string
104
- message: string
105
- published_at?: Date
106
- updated_at?: Date
107
- status?: 'draft' | 'published'
108
- }
109
-
110
- export interface AlertTagI {
111
- name: string
112
- /**
113
- * ColourCode of the alert tag background
114
- * Ex: #ffffff
115
- */
116
- backgroundColor: string
117
- /**
118
- * ColourCode of the alert tag text
119
- * Ex: #ffffff
120
- */
121
- textColor: string
122
- }
123
-
124
- export type AlertV14I = AlertI
1
+ export type IconNameI =
2
+ | 'arrow-down'
3
+ | 'arrow-down-a-z'
4
+ | 'arrow-up-a-z'
5
+ | 'arrow-left'
6
+ | 'arrow-up'
7
+ | 'arrow-up-short-wide'
8
+ | 'arrow-up-91'
9
+ | 'arrow-down-91'
10
+ | 'arrow-up-square-triangle'
11
+ | 'arrow-down-square-triangle'
12
+ | 'arrow-up-big-small'
13
+ | 'arrow-down-big-small'
14
+ | 'bag-seedling'
15
+ | 'bars'
16
+ | 'bell'
17
+ | 'broom-wide'
18
+ | 'bug'
19
+ | 'calendar-check'
20
+ | 'calendar-day'
21
+ | 'calendar-days'
22
+ | 'calendar-minus'
23
+ | 'calendar-pen'
24
+ | 'calendar-plus'
25
+ | 'camera'
26
+ | 'chart-pie'
27
+ | 'chart-tree-map'
28
+ | 'check'
29
+ | 'chevron-down'
30
+ | 'chevron-left'
31
+ | 'chevron-right'
32
+ | 'circle-question'
33
+ | 'city'
34
+ | 'cog'
35
+ | 'comment'
36
+ | 'comment-dots'
37
+ | 'comments-question-check'
38
+ | 'copy'
39
+ | 'columns-3'
40
+ | 'distribute-spacing-horizontal'
41
+ | 'distribute-spacing-vertical'
42
+ | 'envelope'
43
+ | 'eye'
44
+ | 'eye-slash'
45
+ | 'filter-circle-xmark'
46
+ | 'filter-list'
47
+ | 'flask'
48
+ | 'gear'
49
+ | 'heart'
50
+ | 'home'
51
+ | 'hand-back-point-up'
52
+ | 'house-chimney-heart'
53
+ | 'image'
54
+ | 'info'
55
+ | 'keyboard'
56
+ | 'lightbulb-on'
57
+ | 'lightbulb'
58
+ | 'lock'
59
+ | 'lock-open'
60
+ | 'messages-question'
61
+ | 'microphone'
62
+ | 'minus'
63
+ | 'note-medical'
64
+ | 'note-sticky'
65
+ | 'pencil'
66
+ | 'plus'
67
+ | 'pen-ruler'
68
+ | 'podcast'
69
+ | 'rotate'
70
+ | 'ruler'
71
+ | 'scissors'
72
+ | 'satellite-dish'
73
+ | 'search'
74
+ | 'seedling'
75
+ | 'sign-in-alt'
76
+ | 'sign-out-alt'
77
+ | 'share'
78
+ | 'shovel'
79
+ | 'snowflake'
80
+ | 'star'
81
+ | 'sun-bright'
82
+ | 'temperature-snow'
83
+ | 'thumbs-up'
84
+ | 'tomato'
85
+ | 'times'
86
+ | 'trash'
87
+ | 'trowel'
88
+ | 'user-plus'
89
+ | 'user-slash'
90
+ | 'wand-sparkles'
91
+ | 'wheat'
92
+ | 'x'
93
+ | string
94
+
95
+ export interface AlertI {
96
+ id: number
97
+ /** @deprecated Alert tags are deprecated. The presenter no longer populates this field. */
98
+ tags?: AlertTagI[]
99
+ icon: IconNameI
100
+ /**
101
+ * ColourCode of the icon
102
+ * Ex: #ffffff
103
+ */
104
+ iconColor: string
105
+ title?: string
106
+ subtitle?: string
107
+ message: string
108
+ /**
109
+ * Optional public URL to share this alert (e.g. a Webflow blog article).
110
+ * When set, the app shows a "Partager" share button on the alert card.
111
+ */
112
+ shareableUrl?: string
113
+ /**
114
+ * Optional slug of the corresponding Webflow CMS blog article.
115
+ */
116
+ webflowArticleSlug?: string
117
+ published_at?: Date
118
+ updated_at?: Date
119
+ status?: 'draft' | 'published' | 'archived'
120
+ }
121
+
122
+ /** @deprecated Alert tags are deprecated. */
123
+ export interface AlertTagI {
124
+ name: string
125
+ /**
126
+ * ColourCode of the alert tag background
127
+ * Ex: #ffffff
128
+ */
129
+ backgroundColor: string
130
+ /**
131
+ * ColourCode of the alert tag text
132
+ * Ex: #ffffff
133
+ */
134
+ textColor: string
135
+ }
136
+
137
+ export type AlertV14I = AlertI
@@ -1,67 +1,67 @@
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
- * Bulk density in kg/L, used to convert quantities to litres or cubic yards.
40
- * Null for fertilizers without a known density.
41
- */
42
- volumetricDensity: number | null
43
- /**
44
- * Controls how the quantity is displayed in the garden overview.
45
- * - `'weight'`: kg/g, plus cubic yards if ≥ 1 yd³ (default for most bulk organics)
46
- * - `'litre'`: solid products sold by volume (e.g. bagged compost) — L for small, yd³ for large
47
- * - `'liquid'`: true liquid products (e.g. liquid seaweed) — L or mL only, never cubic yards
48
- */
49
- presentationMode: 'weight' | 'litre' | 'liquid'
50
- }
51
-
52
- interface BlendCompositionI {
53
- primary_fertilizer_id: number
54
- primary_fertilizer_ratio: number
55
- secondary_fertilizer_id: number
56
- secondary_fertilizer_ratio: number
57
- }
58
-
59
- export interface FertilizerSectionI {
60
- sectionTitle: string
61
- sectionSubtitle: string
62
- fertilizers: FertilizerI[]
63
- }
64
-
65
- export interface FertilizersInGridI {
66
- fertilizerSection: FertilizerSectionI[]
67
- }
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
+ * Bulk density in kg/L, used to convert quantities to litres or cubic yards.
40
+ * Null for fertilizers without a known density.
41
+ */
42
+ volumetricDensity: number | null
43
+ /**
44
+ * Controls how the quantity is displayed in the garden overview.
45
+ * - `'weight'`: kg/g, plus cubic yards if ≥ 1 yd³ (default for most bulk organics)
46
+ * - `'litre'`: solid products sold by volume (e.g. bagged compost) — L for small, yd³ for large
47
+ * - `'liquid'`: true liquid products (e.g. liquid seaweed) — L or mL only, never cubic yards
48
+ */
49
+ presentationMode: 'weight' | 'litre' | 'liquid'
50
+ }
51
+
52
+ interface BlendCompositionI {
53
+ primary_fertilizer_id: number
54
+ primary_fertilizer_ratio: number
55
+ secondary_fertilizer_id: number
56
+ secondary_fertilizer_ratio: number
57
+ }
58
+
59
+ export interface FertilizerSectionI {
60
+ sectionTitle: string
61
+ sectionSubtitle: string
62
+ fertilizers: FertilizerI[]
63
+ }
64
+
65
+ export interface FertilizersInGridI {
66
+ fertilizerSection: FertilizerSectionI[]
67
+ }