@la-main-verte/shared-types 1.0.81 → 1.0.82
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/index.ts +34 -32
- package/src/plant.d.ts +24 -3
- package/src/taxonFamily.d.ts +15 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
export * from './member'
|
|
2
|
-
export * from './selection'
|
|
3
|
-
export * from './plantSelection'
|
|
4
|
-
export * from './plant'
|
|
5
|
-
export * from './task'
|
|
6
|
-
export * from './calendarView'
|
|
7
|
-
export * from './apiError'
|
|
8
|
-
export * from './gardenMap'
|
|
9
|
-
export * from './gardenOverview'
|
|
10
|
-
export * from './alert'
|
|
11
|
-
export * from './image'
|
|
12
|
-
export * from './note'
|
|
13
|
-
export * from './taggedItem'
|
|
14
|
-
export * from './fertilizer'
|
|
15
|
-
export * from './utmParams'
|
|
16
|
-
export * from './plantFilters'
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import * as
|
|
20
|
-
import * as
|
|
21
|
-
import * as
|
|
22
|
-
import * as
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export import
|
|
29
|
-
export import
|
|
30
|
-
export import
|
|
31
|
-
export import
|
|
32
|
-
|
|
1
|
+
export * from './member'
|
|
2
|
+
export * from './selection'
|
|
3
|
+
export * from './plantSelection'
|
|
4
|
+
export * from './plant'
|
|
5
|
+
export * from './task'
|
|
6
|
+
export * from './calendarView'
|
|
7
|
+
export * from './apiError'
|
|
8
|
+
export * from './gardenMap'
|
|
9
|
+
export * from './gardenOverview'
|
|
10
|
+
export * from './alert'
|
|
11
|
+
export * from './image'
|
|
12
|
+
export * from './note'
|
|
13
|
+
export * from './taggedItem'
|
|
14
|
+
export * from './fertilizer'
|
|
15
|
+
export * from './utmParams'
|
|
16
|
+
export * from './plantFilters'
|
|
17
|
+
export * from './taxonFamily'
|
|
18
|
+
export * from './rotationGroup'
|
|
19
|
+
import * as PlantsAPI from './plants.api'
|
|
20
|
+
import * as UsersAPI from './users.api'
|
|
21
|
+
import * as SessionsAPI from './sessions.api'
|
|
22
|
+
import * as HomeAPI from './home.api'
|
|
23
|
+
import * as PagesAPI from './pages.api'
|
|
24
|
+
import * as PaymentsAPI from './payments.api'
|
|
25
|
+
|
|
26
|
+
// Allow access to the API namespaces without conflicts
|
|
27
|
+
export namespace API {
|
|
28
|
+
export import PLANTS = PlantsAPI
|
|
29
|
+
export import USERS = UsersAPI
|
|
30
|
+
export import SESSIONS = SessionsAPI
|
|
31
|
+
export import HOME = HomeAPI
|
|
32
|
+
export import PAGES = PagesAPI
|
|
33
|
+
export import PAYMENTS = PaymentsAPI
|
|
34
|
+
}
|
package/src/plant.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TaxonFamilyI } from './taxonFamily'
|
|
2
2
|
import type { SeedingInfoI } from './pages.api'
|
|
3
3
|
import type { PlantFilterI } from './plantFilters'
|
|
4
|
+
import type { RotationGroup } from './rotationGroup'
|
|
4
5
|
/**
|
|
5
6
|
* Range filter value for min/max filters
|
|
6
7
|
*/
|
|
@@ -98,9 +99,16 @@ export interface PlantI {
|
|
|
98
99
|
Images?: ImageI[]
|
|
99
100
|
Member?: Partial<MemberI>
|
|
100
101
|
notes?: NoteI[]
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Nitrogen-derived rotation group enum (virtual field on the Plant model).
|
|
104
|
+
* Source of truth for rotation classification — derived from
|
|
105
|
+
* `azoteNeedsKgPerHa` plus the regenerative override on `taxonFamily`.
|
|
106
|
+
*/
|
|
107
|
+
rotationGroup?: RotationGroup | null
|
|
108
|
+
/**
|
|
109
|
+
* French label of `rotationGroup`, ready for display.
|
|
110
|
+
*/
|
|
111
|
+
translatedRotationGroup?: string | null
|
|
104
112
|
taxonFamily?: TaxonFamilyI
|
|
105
113
|
seedingInfo: SeedingInfoI
|
|
106
114
|
/**
|
|
@@ -166,3 +174,16 @@ export interface PlantSearchResultI {
|
|
|
166
174
|
familyName?: string
|
|
167
175
|
filtersUI?: PlantFiltersUII
|
|
168
176
|
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Response shape for `GET /selections/:slug/gardenZones/:id/rotation-suggestions`.
|
|
180
|
+
* - `advice`: short user-facing sentence explaining the recommendation
|
|
181
|
+
* - `Plants`: parent plants matching the recommended rotation group, with
|
|
182
|
+
* the avoided taxon families excluded. Empty when the zone has no usable
|
|
183
|
+
* history yet.
|
|
184
|
+
*/
|
|
185
|
+
export interface PlantRotationSuggestionsI {
|
|
186
|
+
targetYear: number
|
|
187
|
+
advice: string
|
|
188
|
+
Plants: PlantI[]
|
|
189
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RotationGroup } from './rotationGroup'
|
|
2
|
+
|
|
3
|
+
export interface TaxonFamilyI {
|
|
4
|
+
id: number
|
|
5
|
+
slug: string
|
|
6
|
+
translation_key: string
|
|
7
|
+
name: string
|
|
8
|
+
latin_name: string | null
|
|
9
|
+
kingdom: string
|
|
10
|
+
description: string | null
|
|
11
|
+
rotation_group: RotationGroup | null
|
|
12
|
+
translated_rotation_group: string | null
|
|
13
|
+
createdAt?: Date
|
|
14
|
+
updatedAt?: Date
|
|
15
|
+
}
|