@la-main-verte/shared-types 1.0.41 → 1.0.43
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/README.md +26 -26
- package/package.json +16 -16
- package/src/alert.d.ts +25 -25
- package/src/apiError.d.ts +28 -28
- package/src/calendarView.d.ts +7 -7
- package/src/device.d.ts +37 -37
- package/src/gardenMap.d.ts +69 -67
- package/src/index.ts +17 -17
- package/src/member.d.ts +40 -40
- package/src/plant.d.ts +82 -82
- package/src/plantSelection.d.ts +8 -8
- package/src/plants.api.d.ts +54 -47
- package/src/selection.d.ts +52 -52
- package/src/task.d.ts +40 -40
- package/src/users.api.d.ts +39 -39
- package/tsconfig.json +110 -110
package/README.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
# La Main Verte - Shared TypeScript Interfaces
|
|
2
|
-
|
|
3
|
-
This package contains the TypeScript interfaces used for the front-end of La Main Verte application.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
To install the package, run:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
|
|
11
|
-
npm install @la-main-verte/shared-types
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Usage
|
|
15
|
-
|
|
16
|
-
You can import the interfaces directly into your project:
|
|
17
|
-
|
|
18
|
-
```ts
|
|
19
|
-
import type { PlantI, NoteI } from '@la-main-verte/shared-types'
|
|
20
|
-
|
|
21
|
-
const plant: PlantI = await APIResponse.json()
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## License
|
|
25
|
-
|
|
26
|
-
This package is licensed under the MIT License.
|
|
1
|
+
# La Main Verte - Shared TypeScript Interfaces
|
|
2
|
+
|
|
3
|
+
This package contains the TypeScript interfaces used for the front-end of La Main Verte application.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
To install the package, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
|
|
11
|
+
npm install @la-main-verte/shared-types
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
You can import the interfaces directly into your project:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import type { PlantI, NoteI } from '@la-main-verte/shared-types'
|
|
20
|
+
|
|
21
|
+
const plant: PlantI = await APIResponse.json()
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
This package is licensed under the MIT License.
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@la-main-verte/shared-types",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Shared TypeScript interfaces for frontend of la-main-verte app",
|
|
5
|
-
"main": "src/index.js",
|
|
6
|
-
"types": "src/index.d.ts",
|
|
7
|
-
"author": "lamainverte.ca",
|
|
8
|
-
"license": "MIT",
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"typescript": "^5.6.3"
|
|
11
|
-
},
|
|
12
|
-
"devDependencies": {},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@la-main-verte/shared-types",
|
|
3
|
+
"version": "1.0.43",
|
|
4
|
+
"description": "Shared TypeScript interfaces for frontend of la-main-verte app",
|
|
5
|
+
"main": "src/index.js",
|
|
6
|
+
"types": "src/index.d.ts",
|
|
7
|
+
"author": "lamainverte.ca",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"typescript": "^5.6.3"
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
15
|
+
}
|
|
16
|
+
}
|
package/src/alert.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export interface AlertI {
|
|
2
|
-
id: number
|
|
3
|
-
tags: AlertTagI[]
|
|
4
|
-
icon: IconName
|
|
5
|
-
/**
|
|
6
|
-
* ColourCode of the icon
|
|
7
|
-
* Ex: #ffffff
|
|
8
|
-
*/
|
|
9
|
-
iconColor: string
|
|
10
|
-
message: string
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface AlertTagI {
|
|
14
|
-
name: string
|
|
15
|
-
/**
|
|
16
|
-
* ColourCode of the alert tag background
|
|
17
|
-
* Ex: #ffffff
|
|
18
|
-
*/
|
|
19
|
-
backgroundColor: string
|
|
20
|
-
/**
|
|
21
|
-
* ColourCode of the alert tag text
|
|
22
|
-
* Ex: #ffffff
|
|
23
|
-
*/
|
|
24
|
-
textColor: string
|
|
25
|
-
}
|
|
1
|
+
export interface AlertI {
|
|
2
|
+
id: number
|
|
3
|
+
tags: AlertTagI[]
|
|
4
|
+
icon: IconName
|
|
5
|
+
/**
|
|
6
|
+
* ColourCode of the icon
|
|
7
|
+
* Ex: #ffffff
|
|
8
|
+
*/
|
|
9
|
+
iconColor: string
|
|
10
|
+
message: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface AlertTagI {
|
|
14
|
+
name: string
|
|
15
|
+
/**
|
|
16
|
+
* ColourCode of the alert tag background
|
|
17
|
+
* Ex: #ffffff
|
|
18
|
+
*/
|
|
19
|
+
backgroundColor: string
|
|
20
|
+
/**
|
|
21
|
+
* ColourCode of the alert tag text
|
|
22
|
+
* Ex: #ffffff
|
|
23
|
+
*/
|
|
24
|
+
textColor: string
|
|
25
|
+
}
|
package/src/apiError.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
export interface ApiErrorI {
|
|
2
|
-
/**
|
|
3
|
-
* Literally describe what the server error is, ideally in the language of the user
|
|
4
|
-
*/
|
|
5
|
-
error_message?: string
|
|
6
|
-
/**
|
|
7
|
-
* A string code to identify the error
|
|
8
|
-
*/
|
|
9
|
-
error_type?:
|
|
10
|
-
| 'not_identified'
|
|
11
|
-
| 'invalid_request'
|
|
12
|
-
| 'subscription_required'
|
|
13
|
-
| 'internal_server_error'
|
|
14
|
-
| 'resource_already_exists'
|
|
15
|
-
| 'not_found'
|
|
16
|
-
| 'app_update_required'
|
|
17
|
-
| string
|
|
18
|
-
/**
|
|
19
|
-
* A numerical code that can be used to identify the error
|
|
20
|
-
* Ex: 401, 403, 404, 500 or L12, L13, L14
|
|
21
|
-
*/
|
|
22
|
-
error_code?: string | number
|
|
23
|
-
/**
|
|
24
|
-
* A string that can be used to suggest a solution to the user
|
|
25
|
-
* Ex: "Please check your internet connection and try again."
|
|
26
|
-
*/
|
|
27
|
-
error_suggestion?: string
|
|
28
|
-
}
|
|
1
|
+
export interface ApiErrorI {
|
|
2
|
+
/**
|
|
3
|
+
* Literally describe what the server error is, ideally in the language of the user
|
|
4
|
+
*/
|
|
5
|
+
error_message?: string
|
|
6
|
+
/**
|
|
7
|
+
* A string code to identify the error
|
|
8
|
+
*/
|
|
9
|
+
error_type?:
|
|
10
|
+
| 'not_identified'
|
|
11
|
+
| 'invalid_request'
|
|
12
|
+
| 'subscription_required'
|
|
13
|
+
| 'internal_server_error'
|
|
14
|
+
| 'resource_already_exists'
|
|
15
|
+
| 'not_found'
|
|
16
|
+
| 'app_update_required'
|
|
17
|
+
| string
|
|
18
|
+
/**
|
|
19
|
+
* A numerical code that can be used to identify the error
|
|
20
|
+
* Ex: 401, 403, 404, 500 or L12, L13, L14
|
|
21
|
+
*/
|
|
22
|
+
error_code?: string | number
|
|
23
|
+
/**
|
|
24
|
+
* A string that can be used to suggest a solution to the user
|
|
25
|
+
* Ex: "Please check your internet connection and try again."
|
|
26
|
+
*/
|
|
27
|
+
error_suggestion?: string
|
|
28
|
+
}
|
package/src/calendarView.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface CalendarViewI {
|
|
2
|
-
id: number
|
|
3
|
-
title: string
|
|
4
|
-
slug: string
|
|
5
|
-
orderBy: 'startDate' | 'name'
|
|
6
|
-
Plants: PlantI[]
|
|
7
|
-
}
|
|
1
|
+
export interface CalendarViewI {
|
|
2
|
+
id: number
|
|
3
|
+
title: string
|
|
4
|
+
slug: string
|
|
5
|
+
orderBy: 'startDate' | 'name'
|
|
6
|
+
Plants: PlantI[]
|
|
7
|
+
}
|
package/src/device.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { Model } from 'sequelize'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Raw Data returned by the device model
|
|
5
|
-
* Device.toJSON() will return this data
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Raw Data returned by the device model
|
|
9
|
-
* Device.toJSON() will return this data
|
|
10
|
-
*/
|
|
11
|
-
type DeviceDataI = {
|
|
12
|
-
/** Unique identifier for the device */
|
|
13
|
-
id: string
|
|
14
|
-
/** Identifier for the user associated with the device (UUID) */
|
|
15
|
-
memberId: string
|
|
16
|
-
/** Optional push notification key */
|
|
17
|
-
pushKey?: string
|
|
18
|
-
/** Unique identifier for the device (UUID) */
|
|
19
|
-
uuid: string
|
|
20
|
-
/** RAW User agent string from the device */
|
|
21
|
-
userAgent: string
|
|
22
|
-
/** Optional platform (e.g., 'ios', 'android', 'windows') */
|
|
23
|
-
platform?: 'ios' | 'android' | 'windows'
|
|
24
|
-
/** Optional version of the device */
|
|
25
|
-
version?: string
|
|
26
|
-
/** Optional model of the device */
|
|
27
|
-
model?: string
|
|
28
|
-
/** Optional name of the device */
|
|
29
|
-
name?: string
|
|
30
|
-
/** Optional app version of the device. Ex: 1.0.0 */
|
|
31
|
-
appVersion?: string
|
|
32
|
-
/** Timestamp of when the device was created */
|
|
33
|
-
createdAt: Date
|
|
34
|
-
/** Timestamp of when the device was last updated */
|
|
35
|
-
updatedAt: Date
|
|
36
|
-
}
|
|
37
|
-
interface DeviceModelI extends Model<DeviceDataI> {}
|
|
1
|
+
import { Model } from 'sequelize'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Raw Data returned by the device model
|
|
5
|
+
* Device.toJSON() will return this data
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Raw Data returned by the device model
|
|
9
|
+
* Device.toJSON() will return this data
|
|
10
|
+
*/
|
|
11
|
+
type DeviceDataI = {
|
|
12
|
+
/** Unique identifier for the device */
|
|
13
|
+
id: string
|
|
14
|
+
/** Identifier for the user associated with the device (UUID) */
|
|
15
|
+
memberId: string
|
|
16
|
+
/** Optional push notification key */
|
|
17
|
+
pushKey?: string
|
|
18
|
+
/** Unique identifier for the device (UUID) */
|
|
19
|
+
uuid: string
|
|
20
|
+
/** RAW User agent string from the device */
|
|
21
|
+
userAgent: string
|
|
22
|
+
/** Optional platform (e.g., 'ios', 'android', 'windows') */
|
|
23
|
+
platform?: 'ios' | 'android' | 'windows'
|
|
24
|
+
/** Optional version of the device */
|
|
25
|
+
version?: string
|
|
26
|
+
/** Optional model of the device */
|
|
27
|
+
model?: string
|
|
28
|
+
/** Optional name of the device */
|
|
29
|
+
name?: string
|
|
30
|
+
/** Optional app version of the device. Ex: 1.0.0 */
|
|
31
|
+
appVersion?: string
|
|
32
|
+
/** Timestamp of when the device was created */
|
|
33
|
+
createdAt: Date
|
|
34
|
+
/** Timestamp of when the device was last updated */
|
|
35
|
+
updatedAt: Date
|
|
36
|
+
}
|
|
37
|
+
interface DeviceModelI extends Model<DeviceDataI> {}
|
package/src/gardenMap.d.ts
CHANGED
|
@@ -1,67 +1,69 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A gardenMap is a collection of garden zones
|
|
3
|
-
*/
|
|
4
|
-
export interface GardenMapI {
|
|
5
|
-
id: number
|
|
6
|
-
memberId: number
|
|
7
|
-
GardenZones: GardenZoneI[]
|
|
8
|
-
createdAt: Date
|
|
9
|
-
updatedAt: Date
|
|
10
|
-
}
|
|
11
|
-
export interface GardenZoneI {
|
|
12
|
-
id: number
|
|
13
|
-
name: string | null
|
|
14
|
-
gardenMapId: number
|
|
15
|
-
widthInMeters: number
|
|
16
|
-
heightInMeters: number
|
|
17
|
-
diameterInMeters: number
|
|
18
|
-
shape: 'rectangle' | 'circle'
|
|
19
|
-
xPosition: number
|
|
20
|
-
yPosition: number | null
|
|
21
|
-
zIndex: number
|
|
22
|
-
order: number
|
|
23
|
-
totalSurfaceInSquareMeters: number
|
|
24
|
-
totalSurfaceInSquareFeet: number
|
|
25
|
-
backgroundColor: string
|
|
26
|
-
createdAt: Date
|
|
27
|
-
updatedAt: Date
|
|
28
|
-
/**
|
|
29
|
-
* Orientation virtual field ONLY USE FOR RECTANGLES
|
|
30
|
-
* --------------------------------
|
|
31
|
-
* Disregard if the shape is a circle or square. It will return 'vertical'
|
|
32
|
-
*/
|
|
33
|
-
orientation: 'horizontal' | 'vertical'
|
|
34
|
-
/**
|
|
35
|
-
* NOT USED BY THE FRONTEND YET - Use GardenZoneCulture instead
|
|
36
|
-
*/
|
|
37
|
-
GardenZoneCultures?: GardenZoneCultureI[]
|
|
38
|
-
/**
|
|
39
|
-
* The culture on the GardenZone
|
|
40
|
-
*/
|
|
41
|
-
GardenZoneCulture?: GardenZoneCultureI
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface GardenZoneCultureI {
|
|
45
|
-
id: number
|
|
46
|
-
gardenZoneId: number
|
|
47
|
-
plantSelectionId: number
|
|
48
|
-
seedQuantity: number
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
*
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A gardenMap is a collection of garden zones
|
|
3
|
+
*/
|
|
4
|
+
export interface GardenMapI {
|
|
5
|
+
id: number
|
|
6
|
+
memberId: number
|
|
7
|
+
GardenZones: GardenZoneI[]
|
|
8
|
+
createdAt: Date
|
|
9
|
+
updatedAt: Date
|
|
10
|
+
}
|
|
11
|
+
export interface GardenZoneI {
|
|
12
|
+
id: number
|
|
13
|
+
name: string | null
|
|
14
|
+
gardenMapId: number
|
|
15
|
+
widthInMeters: number
|
|
16
|
+
heightInMeters: number
|
|
17
|
+
diameterInMeters: number
|
|
18
|
+
shape: 'rectangle' | 'circle'
|
|
19
|
+
xPosition: number
|
|
20
|
+
yPosition: number | null
|
|
21
|
+
zIndex: number
|
|
22
|
+
order: number
|
|
23
|
+
totalSurfaceInSquareMeters: number
|
|
24
|
+
totalSurfaceInSquareFeet: number
|
|
25
|
+
backgroundColor: string
|
|
26
|
+
createdAt: Date
|
|
27
|
+
updatedAt: Date
|
|
28
|
+
/**
|
|
29
|
+
* Orientation virtual field ONLY USE FOR RECTANGLES
|
|
30
|
+
* --------------------------------
|
|
31
|
+
* Disregard if the shape is a circle or square. It will return 'vertical'
|
|
32
|
+
*/
|
|
33
|
+
orientation: 'horizontal' | 'vertical'
|
|
34
|
+
/**
|
|
35
|
+
* NOT USED BY THE FRONTEND YET - Use GardenZoneCulture instead
|
|
36
|
+
*/
|
|
37
|
+
GardenZoneCultures?: GardenZoneCultureI[]
|
|
38
|
+
/**
|
|
39
|
+
* The culture on the GardenZone
|
|
40
|
+
*/
|
|
41
|
+
GardenZoneCulture?: GardenZoneCultureI
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface GardenZoneCultureI {
|
|
45
|
+
id: number
|
|
46
|
+
gardenZoneId: number
|
|
47
|
+
plantSelectionId: number
|
|
48
|
+
seedQuantity: number
|
|
49
|
+
densityMode: 'dense' | 'sparse' | 'custom'
|
|
50
|
+
/**
|
|
51
|
+
* The year of the culture - do not use it yet.
|
|
52
|
+
* @deprecated Potentially a mistake to have this field here
|
|
53
|
+
*/
|
|
54
|
+
yearOfCulture: number
|
|
55
|
+
PlantSelection?: PlantSelectionI
|
|
56
|
+
/**
|
|
57
|
+
* The number of alleys
|
|
58
|
+
* --------------------------------
|
|
59
|
+
* Value is computed by the backend and NOT coming from the DB.
|
|
60
|
+
*/
|
|
61
|
+
numberOfAlleys?: number
|
|
62
|
+
/**
|
|
63
|
+
* The number of seeds per alley
|
|
64
|
+
* --------------------------------
|
|
65
|
+
* Value is computed by the backend and NOT coming from the DB.
|
|
66
|
+
*/
|
|
67
|
+
numberOfSeedsPerAlley?: number
|
|
68
|
+
fertilizerQuantitySuggested?: string
|
|
69
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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 './alert'
|
|
10
|
-
import * as PlantsAPI from './plants.api'
|
|
11
|
-
import * as UsersAPI from './users.api'
|
|
12
|
-
|
|
13
|
-
// Allow access to the API namespaces without conflicts
|
|
14
|
-
export namespace API {
|
|
15
|
-
export import PLANTS = PlantsAPI
|
|
16
|
-
export import USERS = UsersAPI
|
|
17
|
-
}
|
|
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 './alert'
|
|
10
|
+
import * as PlantsAPI from './plants.api'
|
|
11
|
+
import * as UsersAPI from './users.api'
|
|
12
|
+
|
|
13
|
+
// Allow access to the API namespaces without conflicts
|
|
14
|
+
export namespace API {
|
|
15
|
+
export import PLANTS = PlantsAPI
|
|
16
|
+
export import USERS = UsersAPI
|
|
17
|
+
}
|
package/src/member.d.ts
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
export interface MemberI {
|
|
2
|
-
id: number
|
|
3
|
-
email: string
|
|
4
|
-
firstName: string
|
|
5
|
-
lastName: string
|
|
6
|
-
city?: string
|
|
7
|
-
hardinessZoneName?: string
|
|
8
|
-
createdAt: Date
|
|
9
|
-
updatedAt: Date
|
|
10
|
-
lastFreezingDate?: Date
|
|
11
|
-
firstFreezingDate?: Date
|
|
12
|
-
notes?: NoteI[]
|
|
13
|
-
selections?: SelectionI[]
|
|
14
|
-
userActivities?: UserActivityI[]
|
|
15
|
-
/**
|
|
16
|
-
* hasAnActiveSubscription is a VIRTUAL FIELD used to check if the user has an active subscription
|
|
17
|
-
*/
|
|
18
|
-
hasAnActiveSubscription?: boolean
|
|
19
|
-
/**
|
|
20
|
-
* Acts as a one-way not identifiable token.
|
|
21
|
-
* Crisp and other services like Upvoty use this token to identify the user
|
|
22
|
-
*/
|
|
23
|
-
userToken: string
|
|
24
|
-
/**
|
|
25
|
-
* neverAddedATask <=> Has the use ever open the task form?
|
|
26
|
-
* Yes it is misleading, ticket is open to change it.
|
|
27
|
-
* It was too intense to force the user to add a task.
|
|
28
|
-
*/
|
|
29
|
-
neverAddedATask?: boolean
|
|
30
|
-
neverAddedAPlant?: boolean
|
|
31
|
-
neverAddedANote?: boolean
|
|
32
|
-
neverTriedSpacingSection?: boolean
|
|
33
|
-
neverTriedAiAgent?: boolean
|
|
34
|
-
neverDeletedAPlant?: boolean
|
|
35
|
-
neverDeletedATask?: boolean
|
|
36
|
-
neverEditedATask?: boolean
|
|
37
|
-
finishedOnboarding: boolean
|
|
38
|
-
hasDownloadedNativeApp?: boolean
|
|
39
|
-
unitSystem: 'imperial' | 'metric'
|
|
40
|
-
}
|
|
1
|
+
export interface MemberI {
|
|
2
|
+
id: number
|
|
3
|
+
email: string
|
|
4
|
+
firstName: string
|
|
5
|
+
lastName: string
|
|
6
|
+
city?: string
|
|
7
|
+
hardinessZoneName?: string
|
|
8
|
+
createdAt: Date
|
|
9
|
+
updatedAt: Date
|
|
10
|
+
lastFreezingDate?: Date
|
|
11
|
+
firstFreezingDate?: Date
|
|
12
|
+
notes?: NoteI[]
|
|
13
|
+
selections?: SelectionI[]
|
|
14
|
+
userActivities?: UserActivityI[]
|
|
15
|
+
/**
|
|
16
|
+
* hasAnActiveSubscription is a VIRTUAL FIELD used to check if the user has an active subscription
|
|
17
|
+
*/
|
|
18
|
+
hasAnActiveSubscription?: boolean
|
|
19
|
+
/**
|
|
20
|
+
* Acts as a one-way not identifiable token.
|
|
21
|
+
* Crisp and other services like Upvoty use this token to identify the user
|
|
22
|
+
*/
|
|
23
|
+
userToken: string
|
|
24
|
+
/**
|
|
25
|
+
* neverAddedATask <=> Has the use ever open the task form?
|
|
26
|
+
* Yes it is misleading, ticket is open to change it.
|
|
27
|
+
* It was too intense to force the user to add a task.
|
|
28
|
+
*/
|
|
29
|
+
neverAddedATask?: boolean
|
|
30
|
+
neverAddedAPlant?: boolean
|
|
31
|
+
neverAddedANote?: boolean
|
|
32
|
+
neverTriedSpacingSection?: boolean
|
|
33
|
+
neverTriedAiAgent?: boolean
|
|
34
|
+
neverDeletedAPlant?: boolean
|
|
35
|
+
neverDeletedATask?: boolean
|
|
36
|
+
neverEditedATask?: boolean
|
|
37
|
+
finishedOnboarding: boolean
|
|
38
|
+
hasDownloadedNativeApp?: boolean
|
|
39
|
+
unitSystem: 'imperial' | 'metric'
|
|
40
|
+
}
|