streamby-core 0.16.0 → 0.16.1

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.
@@ -397,15 +397,15 @@ export declare function initProjectModel(connection: mongoose.Connection): mongo
397
397
  dbType: string;
398
398
  name: string;
399
399
  members: mongoose.Types.DocumentArray<{
400
- userId: mongoose.Types.ObjectId;
400
+ userId: string;
401
401
  role: "viewer" | "editor" | "admin";
402
402
  archived: boolean;
403
403
  }, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
404
- userId: mongoose.Types.ObjectId;
404
+ userId: string;
405
405
  role: "viewer" | "editor" | "admin";
406
406
  archived: boolean;
407
407
  }> & {
408
- userId: mongoose.Types.ObjectId;
408
+ userId: string;
409
409
  role: "viewer" | "editor" | "admin";
410
410
  archived: boolean;
411
411
  }>;
@@ -812,15 +812,15 @@ export declare function initProjectModel(connection: mongoose.Connection): mongo
812
812
  dbType: string;
813
813
  name: string;
814
814
  members: mongoose.Types.DocumentArray<{
815
- userId: mongoose.Types.ObjectId;
815
+ userId: string;
816
816
  role: "viewer" | "editor" | "admin";
817
817
  archived: boolean;
818
818
  }, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
819
- userId: mongoose.Types.ObjectId;
819
+ userId: string;
820
820
  role: "viewer" | "editor" | "admin";
821
821
  archived: boolean;
822
822
  }> & {
823
- userId: mongoose.Types.ObjectId;
823
+ userId: string;
824
824
  role: "viewer" | "editor" | "admin";
825
825
  archived: boolean;
826
826
  }>;
@@ -1227,15 +1227,15 @@ export declare function initProjectModel(connection: mongoose.Connection): mongo
1227
1227
  dbType: string;
1228
1228
  name: string;
1229
1229
  members: mongoose.Types.DocumentArray<{
1230
- userId: mongoose.Types.ObjectId;
1230
+ userId: string;
1231
1231
  role: "viewer" | "editor" | "admin";
1232
1232
  archived: boolean;
1233
1233
  }, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
1234
- userId: mongoose.Types.ObjectId;
1234
+ userId: string;
1235
1235
  role: "viewer" | "editor" | "admin";
1236
1236
  archived: boolean;
1237
1237
  }> & {
1238
- userId: mongoose.Types.ObjectId;
1238
+ userId: string;
1239
1239
  role: "viewer" | "editor" | "admin";
1240
1240
  archived: boolean;
1241
1241
  }>;
@@ -1649,15 +1649,15 @@ export declare function initProjectModel(connection: mongoose.Connection): mongo
1649
1649
  dbType: string;
1650
1650
  name: string;
1651
1651
  members: mongoose.Types.DocumentArray<{
1652
- userId: mongoose.Types.ObjectId;
1652
+ userId: string;
1653
1653
  role: "viewer" | "editor" | "admin";
1654
1654
  archived: boolean;
1655
1655
  }, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
1656
- userId: mongoose.Types.ObjectId;
1656
+ userId: string;
1657
1657
  role: "viewer" | "editor" | "admin";
1658
1658
  archived: boolean;
1659
1659
  }> & {
1660
- userId: mongoose.Types.ObjectId;
1660
+ userId: string;
1661
1661
  role: "viewer" | "editor" | "admin";
1662
1662
  archived: boolean;
1663
1663
  }>;
@@ -2064,15 +2064,15 @@ export declare function initProjectModel(connection: mongoose.Connection): mongo
2064
2064
  dbType: string;
2065
2065
  name: string;
2066
2066
  members: mongoose.Types.DocumentArray<{
2067
- userId: mongoose.Types.ObjectId;
2067
+ userId: string;
2068
2068
  role: "viewer" | "editor" | "admin";
2069
2069
  archived: boolean;
2070
2070
  }, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
2071
- userId: mongoose.Types.ObjectId;
2071
+ userId: string;
2072
2072
  role: "viewer" | "editor" | "admin";
2073
2073
  archived: boolean;
2074
2074
  }> & {
2075
- userId: mongoose.Types.ObjectId;
2075
+ userId: string;
2076
2076
  role: "viewer" | "editor" | "admin";
2077
2077
  archived: boolean;
2078
2078
  }>;
@@ -2479,15 +2479,15 @@ export declare function initProjectModel(connection: mongoose.Connection): mongo
2479
2479
  dbType: string;
2480
2480
  name: string;
2481
2481
  members: mongoose.Types.DocumentArray<{
2482
- userId: mongoose.Types.ObjectId;
2482
+ userId: string;
2483
2483
  role: "viewer" | "editor" | "admin";
2484
2484
  archived: boolean;
2485
2485
  }, mongoose.Types.Subdocument<mongoose.Types.ObjectId, any, {
2486
- userId: mongoose.Types.ObjectId;
2486
+ userId: string;
2487
2487
  role: "viewer" | "editor" | "admin";
2488
2488
  archived: boolean;
2489
2489
  }> & {
2490
- userId: mongoose.Types.ObjectId;
2490
+ userId: string;
2491
2491
  role: "viewer" | "editor" | "admin";
2492
2492
  archived: boolean;
2493
2493
  }>;
@@ -12,7 +12,7 @@ function initProjectModel(connection) {
12
12
  children: [Object],
13
13
  }, { _id: false });
14
14
  const memberSchema = new mongoose_1.default.Schema({
15
- userId: { type: mongoose_1.default.Schema.Types.ObjectId, required: true },
15
+ userId: { type: String, required: true },
16
16
  role: { type: String, enum: ['viewer', 'editor', 'admin'], default: 'viewer' },
17
17
  archived: { type: Boolean, default: false }
18
18
  }, { _id: false });
@@ -74,7 +74,8 @@ function createPrismaProjectProvider(prisma, adapter) {
74
74
  return { success: true };
75
75
  }
76
76
  catch (error) {
77
- throw new Error('Project not found');
77
+ console.error('Error deleting project:', error);
78
+ throw new Error(`Failed to delete project: ${error.message || error}`);
78
79
  }
79
80
  },
80
81
  async archive(projectId, userId) {
@@ -24,7 +24,7 @@ function checkRole(auth, required) {
24
24
  }
25
25
  async function dummyAuthProvider(req) {
26
26
  return {
27
- userId: '67ad0832cae5e7e270ee086a',
27
+ userId: 'cd9912a7-e6bd-4c85-85fa-a21f5e19f2cb',
28
28
  username: 'dev-user',
29
29
  projects: [],
30
30
  role: 'admin'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "streamby-core",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "StreamBy middleware framework for media storage management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",