@optimatech88/titomeet-shared-lib 1.0.4 → 1.0.6

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.
@@ -17,7 +17,7 @@ jobs:
17
17
  with:
18
18
  node-version: 20
19
19
  - run: npm ci
20
- #- run: npm test
20
+ - run: npm run build
21
21
 
22
22
  publish-npm:
23
23
  needs: build
@@ -29,6 +29,6 @@ jobs:
29
29
  node-version: 20
30
30
  registry-url: https://registry.npmjs.org/
31
31
  - run: npm ci
32
- - run: npm publish
32
+ - run: npm publish --access public
33
33
  env:
34
34
  NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@optimatech88/titomeet-shared-lib",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1",
8
8
  "build": "nest build",
9
- "format": "prettier --write \"src/**/*.ts\""
9
+ "format": "prettier --write \"src/**/*.ts\"",
10
+ "generate": "npx prisma generate"
10
11
  },
11
12
  "keywords": [],
12
13
  "author": "",
@@ -31,6 +32,7 @@
31
32
  "nestjs-seeder": "^0.3.2"
32
33
  },
33
34
  "devDependencies": {
35
+ "@nestjs/cli": "^11.0.5",
34
36
  "@types/express": "^4.17.21",
35
37
  "@types/node": "^22.2.0",
36
38
  "prettier": "^3.3.3",
@@ -29,6 +29,8 @@ model User {
29
29
  password String?
30
30
  role UserRole @default(USER)
31
31
 
32
+ profilePicture String?
33
+
32
34
  createdAt DateTime @default(now())
33
35
  updatedAt DateTime @updatedAt
34
36
 
@@ -36,6 +38,9 @@ model User {
36
38
  messages Message[]
37
39
  events Event[]
38
40
  participatedEvents Participant[]
41
+ notificationsReceived Notification[] @relation("NotificationRecipient")
42
+ notificationsSent Notification[] @relation("NotificationSender")
43
+ providers Provider[]
39
44
  }
40
45
 
41
46
  model Account {
@@ -49,6 +54,7 @@ model Account {
49
54
  model Address {
50
55
  id String @id @default(uuid())
51
56
  name String
57
+ line2 String?
52
58
  city String
53
59
  state String
54
60
  country String
@@ -102,6 +108,8 @@ model Event {
102
108
  // Add participants relation
103
109
  participants Participant[]
104
110
 
111
+ providers Provider[]
112
+
105
113
  createdAt DateTime @default(now())
106
114
  updatedAt DateTime @updatedAt
107
115
  }
@@ -162,3 +170,45 @@ enum ParticipantStatus {
162
170
  CANCELLED
163
171
  }
164
172
 
173
+ enum NotificationType {
174
+ NEW_MESSAGE
175
+ EVENT_REMINDER
176
+ EVENT_PARTICIPATION_CONFIRMATION
177
+ }
178
+
179
+ model Notification {
180
+ id String @id @default(cuid())
181
+ notifiedTo User @relation("NotificationRecipient", fields: [notifiedToId], references: [id])
182
+ notifiedToId String
183
+ user User? @relation("NotificationSender", fields: [userId], references: [id])
184
+ userId String?
185
+ type NotificationType
186
+ read Boolean @default(false)
187
+ data Json?
188
+
189
+ createdAt DateTime @default(now())
190
+ updatedAt DateTime @updatedAt
191
+ }
192
+
193
+ enum ProviderStatus {
194
+ PENDING
195
+ APPROVED
196
+ REJECTED
197
+ }
198
+
199
+ model Provider {
200
+ id String @id @default(cuid())
201
+ name String
202
+ description String?
203
+ image String?
204
+
205
+ user User @relation(fields: [userId], references: [id])
206
+ userId String
207
+
208
+ events Event[]
209
+
210
+ status ProviderStatus @default(PENDING)
211
+
212
+ createdAt DateTime @default(now())
213
+ updatedAt DateTime @updatedAt
214
+ }
package/src/index.ts CHANGED
@@ -1,5 +1,12 @@
1
1
  export * from './auth/auth.guard';
2
- export { PrismaClient, User, Account, UserRole, Event, EventAccess, EventVisibility, EventStatus, EventPrice, Address, Participant, ParticipantStatus } from '@prisma/client';
2
+ export {
3
+ PrismaClient, User, Account,
4
+ UserRole, Event, EventAccess,
5
+ EventVisibility, EventStatus,
6
+ EventPrice, Address, Participant,
7
+ ParticipantStatus,
8
+ Provider,
9
+ ProviderStatus } from '@prisma/client';
3
10
 
4
11
  //auth
5
12
  export * from './auth/auth.guard';