@la-main-verte/shared-types 1.0.64 → 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 +1 -1
- package/src/home.api.d.ts +20 -0
- package/src/index.ts +2 -0
- package/src/pages.api.d.ts +36 -0
- package/src/plant.d.ts +2 -0
package/package.json
CHANGED
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
|
}
|
|
@@ -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 {
|