@la-main-verte/shared-types 1.0.50 → 1.0.52

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.50",
3
+ "version": "1.0.52",
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",
@@ -1,3 +1,5 @@
1
+ import { PlantI } from './plant'
2
+
1
3
  export interface CalendarViewI {
2
4
  id: number
3
5
  title: string
@@ -15,5 +15,6 @@ export interface FertilizerI {
15
15
  */
16
16
  azoteEfficiency: number
17
17
  imageLocation: string
18
+ imageURL: string
18
19
  quantitySuggested: string
19
20
  }
package/src/index.ts CHANGED
@@ -9,6 +9,9 @@ export * from './gardenMap'
9
9
  export * from './alert'
10
10
  export * from './image'
11
11
  export * from './fertilizer'
12
+ export * from './note'
13
+ export * from './taggedItem'
14
+ export * from './tag'
12
15
  import * as PlantsAPI from './plants.api'
13
16
  import * as UsersAPI from './users.api'
14
17
 
package/src/member.d.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import { NoteI } from './note'
2
+ import { SelectionI } from './selection'
3
+
1
4
  export interface MemberI {
2
5
  id: number
3
6
  email: string
package/src/note.d.ts ADDED
@@ -0,0 +1,28 @@
1
+ import { ImageI } from './image.d.ts'
2
+ import { TaggedItemI } from './taggedItem.d.ts'
3
+
4
+ export interface NoteI {
5
+ id: number
6
+ memberId: number
7
+ title: string
8
+ contentInMarkdown: string
9
+ color?: string
10
+ agreedToShare: boolean
11
+ createdAt: Date
12
+ updatedAt: Date
13
+ /**
14
+ * Virtual field for the note thumbnail imageURL (absolute path) */
15
+ imageURL?: string
16
+ /**
17
+ * Virtual field indicating if the note content is short
18
+ * Used to alter the design of the note (likely with ContentInMarkdown replacing the title)
19
+ * */
20
+ hasShortContent?: boolean
21
+ /**
22
+ * Virtual field for the note sharing URL (relative path) */
23
+ sharingURL: string
24
+ darkColor: string
25
+ pastelColor: string
26
+ Images: ImageI[]
27
+ TaggedItems: TaggedItemI[]
28
+ }
package/src/plant.d.ts CHANGED
@@ -1,3 +1,9 @@
1
+ import { ImageI } from './image.d.ts'
2
+ import { SelectionI } from './selection.d.ts'
3
+ import { TaskI } from './task.d.ts'
4
+ import { TaggedItemI } from './taggedItem.d.ts'
5
+ import { NoteI } from './note.js'
6
+
1
7
  export interface PlantI {
2
8
  id: number
3
9
  name: string
@@ -48,6 +54,7 @@ export interface PlantI {
48
54
  Selections?: SelectionI[]
49
55
  tasks?: TaskI[]
50
56
  Images?: ImageI[]
57
+ notes?: NoteI[]
51
58
  }
52
59
 
53
60
  interface PlantTagI {
@@ -1,3 +1,5 @@
1
+ import { PlantI } from './plant'
2
+
1
3
  export interface SelectionI {
2
4
  id: number
3
5
  memberId: number
package/src/tag.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ export interface TagI {
2
+ id?: number
3
+ name?: string
4
+ tagType?: 'plant' | 'task'
5
+ icon?: string
6
+ color?: string
7
+ createdAt: Date
8
+ updatedAt: Date
9
+ }
@@ -0,0 +1,12 @@
1
+ import { TagI } from './tag.d.ts'
2
+
3
+ export interface TaggedItemI {
4
+ id: number
5
+ noteId: number
6
+ tagId: number
7
+ itemType: 'plant' | 'task'
8
+ itemId: number
9
+ createdAt: Date
10
+ updatedAt: Date
11
+ Tag: TagI
12
+ }