@optimatech88/titomeet-shared-lib 1.0.30 → 1.0.32

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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from './auth/auth.guard';
2
- export { PrismaClient, User, Account, UserRole, Event, EventAccess, EventVisibility, EventStatus, EventPrice, Address, Provider, ProviderStatus, EventCategory, Review, ProviderCategory, Order, OrderStatus, OrderItem, PaymentStatus, Chat, ChatUser, Message, Notification, NotificationType, MediaType, UserStatus, } from '@prisma/client';
2
+ export { PrismaClient, User, Account, UserRole, Event, EventAccess, EventVisibility, EventStatus, EventPrice, Address, Provider, ProviderStatus, EventCategory, Review, ProviderCategory, Order, OrderStatus, OrderItem, PaymentStatus, Chat, ChatUser, Message, Notification, NotificationType, MediaType, UserStatus, UserInterests } from '@prisma/client';
3
3
  export * from './auth/auth.guard';
4
4
  export * from './auth/auth.module';
5
5
  export * from './auth/admin.middleware';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACH,YAAY,EAAE,IAAI,EAAE,OAAO,EACvB,QAAQ,EAAE,KAAK,EAAE,WAAW,EAC5B,eAAe,EAAE,WAAW,EAC5B,UAAU,EAAE,OAAO,EACnB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,MAAM,EACV,gBAAgB,EAChB,KAAK,EACL,WAAW,EACX,SAAS,EACT,aAAa,EACb,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,UAAU,GACT,MAAM,gBAAgB,CAAC;AAG5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACH,YAAY,EAAE,IAAI,EAAE,OAAO,EACvB,QAAQ,EAAE,KAAK,EAAE,WAAW,EAC5B,eAAe,EAAE,WAAW,EAC5B,UAAU,EAAE,OAAO,EACnB,QAAQ,EACR,cAAc,EACd,aAAa,EACb,MAAM,EACV,gBAAgB,EAChB,KAAK,EACL,WAAW,EACX,SAAS,EACT,aAAa,EACb,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,aAAa,EACZ,MAAM,gBAAgB,CAAC;AAG5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,yCAqB4B;AApBxB,sGAAA,YAAY,OAAA;AACR,kGAAA,QAAQ,OAAA;AAAS,qGAAA,WAAW,OAAA;AAC5B,yGAAA,eAAe,OAAA;AAAE,qGAAA,WAAW,OAAA;AAG5B,wGAAA,cAAc,OAAA;AAKlB,qGAAA,WAAW,OAAA;AAEX,uGAAA,aAAa,OAAA;AAKb,0GAAA,gBAAgB,OAAA;AAChB,mGAAA,SAAS,OAAA;AACT,oGAAA,UAAU,OAAA;AAId,oDAAkC;AAClC,qDAAmC;AACnC,0DAAwC;AAGxC,uDAAqC;AACrC,wDAAsC;AAGtC,yDAAuC;AACvC,0DAAwC;AACxC,gDAA8B;AAC9B,0CAAwB;AACxB,0CAAwB;AACxB,wDAAsC;AACtC,iDAA+B;AAE/B,mCAAyC;AAAhC,iGAAA,UAAU,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,yCAsB4B;AArBxB,sGAAA,YAAY,OAAA;AACR,kGAAA,QAAQ,OAAA;AAAS,qGAAA,WAAW,OAAA;AAC5B,yGAAA,eAAe,OAAA;AAAE,qGAAA,WAAW,OAAA;AAG5B,wGAAA,cAAc,OAAA;AAKlB,qGAAA,WAAW,OAAA;AAEX,uGAAA,aAAa,OAAA;AAKb,0GAAA,gBAAgB,OAAA;AAChB,mGAAA,SAAS,OAAA;AACT,oGAAA,UAAU,OAAA;AAKd,oDAAkC;AAClC,qDAAmC;AACnC,0DAAwC;AAGxC,uDAAqC;AACrC,wDAAsC;AAGtC,yDAAuC;AACvC,0DAAwC;AACxC,gDAA8B;AAC9B,0CAAwB;AACxB,0CAAwB;AACxB,wDAAsC;AACtC,iDAA+B;AAE/B,mCAAyC;AAAhC,iGAAA,UAAU,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optimatech88/titomeet-shared-lib",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -0,0 +1,16 @@
1
+ -- CreateTable
2
+ CREATE TABLE "UserInterests" (
3
+ "id" TEXT NOT NULL,
4
+ "interests" TEXT[],
5
+ "userId" TEXT NOT NULL,
6
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
7
+ "updatedAt" TIMESTAMP(3) NOT NULL,
8
+
9
+ CONSTRAINT "UserInterests_pkey" PRIMARY KEY ("id")
10
+ );
11
+
12
+ -- CreateIndex
13
+ CREATE UNIQUE INDEX "UserInterests_userId_key" ON "UserInterests"("userId");
14
+
15
+ -- AddForeignKey
16
+ ALTER TABLE "UserInterests" ADD CONSTRAINT "UserInterests_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,31 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `interests` on the `UserInterests` table. All the data in the column will be lost.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE "EventCategory" ADD COLUMN "parentId" TEXT;
9
+
10
+ -- AlterTable
11
+ ALTER TABLE "UserInterests" DROP COLUMN "interests";
12
+
13
+ -- CreateTable
14
+ CREATE TABLE "_EventCategoryToUserInterests" (
15
+ "A" TEXT NOT NULL,
16
+ "B" TEXT NOT NULL,
17
+
18
+ CONSTRAINT "_EventCategoryToUserInterests_AB_pkey" PRIMARY KEY ("A","B")
19
+ );
20
+
21
+ -- CreateIndex
22
+ CREATE INDEX "_EventCategoryToUserInterests_B_index" ON "_EventCategoryToUserInterests"("B");
23
+
24
+ -- AddForeignKey
25
+ ALTER TABLE "EventCategory" ADD CONSTRAINT "EventCategory_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "EventCategory"("id") ON DELETE SET NULL ON UPDATE CASCADE;
26
+
27
+ -- AddForeignKey
28
+ ALTER TABLE "_EventCategoryToUserInterests" ADD CONSTRAINT "_EventCategoryToUserInterests_A_fkey" FOREIGN KEY ("A") REFERENCES "EventCategory"("id") ON DELETE CASCADE ON UPDATE CASCADE;
29
+
30
+ -- AddForeignKey
31
+ ALTER TABLE "_EventCategoryToUserInterests" ADD CONSTRAINT "_EventCategoryToUserInterests_B_fkey" FOREIGN KEY ("B") REFERENCES "UserInterests"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -30,6 +30,8 @@ model User {
30
30
  orders Order[]
31
31
  providers Provider[]
32
32
  reviews Review[]
33
+
34
+ userInterests UserInterests?
33
35
  }
34
36
 
35
37
  model Account {
@@ -66,6 +68,13 @@ model EventCategory {
66
68
  updatedAt DateTime @updatedAt
67
69
  active Boolean @default(true)
68
70
  events Event[] @relation("EventToEventCategory")
71
+ userInterests UserInterests[]
72
+
73
+ parentId String?
74
+ parent EventCategory? @relation("EventCategoryParent", fields: [parentId], references: [id])
75
+
76
+
77
+ children EventCategory[] @relation("EventCategoryParent")
69
78
  }
70
79
 
71
80
  model Event {
@@ -240,6 +249,19 @@ model OrderItem {
240
249
  order Order @relation(fields: [orderId], references: [id])
241
250
  }
242
251
 
252
+
253
+ model UserInterests {
254
+ id String @id @default(cuid())
255
+
256
+ interests EventCategory[]
257
+
258
+ userId String @unique
259
+ user User @relation(fields: [userId], references: [id])
260
+
261
+ createdAt DateTime @default(now())
262
+ updatedAt DateTime @updatedAt
263
+ }
264
+
243
265
  enum UserRole {
244
266
  SUPER_ADMIN
245
267
  ADMIN
package/src/index.ts CHANGED
@@ -20,6 +20,7 @@ export {
20
20
  NotificationType,
21
21
  MediaType,
22
22
  UserStatus,
23
+ UserInterests
23
24
  } from '@prisma/client';
24
25
 
25
26
  //auth
@@ -1,34 +0,0 @@
1
- # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2
- # For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3
-
4
- name: Node.js Package
5
-
6
- on:
7
- push:
8
- branches:
9
- - main # Or your main branch
10
-
11
- jobs:
12
- build:
13
- runs-on: ubuntu-latest
14
- steps:
15
- - uses: actions/checkout@v4
16
- - uses: actions/setup-node@v4
17
- with:
18
- node-version: 20
19
- - run: npm ci
20
- - run: npm run build
21
-
22
- publish-npm:
23
- needs: build
24
- runs-on: ubuntu-latest
25
- steps:
26
- - uses: actions/checkout@v4
27
- - uses: actions/setup-node@v4
28
- with:
29
- node-version: 20
30
- registry-url: https://registry.npmjs.org/
31
- - run: npm ci
32
- - run: npm publish --access public
33
- env:
34
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}