@justair/justair-library 6.14.0 → 7.0.0
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/config/db.d.ts +3 -1
- package/dist/config/db.d.ts.map +1 -1
- package/dist/config/tests/db.test.d.ts +2 -0
- package/dist/config/tests/db.test.d.ts.map +1 -0
- package/dist/models/measurements.d.ts +31 -36
- package/dist/models/measurements.d.ts.map +1 -1
- package/dist/models/monitorEpisodes.d.ts +122 -222
- package/dist/models/monitorEpisodes.d.ts.map +1 -1
- package/dist/models/organizations.d.ts.map +1 -1
- package/dist/models/passwordResetToken.d.ts +82 -122
- package/dist/models/passwordResetToken.d.ts.map +1 -1
- package/dist/models/sampleSites.d.ts.map +1 -1
- package/dist/models/sites.d.ts.map +1 -1
- package/dist/models/userNotifications.d.ts +260 -122
- package/dist/models/userNotifications.d.ts.map +1 -1
- package/dist/models/users.d.ts.map +1 -1
- package/dist/modules/audit/schema.d.ts +122 -195
- package/dist/modules/audit/schema.d.ts.map +1 -1
- package/package.json +8 -2
- package/src/config/db.js +6 -1
- package/src/config/tests/db.test.js +46 -0
- package/src/models/organizations.js +1 -3
- package/src/models/sampleSites.js +269 -260
- package/src/models/sites.js +65 -55
- package/src/models/users.js +1 -2
|
@@ -1,158 +1,118 @@
|
|
|
1
|
-
export const passwordResetTokenSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
1
|
+
export const passwordResetTokenSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
2
2
|
timestamps: true;
|
|
3
3
|
}, {
|
|
4
|
-
|
|
5
|
-
updatedAt: NativeDate;
|
|
6
|
-
} & {
|
|
7
|
-
adminId: {
|
|
8
|
-
prototype?: mongoose.Types.ObjectId;
|
|
9
|
-
cacheHexString?: unknown;
|
|
10
|
-
generate?: {};
|
|
11
|
-
createFromTime?: {};
|
|
12
|
-
createFromHexString?: {};
|
|
13
|
-
createFromBase64?: {};
|
|
14
|
-
isValid?: {};
|
|
15
|
-
};
|
|
4
|
+
adminId: mongoose.Types.ObjectId;
|
|
16
5
|
tokenHash: string;
|
|
17
6
|
used: boolean;
|
|
18
|
-
expiresAt:
|
|
19
|
-
}, mongoose.Document<unknown, {},
|
|
20
|
-
|
|
21
|
-
updatedAt: NativeDate;
|
|
22
|
-
} & {
|
|
23
|
-
adminId: {
|
|
24
|
-
prototype?: mongoose.Types.ObjectId;
|
|
25
|
-
cacheHexString?: unknown;
|
|
26
|
-
generate?: {};
|
|
27
|
-
createFromTime?: {};
|
|
28
|
-
createFromHexString?: {};
|
|
29
|
-
createFromBase64?: {};
|
|
30
|
-
isValid?: {};
|
|
31
|
-
};
|
|
7
|
+
expiresAt: NativeDate;
|
|
8
|
+
} & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, {
|
|
9
|
+
adminId: mongoose.Types.ObjectId;
|
|
32
10
|
tokenHash: string;
|
|
33
11
|
used: boolean;
|
|
34
|
-
expiresAt:
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
cacheHexString?: unknown;
|
|
42
|
-
generate?: {};
|
|
43
|
-
createFromTime?: {};
|
|
44
|
-
createFromHexString?: {};
|
|
45
|
-
createFromBase64?: {};
|
|
46
|
-
isValid?: {};
|
|
47
|
-
};
|
|
12
|
+
expiresAt: NativeDate;
|
|
13
|
+
} & mongoose.DefaultTimestampProps, {
|
|
14
|
+
id: string;
|
|
15
|
+
}, Omit<mongoose.DefaultSchemaOptions, "timestamps"> & {
|
|
16
|
+
timestamps: true;
|
|
17
|
+
}> & Omit<{
|
|
18
|
+
adminId: mongoose.Types.ObjectId;
|
|
48
19
|
tokenHash: string;
|
|
49
20
|
used: boolean;
|
|
50
|
-
expiresAt:
|
|
51
|
-
}
|
|
21
|
+
expiresAt: NativeDate;
|
|
22
|
+
} & mongoose.DefaultTimestampProps & {
|
|
52
23
|
_id: mongoose.Types.ObjectId;
|
|
53
|
-
}>;
|
|
54
|
-
export const PasswordResetToken: mongoose.Model<{
|
|
55
|
-
createdAt: NativeDate;
|
|
56
|
-
updatedAt: NativeDate;
|
|
57
24
|
} & {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
createFromHexString?: {};
|
|
64
|
-
createFromBase64?: {};
|
|
65
|
-
isValid?: {};
|
|
66
|
-
};
|
|
25
|
+
__v: number;
|
|
26
|
+
}, "id"> & mongoose.HydratedDocumentOverrides<{
|
|
27
|
+
id: string;
|
|
28
|
+
}>, unknown, {
|
|
29
|
+
adminId: mongoose.Types.ObjectId;
|
|
67
30
|
tokenHash: string;
|
|
68
31
|
used: boolean;
|
|
69
|
-
expiresAt:
|
|
70
|
-
}, {}, {}, {}, mongoose.Document<unknown, {}, {
|
|
32
|
+
expiresAt: NativeDate;
|
|
71
33
|
createdAt: NativeDate;
|
|
72
34
|
updatedAt: NativeDate;
|
|
73
35
|
} & {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
createFromBase64?: {};
|
|
81
|
-
isValid?: {};
|
|
82
|
-
};
|
|
36
|
+
_id: mongoose.Types.ObjectId;
|
|
37
|
+
} & {
|
|
38
|
+
__v: number;
|
|
39
|
+
}>;
|
|
40
|
+
export const PasswordResetToken: mongoose.Model<{
|
|
41
|
+
adminId: mongoose.Types.ObjectId;
|
|
83
42
|
tokenHash: string;
|
|
84
43
|
used: boolean;
|
|
85
|
-
expiresAt:
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
adminId: {
|
|
91
|
-
prototype?: mongoose.Types.ObjectId;
|
|
92
|
-
cacheHexString?: unknown;
|
|
93
|
-
generate?: {};
|
|
94
|
-
createFromTime?: {};
|
|
95
|
-
createFromHexString?: {};
|
|
96
|
-
createFromBase64?: {};
|
|
97
|
-
isValid?: {};
|
|
98
|
-
};
|
|
44
|
+
expiresAt: NativeDate;
|
|
45
|
+
} & mongoose.DefaultTimestampProps, {}, {}, {
|
|
46
|
+
id: string;
|
|
47
|
+
}, mongoose.Document<unknown, {}, {
|
|
48
|
+
adminId: mongoose.Types.ObjectId;
|
|
99
49
|
tokenHash: string;
|
|
100
50
|
used: boolean;
|
|
101
|
-
expiresAt:
|
|
102
|
-
} & {
|
|
51
|
+
expiresAt: NativeDate;
|
|
52
|
+
} & mongoose.DefaultTimestampProps, {
|
|
53
|
+
id: string;
|
|
54
|
+
}, {
|
|
55
|
+
timestamps: true;
|
|
56
|
+
}> & Omit<{
|
|
57
|
+
adminId: mongoose.Types.ObjectId;
|
|
58
|
+
tokenHash: string;
|
|
59
|
+
used: boolean;
|
|
60
|
+
expiresAt: NativeDate;
|
|
61
|
+
} & mongoose.DefaultTimestampProps & {
|
|
103
62
|
_id: mongoose.Types.ObjectId;
|
|
104
|
-
}
|
|
63
|
+
} & {
|
|
64
|
+
__v: number;
|
|
65
|
+
}, "id"> & mongoose.HydratedDocumentOverrides<{
|
|
66
|
+
id: string;
|
|
67
|
+
}>, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
105
68
|
timestamps: true;
|
|
106
69
|
}, {
|
|
107
|
-
|
|
108
|
-
|
|
70
|
+
adminId: mongoose.Types.ObjectId;
|
|
71
|
+
tokenHash: string;
|
|
72
|
+
used: boolean;
|
|
73
|
+
expiresAt: NativeDate;
|
|
74
|
+
} & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, {
|
|
75
|
+
adminId: mongoose.Types.ObjectId;
|
|
76
|
+
tokenHash: string;
|
|
77
|
+
used: boolean;
|
|
78
|
+
expiresAt: NativeDate;
|
|
79
|
+
} & mongoose.DefaultTimestampProps, {
|
|
80
|
+
id: string;
|
|
81
|
+
}, Omit<mongoose.DefaultSchemaOptions, "timestamps"> & {
|
|
82
|
+
timestamps: true;
|
|
83
|
+
}> & Omit<{
|
|
84
|
+
adminId: mongoose.Types.ObjectId;
|
|
85
|
+
tokenHash: string;
|
|
86
|
+
used: boolean;
|
|
87
|
+
expiresAt: NativeDate;
|
|
88
|
+
} & mongoose.DefaultTimestampProps & {
|
|
89
|
+
_id: mongoose.Types.ObjectId;
|
|
109
90
|
} & {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
createFromHexString?: {};
|
|
116
|
-
createFromBase64?: {};
|
|
117
|
-
isValid?: {};
|
|
118
|
-
};
|
|
91
|
+
__v: number;
|
|
92
|
+
}, "id"> & mongoose.HydratedDocumentOverrides<{
|
|
93
|
+
id: string;
|
|
94
|
+
}>, unknown, {
|
|
95
|
+
adminId: mongoose.Types.ObjectId;
|
|
119
96
|
tokenHash: string;
|
|
120
97
|
used: boolean;
|
|
121
|
-
expiresAt:
|
|
122
|
-
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
98
|
+
expiresAt: NativeDate;
|
|
123
99
|
createdAt: NativeDate;
|
|
124
100
|
updatedAt: NativeDate;
|
|
125
101
|
} & {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
createFromHexString?: {};
|
|
132
|
-
createFromBase64?: {};
|
|
133
|
-
isValid?: {};
|
|
134
|
-
};
|
|
102
|
+
_id: mongoose.Types.ObjectId;
|
|
103
|
+
} & {
|
|
104
|
+
__v: number;
|
|
105
|
+
}>, {
|
|
106
|
+
adminId: mongoose.Types.ObjectId;
|
|
135
107
|
tokenHash: string;
|
|
136
108
|
used: boolean;
|
|
137
|
-
expiresAt:
|
|
138
|
-
}>> & mongoose.FlatRecord<{
|
|
109
|
+
expiresAt: NativeDate;
|
|
139
110
|
createdAt: NativeDate;
|
|
140
111
|
updatedAt: NativeDate;
|
|
141
112
|
} & {
|
|
142
|
-
adminId: {
|
|
143
|
-
prototype?: mongoose.Types.ObjectId;
|
|
144
|
-
cacheHexString?: unknown;
|
|
145
|
-
generate?: {};
|
|
146
|
-
createFromTime?: {};
|
|
147
|
-
createFromHexString?: {};
|
|
148
|
-
createFromBase64?: {};
|
|
149
|
-
isValid?: {};
|
|
150
|
-
};
|
|
151
|
-
tokenHash: string;
|
|
152
|
-
used: boolean;
|
|
153
|
-
expiresAt: Date;
|
|
154
|
-
}> & {
|
|
155
113
|
_id: mongoose.Types.ObjectId;
|
|
156
|
-
}
|
|
114
|
+
} & {
|
|
115
|
+
__v: number;
|
|
116
|
+
}>;
|
|
157
117
|
import mongoose from 'mongoose';
|
|
158
118
|
//# sourceMappingURL=passwordResetToken.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passwordResetToken.d.ts","sourceRoot":"","sources":["../../src/models/passwordResetToken.js"],"names":[],"mappings":"AAgBA
|
|
1
|
+
{"version":3,"file":"passwordResetToken.d.ts","sourceRoot":"","sources":["../../src/models/passwordResetToken.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQE;AAKF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA0F;qBA7BrE,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sampleSites.d.ts","sourceRoot":"","sources":["../../src/models/sampleSites.js"],"names":[],"mappings":"AAsDA,
|
|
1
|
+
{"version":3,"file":"sampleSites.d.ts","sourceRoot":"","sources":["../../src/models/sampleSites.js"],"names":[],"mappings":"AAsDA,oCAiEE;AAoJF,8BAAqE;AA3OrE,wCAgBE;AAGF,kCAAiF;AA7CjF,4CAAuD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../src/models/sites.js"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../src/models/sites.js"],"names":[],"mappings":"AAGA,8BA8CE;AAaF,wBAAmD"}
|
|
@@ -1,174 +1,312 @@
|
|
|
1
|
-
declare const baseSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
1
|
+
declare const baseSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
2
2
|
timestamps: true;
|
|
3
3
|
discriminatorKey: string;
|
|
4
4
|
}, {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
user: mongoose.Types.ObjectId;
|
|
6
|
+
channel: string;
|
|
7
|
+
status: string;
|
|
8
|
+
sentAt: NativeDate;
|
|
9
|
+
message?: string;
|
|
10
|
+
} & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, {
|
|
11
|
+
user: mongoose.Types.ObjectId;
|
|
12
|
+
channel: string;
|
|
13
|
+
status: string;
|
|
14
|
+
sentAt: NativeDate;
|
|
15
|
+
message?: string;
|
|
16
|
+
} & mongoose.DefaultTimestampProps, {
|
|
17
|
+
id: string;
|
|
18
|
+
}, Omit<mongoose.DefaultSchemaOptions, "timestamps" | "discriminatorKey"> & {
|
|
19
|
+
timestamps: true;
|
|
20
|
+
discriminatorKey: string;
|
|
21
|
+
}> & Omit<{
|
|
22
|
+
user: mongoose.Types.ObjectId;
|
|
23
|
+
channel: string;
|
|
24
|
+
status: string;
|
|
25
|
+
sentAt: NativeDate;
|
|
26
|
+
message?: string;
|
|
27
|
+
} & mongoose.DefaultTimestampProps & {
|
|
28
|
+
_id: mongoose.Types.ObjectId;
|
|
7
29
|
} & {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
createFromHexString?: {};
|
|
14
|
-
createFromBase64?: {};
|
|
15
|
-
isValid?: {};
|
|
16
|
-
};
|
|
30
|
+
__v: number;
|
|
31
|
+
}, "id"> & mongoose.HydratedDocumentOverrides<{
|
|
32
|
+
id: string;
|
|
33
|
+
}>, unknown, {
|
|
34
|
+
user: mongoose.Types.ObjectId;
|
|
17
35
|
channel: string;
|
|
18
36
|
status: string;
|
|
19
|
-
sentAt:
|
|
37
|
+
sentAt: NativeDate;
|
|
20
38
|
message?: string;
|
|
21
|
-
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
22
39
|
createdAt: NativeDate;
|
|
23
40
|
updatedAt: NativeDate;
|
|
24
41
|
} & {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
createFromBase64?: {};
|
|
32
|
-
isValid?: {};
|
|
33
|
-
};
|
|
42
|
+
_id: mongoose.Types.ObjectId;
|
|
43
|
+
} & {
|
|
44
|
+
__v: number;
|
|
45
|
+
}>;
|
|
46
|
+
export const UserNotification: mongoose.Model<{
|
|
47
|
+
user: mongoose.Types.ObjectId;
|
|
34
48
|
channel: string;
|
|
35
49
|
status: string;
|
|
36
|
-
sentAt:
|
|
50
|
+
sentAt: NativeDate;
|
|
37
51
|
message?: string;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
52
|
+
} & mongoose.DefaultTimestampProps, {}, {}, {
|
|
53
|
+
id: string;
|
|
54
|
+
}, mongoose.Document<unknown, {}, {
|
|
55
|
+
user: mongoose.Types.ObjectId;
|
|
56
|
+
channel: string;
|
|
57
|
+
status: string;
|
|
58
|
+
sentAt: NativeDate;
|
|
59
|
+
message?: string;
|
|
60
|
+
} & mongoose.DefaultTimestampProps, {
|
|
61
|
+
id: string;
|
|
62
|
+
}, {
|
|
63
|
+
timestamps: true;
|
|
64
|
+
discriminatorKey: string;
|
|
65
|
+
}> & Omit<{
|
|
66
|
+
user: mongoose.Types.ObjectId;
|
|
67
|
+
channel: string;
|
|
68
|
+
status: string;
|
|
69
|
+
sentAt: NativeDate;
|
|
70
|
+
message?: string;
|
|
71
|
+
} & mongoose.DefaultTimestampProps & {
|
|
72
|
+
_id: mongoose.Types.ObjectId;
|
|
41
73
|
} & {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
74
|
+
__v: number;
|
|
75
|
+
}, "id"> & mongoose.HydratedDocumentOverrides<{
|
|
76
|
+
id: string;
|
|
77
|
+
}>, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
78
|
+
timestamps: true;
|
|
79
|
+
discriminatorKey: string;
|
|
80
|
+
}, {
|
|
81
|
+
user: mongoose.Types.ObjectId;
|
|
82
|
+
channel: string;
|
|
83
|
+
status: string;
|
|
84
|
+
sentAt: NativeDate;
|
|
85
|
+
message?: string;
|
|
86
|
+
} & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, {
|
|
87
|
+
user: mongoose.Types.ObjectId;
|
|
88
|
+
channel: string;
|
|
89
|
+
status: string;
|
|
90
|
+
sentAt: NativeDate;
|
|
91
|
+
message?: string;
|
|
92
|
+
} & mongoose.DefaultTimestampProps, {
|
|
93
|
+
id: string;
|
|
94
|
+
}, Omit<mongoose.DefaultSchemaOptions, "timestamps" | "discriminatorKey"> & {
|
|
95
|
+
timestamps: true;
|
|
96
|
+
discriminatorKey: string;
|
|
97
|
+
}> & Omit<{
|
|
98
|
+
user: mongoose.Types.ObjectId;
|
|
51
99
|
channel: string;
|
|
52
100
|
status: string;
|
|
53
|
-
sentAt:
|
|
101
|
+
sentAt: NativeDate;
|
|
54
102
|
message?: string;
|
|
55
|
-
}
|
|
103
|
+
} & mongoose.DefaultTimestampProps & {
|
|
56
104
|
_id: mongoose.Types.ObjectId;
|
|
57
|
-
}>;
|
|
58
|
-
export const UserNotification: mongoose.Model<{
|
|
59
|
-
createdAt: NativeDate;
|
|
60
|
-
updatedAt: NativeDate;
|
|
61
105
|
} & {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
createFromHexString?: {};
|
|
68
|
-
createFromBase64?: {};
|
|
69
|
-
isValid?: {};
|
|
70
|
-
};
|
|
106
|
+
__v: number;
|
|
107
|
+
}, "id"> & mongoose.HydratedDocumentOverrides<{
|
|
108
|
+
id: string;
|
|
109
|
+
}>, unknown, {
|
|
110
|
+
user: mongoose.Types.ObjectId;
|
|
71
111
|
channel: string;
|
|
72
112
|
status: string;
|
|
73
|
-
sentAt:
|
|
113
|
+
sentAt: NativeDate;
|
|
74
114
|
message?: string;
|
|
75
|
-
}, {}, {}, {}, mongoose.Document<unknown, {}, {
|
|
76
115
|
createdAt: NativeDate;
|
|
77
116
|
updatedAt: NativeDate;
|
|
78
117
|
} & {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
createFromHexString?: {};
|
|
85
|
-
createFromBase64?: {};
|
|
86
|
-
isValid?: {};
|
|
87
|
-
};
|
|
118
|
+
_id: mongoose.Types.ObjectId;
|
|
119
|
+
} & {
|
|
120
|
+
__v: number;
|
|
121
|
+
}>, {
|
|
122
|
+
user: mongoose.Types.ObjectId;
|
|
88
123
|
channel: string;
|
|
89
124
|
status: string;
|
|
90
|
-
sentAt:
|
|
125
|
+
sentAt: NativeDate;
|
|
91
126
|
message?: string;
|
|
92
|
-
}> & {
|
|
93
127
|
createdAt: NativeDate;
|
|
94
128
|
updatedAt: NativeDate;
|
|
95
129
|
} & {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
130
|
+
_id: mongoose.Types.ObjectId;
|
|
131
|
+
} & {
|
|
132
|
+
__v: number;
|
|
133
|
+
}>;
|
|
134
|
+
export const AqiAlertNotification: mongoose.Model<{
|
|
135
|
+
user: mongoose.Types.ObjectId;
|
|
136
|
+
channel: string;
|
|
137
|
+
status: string;
|
|
138
|
+
sentAt: NativeDate;
|
|
139
|
+
message?: string;
|
|
140
|
+
} & mongoose.DefaultTimestampProps & {
|
|
141
|
+
monitors: mongoose.Types.ObjectId[];
|
|
142
|
+
episodes: mongoose.Types.ObjectId[];
|
|
143
|
+
alertLevel: string;
|
|
144
|
+
}, {}, {}, {
|
|
145
|
+
id: string;
|
|
146
|
+
}, mongoose.Document<unknown, {}, {
|
|
147
|
+
user: mongoose.Types.ObjectId;
|
|
105
148
|
channel: string;
|
|
106
149
|
status: string;
|
|
107
|
-
sentAt:
|
|
150
|
+
sentAt: NativeDate;
|
|
108
151
|
message?: string;
|
|
152
|
+
} & mongoose.DefaultTimestampProps & {
|
|
153
|
+
monitors: mongoose.Types.ObjectId[];
|
|
154
|
+
episodes: mongoose.Types.ObjectId[];
|
|
155
|
+
alertLevel: string;
|
|
156
|
+
}, {
|
|
157
|
+
id: string;
|
|
158
|
+
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
159
|
+
user: mongoose.Types.ObjectId;
|
|
160
|
+
channel: string;
|
|
161
|
+
status: string;
|
|
162
|
+
sentAt: NativeDate;
|
|
163
|
+
message?: string;
|
|
164
|
+
} & mongoose.DefaultTimestampProps & {
|
|
165
|
+
monitors: mongoose.Types.ObjectId[];
|
|
166
|
+
episodes: mongoose.Types.ObjectId[];
|
|
167
|
+
alertLevel: string;
|
|
109
168
|
} & {
|
|
110
169
|
_id: mongoose.Types.ObjectId;
|
|
111
|
-
}, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
112
|
-
timestamps: true;
|
|
113
|
-
discriminatorKey: string;
|
|
114
|
-
}, {
|
|
115
|
-
createdAt: NativeDate;
|
|
116
|
-
updatedAt: NativeDate;
|
|
117
170
|
} & {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
createFromHexString?: {};
|
|
124
|
-
createFromBase64?: {};
|
|
125
|
-
isValid?: {};
|
|
126
|
-
};
|
|
171
|
+
__v: number;
|
|
172
|
+
}, "id"> & mongoose.HydratedDocumentOverrides<{
|
|
173
|
+
id: string;
|
|
174
|
+
}>, any, {
|
|
175
|
+
user: mongoose.Types.ObjectId;
|
|
127
176
|
channel: string;
|
|
128
177
|
status: string;
|
|
129
|
-
sentAt:
|
|
178
|
+
sentAt: NativeDate;
|
|
130
179
|
message?: string;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
180
|
+
} & mongoose.DefaultTimestampProps & {
|
|
181
|
+
monitors: mongoose.Types.ObjectId[];
|
|
182
|
+
episodes: mongoose.Types.ObjectId[];
|
|
183
|
+
alertLevel: string;
|
|
184
|
+
}>;
|
|
185
|
+
export const DeviceOfflineNotification: mongoose.Model<{
|
|
186
|
+
user: mongoose.Types.ObjectId;
|
|
187
|
+
channel: string;
|
|
188
|
+
status: string;
|
|
189
|
+
sentAt: NativeDate;
|
|
190
|
+
message?: string;
|
|
191
|
+
} & mongoose.DefaultTimestampProps & {
|
|
192
|
+
monitors: mongoose.Types.ObjectId[];
|
|
193
|
+
}, {}, {}, {
|
|
194
|
+
id: string;
|
|
195
|
+
}, mongoose.Document<unknown, {}, {
|
|
196
|
+
user: mongoose.Types.ObjectId;
|
|
197
|
+
channel: string;
|
|
198
|
+
status: string;
|
|
199
|
+
sentAt: NativeDate;
|
|
200
|
+
message?: string;
|
|
201
|
+
} & mongoose.DefaultTimestampProps & {
|
|
202
|
+
monitors: mongoose.Types.ObjectId[];
|
|
203
|
+
}, {
|
|
204
|
+
id: string;
|
|
205
|
+
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
206
|
+
user: mongoose.Types.ObjectId;
|
|
207
|
+
channel: string;
|
|
208
|
+
status: string;
|
|
209
|
+
sentAt: NativeDate;
|
|
210
|
+
message?: string;
|
|
211
|
+
} & mongoose.DefaultTimestampProps & {
|
|
212
|
+
monitors: mongoose.Types.ObjectId[];
|
|
213
|
+
} & {
|
|
214
|
+
_id: mongoose.Types.ObjectId;
|
|
134
215
|
} & {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
createFromHexString?: {};
|
|
141
|
-
createFromBase64?: {};
|
|
142
|
-
isValid?: {};
|
|
143
|
-
};
|
|
216
|
+
__v: number;
|
|
217
|
+
}, "id"> & mongoose.HydratedDocumentOverrides<{
|
|
218
|
+
id: string;
|
|
219
|
+
}>, any, {
|
|
220
|
+
user: mongoose.Types.ObjectId;
|
|
144
221
|
channel: string;
|
|
145
222
|
status: string;
|
|
146
|
-
sentAt:
|
|
223
|
+
sentAt: NativeDate;
|
|
147
224
|
message?: string;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
225
|
+
} & mongoose.DefaultTimestampProps & {
|
|
226
|
+
monitors: mongoose.Types.ObjectId[];
|
|
227
|
+
}>;
|
|
228
|
+
export const WeeklyDigestNotification: mongoose.Model<{
|
|
229
|
+
user: mongoose.Types.ObjectId;
|
|
230
|
+
channel: string;
|
|
231
|
+
status: string;
|
|
232
|
+
sentAt: NativeDate;
|
|
233
|
+
message?: string;
|
|
234
|
+
} & mongoose.DefaultTimestampProps & {
|
|
235
|
+
periodStart?: NativeDate;
|
|
236
|
+
periodEnd?: NativeDate;
|
|
237
|
+
}, {}, {}, {
|
|
238
|
+
id: string;
|
|
239
|
+
}, mongoose.Document<unknown, {}, {
|
|
240
|
+
user: mongoose.Types.ObjectId;
|
|
241
|
+
channel: string;
|
|
242
|
+
status: string;
|
|
243
|
+
sentAt: NativeDate;
|
|
244
|
+
message?: string;
|
|
245
|
+
} & mongoose.DefaultTimestampProps & {
|
|
246
|
+
periodStart?: NativeDate;
|
|
247
|
+
periodEnd?: NativeDate;
|
|
248
|
+
}, {
|
|
249
|
+
id: string;
|
|
250
|
+
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
251
|
+
user: mongoose.Types.ObjectId;
|
|
252
|
+
channel: string;
|
|
253
|
+
status: string;
|
|
254
|
+
sentAt: NativeDate;
|
|
255
|
+
message?: string;
|
|
256
|
+
} & mongoose.DefaultTimestampProps & {
|
|
257
|
+
periodStart?: NativeDate;
|
|
258
|
+
periodEnd?: NativeDate;
|
|
151
259
|
} & {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
260
|
+
_id: mongoose.Types.ObjectId;
|
|
261
|
+
} & {
|
|
262
|
+
__v: number;
|
|
263
|
+
}, "id"> & mongoose.HydratedDocumentOverrides<{
|
|
264
|
+
id: string;
|
|
265
|
+
}>, any, {
|
|
266
|
+
user: mongoose.Types.ObjectId;
|
|
267
|
+
channel: string;
|
|
268
|
+
status: string;
|
|
269
|
+
sentAt: NativeDate;
|
|
270
|
+
message?: string;
|
|
271
|
+
} & mongoose.DefaultTimestampProps & {
|
|
272
|
+
periodStart?: NativeDate;
|
|
273
|
+
periodEnd?: NativeDate;
|
|
274
|
+
}>;
|
|
275
|
+
export const AccountNotification: mongoose.Model<{
|
|
276
|
+
user: mongoose.Types.ObjectId;
|
|
161
277
|
channel: string;
|
|
162
278
|
status: string;
|
|
163
|
-
sentAt:
|
|
279
|
+
sentAt: NativeDate;
|
|
164
280
|
message?: string;
|
|
165
|
-
}
|
|
281
|
+
} & mongoose.DefaultTimestampProps, {}, {}, {
|
|
282
|
+
id: string;
|
|
283
|
+
}, mongoose.Document<unknown, {}, {
|
|
284
|
+
user: mongoose.Types.ObjectId;
|
|
285
|
+
channel: string;
|
|
286
|
+
status: string;
|
|
287
|
+
sentAt: NativeDate;
|
|
288
|
+
message?: string;
|
|
289
|
+
} & mongoose.DefaultTimestampProps, {
|
|
290
|
+
id: string;
|
|
291
|
+
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
292
|
+
user: mongoose.Types.ObjectId;
|
|
293
|
+
channel: string;
|
|
294
|
+
status: string;
|
|
295
|
+
sentAt: NativeDate;
|
|
296
|
+
message?: string;
|
|
297
|
+
} & mongoose.DefaultTimestampProps & {
|
|
166
298
|
_id: mongoose.Types.ObjectId;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
299
|
+
} & {
|
|
300
|
+
__v: number;
|
|
301
|
+
}, "id"> & mongoose.HydratedDocumentOverrides<{
|
|
302
|
+
id: string;
|
|
303
|
+
}>, any, {
|
|
304
|
+
user: mongoose.Types.ObjectId;
|
|
305
|
+
channel: string;
|
|
306
|
+
status: string;
|
|
307
|
+
sentAt: NativeDate;
|
|
308
|
+
message?: string;
|
|
309
|
+
} & mongoose.DefaultTimestampProps>;
|
|
172
310
|
import mongoose from "mongoose";
|
|
173
311
|
export { baseSchema as userNotificationsSchema };
|
|
174
312
|
export { NOTIFICATION_KINDS, NOTIFICATION_CHANNELS, DELIVERY_STATUSES } from "../constants/userNotifications.js";
|