@la-main-verte/shared-types 1.0.69 → 1.0.71

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.69",
3
+ "version": "1.0.71",
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/alert.d.ts CHANGED
@@ -1,124 +1,124 @@
1
- export type IconNameI =
2
- | 'arrow-down'
3
- | 'arrow-down-a-z'
4
- | 'arrow-up-a-z'
5
- | 'arrow-left'
6
- | 'arrow-up'
7
- | 'arrow-up-short-wide'
8
- | 'arrow-up-91'
9
- | 'arrow-down-91'
10
- | 'arrow-up-square-triangle'
11
- | 'arrow-down-square-triangle'
12
- | 'arrow-up-big-small'
13
- | 'arrow-down-big-small'
14
- | 'bag-seedling'
15
- | 'bars'
16
- | 'bell'
17
- | 'broom-wide'
18
- | 'bug'
19
- | 'calendar-check'
20
- | 'calendar-day'
21
- | 'calendar-days'
22
- | 'calendar-minus'
23
- | 'calendar-pen'
24
- | 'calendar-plus'
25
- | 'camera'
26
- | 'chart-pie'
27
- | 'chart-tree-map'
28
- | 'check'
29
- | 'chevron-down'
30
- | 'chevron-left'
31
- | 'chevron-right'
32
- | 'circle-question'
33
- | 'city'
34
- | 'cog'
35
- | 'comment'
36
- | 'comment-dots'
37
- | 'comments-question-check'
38
- | 'copy'
39
- | 'columns-3'
40
- | 'distribute-spacing-horizontal'
41
- | 'distribute-spacing-vertical'
42
- | 'envelope'
43
- | 'eye'
44
- | 'eye-slash'
45
- | 'filter-circle-xmark'
46
- | 'filter-list'
47
- | 'flask'
48
- | 'gear'
49
- | 'heart'
50
- | 'home'
51
- | 'hand-back-point-up'
52
- | 'house-chimney-heart'
53
- | 'image'
54
- | 'info'
55
- | 'keyboard'
56
- | 'lightbulb-on'
57
- | 'lightbulb'
58
- | 'lock'
59
- | 'lock-open'
60
- | 'messages-question'
61
- | 'microphone'
62
- | 'minus'
63
- | 'note-medical'
64
- | 'note-sticky'
65
- | 'pencil'
66
- | 'plus'
67
- | 'pen-ruler'
68
- | 'podcast'
69
- | 'rotate'
70
- | 'ruler'
71
- | 'scissors'
72
- | 'satellite-dish'
73
- | 'search'
74
- | 'seedling'
75
- | 'sign-in-alt'
76
- | 'sign-out-alt'
77
- | 'share'
78
- | 'shovel'
79
- | 'snowflake'
80
- | 'star'
81
- | 'sun-bright'
82
- | 'temperature-snow'
83
- | 'thumbs-up'
84
- | 'tomato'
85
- | 'times'
86
- | 'trash'
87
- | 'trowel'
88
- | 'user-plus'
89
- | 'user-slash'
90
- | 'wand-sparkles'
91
- | 'wheat'
92
- | 'x'
93
- | string
94
-
95
- export interface AlertI {
96
- id: number
97
- tags?: AlertTagI[]
98
- icon: IconNameI
99
- /**
100
- * ColourCode of the icon
101
- * Ex: #ffffff
102
- */
103
- iconColor: string
104
- message: string
105
- published_at?: Date
106
- updated_at?: Date
107
- status?: 'draft' | 'published'
108
- }
109
-
110
- export interface AlertTagI {
111
- name: string
112
- /**
113
- * ColourCode of the alert tag background
114
- * Ex: #ffffff
115
- */
116
- backgroundColor: string
117
- /**
118
- * ColourCode of the alert tag text
119
- * Ex: #ffffff
120
- */
121
- textColor: string
122
- }
123
-
124
- export type AlertV14I = AlertI
1
+ export type IconNameI =
2
+ | 'arrow-down'
3
+ | 'arrow-down-a-z'
4
+ | 'arrow-up-a-z'
5
+ | 'arrow-left'
6
+ | 'arrow-up'
7
+ | 'arrow-up-short-wide'
8
+ | 'arrow-up-91'
9
+ | 'arrow-down-91'
10
+ | 'arrow-up-square-triangle'
11
+ | 'arrow-down-square-triangle'
12
+ | 'arrow-up-big-small'
13
+ | 'arrow-down-big-small'
14
+ | 'bag-seedling'
15
+ | 'bars'
16
+ | 'bell'
17
+ | 'broom-wide'
18
+ | 'bug'
19
+ | 'calendar-check'
20
+ | 'calendar-day'
21
+ | 'calendar-days'
22
+ | 'calendar-minus'
23
+ | 'calendar-pen'
24
+ | 'calendar-plus'
25
+ | 'camera'
26
+ | 'chart-pie'
27
+ | 'chart-tree-map'
28
+ | 'check'
29
+ | 'chevron-down'
30
+ | 'chevron-left'
31
+ | 'chevron-right'
32
+ | 'circle-question'
33
+ | 'city'
34
+ | 'cog'
35
+ | 'comment'
36
+ | 'comment-dots'
37
+ | 'comments-question-check'
38
+ | 'copy'
39
+ | 'columns-3'
40
+ | 'distribute-spacing-horizontal'
41
+ | 'distribute-spacing-vertical'
42
+ | 'envelope'
43
+ | 'eye'
44
+ | 'eye-slash'
45
+ | 'filter-circle-xmark'
46
+ | 'filter-list'
47
+ | 'flask'
48
+ | 'gear'
49
+ | 'heart'
50
+ | 'home'
51
+ | 'hand-back-point-up'
52
+ | 'house-chimney-heart'
53
+ | 'image'
54
+ | 'info'
55
+ | 'keyboard'
56
+ | 'lightbulb-on'
57
+ | 'lightbulb'
58
+ | 'lock'
59
+ | 'lock-open'
60
+ | 'messages-question'
61
+ | 'microphone'
62
+ | 'minus'
63
+ | 'note-medical'
64
+ | 'note-sticky'
65
+ | 'pencil'
66
+ | 'plus'
67
+ | 'pen-ruler'
68
+ | 'podcast'
69
+ | 'rotate'
70
+ | 'ruler'
71
+ | 'scissors'
72
+ | 'satellite-dish'
73
+ | 'search'
74
+ | 'seedling'
75
+ | 'sign-in-alt'
76
+ | 'sign-out-alt'
77
+ | 'share'
78
+ | 'shovel'
79
+ | 'snowflake'
80
+ | 'star'
81
+ | 'sun-bright'
82
+ | 'temperature-snow'
83
+ | 'thumbs-up'
84
+ | 'tomato'
85
+ | 'times'
86
+ | 'trash'
87
+ | 'trowel'
88
+ | 'user-plus'
89
+ | 'user-slash'
90
+ | 'wand-sparkles'
91
+ | 'wheat'
92
+ | 'x'
93
+ | string
94
+
95
+ export interface AlertI {
96
+ id: number
97
+ tags?: AlertTagI[]
98
+ icon: IconNameI
99
+ /**
100
+ * ColourCode of the icon
101
+ * Ex: #ffffff
102
+ */
103
+ iconColor: string
104
+ message: string
105
+ published_at?: Date
106
+ updated_at?: Date
107
+ status?: 'draft' | 'published'
108
+ }
109
+
110
+ export interface AlertTagI {
111
+ name: string
112
+ /**
113
+ * ColourCode of the alert tag background
114
+ * Ex: #ffffff
115
+ */
116
+ backgroundColor: string
117
+ /**
118
+ * ColourCode of the alert tag text
119
+ * Ex: #ffffff
120
+ */
121
+ textColor: string
122
+ }
123
+
124
+ export type AlertV14I = AlertI
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
+ }
@@ -1,9 +1,9 @@
1
- import { PlantI } from './plant'
2
-
3
- export interface CalendarViewI {
4
- id: number
5
- title: string
6
- slug: string
7
- orderBy: 'startDate' | 'name'
8
- Plants: PlantI[]
9
- }
1
+ import { PlantI } from './plant'
2
+
3
+ export interface CalendarViewI {
4
+ id: number
5
+ title: string
6
+ slug: string
7
+ orderBy: 'startDate' | 'name'
8
+ Plants: PlantI[]
9
+ }
package/src/device.d.ts CHANGED
@@ -1,52 +1,52 @@
1
- /**
2
- * Raw Data returned by the device model
3
- * Device.toJSON() will return this data
4
- */
5
- export interface DeviceDataI {
6
- /** Unique identifier for the device */
7
- id: string
8
- /** Identifier for the user associated with the device (UUID) */
9
- memberId: string
10
- /** Expo Push Notification Key */
11
- pushKey?: string
12
- /** Apple Push Notification Service Token */
13
- apnsToken?: string
14
- /** Firebase (Android) Cloud Messaging Token */
15
- fcmToken?: string
16
- /** Unique identifier for the device (UUID) */
17
- uuid: string
18
- /** RAW User agent string from the device */
19
- userAgent?: string
20
- /** Optional platform (e.g., 'ios', 'android', 'web') */
21
- platform?: 'ios' | 'android' | 'web'
22
- /** Optional version of the device */
23
- version?: string
24
- /**
25
- * Technical model of the device
26
- * ---
27
- * Ex: iPhone12,1, iPhone13,2, iPhone14,4, etc.
28
- */
29
- model?: string
30
- /**
31
- * Readable name of the device
32
- * ---
33
- * Ex: 'iPhone 12 Pro Max', 'Samsung Galaxy S20', 'MacBook Pro 13 inch'
34
- * */
35
- name?: string
36
- /** Optional app version of the device. Ex: 1.0.0 */
37
- appVersion?: string
38
- /** Web Push endpoint associated with the device */
39
- webPushEndpoint?: string
40
- /** Web Push user public key */
41
- webPushP256dh?: string
42
- /** Web Push auth secret */
43
- webPushAuth?: string
44
- /** Web Push subscription payload */
45
- webPushSubscription?: string
46
- /** Timestamp of when the device was created */
47
- createdAt: Date
48
- /** Timestamp of when the device was last updated */
49
- updatedAt: Date
50
- /** Virtual field that combines the name and appVersion */
51
- fullName: string
52
- }
1
+ /**
2
+ * Raw Data returned by the device model
3
+ * Device.toJSON() will return this data
4
+ */
5
+ export interface DeviceDataI {
6
+ /** Unique identifier for the device */
7
+ id: string
8
+ /** Identifier for the user associated with the device (UUID) */
9
+ memberId: string
10
+ /** Expo Push Notification Key */
11
+ pushKey?: string
12
+ /** Apple Push Notification Service Token */
13
+ apnsToken?: string
14
+ /** Firebase (Android) Cloud Messaging Token */
15
+ fcmToken?: string
16
+ /** Unique identifier for the device (UUID) */
17
+ uuid: string
18
+ /** RAW User agent string from the device */
19
+ userAgent?: string
20
+ /** Optional platform (e.g., 'ios', 'android', 'web') */
21
+ platform?: 'ios' | 'android' | 'web'
22
+ /** Optional version of the device */
23
+ version?: string
24
+ /**
25
+ * Technical model of the device
26
+ * ---
27
+ * Ex: iPhone12,1, iPhone13,2, iPhone14,4, etc.
28
+ */
29
+ model?: string
30
+ /**
31
+ * Readable name of the device
32
+ * ---
33
+ * Ex: 'iPhone 12 Pro Max', 'Samsung Galaxy S20', 'MacBook Pro 13 inch'
34
+ * */
35
+ name?: string
36
+ /** Optional app version of the device. Ex: 1.0.0 */
37
+ appVersion?: string
38
+ /** Web Push endpoint associated with the device */
39
+ webPushEndpoint?: string
40
+ /** Web Push user public key */
41
+ webPushP256dh?: string
42
+ /** Web Push auth secret */
43
+ webPushAuth?: string
44
+ /** Web Push subscription payload */
45
+ webPushSubscription?: string
46
+ /** Timestamp of when the device was created */
47
+ createdAt: Date
48
+ /** Timestamp of when the device was last updated */
49
+ updatedAt: Date
50
+ /** Virtual field that combines the name and appVersion */
51
+ fullName: string
52
+ }
@@ -1,56 +1,56 @@
1
- export interface FertilizerI {
2
- id: number
3
- name: string
4
- slug: string
5
- azotePercentage: number
6
- phosphorePercentage: number
7
- potassiumPercentage: number
8
- /**
9
- * The real azote percentage is the azote percentage multiplied by the azote efficiency.
10
- */
11
- realAzotePercentage: number
12
- /**
13
- * The azote efficiency is a percentage number between 0 and 1.
14
- * Its how efficient the mineralization of the azote is.
15
- */
16
- azoteEfficiency: number
17
- imageLocation: string
18
- imageURL: string
19
- quantitySuggested: string
20
- /**
21
- * Blend composition when this fertilizer is a combination of two products.
22
- * Null for single fertilizers.
23
- * When populated, contains the IDs and ratios (as percentages) of the primary and secondary fertilizers.
24
- * The NPK values should be calculated by fetching each fertilizer and applying the weighted average.
25
- *
26
- * @example
27
- * // For a blend:
28
- * {
29
- * "primary_fertilizer_id": 1, // Acti-Sol (70%)
30
- * "primary_fertilizer_ratio": 70,
31
- * "secondary_fertilizer_id": 12, // Bionik (30%)
32
- * "secondary_fertilizer_ratio": 30
33
- * }
34
- *
35
- * // For a single fertilizer:
36
- * {}
37
- */
38
- combination_details: BlendCompositionI | null
39
- }
40
-
41
- interface BlendCompositionI {
42
- primary_fertilizer_id: number
43
- primary_fertilizer_ratio: number
44
- secondary_fertilizer_id: number
45
- secondary_fertilizer_ratio: number
46
- }
47
-
48
- export interface FertilizerSectionI {
49
- sectionTitle: string
50
- sectionSubtitle: string
51
- fertilizers: FertilizerI[]
52
- }
53
-
54
- export interface FertilizersInGridI {
55
- fertilizerSection: FertilizerSectionI[]
56
- }
1
+ export interface FertilizerI {
2
+ id: number
3
+ name: string
4
+ slug: string
5
+ azotePercentage: number
6
+ phosphorePercentage: number
7
+ potassiumPercentage: number
8
+ /**
9
+ * The real azote percentage is the azote percentage multiplied by the azote efficiency.
10
+ */
11
+ realAzotePercentage: number
12
+ /**
13
+ * The azote efficiency is a percentage number between 0 and 1.
14
+ * Its how efficient the mineralization of the azote is.
15
+ */
16
+ azoteEfficiency: number
17
+ imageLocation: string
18
+ imageURL: string
19
+ quantitySuggested: string
20
+ /**
21
+ * Blend composition when this fertilizer is a combination of two products.
22
+ * Null for single fertilizers.
23
+ * When populated, contains the IDs and ratios (as percentages) of the primary and secondary fertilizers.
24
+ * The NPK values should be calculated by fetching each fertilizer and applying the weighted average.
25
+ *
26
+ * @example
27
+ * // For a blend:
28
+ * {
29
+ * "primary_fertilizer_id": 1, // Acti-Sol (70%)
30
+ * "primary_fertilizer_ratio": 70,
31
+ * "secondary_fertilizer_id": 12, // Bionik (30%)
32
+ * "secondary_fertilizer_ratio": 30
33
+ * }
34
+ *
35
+ * // For a single fertilizer:
36
+ * {}
37
+ */
38
+ combination_details: BlendCompositionI | null
39
+ }
40
+
41
+ interface BlendCompositionI {
42
+ primary_fertilizer_id: number
43
+ primary_fertilizer_ratio: number
44
+ secondary_fertilizer_id: number
45
+ secondary_fertilizer_ratio: number
46
+ }
47
+
48
+ export interface FertilizerSectionI {
49
+ sectionTitle: string
50
+ sectionSubtitle: string
51
+ fertilizers: FertilizerI[]
52
+ }
53
+
54
+ export interface FertilizersInGridI {
55
+ fertilizerSection: FertilizerSectionI[]
56
+ }