@brimble/models 3.7.9 → 3.7.91
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/collab-annotation.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ICollabAnnotation } from "./types";
|
|
|
5
5
|
const collabAnnotationSchema = new Schema(
|
|
6
6
|
{
|
|
7
7
|
projectId: { type: Schema.Types.ObjectId, ref: "Project", required: true, index: true },
|
|
8
|
-
userId: { type: Schema.Types.ObjectId, ref: "User"
|
|
8
|
+
userId: { type: Schema.Types.ObjectId, ref: "User" },
|
|
9
9
|
pageUrl: { type: String, required: true },
|
|
10
10
|
pagePath: { type: String, required: true, index: true },
|
|
11
11
|
xPercent: { type: Number, required: true },
|
|
@@ -20,8 +20,10 @@ const collabAnnotationSchema = new Schema(
|
|
|
20
20
|
},
|
|
21
21
|
resolvedAt: { type: Date },
|
|
22
22
|
resolvedBy: { type: Schema.Types.ObjectId, ref: "User" },
|
|
23
|
+
guestName: { type: String },
|
|
24
|
+
guestEmail: { type: String },
|
|
23
25
|
},
|
|
24
|
-
{ timestamps: true, collection: "
|
|
26
|
+
{ timestamps: true, collection: "annotations" },
|
|
25
27
|
);
|
|
26
28
|
|
|
27
29
|
collabAnnotationSchema.index({ projectId: 1, pagePath: 1, status: 1 });
|
package/collab-comment.ts
CHANGED
|
@@ -21,7 +21,7 @@ const collabCommentSchema = new Schema(
|
|
|
21
21
|
guestName: { type: String },
|
|
22
22
|
guestEmail: { type: String },
|
|
23
23
|
},
|
|
24
|
-
{ timestamps: true, collection: "
|
|
24
|
+
{ timestamps: true, collection: "comments" },
|
|
25
25
|
);
|
|
26
26
|
|
|
27
27
|
export default model<ICollabComment>("CollabComment", collabCommentSchema);
|
|
@@ -4,7 +4,7 @@ const mongoose_1 = require("mongoose");
|
|
|
4
4
|
const enum_1 = require("./enum");
|
|
5
5
|
const collabAnnotationSchema = new mongoose_1.Schema({
|
|
6
6
|
projectId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Project", required: true, index: true },
|
|
7
|
-
userId: { type: mongoose_1.Schema.Types.ObjectId, ref: "User"
|
|
7
|
+
userId: { type: mongoose_1.Schema.Types.ObjectId, ref: "User" },
|
|
8
8
|
pageUrl: { type: String, required: true },
|
|
9
9
|
pagePath: { type: String, required: true, index: true },
|
|
10
10
|
xPercent: { type: Number, required: true },
|
|
@@ -19,6 +19,8 @@ const collabAnnotationSchema = new mongoose_1.Schema({
|
|
|
19
19
|
},
|
|
20
20
|
resolvedAt: { type: Date },
|
|
21
21
|
resolvedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: "User" },
|
|
22
|
-
|
|
22
|
+
guestName: { type: String },
|
|
23
|
+
guestEmail: { type: String },
|
|
24
|
+
}, { timestamps: true, collection: "annotations" });
|
|
23
25
|
collabAnnotationSchema.index({ projectId: 1, pagePath: 1, status: 1 });
|
|
24
26
|
exports.default = (0, mongoose_1.model)("CollabAnnotation", collabAnnotationSchema);
|
package/dist/collab-comment.js
CHANGED
|
@@ -15,5 +15,5 @@ const collabCommentSchema = new mongoose_1.Schema({
|
|
|
15
15
|
attachments: { type: [collabAttachmentSchema], default: undefined },
|
|
16
16
|
guestName: { type: String },
|
|
17
17
|
guestEmail: { type: String },
|
|
18
|
-
}, { timestamps: true, collection: "
|
|
18
|
+
}, { timestamps: true, collection: "comments" });
|
|
19
19
|
exports.default = (0, mongoose_1.model)("CollabComment", collabCommentSchema);
|
|
@@ -4,7 +4,7 @@ import { IUser } from "./user";
|
|
|
4
4
|
import { IProject } from "./project";
|
|
5
5
|
export interface ICollabAnnotation extends Document {
|
|
6
6
|
projectId: IProject;
|
|
7
|
-
userId
|
|
7
|
+
userId?: IUser;
|
|
8
8
|
pageUrl: string;
|
|
9
9
|
pagePath: string;
|
|
10
10
|
xPercent: number;
|
|
@@ -15,6 +15,8 @@ export interface ICollabAnnotation extends Document {
|
|
|
15
15
|
status: COLLAB_ANNOTATION_STATUS;
|
|
16
16
|
resolvedAt?: Date;
|
|
17
17
|
resolvedBy?: IUser;
|
|
18
|
+
guestName?: string;
|
|
19
|
+
guestEmail?: string;
|
|
18
20
|
createdAt: Date;
|
|
19
21
|
updatedAt: Date;
|
|
20
22
|
}
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import { IProject } from "./project";
|
|
|
5
5
|
|
|
6
6
|
export interface ICollabAnnotation extends Document {
|
|
7
7
|
projectId: IProject;
|
|
8
|
-
userId
|
|
8
|
+
userId?: IUser;
|
|
9
9
|
pageUrl: string;
|
|
10
10
|
pagePath: string;
|
|
11
11
|
xPercent: number;
|
|
@@ -16,6 +16,8 @@ export interface ICollabAnnotation extends Document {
|
|
|
16
16
|
status: COLLAB_ANNOTATION_STATUS;
|
|
17
17
|
resolvedAt?: Date;
|
|
18
18
|
resolvedBy?: IUser;
|
|
19
|
+
guestName?: string;
|
|
20
|
+
guestEmail?: string;
|
|
19
21
|
createdAt: Date;
|
|
20
22
|
updatedAt: Date;
|
|
21
23
|
}
|