@la-main-verte/shared-types 1.0.39 → 1.0.40
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/apiError.d.ts +28 -28
- package/src/calendarView.d.ts +7 -7
- package/src/device.d.ts +37 -37
- package/src/gardenMap.d.ts +67 -66
- package/src/index.ts +16 -16
- 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 +47 -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.40",
|
|
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/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,66 +1,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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
*
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
+
* The year of the culture - do not use it yet.
|
|
51
|
+
* @deprecated Potentially a mistake to have this field here
|
|
52
|
+
*/
|
|
53
|
+
yearOfCulture: number
|
|
54
|
+
PlantSelection?: PlantSelectionI
|
|
55
|
+
/**
|
|
56
|
+
* The number of alleys
|
|
57
|
+
* --------------------------------
|
|
58
|
+
* Value is computed by the backend and NOT coming from the DB.
|
|
59
|
+
*/
|
|
60
|
+
numberOfAlleys?: number
|
|
61
|
+
/**
|
|
62
|
+
* The number of seeds per alley
|
|
63
|
+
* --------------------------------
|
|
64
|
+
* Value is computed by the backend and NOT coming from the DB.
|
|
65
|
+
*/
|
|
66
|
+
numberOfSeedsPerAlley?: number
|
|
67
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
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
|
-
import * as PlantsAPI from './plants.api'
|
|
10
|
-
import * as UsersAPI from './users.api'
|
|
11
|
-
|
|
12
|
-
// Allow access to the API namespaces without conflicts
|
|
13
|
-
export namespace API {
|
|
14
|
-
export import PLANTS = PlantsAPI
|
|
15
|
-
export import USERS = UsersAPI
|
|
16
|
-
}
|
|
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
|
+
import * as PlantsAPI from './plants.api'
|
|
10
|
+
import * as UsersAPI from './users.api'
|
|
11
|
+
|
|
12
|
+
// Allow access to the API namespaces without conflicts
|
|
13
|
+
export namespace API {
|
|
14
|
+
export import PLANTS = PlantsAPI
|
|
15
|
+
export import USERS = UsersAPI
|
|
16
|
+
}
|
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
|
+
}
|
package/src/plant.d.ts
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
export interface PlantI {
|
|
2
|
-
id: number
|
|
3
|
-
name: string
|
|
4
|
-
slug: string
|
|
5
|
-
description: string
|
|
6
|
-
descriptionSource?: string
|
|
7
|
-
female: boolean
|
|
8
|
-
family?: string | null
|
|
9
|
-
spaceBetweenSeedMin: number
|
|
10
|
-
spaceBetweenSeedMax: number
|
|
11
|
-
spaceBetweenAlleyMin: number
|
|
12
|
-
spaceBetweenAlleyMax: number
|
|
13
|
-
weeksInTransplant: number
|
|
14
|
-
weeksDuringWhichYouCanSeedOutdoor: number
|
|
15
|
-
weeksToMaturity: number
|
|
16
|
-
weeksToWaitAfterFreezingDate: number
|
|
17
|
-
weeksToHarvest: number
|
|
18
|
-
indoorSeeding: boolean
|
|
19
|
-
outdoorSeeding: boolean
|
|
20
|
-
azoteNeedsKgPerHa: number
|
|
21
|
-
hibernate: boolean
|
|
22
|
-
germinationTemperature: number | null
|
|
23
|
-
minGerminationTemperature: number | null
|
|
24
|
-
germinationNumberOfDays: string | null
|
|
25
|
-
germinationSeedDepth: string | null
|
|
26
|
-
cultivationInfo: string | null
|
|
27
|
-
parentId: number | null
|
|
28
|
-
memberId?: number
|
|
29
|
-
shared: boolean
|
|
30
|
-
hexColor: string | null
|
|
31
|
-
sunRequirements: 'partialShade' | 'fullSun' | 'fullShade' | null
|
|
32
|
-
isHardy: boolean | null
|
|
33
|
-
imageURL: string
|
|
34
|
-
totalWeeksToMaturity: number
|
|
35
|
-
hasNoInformation: boolean
|
|
36
|
-
createdAt: Date
|
|
37
|
-
updatedAt: Date
|
|
38
|
-
translatedSunRequirements: string
|
|
39
|
-
parent?: PlantI
|
|
40
|
-
children?: PlantI[]
|
|
41
|
-
PlantInventories?: PlantInventoryI[]
|
|
42
|
-
taggedItems?: TaggedItemI[]
|
|
43
|
-
/**
|
|
44
|
-
* List of selections that the plant is in.
|
|
45
|
-
* --------------------------------------
|
|
46
|
-
* Tends to be used for featured selections
|
|
47
|
-
*/
|
|
48
|
-
Selections?: SelectionI[]
|
|
49
|
-
tasks?: TaskI[]
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
interface PlantTagI {
|
|
53
|
-
name: string
|
|
54
|
-
/**
|
|
55
|
-
* Font color of the tag
|
|
56
|
-
* Ex: #ffffff
|
|
57
|
-
*/
|
|
58
|
-
fontColor: string
|
|
59
|
-
/**
|
|
60
|
-
* Background color of the tag
|
|
61
|
-
* Ex: #1B76E6
|
|
62
|
-
*/
|
|
63
|
-
backgroundColor: string
|
|
64
|
-
/**
|
|
65
|
-
* Font awesome Icon name
|
|
66
|
-
* Ex: 'tomato'
|
|
67
|
-
*/
|
|
68
|
-
iconName: string
|
|
69
|
-
/** Selection slug related to the tag */
|
|
70
|
-
slug: string
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
interface PlantInventoryI {
|
|
74
|
-
id: number
|
|
75
|
-
plantId: number
|
|
76
|
-
supplierName: string
|
|
77
|
-
plantName: string
|
|
78
|
-
supplierURL: string
|
|
79
|
-
imageLocation: string
|
|
80
|
-
description: string
|
|
81
|
-
inStock: boolean
|
|
82
|
-
}
|
|
1
|
+
export interface PlantI {
|
|
2
|
+
id: number
|
|
3
|
+
name: string
|
|
4
|
+
slug: string
|
|
5
|
+
description: string
|
|
6
|
+
descriptionSource?: string
|
|
7
|
+
female: boolean
|
|
8
|
+
family?: string | null
|
|
9
|
+
spaceBetweenSeedMin: number
|
|
10
|
+
spaceBetweenSeedMax: number
|
|
11
|
+
spaceBetweenAlleyMin: number
|
|
12
|
+
spaceBetweenAlleyMax: number
|
|
13
|
+
weeksInTransplant: number
|
|
14
|
+
weeksDuringWhichYouCanSeedOutdoor: number
|
|
15
|
+
weeksToMaturity: number
|
|
16
|
+
weeksToWaitAfterFreezingDate: number
|
|
17
|
+
weeksToHarvest: number
|
|
18
|
+
indoorSeeding: boolean
|
|
19
|
+
outdoorSeeding: boolean
|
|
20
|
+
azoteNeedsKgPerHa: number
|
|
21
|
+
hibernate: boolean
|
|
22
|
+
germinationTemperature: number | null
|
|
23
|
+
minGerminationTemperature: number | null
|
|
24
|
+
germinationNumberOfDays: string | null
|
|
25
|
+
germinationSeedDepth: string | null
|
|
26
|
+
cultivationInfo: string | null
|
|
27
|
+
parentId: number | null
|
|
28
|
+
memberId?: number
|
|
29
|
+
shared: boolean
|
|
30
|
+
hexColor: string | null
|
|
31
|
+
sunRequirements: 'partialShade' | 'fullSun' | 'fullShade' | null
|
|
32
|
+
isHardy: boolean | null
|
|
33
|
+
imageURL: string
|
|
34
|
+
totalWeeksToMaturity: number
|
|
35
|
+
hasNoInformation: boolean
|
|
36
|
+
createdAt: Date
|
|
37
|
+
updatedAt: Date
|
|
38
|
+
translatedSunRequirements: string
|
|
39
|
+
parent?: PlantI
|
|
40
|
+
children?: PlantI[]
|
|
41
|
+
PlantInventories?: PlantInventoryI[]
|
|
42
|
+
taggedItems?: TaggedItemI[]
|
|
43
|
+
/**
|
|
44
|
+
* List of selections that the plant is in.
|
|
45
|
+
* --------------------------------------
|
|
46
|
+
* Tends to be used for featured selections
|
|
47
|
+
*/
|
|
48
|
+
Selections?: SelectionI[]
|
|
49
|
+
tasks?: TaskI[]
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
interface PlantTagI {
|
|
53
|
+
name: string
|
|
54
|
+
/**
|
|
55
|
+
* Font color of the tag
|
|
56
|
+
* Ex: #ffffff
|
|
57
|
+
*/
|
|
58
|
+
fontColor: string
|
|
59
|
+
/**
|
|
60
|
+
* Background color of the tag
|
|
61
|
+
* Ex: #1B76E6
|
|
62
|
+
*/
|
|
63
|
+
backgroundColor: string
|
|
64
|
+
/**
|
|
65
|
+
* Font awesome Icon name
|
|
66
|
+
* Ex: 'tomato'
|
|
67
|
+
*/
|
|
68
|
+
iconName: string
|
|
69
|
+
/** Selection slug related to the tag */
|
|
70
|
+
slug: string
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface PlantInventoryI {
|
|
74
|
+
id: number
|
|
75
|
+
plantId: number
|
|
76
|
+
supplierName: string
|
|
77
|
+
plantName: string
|
|
78
|
+
supplierURL: string
|
|
79
|
+
imageLocation: string
|
|
80
|
+
description: string
|
|
81
|
+
inStock: boolean
|
|
82
|
+
}
|
package/src/plantSelection.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export interface PlantSelectionI {
|
|
2
|
-
id: number
|
|
3
|
-
plantId: number
|
|
4
|
-
selectionId: number
|
|
5
|
-
seedQuantity: number
|
|
6
|
-
createdAt: Date
|
|
7
|
-
updatedAt: Date
|
|
8
|
-
}
|
|
1
|
+
export interface PlantSelectionI {
|
|
2
|
+
id: number
|
|
3
|
+
plantId: number
|
|
4
|
+
selectionId: number
|
|
5
|
+
seedQuantity: number
|
|
6
|
+
createdAt: Date
|
|
7
|
+
updatedAt: Date
|
|
8
|
+
}
|
package/src/plants.api.d.ts
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { PlantI, PlantTagI } from './plant.d'
|
|
2
|
-
import { SelectionI } from './selection.d'
|
|
3
|
-
|
|
4
|
-
interface PlantExtendedDataI extends PlantI {
|
|
5
|
-
Selections: SelectionI[]
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export namespace PLANTS {
|
|
9
|
-
export namespace RECOMMENDATIONS {
|
|
10
|
-
/**
|
|
11
|
-
* Request parameters for plant recommendations
|
|
12
|
-
* @remarks identification by session token is optional
|
|
13
|
-
*/
|
|
14
|
-
export interface Request {
|
|
15
|
-
headers?: {
|
|
16
|
-
'x-session-token'?: string
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Response containing recommended plants with their tags
|
|
21
|
-
*/
|
|
22
|
-
export type Response = readonly PlantExtendedDataI[]
|
|
23
|
-
}
|
|
24
|
-
export namespace SEARCH {
|
|
25
|
-
/**
|
|
26
|
-
* Request parameters for plant recommendations
|
|
27
|
-
* @remarks identification by session token is optional
|
|
28
|
-
*/
|
|
29
|
-
export interface Request {
|
|
30
|
-
headers?: {
|
|
31
|
-
'x-session-token'?: string
|
|
32
|
-
}
|
|
33
|
-
query?: {
|
|
34
|
-
withAzoteNeedsKgPerHa?: boolean
|
|
35
|
-
withSpacing?: boolean
|
|
36
|
-
parentsOnly?: boolean
|
|
37
|
-
search?: string
|
|
38
|
-
family?: string
|
|
39
|
-
limit?: number
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Response containing search plants with their tags
|
|
44
|
-
*/
|
|
45
|
-
export type Response = readonly PlantExtendedDataI[]
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
import { PlantI, PlantTagI } from './plant.d'
|
|
2
|
+
import { SelectionI } from './selection.d'
|
|
3
|
+
|
|
4
|
+
interface PlantExtendedDataI extends PlantI {
|
|
5
|
+
Selections: SelectionI[]
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export namespace PLANTS {
|
|
9
|
+
export namespace RECOMMENDATIONS {
|
|
10
|
+
/**
|
|
11
|
+
* Request parameters for plant recommendations
|
|
12
|
+
* @remarks identification by session token is optional
|
|
13
|
+
*/
|
|
14
|
+
export interface Request {
|
|
15
|
+
headers?: {
|
|
16
|
+
'x-session-token'?: string
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Response containing recommended plants with their tags
|
|
21
|
+
*/
|
|
22
|
+
export type Response = readonly PlantExtendedDataI[]
|
|
23
|
+
}
|
|
24
|
+
export namespace SEARCH {
|
|
25
|
+
/**
|
|
26
|
+
* Request parameters for plant recommendations
|
|
27
|
+
* @remarks identification by session token is optional
|
|
28
|
+
*/
|
|
29
|
+
export interface Request {
|
|
30
|
+
headers?: {
|
|
31
|
+
'x-session-token'?: string
|
|
32
|
+
}
|
|
33
|
+
query?: {
|
|
34
|
+
withAzoteNeedsKgPerHa?: boolean
|
|
35
|
+
withSpacing?: boolean
|
|
36
|
+
parentsOnly?: boolean
|
|
37
|
+
search?: string
|
|
38
|
+
family?: string
|
|
39
|
+
limit?: number
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Response containing search plants with their tags
|
|
44
|
+
*/
|
|
45
|
+
export type Response = readonly PlantExtendedDataI[]
|
|
46
|
+
}
|
|
47
|
+
}
|
package/src/selection.d.ts
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
export interface SelectionI {
|
|
2
|
-
id: number
|
|
3
|
-
memberId: number
|
|
4
|
-
title: string
|
|
5
|
-
slug: string
|
|
6
|
-
description?: string
|
|
7
|
-
orderBy?: 'startDate' | 'name'
|
|
8
|
-
default?: boolean
|
|
9
|
-
viewsCount?: number
|
|
10
|
-
imageLocation?: string
|
|
11
|
-
imageURL?: string
|
|
12
|
-
/**
|
|
13
|
-
* Indicates if the selection is featured on the app (search, explore, etc).
|
|
14
|
-
**/
|
|
15
|
-
featured: boolean
|
|
16
|
-
/**
|
|
17
|
-
* Indicates if the selection is dynamically generated on the fly by the API.
|
|
18
|
-
* Ex: "What you can seed in March"
|
|
19
|
-
* INTERNAL USE ONLY
|
|
20
|
-
*/
|
|
21
|
-
isDynamic: boolean
|
|
22
|
-
/**
|
|
23
|
-
* Background color of the selection, for UI purposes.
|
|
24
|
-
*/
|
|
25
|
-
backgroundColor: string | null
|
|
26
|
-
/**
|
|
27
|
-
* Font color of the selection, for UI purposes.
|
|
28
|
-
*/
|
|
29
|
-
fontColor: string | null
|
|
30
|
-
/**
|
|
31
|
-
* Font awesome icon name of the selection, for UI purposes.
|
|
32
|
-
* -----------------------------------------
|
|
33
|
-
* Not all icons are available in the react-native-app. Must be explicitly declared first.
|
|
34
|
-
* Ex: 'fa-bag-seedling', 'fa-bug', etc.
|
|
35
|
-
*/
|
|
36
|
-
iconName: string | null
|
|
37
|
-
link?: string
|
|
38
|
-
sharingURL?: string
|
|
39
|
-
createdAt: Date
|
|
40
|
-
updatedAt: Date
|
|
41
|
-
Plants?: PlantI[]
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Those are the different possible types for a selection.
|
|
46
|
-
*/
|
|
47
|
-
export type SelectionType = 'Serre' | 'Potager' | 'Recette' | 'Coup de coeur' | "Jardin d'intérieur" | 'Autres'
|
|
48
|
-
|
|
49
|
-
export interface SelectionTypeI {
|
|
50
|
-
name: SelectionType
|
|
51
|
-
iconName?: IconName
|
|
52
|
-
}
|
|
1
|
+
export interface SelectionI {
|
|
2
|
+
id: number
|
|
3
|
+
memberId: number
|
|
4
|
+
title: string
|
|
5
|
+
slug: string
|
|
6
|
+
description?: string
|
|
7
|
+
orderBy?: 'startDate' | 'name'
|
|
8
|
+
default?: boolean
|
|
9
|
+
viewsCount?: number
|
|
10
|
+
imageLocation?: string
|
|
11
|
+
imageURL?: string
|
|
12
|
+
/**
|
|
13
|
+
* Indicates if the selection is featured on the app (search, explore, etc).
|
|
14
|
+
**/
|
|
15
|
+
featured: boolean
|
|
16
|
+
/**
|
|
17
|
+
* Indicates if the selection is dynamically generated on the fly by the API.
|
|
18
|
+
* Ex: "What you can seed in March"
|
|
19
|
+
* INTERNAL USE ONLY
|
|
20
|
+
*/
|
|
21
|
+
isDynamic: boolean
|
|
22
|
+
/**
|
|
23
|
+
* Background color of the selection, for UI purposes.
|
|
24
|
+
*/
|
|
25
|
+
backgroundColor: string | null
|
|
26
|
+
/**
|
|
27
|
+
* Font color of the selection, for UI purposes.
|
|
28
|
+
*/
|
|
29
|
+
fontColor: string | null
|
|
30
|
+
/**
|
|
31
|
+
* Font awesome icon name of the selection, for UI purposes.
|
|
32
|
+
* -----------------------------------------
|
|
33
|
+
* Not all icons are available in the react-native-app. Must be explicitly declared first.
|
|
34
|
+
* Ex: 'fa-bag-seedling', 'fa-bug', etc.
|
|
35
|
+
*/
|
|
36
|
+
iconName: string | null
|
|
37
|
+
link?: string
|
|
38
|
+
sharingURL?: string
|
|
39
|
+
createdAt: Date
|
|
40
|
+
updatedAt: Date
|
|
41
|
+
Plants?: PlantI[]
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Those are the different possible types for a selection.
|
|
46
|
+
*/
|
|
47
|
+
export type SelectionType = 'Serre' | 'Potager' | 'Recette' | 'Coup de coeur' | "Jardin d'intérieur" | 'Autres'
|
|
48
|
+
|
|
49
|
+
export interface SelectionTypeI {
|
|
50
|
+
name: SelectionType
|
|
51
|
+
iconName?: IconName
|
|
52
|
+
}
|
package/src/task.d.ts
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
export interface TaskI {
|
|
2
|
-
id: number
|
|
3
|
-
name: string
|
|
4
|
-
startDate: Date
|
|
5
|
-
endDate?: Date
|
|
6
|
-
/**
|
|
7
|
-
* ColourCode of the task
|
|
8
|
-
* Ex: #ffffff
|
|
9
|
-
*/
|
|
10
|
-
colourCode: string
|
|
11
|
-
iconName?: string
|
|
12
|
-
private: boolean
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Represents predefined task tags used in the task creation/modification form.
|
|
17
|
-
* There are just a few Tasks that have their own tags
|
|
18
|
-
* and they just have a name a colourCode and an optional iconName similar to the Task they represent
|
|
19
|
-
*/
|
|
20
|
-
export interface TaskTagI {
|
|
21
|
-
name: string
|
|
22
|
-
/**
|
|
23
|
-
* ColourCode of the task
|
|
24
|
-
* Ex: #ffffff
|
|
25
|
-
*/
|
|
26
|
-
colourCode: string
|
|
27
|
-
iconName?: string
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Data used to create or edit a task
|
|
32
|
-
*/
|
|
33
|
-
export interface TaskFormDataI {
|
|
34
|
-
name: string
|
|
35
|
-
startDate: Date
|
|
36
|
-
endDate?: Date
|
|
37
|
-
colourCode: string
|
|
38
|
-
iconName?: string
|
|
39
|
-
private: boolean
|
|
40
|
-
}
|
|
1
|
+
export interface TaskI {
|
|
2
|
+
id: number
|
|
3
|
+
name: string
|
|
4
|
+
startDate: Date
|
|
5
|
+
endDate?: Date
|
|
6
|
+
/**
|
|
7
|
+
* ColourCode of the task
|
|
8
|
+
* Ex: #ffffff
|
|
9
|
+
*/
|
|
10
|
+
colourCode: string
|
|
11
|
+
iconName?: string
|
|
12
|
+
private: boolean
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents predefined task tags used in the task creation/modification form.
|
|
17
|
+
* There are just a few Tasks that have their own tags
|
|
18
|
+
* and they just have a name a colourCode and an optional iconName similar to the Task they represent
|
|
19
|
+
*/
|
|
20
|
+
export interface TaskTagI {
|
|
21
|
+
name: string
|
|
22
|
+
/**
|
|
23
|
+
* ColourCode of the task
|
|
24
|
+
* Ex: #ffffff
|
|
25
|
+
*/
|
|
26
|
+
colourCode: string
|
|
27
|
+
iconName?: string
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Data used to create or edit a task
|
|
32
|
+
*/
|
|
33
|
+
export interface TaskFormDataI {
|
|
34
|
+
name: string
|
|
35
|
+
startDate: Date
|
|
36
|
+
endDate?: Date
|
|
37
|
+
colourCode: string
|
|
38
|
+
iconName?: string
|
|
39
|
+
private: boolean
|
|
40
|
+
}
|
package/src/users.api.d.ts
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import type { DeviceDataI } from './device.d'
|
|
2
|
-
import type { MemberI as MemberDataI } from './member.d'
|
|
3
|
-
|
|
4
|
-
interface RequestHeaders {
|
|
5
|
-
'x-session-token': string
|
|
6
|
-
'x-app-version'?: string
|
|
7
|
-
'x-application-type'?: 'react-native' | 'web'
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export namespace USERS {
|
|
11
|
-
export namespace GET {
|
|
12
|
-
export interface Request {
|
|
13
|
-
headers: RequestHeaders
|
|
14
|
-
params: {
|
|
15
|
-
scopes: ('unreadNotificationsCount' | 'coordinates')[]
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export type Response = MemberDataI & {
|
|
19
|
-
unreadAlertsCount?: number
|
|
20
|
-
unreadMessagesCount?: number
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export namespace DEVICES {
|
|
24
|
-
export interface Request {
|
|
25
|
-
headers: RequestHeaders
|
|
26
|
-
body: {
|
|
27
|
-
/** @see DeviceDataI */
|
|
28
|
-
userAgent?: DeviceDataI['userAgent']
|
|
29
|
-
platform?: DeviceDataI['platform']
|
|
30
|
-
version?: DeviceDataI['version']
|
|
31
|
-
model?: DeviceDataI['model']
|
|
32
|
-
name?: DeviceDataI['name']
|
|
33
|
-
appVersion?: DeviceDataI['appVersion']
|
|
34
|
-
pushKey?: DeviceDataI['pushKey']
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
export type Response = DeviceDataI
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
import type { DeviceDataI } from './device.d'
|
|
2
|
+
import type { MemberI as MemberDataI } from './member.d'
|
|
3
|
+
|
|
4
|
+
interface RequestHeaders {
|
|
5
|
+
'x-session-token': string
|
|
6
|
+
'x-app-version'?: string
|
|
7
|
+
'x-application-type'?: 'react-native' | 'web'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export namespace USERS {
|
|
11
|
+
export namespace GET {
|
|
12
|
+
export interface Request {
|
|
13
|
+
headers: RequestHeaders
|
|
14
|
+
params: {
|
|
15
|
+
scopes: ('unreadNotificationsCount' | 'coordinates')[]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export type Response = MemberDataI & {
|
|
19
|
+
unreadAlertsCount?: number
|
|
20
|
+
unreadMessagesCount?: number
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export namespace DEVICES {
|
|
24
|
+
export interface Request {
|
|
25
|
+
headers: RequestHeaders
|
|
26
|
+
body: {
|
|
27
|
+
/** @see DeviceDataI */
|
|
28
|
+
userAgent?: DeviceDataI['userAgent']
|
|
29
|
+
platform?: DeviceDataI['platform']
|
|
30
|
+
version?: DeviceDataI['version']
|
|
31
|
+
model?: DeviceDataI['model']
|
|
32
|
+
name?: DeviceDataI['name']
|
|
33
|
+
appVersion?: DeviceDataI['appVersion']
|
|
34
|
+
pushKey?: DeviceDataI['pushKey']
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export type Response = DeviceDataI
|
|
38
|
+
}
|
|
39
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
/* Visit https://aka.ms/tsconfig to read more about this file */
|
|
4
|
-
|
|
5
|
-
/* Projects */
|
|
6
|
-
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
|
7
|
-
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
8
|
-
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
|
9
|
-
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
|
10
|
-
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
11
|
-
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
12
|
-
|
|
13
|
-
/* Language and Environment */
|
|
14
|
-
"target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
|
15
|
-
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
16
|
-
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
|
17
|
-
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
|
|
18
|
-
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
19
|
-
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
|
20
|
-
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
21
|
-
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
|
22
|
-
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
|
23
|
-
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
24
|
-
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
25
|
-
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
26
|
-
|
|
27
|
-
/* Modules */
|
|
28
|
-
"module": "commonjs" /* Specify what module code is generated. */,
|
|
29
|
-
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
30
|
-
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
|
31
|
-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
32
|
-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
33
|
-
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
34
|
-
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
|
35
|
-
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
|
36
|
-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
37
|
-
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
|
38
|
-
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
|
|
39
|
-
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
|
|
40
|
-
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
|
|
41
|
-
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
|
|
42
|
-
// "resolveJsonModule": true, /* Enable importing .json files. */
|
|
43
|
-
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
|
44
|
-
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
|
45
|
-
|
|
46
|
-
/* JavaScript Support */
|
|
47
|
-
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
|
48
|
-
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
49
|
-
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
50
|
-
|
|
51
|
-
/* Emit */
|
|
52
|
-
"declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
|
|
53
|
-
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
54
|
-
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
55
|
-
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
56
|
-
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
57
|
-
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
|
58
|
-
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
59
|
-
// "removeComments": true, /* Disable emitting comments. */
|
|
60
|
-
// "noEmit": true, /* Disable emitting files from a compilation. */
|
|
61
|
-
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
62
|
-
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
63
|
-
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
64
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
65
|
-
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
66
|
-
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
67
|
-
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
68
|
-
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
|
69
|
-
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
|
70
|
-
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
71
|
-
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
|
72
|
-
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
73
|
-
|
|
74
|
-
/* Interop Constraints */
|
|
75
|
-
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
|
76
|
-
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
|
|
77
|
-
// "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
|
|
78
|
-
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
79
|
-
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
|
|
80
|
-
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
81
|
-
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
|
82
|
-
|
|
83
|
-
/* Type Checking */
|
|
84
|
-
"strict": true /* Enable all strict type-checking options. */,
|
|
85
|
-
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
|
86
|
-
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
|
87
|
-
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
88
|
-
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
|
89
|
-
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
90
|
-
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
|
91
|
-
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
|
92
|
-
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
93
|
-
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
|
94
|
-
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
|
95
|
-
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
96
|
-
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
97
|
-
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
98
|
-
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
|
99
|
-
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
100
|
-
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
101
|
-
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
102
|
-
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
103
|
-
|
|
104
|
-
/* Completeness */
|
|
105
|
-
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
106
|
-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
107
|
-
},
|
|
108
|
-
"include": ["src"],
|
|
109
|
-
"exclude": ["node_modules", "dist"]
|
|
110
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Visit https://aka.ms/tsconfig to read more about this file */
|
|
4
|
+
|
|
5
|
+
/* Projects */
|
|
6
|
+
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
|
|
7
|
+
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
8
|
+
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
|
|
9
|
+
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
|
|
10
|
+
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
11
|
+
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
12
|
+
|
|
13
|
+
/* Language and Environment */
|
|
14
|
+
"target": "es2016" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
|
15
|
+
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
16
|
+
// "jsx": "preserve", /* Specify what JSX code is generated. */
|
|
17
|
+
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
|
|
18
|
+
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
19
|
+
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
|
|
20
|
+
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
21
|
+
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
|
|
22
|
+
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
|
|
23
|
+
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
24
|
+
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
25
|
+
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
26
|
+
|
|
27
|
+
/* Modules */
|
|
28
|
+
"module": "commonjs" /* Specify what module code is generated. */,
|
|
29
|
+
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
30
|
+
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
|
31
|
+
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
32
|
+
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
33
|
+
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
34
|
+
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
|
|
35
|
+
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
|
|
36
|
+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
37
|
+
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
|
|
38
|
+
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
|
|
39
|
+
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
|
|
40
|
+
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
|
|
41
|
+
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
|
|
42
|
+
// "resolveJsonModule": true, /* Enable importing .json files. */
|
|
43
|
+
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
|
44
|
+
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
|
|
45
|
+
|
|
46
|
+
/* JavaScript Support */
|
|
47
|
+
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
|
48
|
+
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
49
|
+
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
50
|
+
|
|
51
|
+
/* Emit */
|
|
52
|
+
"declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
|
|
53
|
+
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
54
|
+
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
55
|
+
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
56
|
+
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
57
|
+
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
|
|
58
|
+
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
59
|
+
// "removeComments": true, /* Disable emitting comments. */
|
|
60
|
+
// "noEmit": true, /* Disable emitting files from a compilation. */
|
|
61
|
+
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
62
|
+
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
63
|
+
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
64
|
+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
65
|
+
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
66
|
+
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
67
|
+
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
68
|
+
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
|
|
69
|
+
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
|
|
70
|
+
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
71
|
+
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
|
|
72
|
+
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
73
|
+
|
|
74
|
+
/* Interop Constraints */
|
|
75
|
+
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
|
76
|
+
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
|
|
77
|
+
// "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
|
|
78
|
+
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
79
|
+
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
|
|
80
|
+
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
81
|
+
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
|
82
|
+
|
|
83
|
+
/* Type Checking */
|
|
84
|
+
"strict": true /* Enable all strict type-checking options. */,
|
|
85
|
+
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
|
|
86
|
+
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
|
|
87
|
+
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
88
|
+
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
|
|
89
|
+
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
90
|
+
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
|
|
91
|
+
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
|
|
92
|
+
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
93
|
+
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
|
|
94
|
+
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
|
|
95
|
+
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
96
|
+
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
97
|
+
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
98
|
+
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
|
99
|
+
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
100
|
+
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
|
101
|
+
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
102
|
+
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
103
|
+
|
|
104
|
+
/* Completeness */
|
|
105
|
+
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
106
|
+
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
107
|
+
},
|
|
108
|
+
"include": ["src"],
|
|
109
|
+
"exclude": ["node_modules", "dist"]
|
|
110
|
+
}
|