@la-main-verte/shared-types 1.0.63 → 1.0.65

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.63",
3
+ "version": "1.0.65",
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/home.api.d.ts CHANGED
@@ -166,6 +166,7 @@ export namespace HOME {
166
166
  plantImageURL?: string | null
167
167
  gardenName: string
168
168
  gardenCategory: string
169
+ selectionSlug: string
169
170
  /** If this task is grouped by family */
170
171
  familyGroup?: TaskFamilyGroupI
171
172
  }
@@ -178,6 +179,7 @@ export namespace HOME {
178
179
  plantImageURL?: string | null
179
180
  gardenName: string
180
181
  gardenCategory: string
182
+ selectionSlug: string
181
183
  task: TaskI
182
184
  /** If this task is grouped by family */
183
185
  familyGroup?: TaskFamilyGroupI
@@ -190,6 +192,25 @@ export namespace HOME {
190
192
  advices: UpcomingTaskAdviceI[]
191
193
  }
192
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
+
193
214
  export type SectionI =
194
215
  | HeaderSectionI
195
216
  | HeroCardsSectionI
@@ -200,6 +221,7 @@ export namespace HOME {
200
221
  | AdviceSectionI
201
222
  | OnboardingCardSectionI
202
223
  | UpcomingTasksSectionI
224
+ | LinkCardSectionI
203
225
 
204
226
  export interface Response {
205
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
  }
@@ -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 {