@la-main-verte/shared-types 1.0.42 → 1.0.46
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/device.d.ts +13 -9
- package/src/gardenMap.d.ts +2 -0
- package/src/member.d.ts +12 -0
- package/src/plants.api.d.ts +7 -0
- package/src/users.api.d.ts +0 -1
package/package.json
CHANGED
package/src/device.d.ts
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { Model } from 'sequelize'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Raw Data returned by the device model
|
|
5
|
-
* Device.toJSON() will return this data
|
|
6
|
-
*/
|
|
7
1
|
/**
|
|
8
2
|
* Raw Data returned by the device model
|
|
9
3
|
* Device.toJSON() will return this data
|
|
@@ -23,9 +17,17 @@ type DeviceDataI = {
|
|
|
23
17
|
platform?: 'ios' | 'android' | 'windows'
|
|
24
18
|
/** Optional version of the device */
|
|
25
19
|
version?: string
|
|
26
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Technical model of the device
|
|
22
|
+
* ---
|
|
23
|
+
* Ex: iPhone12,1, iPhone13,2, iPhone14,4, etc.
|
|
24
|
+
*/
|
|
27
25
|
model?: string
|
|
28
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Readable name of the device
|
|
28
|
+
* ---
|
|
29
|
+
* Ex: 'iPhone 12 Pro Max', 'Samsung Galaxy S20', 'MacBook Pro 13 inch'
|
|
30
|
+
* */
|
|
29
31
|
name?: string
|
|
30
32
|
/** Optional app version of the device. Ex: 1.0.0 */
|
|
31
33
|
appVersion?: string
|
|
@@ -33,5 +35,7 @@ type DeviceDataI = {
|
|
|
33
35
|
createdAt: Date
|
|
34
36
|
/** Timestamp of when the device was last updated */
|
|
35
37
|
updatedAt: Date
|
|
38
|
+
/** Virtual field that combines the name and appVersion */
|
|
39
|
+
fullName: string
|
|
36
40
|
}
|
|
37
|
-
|
|
41
|
+
export { DeviceDataI }
|
package/src/gardenMap.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export interface GardenZoneCultureI {
|
|
|
46
46
|
gardenZoneId: number
|
|
47
47
|
plantSelectionId: number
|
|
48
48
|
seedQuantity: number
|
|
49
|
+
densityMode: 'dense' | 'sparse' | 'custom'
|
|
49
50
|
/**
|
|
50
51
|
* The year of the culture - do not use it yet.
|
|
51
52
|
* @deprecated Potentially a mistake to have this field here
|
|
@@ -64,4 +65,5 @@ export interface GardenZoneCultureI {
|
|
|
64
65
|
* Value is computed by the backend and NOT coming from the DB.
|
|
65
66
|
*/
|
|
66
67
|
numberOfSeedsPerAlley?: number
|
|
68
|
+
fertilizerQuantitySuggested?: string
|
|
67
69
|
}
|
package/src/member.d.ts
CHANGED
|
@@ -3,12 +3,18 @@ export interface MemberI {
|
|
|
3
3
|
email: string
|
|
4
4
|
firstName: string
|
|
5
5
|
lastName: string
|
|
6
|
+
/** Virtual field to get the user's full name */
|
|
7
|
+
fullName?: string | null
|
|
6
8
|
city?: string
|
|
7
9
|
hardinessZoneName?: string
|
|
8
10
|
createdAt: Date
|
|
9
11
|
updatedAt: Date
|
|
10
12
|
lastFreezingDate?: Date
|
|
11
13
|
firstFreezingDate?: Date
|
|
14
|
+
/**
|
|
15
|
+
* Number of unread Crisp messages
|
|
16
|
+
*/
|
|
17
|
+
unreadMessagesCount?: number
|
|
12
18
|
notes?: NoteI[]
|
|
13
19
|
selections?: SelectionI[]
|
|
14
20
|
userActivities?: UserActivityI[]
|
|
@@ -37,4 +43,10 @@ export interface MemberI {
|
|
|
37
43
|
finishedOnboarding: boolean
|
|
38
44
|
hasDownloadedNativeApp?: boolean
|
|
39
45
|
unitSystem: 'imperial' | 'metric'
|
|
46
|
+
/**
|
|
47
|
+
* Virtual field to get the app badge count
|
|
48
|
+
* ----------------------------------------
|
|
49
|
+
* For now, it's just the number of unread messages.
|
|
50
|
+
*/
|
|
51
|
+
badgeCount?: number
|
|
40
52
|
}
|
package/src/plants.api.d.ts
CHANGED
|
@@ -37,6 +37,13 @@ export namespace PLANTS {
|
|
|
37
37
|
search?: string
|
|
38
38
|
family?: string
|
|
39
39
|
limit?: number
|
|
40
|
+
/**
|
|
41
|
+
* If submitted, it means we are searching for plants that can be planted in the given garden zone.
|
|
42
|
+
* It almost means:
|
|
43
|
+
* - withSpacing will be set to true automatically.
|
|
44
|
+
* - Plant.contextualSearchText may be added to the results to provided additional contextual information to the search results (and therefore the member)
|
|
45
|
+
*/
|
|
46
|
+
gardenZoneId?: string | number
|
|
40
47
|
}
|
|
41
48
|
}
|
|
42
49
|
/**
|