codebase-models 2.1.24 → 3.0.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.
- package/.github/workflows/npm-publish-stage.yml +33 -0
- package/dist/index.d.ts +7 -4
- package/dist/index.js +14 -8
- package/dist/src/constant.d.ts +24 -1
- package/dist/src/constant.js +89 -3
- package/dist/src/models/Client.d.ts +1 -1
- package/dist/src/models/Client.js +7 -4
- package/dist/src/models/ClientRetention.js +1 -1
- package/dist/src/models/{SegmentCombination.d.ts → Invitation.d.ts} +15 -14
- package/dist/src/models/Invitation.js +55 -0
- package/dist/src/models/Organization.d.ts +8 -15
- package/dist/src/models/Organization.js +10 -58
- package/dist/src/models/{QueryLog.d.ts → Package.d.ts} +7 -7
- package/dist/src/models/{QueryLog.js → Package.js} +10 -19
- package/dist/src/models/{Segment.d.ts → Thread.d.ts} +7 -10
- package/dist/src/models/Thread.js +78 -0
- package/dist/src/models/ThreadMessage.d.ts +35 -0
- package/dist/src/models/ThreadMessage.js +86 -0
- package/dist/src/models/User.d.ts +8 -5
- package/dist/src/models/User.js +13 -37
- package/dist/src/models/UserIdentity.d.ts +35 -0
- package/dist/src/models/{SegmentCombination.js → UserIdentity.js} +11 -47
- package/dist/src/models/UserOrganization.d.ts +33 -0
- package/dist/src/models/{Segment.js → UserOrganization.js} +10 -33
- package/dist/src/models/UserPermission.d.ts +4 -11
- package/dist/src/models/UserPermission.js +27 -10
- package/index.ts +12 -6
- package/package.json +1 -1
- package/src/constant.ts +88 -3
- package/src/models/Client.ts +8 -5
- package/src/models/ClientRetention.ts +1 -1
- package/src/models/Invitation.ts +50 -0
- package/src/models/Organization.ts +18 -73
- package/src/models/Package.ts +24 -0
- package/src/models/Thread.ts +57 -0
- package/src/models/ThreadMessage.ts +67 -0
- package/src/models/User.ts +21 -43
- package/src/models/UserIdentity.ts +26 -0
- package/src/models/UserOrganization.ts +23 -0
- package/src/models/UserPermission.ts +31 -21
- package/src/models/QueryLog.ts +0 -35
- package/src/models/Segment.ts +0 -50
- package/src/models/SegmentCombination.ts +0 -68
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import mongoose, { Document, Schema, model } from "mongoose";
|
|
2
|
-
|
|
3
|
-
export interface ISegmentCombination extends Document {
|
|
4
|
-
name?: string;
|
|
5
|
-
combination?: [];
|
|
6
|
-
gagroup?: string;
|
|
7
|
-
secondaryFilters?: [];
|
|
8
|
-
segmentType?: string;
|
|
9
|
-
client?: mongoose.Schema.Types.ObjectId[];
|
|
10
|
-
published?: boolean;
|
|
11
|
-
order?: Number;
|
|
12
|
-
createdAt?: Date;
|
|
13
|
-
updatedAt?: Date;
|
|
14
|
-
organizationId?: mongoose.Schema.Types.ObjectId;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const SegmentSchema = new Schema<ISegmentCombination>({
|
|
18
|
-
organizationId: {
|
|
19
|
-
type: mongoose.Schema.Types.ObjectId,
|
|
20
|
-
ref: "organization",
|
|
21
|
-
default: null,
|
|
22
|
-
},
|
|
23
|
-
name: {
|
|
24
|
-
type: String,
|
|
25
|
-
},
|
|
26
|
-
combination: {
|
|
27
|
-
type: [],
|
|
28
|
-
},
|
|
29
|
-
gagroup: {
|
|
30
|
-
typr: String,
|
|
31
|
-
},
|
|
32
|
-
secondaryFilters: {
|
|
33
|
-
type: [],
|
|
34
|
-
default: null,
|
|
35
|
-
},
|
|
36
|
-
segmentType: {
|
|
37
|
-
type: String,
|
|
38
|
-
default: "general",
|
|
39
|
-
},
|
|
40
|
-
client: {
|
|
41
|
-
type: [mongoose.Schema.Types.ObjectId],
|
|
42
|
-
ref: "client",
|
|
43
|
-
default: null,
|
|
44
|
-
},
|
|
45
|
-
published: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
default: true,
|
|
48
|
-
},
|
|
49
|
-
order: {
|
|
50
|
-
type: Number,
|
|
51
|
-
default: 1,
|
|
52
|
-
},
|
|
53
|
-
createdAt: {
|
|
54
|
-
type: Date,
|
|
55
|
-
default: new Date(),
|
|
56
|
-
},
|
|
57
|
-
updatedAt: {
|
|
58
|
-
type: Date,
|
|
59
|
-
default: new Date(),
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
const SegmentCombination = mongoose.models.segmentcombination || model<ISegmentCombination>(
|
|
64
|
-
"segmentcombination",
|
|
65
|
-
SegmentSchema
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
export default SegmentCombination;
|