@amohamud23/notihub 1.0.61 → 1.0.63
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/README.md +7 -7
- package/dist/index.d.ts +3 -0
- package/dist/index.js +16 -6
- package/dist/{util → lib/util}/DateUtil.js +14 -12
- package/dist/{models → src/models}/CustomerMinifiedModel.d.ts +2 -1
- package/dist/{models → src/models}/CustomerModel.d.ts +2 -1
- package/dist/{models → src/models}/NotiHubStatsHistoryModel.d.ts +2 -1
- package/dist/{models → src/models}/NotiHubStatsModel.d.ts +2 -1
- package/dist/{models → src/models}/NotiTypeModel.d.ts +2 -1
- package/dist/{models → src/models}/NotificationModel.d.ts +2 -1
- package/dist/{models → src/models}/NotificationStatsModel.d.ts +2 -1
- package/dist/{models → src/models}/SubscriptionModel.d.ts +2 -1
- package/dist/{models → src/models}/SubscriptionTypeModel.d.ts +2 -1
- package/dist/{models → src/models}/UserModel.d.ts +2 -1
- package/dist/src/models/index.d.ts +74 -0
- package/dist/{models → src/models}/schemas/NotificationStatsSchema.d.ts +2 -2
- package/dist/types.d.ts +140 -0
- package/dist/types.js +2 -0
- package/package.json +31 -32
- package/dist/models/CustomerMinifiedModel.js +0 -7
- package/dist/models/CustomerModel.js +0 -9
- package/dist/models/NotiHubStatsHistoryModel.js +0 -9
- package/dist/models/NotiHubStatsModel.js +0 -12
- package/dist/models/NotiTypeModel.js +0 -9
- package/dist/models/NotificationModel.js +0 -14
- package/dist/models/NotificationStatsModel.js +0 -10
- package/dist/models/SubscriptionModel.js +0 -9
- package/dist/models/SubscriptionTypeModel.js +0 -9
- package/dist/models/UserModel.js +0 -7
- package/dist/models/index.d.ts +0 -74
- package/dist/models/index.js +0 -20
- package/dist/models/schemas/CustomerMinifiedSchema.js +0 -12
- package/dist/models/schemas/CustomerSchema.js +0 -12
- package/dist/models/schemas/NotiTypeSchema.js +0 -9
- package/dist/models/schemas/NotificationSchema.js +0 -13
- package/dist/models/schemas/NotificationStatsHistorySchema.js +0 -10
- package/dist/models/schemas/NotificationStatsSchema.js +0 -6
- package/dist/models/schemas/SubscriptionSchema.js +0 -11
- package/dist/models/schemas/SubscriptionTypeSchema.js +0 -6
- package/dist/models/schemas/UserSchema.js +0 -9
- /package/dist/{models → src/models}/schemas/CustomerMinifiedSchema.d.ts +0 -0
- /package/dist/{models → src/models}/schemas/CustomerSchema.d.ts +0 -0
- /package/dist/{models → src/models}/schemas/NotiTypeSchema.d.ts +0 -0
- /package/dist/{models → src/models}/schemas/NotificationSchema.d.ts +0 -0
- /package/dist/{models → src/models}/schemas/NotificationStatsHistorySchema.d.ts +0 -0
- /package/dist/{models → src/models}/schemas/SubscriptionSchema.d.ts +0 -0
- /package/dist/{models → src/models}/schemas/SubscriptionTypeSchema.d.ts +0 -0
- /package/dist/{models → src/models}/schemas/UserSchema.d.ts +0 -0
- /package/dist/{util → src/util}/DateUtil.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# NotiHubPackage
|
|
2
|
-
|
|
3
|
-
### How to publish package
|
|
4
|
-
|
|
5
|
-
1. Increment version
|
|
6
|
-
|
|
7
|
-
2. Run `npm publish`
|
|
1
|
+
# NotiHubPackage
|
|
2
|
+
|
|
3
|
+
### How to publish package
|
|
4
|
+
|
|
5
|
+
1. Increment version
|
|
6
|
+
|
|
7
|
+
2. Run `npm publish`
|
package/dist/index.d.ts
ADDED
package/dist/index.js
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
4
15
|
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
exports.default = { DateUtil: DateUtil_1.default, DB: index_1.default };
|
|
17
|
+
__exportStar(require("./src/util/DateUtil"), exports);
|
|
18
|
+
__exportStar(require("./src/models/index"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const getDate = (dateStr) => {
|
|
4
|
+
const date = new Date(dateStr); // Convert seconds to milliseconds
|
|
5
|
+
const year = date.getFullYear();
|
|
6
|
+
const month = (date.getMonth() + 1).toString().padStart(2, "0"); // Months are zero-based
|
|
7
|
+
const day = date.getDate().toString().padStart(2, "0");
|
|
8
|
+
const formattedDate = `${month}-${day}-${year}`;
|
|
7
9
|
return formattedDate;
|
|
8
10
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const getDateFormat = (dateStr) => {
|
|
12
|
+
const date = new Date(dateStr);
|
|
13
|
+
const now = new Date();
|
|
14
|
+
const seconds = Math.floor((now.getTime() - date.getTime()) / 1000);
|
|
15
|
+
let interval = seconds / 31536000;
|
|
14
16
|
if (interval > 1) {
|
|
15
17
|
return date.toLocaleDateString("en-US", {
|
|
16
18
|
year: "numeric",
|
|
@@ -51,4 +53,4 @@ function addMonths(date, months) {
|
|
|
51
53
|
date.setMonth(date.getMonth() + months);
|
|
52
54
|
return date;
|
|
53
55
|
}
|
|
54
|
-
|
|
56
|
+
exports.default = { addMonths, getDate, getDateFormat };
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
/// <reference types="mongoose" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
26
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
import { INotiHubCustomerMinified } from "../../types";
|
|
27
28
|
declare const CustomerMinified: import("mongoose").Model<INotiHubCustomerMinified, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiHubCustomerMinified> & INotiHubCustomerMinified & Required<{
|
|
28
29
|
_id: string;
|
|
29
30
|
}> & {
|
|
30
|
-
__v?: number;
|
|
31
|
+
__v?: number | undefined;
|
|
31
32
|
}, any>;
|
|
32
33
|
export default CustomerMinified;
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
/// <reference types="mongoose" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
26
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
import { INotiHubCustomer } from "../../types";
|
|
27
28
|
declare const Customer: import("mongoose").Model<INotiHubCustomer, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiHubCustomer> & INotiHubCustomer & Required<{
|
|
28
29
|
_id: string;
|
|
29
30
|
}> & {
|
|
30
|
-
__v?: number;
|
|
31
|
+
__v?: number | undefined;
|
|
31
32
|
}, any>;
|
|
32
33
|
export default Customer;
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
/// <reference types="mongoose" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
26
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
import { INotiHubStatsHistory } from "../../types";
|
|
27
28
|
declare const NotiHubStatsHistory: import("mongoose").Model<INotiHubStatsHistory, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiHubStatsHistory> & INotiHubStatsHistory & {
|
|
28
29
|
_id: import("mongoose").Types.ObjectId;
|
|
29
30
|
} & {
|
|
30
|
-
__v?: number;
|
|
31
|
+
__v?: number | undefined;
|
|
31
32
|
}, any>;
|
|
32
33
|
export default NotiHubStatsHistory;
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
/// <reference types="mongoose" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
26
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
import { INotiHubStats } from "../../types";
|
|
27
28
|
declare const EntityNotiHubStats: import("mongoose").Model<INotiHubStats, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiHubStats> & INotiHubStats & {
|
|
28
29
|
_id: import("mongoose").Types.ObjectId;
|
|
29
30
|
} & {
|
|
30
|
-
__v?: number;
|
|
31
|
+
__v?: number | undefined;
|
|
31
32
|
}, any>;
|
|
32
33
|
export default EntityNotiHubStats;
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
/// <reference types="mongoose" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
26
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
import { INotiType } from "../../types";
|
|
27
28
|
declare const NotiTypeModel: import("mongoose").Model<INotiType, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiType> & INotiType & Required<{
|
|
28
29
|
_id: string;
|
|
29
30
|
}> & {
|
|
30
|
-
__v?: number;
|
|
31
|
+
__v?: number | undefined;
|
|
31
32
|
}, any>;
|
|
32
33
|
export default NotiTypeModel;
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
/// <reference types="mongoose" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
26
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
import { INotiHubNotification } from "../../types";
|
|
27
28
|
declare const NotificationModel: import("mongoose").Model<INotiHubNotification, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiHubNotification> & INotiHubNotification & Required<{
|
|
28
29
|
_id: string;
|
|
29
30
|
}> & {
|
|
30
|
-
__v?: number;
|
|
31
|
+
__v?: number | undefined;
|
|
31
32
|
}, any>;
|
|
32
33
|
export default NotificationModel;
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
/// <reference types="mongoose" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
26
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
import { INotiHubNotificationStats } from "../../types";
|
|
27
28
|
declare const NotificationStatsModel: import("mongoose").Model<INotiHubNotificationStats, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiHubNotificationStats> & INotiHubNotificationStats & Required<{
|
|
28
29
|
_id: string;
|
|
29
30
|
}> & {
|
|
30
|
-
__v?: number;
|
|
31
|
+
__v?: number | undefined;
|
|
31
32
|
}, any>;
|
|
32
33
|
export default NotificationStatsModel;
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
26
|
import mongoose from "mongoose";
|
|
27
|
+
import { INotiHubSubscription } from "../../types";
|
|
27
28
|
declare const Subscription: mongoose.Model<INotiHubSubscription, {}, {}, {}, mongoose.Document<unknown, {}, INotiHubSubscription> & INotiHubSubscription & Required<{
|
|
28
29
|
_id: string;
|
|
29
30
|
}> & {
|
|
30
|
-
__v?: number;
|
|
31
|
+
__v?: number | undefined;
|
|
31
32
|
}, any>;
|
|
32
33
|
export default Subscription;
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
/// <reference types="mongoose" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
26
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
import { IUserSubscribeNotifier } from "../../types";
|
|
27
28
|
declare const SubscriptionType: import("mongoose").Model<IUserSubscribeNotifier, {}, {}, {}, import("mongoose").Document<unknown, {}, IUserSubscribeNotifier> & IUserSubscribeNotifier & {
|
|
28
29
|
_id: import("mongoose").Types.ObjectId;
|
|
29
30
|
} & {
|
|
30
|
-
__v?: number;
|
|
31
|
+
__v?: number | undefined;
|
|
31
32
|
}, any>;
|
|
32
33
|
export default SubscriptionType;
|
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
/// <reference types="mongoose" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype" />
|
|
26
26
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
import { INotiHubUser } from "../../types";
|
|
27
28
|
declare const UserModel: import("mongoose").Model<INotiHubUser, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiHubUser> & INotiHubUser & Required<{
|
|
28
29
|
_id: string;
|
|
29
30
|
}> & {
|
|
30
|
-
__v?: number;
|
|
31
|
+
__v?: number | undefined;
|
|
31
32
|
}, any>;
|
|
32
33
|
export default UserModel;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
+
declare const _default: {
|
|
28
|
+
UserModel: import("mongoose").Model<import("../..").INotiHubUser, {}, {}, {}, import("mongoose").Document<unknown, {}, import("../..").INotiHubUser> & import("../..").INotiHubUser & Required<{
|
|
29
|
+
_id: string;
|
|
30
|
+
}> & {
|
|
31
|
+
__v?: number | undefined;
|
|
32
|
+
}, any>;
|
|
33
|
+
Subscription: import("mongoose").Model<import("../..").INotiHubSubscription, {}, {}, {}, import("mongoose").Document<unknown, {}, import("../..").INotiHubSubscription> & import("../..").INotiHubSubscription & Required<{
|
|
34
|
+
_id: string;
|
|
35
|
+
}> & {
|
|
36
|
+
__v?: number | undefined;
|
|
37
|
+
}, any>;
|
|
38
|
+
SubscriptionType: import("mongoose").Model<import("../..").IUserSubscribeNotifier, {}, {}, {}, import("mongoose").Document<unknown, {}, import("../..").IUserSubscribeNotifier> & import("../..").IUserSubscribeNotifier & {
|
|
39
|
+
_id: import("mongoose").Types.ObjectId;
|
|
40
|
+
} & {
|
|
41
|
+
__v?: number | undefined;
|
|
42
|
+
}, any>;
|
|
43
|
+
NotiTypeModel: import("mongoose").Model<import("../..").INotiType, {}, {}, {}, import("mongoose").Document<unknown, {}, import("../..").INotiType> & import("../..").INotiType & Required<{
|
|
44
|
+
_id: string;
|
|
45
|
+
}> & {
|
|
46
|
+
__v?: number | undefined;
|
|
47
|
+
}, any>;
|
|
48
|
+
NotificationStatsModel: import("mongoose").Model<import("../..").INotiHubNotificationStats, {}, {}, {}, import("mongoose").Document<unknown, {}, import("../..").INotiHubNotificationStats> & import("../..").INotiHubNotificationStats & Required<{
|
|
49
|
+
_id: string;
|
|
50
|
+
}> & {
|
|
51
|
+
__v?: number | undefined;
|
|
52
|
+
}, any>;
|
|
53
|
+
NotiHubStatsHistory: import("mongoose").Model<import("../..").INotiHubStatsHistory, {}, {}, {}, import("mongoose").Document<unknown, {}, import("../..").INotiHubStatsHistory> & import("../..").INotiHubStatsHistory & {
|
|
54
|
+
_id: import("mongoose").Types.ObjectId;
|
|
55
|
+
} & {
|
|
56
|
+
__v?: number | undefined;
|
|
57
|
+
}, any>;
|
|
58
|
+
NotificationModel: import("mongoose").Model<import("../..").INotiHubNotification, {}, {}, {}, import("mongoose").Document<unknown, {}, import("../..").INotiHubNotification> & import("../..").INotiHubNotification & Required<{
|
|
59
|
+
_id: string;
|
|
60
|
+
}> & {
|
|
61
|
+
__v?: number | undefined;
|
|
62
|
+
}, any>;
|
|
63
|
+
Customer: import("mongoose").Model<import("../..").INotiHubCustomer, {}, {}, {}, import("mongoose").Document<unknown, {}, import("../..").INotiHubCustomer> & import("../..").INotiHubCustomer & Required<{
|
|
64
|
+
_id: string;
|
|
65
|
+
}> & {
|
|
66
|
+
__v?: number | undefined;
|
|
67
|
+
}, any>;
|
|
68
|
+
CustomerMinified: import("mongoose").Model<import("../..").INotiHubCustomerMinified, {}, {}, {}, import("mongoose").Document<unknown, {}, import("../..").INotiHubCustomerMinified> & import("../..").INotiHubCustomerMinified & Required<{
|
|
69
|
+
_id: string;
|
|
70
|
+
}> & {
|
|
71
|
+
__v?: number | undefined;
|
|
72
|
+
}, any>;
|
|
73
|
+
};
|
|
74
|
+
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const NotificationSchema: {
|
|
2
2
|
notification: {
|
|
3
|
-
new (title: string, options?: NotificationOptions): Notification;
|
|
3
|
+
new (title: string, options?: NotificationOptions | undefined): Notification;
|
|
4
4
|
prototype: Notification;
|
|
5
5
|
readonly permission: NotificationPermission;
|
|
6
|
-
requestPermission(deprecatedCallback?: NotificationPermissionCallback): Promise<NotificationPermission>;
|
|
6
|
+
requestPermission(deprecatedCallback?: NotificationPermissionCallback | undefined): Promise<NotificationPermission>;
|
|
7
7
|
};
|
|
8
8
|
views: {
|
|
9
9
|
type: NumberConstructor;
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
export type CreateNotiRequestBody = {
|
|
2
|
+
subscriptionId: string;
|
|
3
|
+
userId: string;
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
|
+
type: string;
|
|
7
|
+
};
|
|
8
|
+
export type CreateSubscriptionRequestBody = {
|
|
9
|
+
subscriptionId: string;
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
export type CreateUserRequestBody = {
|
|
13
|
+
name: string;
|
|
14
|
+
email: string;
|
|
15
|
+
token: string;
|
|
16
|
+
};
|
|
17
|
+
export type ICreateCustomerRequestBody = {
|
|
18
|
+
email: string;
|
|
19
|
+
username: string;
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
export type ICreateNotiRequestBody = {};
|
|
23
|
+
export type INotiHubCustomerMinified = {
|
|
24
|
+
_id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
img: INotiHubImage;
|
|
27
|
+
username: string;
|
|
28
|
+
createdAt: string;
|
|
29
|
+
updatedAt: string;
|
|
30
|
+
};
|
|
31
|
+
export type INotiHubCustomer = {
|
|
32
|
+
_id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
email: string;
|
|
35
|
+
minified: INotiHubCustomerMinified;
|
|
36
|
+
verified: boolean;
|
|
37
|
+
paid: boolean;
|
|
38
|
+
confirmed: boolean;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
updatedAt: string;
|
|
41
|
+
};
|
|
42
|
+
export type INotiHubNotification = {
|
|
43
|
+
_id?: string;
|
|
44
|
+
title: string;
|
|
45
|
+
message: string;
|
|
46
|
+
type: string;
|
|
47
|
+
entityId: string;
|
|
48
|
+
entityMinified: INotiHubCustomerMinified;
|
|
49
|
+
body: string;
|
|
50
|
+
createdAt: string;
|
|
51
|
+
updatedAt: string;
|
|
52
|
+
};
|
|
53
|
+
export type INotiHubNotificationStats = {
|
|
54
|
+
_id?: string;
|
|
55
|
+
notification: INotiHubNotification;
|
|
56
|
+
views: number;
|
|
57
|
+
};
|
|
58
|
+
export type INotiHubUser = {
|
|
59
|
+
_id?: string;
|
|
60
|
+
pushToken: string;
|
|
61
|
+
name: string;
|
|
62
|
+
email: string;
|
|
63
|
+
subscriptions: number;
|
|
64
|
+
events: number;
|
|
65
|
+
};
|
|
66
|
+
export type INotiHubImage = {
|
|
67
|
+
bucket: string;
|
|
68
|
+
key: string;
|
|
69
|
+
};
|
|
70
|
+
export type INotiHubStats = {
|
|
71
|
+
entityRef: string;
|
|
72
|
+
entity: INotiHubCustomer;
|
|
73
|
+
subscription: number;
|
|
74
|
+
notifications: number;
|
|
75
|
+
views: number;
|
|
76
|
+
};
|
|
77
|
+
export type INotiHubStatsHistory = {
|
|
78
|
+
entityId: string;
|
|
79
|
+
type: "MONTH" | "YEAR";
|
|
80
|
+
subscription: number;
|
|
81
|
+
notifications: number;
|
|
82
|
+
views: number;
|
|
83
|
+
};
|
|
84
|
+
export type INotiType = {
|
|
85
|
+
_id?: string;
|
|
86
|
+
type: string;
|
|
87
|
+
entity: string;
|
|
88
|
+
createdAt: string;
|
|
89
|
+
updatedAt: string;
|
|
90
|
+
};
|
|
91
|
+
export type INotiTypeStats = {
|
|
92
|
+
_id?: string;
|
|
93
|
+
notiTypeId: string;
|
|
94
|
+
subscribed: number;
|
|
95
|
+
createdAt: string;
|
|
96
|
+
};
|
|
97
|
+
export type IUserSubscription = {
|
|
98
|
+
user: INotiHubUser;
|
|
99
|
+
entity: INotiHubCustomer;
|
|
100
|
+
subscriptionId: string;
|
|
101
|
+
type: "SUBSCRIBED" | "UNSUBSCRIBED";
|
|
102
|
+
createdAt: string;
|
|
103
|
+
updatedAt: string;
|
|
104
|
+
};
|
|
105
|
+
export type IUserSubscribeNotifier = {
|
|
106
|
+
userId: string;
|
|
107
|
+
entityId: string;
|
|
108
|
+
notiTypeId: string;
|
|
109
|
+
createdAt: string;
|
|
110
|
+
updatedAt: string;
|
|
111
|
+
};
|
|
112
|
+
export type INotiHubUserView = {
|
|
113
|
+
userId: string;
|
|
114
|
+
entityId: string;
|
|
115
|
+
notificationId: string;
|
|
116
|
+
createdAt: string;
|
|
117
|
+
};
|
|
118
|
+
export type INotiHubSubscription = {
|
|
119
|
+
_id?: string;
|
|
120
|
+
subscriptionId: string;
|
|
121
|
+
entity: INotiHubCustomer;
|
|
122
|
+
user: INotiHubUser;
|
|
123
|
+
type: "SUBSCRIBED" | "UNSUBSCRIBED";
|
|
124
|
+
createdAt: string;
|
|
125
|
+
updatedAt: string;
|
|
126
|
+
};
|
|
127
|
+
export type NotiHubTypes = {
|
|
128
|
+
INotiHubUserView: INotiHubUserView;
|
|
129
|
+
IUserSubscribeNotifier: IUserSubscribeNotifier;
|
|
130
|
+
IUserSubscription: IUserSubscription;
|
|
131
|
+
INotiHubUser: INotiHubUser;
|
|
132
|
+
INotiTypeStats: INotiTypeStats;
|
|
133
|
+
INotiHubImage: INotiHubImage;
|
|
134
|
+
INotiHubSubscription: INotiHubSubscription;
|
|
135
|
+
INotiHubNotificationStats: INotiHubNotificationStats;
|
|
136
|
+
INotiHubNotification: INotiHubNotification;
|
|
137
|
+
INotiHubCustomer: INotiHubCustomer;
|
|
138
|
+
INotiHubCustomerMinified: INotiHubCustomerMinified;
|
|
139
|
+
INotiHubStatsHistory: INotiHubStatsHistory;
|
|
140
|
+
};
|
package/dist/types.js
ADDED
package/package.json
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@amohamud23/notihub",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Notihub Package",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "src/types/index.d.ts",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@amohamud23/notihub",
|
|
3
|
+
"version": "1.0.63",
|
|
4
|
+
"description": "Notihub Package",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "src/types/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist/index.js",
|
|
9
|
+
"index.d.ts",
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "npx tsc",
|
|
14
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"npm",
|
|
18
|
+
"package",
|
|
19
|
+
"util",
|
|
20
|
+
"types"
|
|
21
|
+
],
|
|
22
|
+
"author": "Abdi Mohamud",
|
|
23
|
+
"license": "ISC",
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/node": "^22.8.4",
|
|
26
|
+
"typescript": "^5.4.5"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"mongoose": "^8.7.2"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import CustomerMinifiedSchema from "./schemas/CustomerMinifiedSchema";
|
|
3
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
4
|
-
var customerMinifiedSchema = new Schema(CustomerMinifiedSchema, { timestamps: true });
|
|
5
|
-
// 3. Create a Model.
|
|
6
|
-
var CustomerMinified = model("CustomerMinified", customerMinifiedSchema);
|
|
7
|
-
export default CustomerMinified;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import CustomerSchema from "./schemas/CustomerSchema";
|
|
3
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
4
|
-
var customerSchema = new Schema(CustomerSchema, {
|
|
5
|
-
timestamps: true,
|
|
6
|
-
});
|
|
7
|
-
// 3. Create a Model.
|
|
8
|
-
var Customer = model("Customer", customerSchema);
|
|
9
|
-
export default Customer;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import NotihubStatsHistorySchema from "./schemas/NotificationStatsHistorySchema";
|
|
3
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
4
|
-
var notihubStatsHistorySchema = new Schema(NotihubStatsHistorySchema, {
|
|
5
|
-
timestamps: true,
|
|
6
|
-
});
|
|
7
|
-
// 3. Create a Model.
|
|
8
|
-
var NotiHubStatsHistory = model("INotiHubStatsHistories", notihubStatsHistorySchema);
|
|
9
|
-
export default NotiHubStatsHistory;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import CustomerSchema from "./schemas/CustomerSchema";
|
|
3
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
4
|
-
var entityNotiHubStatsSchema = new Schema({
|
|
5
|
-
entity: CustomerSchema,
|
|
6
|
-
notifications: { type: Number, default: 0 },
|
|
7
|
-
subscription: { type: Number, default: 0 },
|
|
8
|
-
views: { type: Number, default: 0 },
|
|
9
|
-
}, { timestamps: true });
|
|
10
|
-
// 3. Create a Model.
|
|
11
|
-
var EntityNotiHubStats = model("EntityNotiHubStats", entityNotiHubStatsSchema);
|
|
12
|
-
export default EntityNotiHubStats;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import NotiTypeSchema from "./schemas/NotiTypeSchema";
|
|
3
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
4
|
-
var notiTypeSchema = new Schema(NotiTypeSchema, {
|
|
5
|
-
timestamps: true,
|
|
6
|
-
});
|
|
7
|
-
// 3. Create a Model.
|
|
8
|
-
var NotiTypeModel = model("NotiTypes", notiTypeSchema);
|
|
9
|
-
export default NotiTypeModel;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import CustomerSchema from "./schemas/CustomerSchema";
|
|
3
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
4
|
-
var notificationSchema = new Schema({
|
|
5
|
-
title: { type: String, required: true },
|
|
6
|
-
message: { type: String, required: true },
|
|
7
|
-
type: { type: String, required: true },
|
|
8
|
-
body: { type: String },
|
|
9
|
-
entityId: { type: String, required: true },
|
|
10
|
-
entityMinified: CustomerSchema,
|
|
11
|
-
}, { timestamps: true });
|
|
12
|
-
// 3. Create a Model.
|
|
13
|
-
var NotificationModel = model("Notification", notificationSchema);
|
|
14
|
-
export default NotificationModel;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import NotificationSchema from "./schemas/NotificationSchema";
|
|
3
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
4
|
-
var notificationSchema = new Schema({
|
|
5
|
-
notification: NotificationSchema,
|
|
6
|
-
views: { type: Number, default: 0 },
|
|
7
|
-
}, { timestamps: true });
|
|
8
|
-
// 3. Create a Model.
|
|
9
|
-
var NotificationStatsModel = model("NotificationStats", notificationSchema);
|
|
10
|
-
export default NotificationStatsModel;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import SubscriptionSchema from "./schemas/SubscriptionSchema";
|
|
3
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
4
|
-
var subscriptionSchema = new Schema(SubscriptionSchema, {
|
|
5
|
-
timestamps: true,
|
|
6
|
-
});
|
|
7
|
-
// 3. Create a Model.
|
|
8
|
-
var Subscription = model("Subscriptions", subscriptionSchema);
|
|
9
|
-
export default Subscription;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import SubscriptionSchema from "./schemas/SubscriptionTypeSchema";
|
|
3
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
4
|
-
var subscriptionSchema = new Schema(SubscriptionSchema, {
|
|
5
|
-
timestamps: true,
|
|
6
|
-
});
|
|
7
|
-
// 3. Create a Model.
|
|
8
|
-
var SubscriptionType = model("SubscriptionTypes", subscriptionSchema);
|
|
9
|
-
export default SubscriptionType;
|
package/dist/models/UserModel.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import UserSchema from "./schemas/UserSchema";
|
|
3
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
4
|
-
var userSchema = new Schema(UserSchema, { timestamps: true });
|
|
5
|
-
// 3. Create a Model.
|
|
6
|
-
var UserModel = model("User", userSchema);
|
|
7
|
-
export default UserModel;
|
package/dist/models/index.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose" />
|
|
25
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
-
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
27
|
-
declare const _default: {
|
|
28
|
-
UserModel: import("mongoose").Model<INotiHubUser, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiHubUser> & INotiHubUser & Required<{
|
|
29
|
-
_id: string;
|
|
30
|
-
}> & {
|
|
31
|
-
__v?: number;
|
|
32
|
-
}, any>;
|
|
33
|
-
Subscription: import("mongoose").Model<INotiHubSubscription, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiHubSubscription> & INotiHubSubscription & Required<{
|
|
34
|
-
_id: string;
|
|
35
|
-
}> & {
|
|
36
|
-
__v?: number;
|
|
37
|
-
}, any>;
|
|
38
|
-
SubscriptionType: import("mongoose").Model<IUserSubscribeNotifier, {}, {}, {}, import("mongoose").Document<unknown, {}, IUserSubscribeNotifier> & IUserSubscribeNotifier & {
|
|
39
|
-
_id: import("mongoose").Types.ObjectId;
|
|
40
|
-
} & {
|
|
41
|
-
__v?: number;
|
|
42
|
-
}, any>;
|
|
43
|
-
NotiTypeModel: import("mongoose").Model<INotiType, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiType> & INotiType & Required<{
|
|
44
|
-
_id: string;
|
|
45
|
-
}> & {
|
|
46
|
-
__v?: number;
|
|
47
|
-
}, any>;
|
|
48
|
-
NotificationStatsModel: import("mongoose").Model<INotiHubNotificationStats, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiHubNotificationStats> & INotiHubNotificationStats & Required<{
|
|
49
|
-
_id: string;
|
|
50
|
-
}> & {
|
|
51
|
-
__v?: number;
|
|
52
|
-
}, any>;
|
|
53
|
-
NotiHubStatsHistory: import("mongoose").Model<INotiHubStatsHistory, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiHubStatsHistory> & INotiHubStatsHistory & {
|
|
54
|
-
_id: import("mongoose").Types.ObjectId;
|
|
55
|
-
} & {
|
|
56
|
-
__v?: number;
|
|
57
|
-
}, any>;
|
|
58
|
-
NotificationModel: import("mongoose").Model<INotiHubNotification, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiHubNotification> & INotiHubNotification & Required<{
|
|
59
|
-
_id: string;
|
|
60
|
-
}> & {
|
|
61
|
-
__v?: number;
|
|
62
|
-
}, any>;
|
|
63
|
-
Customer: import("mongoose").Model<INotiHubCustomer, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiHubCustomer> & INotiHubCustomer & Required<{
|
|
64
|
-
_id: string;
|
|
65
|
-
}> & {
|
|
66
|
-
__v?: number;
|
|
67
|
-
}, any>;
|
|
68
|
-
CustomerMinified: import("mongoose").Model<INotiHubCustomerMinified, {}, {}, {}, import("mongoose").Document<unknown, {}, INotiHubCustomerMinified> & INotiHubCustomerMinified & Required<{
|
|
69
|
-
_id: string;
|
|
70
|
-
}> & {
|
|
71
|
-
__v?: number;
|
|
72
|
-
}, any>;
|
|
73
|
-
};
|
|
74
|
-
export default _default;
|
package/dist/models/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import UserModel from "./UserModel";
|
|
2
|
-
import Subscription from "./SubscriptionModel";
|
|
3
|
-
import NotiTypeModel from "./NotiTypeModel";
|
|
4
|
-
import NotiHubStatsHistory from "./NotiHubStatsHistoryModel";
|
|
5
|
-
import NotificationStatsModel from "./NotificationStatsModel";
|
|
6
|
-
import NotificationModel from "./NotificationModel";
|
|
7
|
-
import Customer from "./CustomerModel";
|
|
8
|
-
import CustomerMinified from "./CustomerMinifiedModel";
|
|
9
|
-
import SubscriptionType from "./SubscriptionTypeModel";
|
|
10
|
-
export default {
|
|
11
|
-
UserModel: UserModel,
|
|
12
|
-
Subscription: Subscription,
|
|
13
|
-
SubscriptionType: SubscriptionType,
|
|
14
|
-
NotiTypeModel: NotiTypeModel,
|
|
15
|
-
NotificationStatsModel: NotificationStatsModel,
|
|
16
|
-
NotiHubStatsHistory: NotiHubStatsHistory,
|
|
17
|
-
NotificationModel: NotificationModel,
|
|
18
|
-
Customer: Customer,
|
|
19
|
-
CustomerMinified: CustomerMinified,
|
|
20
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Schema } from "mongoose";
|
|
2
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
3
|
-
var CustomerMinifiedSchema = {
|
|
4
|
-
id: { type: Schema.Types.UUID, default: true },
|
|
5
|
-
username: { type: String, required: true },
|
|
6
|
-
img: {
|
|
7
|
-
bucket: { type: String, required: true },
|
|
8
|
-
key: { type: String, required: true },
|
|
9
|
-
},
|
|
10
|
-
name: { type: String, required: true },
|
|
11
|
-
};
|
|
12
|
-
export default CustomerMinifiedSchema;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Schema } from "mongoose";
|
|
2
|
-
import CustomerMinifiedSchema from "./CustomerMinifiedSchema";
|
|
3
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
4
|
-
var CustomerSchema = {
|
|
5
|
-
id: { type: Schema.Types.UUID, default: true },
|
|
6
|
-
minified: CustomerMinifiedSchema,
|
|
7
|
-
paid: { type: Boolean, default: false },
|
|
8
|
-
email: { type: String, required: true },
|
|
9
|
-
verified: { type: Boolean, default: false },
|
|
10
|
-
confirmed: { type: Boolean, default: false },
|
|
11
|
-
};
|
|
12
|
-
export default CustomerSchema;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Schema } from "mongoose";
|
|
2
|
-
import CustomerSchema from "./CustomerSchema";
|
|
3
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
4
|
-
var NotiTypeSchema = {
|
|
5
|
-
id: { type: Schema.Types.UUID, default: true },
|
|
6
|
-
entity: CustomerSchema,
|
|
7
|
-
type: { type: String, required: true },
|
|
8
|
-
};
|
|
9
|
-
export default NotiTypeSchema;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Schema } from "mongoose";
|
|
2
|
-
import CustomerMinifiedSchema from "./CustomerMinifiedSchema";
|
|
3
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
4
|
-
var NotificationSchema = {
|
|
5
|
-
id: { type: Schema.Types.UUID, default: true },
|
|
6
|
-
title: { type: String, required: true },
|
|
7
|
-
message: { type: String, required: true },
|
|
8
|
-
type: { type: String, required: true },
|
|
9
|
-
body: { type: String },
|
|
10
|
-
entityId: { type: String, required: true },
|
|
11
|
-
entityMinified: CustomerMinifiedSchema,
|
|
12
|
-
};
|
|
13
|
-
export default NotificationSchema;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Schema } from "mongoose";
|
|
2
|
-
var NotihubStatsHistorySchema = {
|
|
3
|
-
id: { type: Schema.Types.UUID, default: true },
|
|
4
|
-
entityId: { type: String, required: true },
|
|
5
|
-
notifications: { type: Number, required: true },
|
|
6
|
-
subscription: { type: Number, required: true },
|
|
7
|
-
views: { type: Number, required: true },
|
|
8
|
-
type: { type: String, required: true },
|
|
9
|
-
};
|
|
10
|
-
export default NotihubStatsHistorySchema;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Schema } from "mongoose";
|
|
2
|
-
import CustomerSchema from "./CustomerSchema";
|
|
3
|
-
import UserSchema from "./UserSchema";
|
|
4
|
-
// 2. Create a Schema corresponding to the document interface.
|
|
5
|
-
var SubscriptionSchema = {
|
|
6
|
-
id: { type: Schema.Types.UUID, default: true },
|
|
7
|
-
subscriptionId: { type: String, required: true },
|
|
8
|
-
user: UserSchema,
|
|
9
|
-
entity: CustomerSchema,
|
|
10
|
-
};
|
|
11
|
-
export default SubscriptionSchema;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Schema } from "mongoose";
|
|
2
|
-
var UserSchema = {
|
|
3
|
-
id: { type: Schema.Types.UUID, default: true },
|
|
4
|
-
name: { type: String, required: true },
|
|
5
|
-
email: { type: String, required: true },
|
|
6
|
-
pushToken: { type: String, required: true },
|
|
7
|
-
signedIn: { type: Boolean, required: true, default: false },
|
|
8
|
-
};
|
|
9
|
-
export default UserSchema;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|