@la-main-verte/shared-types 1.0.64 → 1.0.66

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.64",
3
+ "version": "1.0.66",
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",
@@ -45,6 +45,11 @@ export interface GardenZoneI {
45
45
  yPosition: number
46
46
  zIndex: number
47
47
  order: number
48
+ /**
49
+ * When set, the zone is shown only for that year.
50
+ * Null means the zone is timeless (visible for every year).
51
+ */
52
+ yearOfCulture: number | null
48
53
  totalSurfaceInSquareMeters: number
49
54
  totalSurfaceInSquareFeet: number
50
55
  backgroundColor: string
@@ -62,6 +67,7 @@ export interface GardenZoneI {
62
67
  */
63
68
  is_subdivision: boolean
64
69
  has_subdivisions: boolean
70
+ timeless: boolean
65
71
  /**
66
72
  * Orientation virtual field ONLY USE FOR RECTANGLES
67
73
  * --------------------------------
@@ -104,7 +110,6 @@ export interface GardenZoneCultureI {
104
110
  * Value is computed by the backend and NOT coming from the DB.
105
111
  */
106
112
  numberOfSeedsPerAlley?: number
107
- fertilizerQuantitySuggested?: string
108
113
  Fertilizer?: FertilizerI
109
114
  custom_space_between_seeds_in_cm?: number
110
115
  custom_space_between_alley_in_cm?: number
package/src/home.api.d.ts CHANGED
@@ -192,6 +192,25 @@ export namespace HOME {
192
192
  advices: UpcomingTaskAdviceI[]
193
193
  }
194
194
 
195
+ /** Preview plant for WhenToSeedWhat section */
196
+ export interface WhenToSeedWhatPlantPreviewI {
197
+ id: number
198
+ name: string
199
+ family?: string | null
200
+ slug: string
201
+ imageURL?: string | null
202
+ }
203
+
204
+ /** A generic link card section with title, subtitle, URL, and optional preview images */
205
+ export interface LinkCardSectionI {
206
+ componentType: 'LinkCard'
207
+ title: string
208
+ subtitle?: string
209
+ url: string
210
+ previewPlants?: WhenToSeedWhatPlantPreviewI[]
211
+ backgroundColor?: string
212
+ }
213
+
195
214
  export type SectionI =
196
215
  | HeaderSectionI
197
216
  | HeroCardsSectionI
@@ -202,6 +221,7 @@ export namespace HOME {
202
221
  | AdviceSectionI
203
222
  | OnboardingCardSectionI
204
223
  | UpcomingTasksSectionI
224
+ | LinkCardSectionI
205
225
 
206
226
  export interface Response {
207
227
  sections: SectionI[]
package/src/index.ts CHANGED
@@ -18,6 +18,7 @@ import * as PlantsAPI from './plants.api'
18
18
  import * as UsersAPI from './users.api'
19
19
  import * as SessionsAPI from './sessions.api'
20
20
  import * as HomeAPI from './home.api'
21
+ import * as PagesAPI from './pages.api'
21
22
 
22
23
  // Allow access to the API namespaces without conflicts
23
24
  export namespace API {
@@ -25,4 +26,5 @@ export namespace API {
25
26
  export import USERS = UsersAPI
26
27
  export import SESSIONS = SessionsAPI
27
28
  export import HOME = HomeAPI
29
+ export import PAGES = PagesAPI
28
30
  }
package/src/member.d.ts CHANGED
@@ -46,6 +46,7 @@ export interface MemberI {
46
46
  finishedOnboarding: boolean
47
47
  hasDownloadedNativeApp?: boolean
48
48
  unitSystem: 'imperial' | 'metric'
49
+ gardenZoneTimelessPreference?: boolean
49
50
  subscriptionEndDate?: Date
50
51
  /**
51
52
  * Virtual field to get the app badge count
@@ -0,0 +1,36 @@
1
+ import type { PlantI } from './plant'
2
+
3
+ export namespace PAGES {
4
+ export interface SeedingTagI {
5
+ label: string
6
+ variant: string
7
+ }
8
+
9
+ export interface StartDateBadgeI {
10
+ day: string
11
+ month: string
12
+ }
13
+
14
+ export interface SeedingInfoI {
15
+ tags: SeedingTagI[]
16
+ startDateBadge: StartDateBadgeI | null
17
+ description: string | null
18
+ }
19
+
20
+ export interface SeedableFamiliesByMonthResponse {
21
+ title?: string | null
22
+ subtitle?: string | null
23
+ Plants: PlantI[]
24
+ }
25
+
26
+ export interface MonthPreviewI {
27
+ month: number
28
+ label: string
29
+ previewPlants: Pick<PlantI, 'id' | 'name' | 'family' | 'slug' | 'imageURL'>[]
30
+ totalFamiliesCount: number
31
+ }
32
+
33
+ export interface MonthsPreviewResponse {
34
+ months: MonthPreviewI[]
35
+ }
36
+ }
package/src/plant.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { TaxonFamilyI } from './taxonFamily'
2
+ import type { SeedingInfoI } from './pages.api'
2
3
  /**
3
4
  * Range filter value for min/max filters
4
5
  */
@@ -76,6 +77,7 @@ export interface PlantI {
76
77
  // @deprecate once v1.8.1 is fully adopted
77
78
  rotationFamily?: string
78
79
  taxonFamily?: TaxonFamilyI
80
+ seedingInfo: SeedingInfoI
79
81
  }
80
82
 
81
83
  interface PlantTagI {
@@ -1,6 +1,5 @@
1
1
  export interface PlantFiltersConfigI {
2
2
  filters: PlantFilterI[]
3
- helpText?: string
4
3
  }
5
4
 
6
5
  export interface PlantFilterI {
@@ -11,9 +10,31 @@ export interface PlantFilterI {
11
10
  options?: FilterOptionI[] // For select/multiselect
12
11
  min?: number // For range
13
12
  max?: number // For range
13
+ /** General help text for this filter attribute (always displayed) */
14
+ helpText?: string
15
+ /** Contextual help text based on member profile (displayed when relevant) */
16
+ contextualHelpText?: string
14
17
  }
15
18
 
16
19
  export interface FilterOptionI {
17
20
  value: string
18
21
  label: string
22
+ /** General help text for this option (always displayed) */
23
+ helpText?: string
24
+ /** Contextual help text based on member profile (displayed when relevant) */
25
+ contextualHelpText?: string
26
+ }
27
+
28
+ /**
29
+ * Member context used to generate contextual help texts
30
+ */
31
+ export interface MemberFilterContextI {
32
+ /** Hardiness zone index (e.g., 30, 40, 50) - null if not available */
33
+ hardinessZoneIndex: number | null
34
+ /** Hardiness zone name (e.g., "4a", "5b") - null if not available */
35
+ hardinessZoneName: string | null
36
+ /** Whether the member has a greenhouse */
37
+ hasGreenhouse: boolean
38
+ /** Whether the member has a balcony */
39
+ hasBalcony: boolean
19
40
  }