@amohamud23/notihub 1.0.91 → 1.0.93
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/index.cjs +14 -3
- package/dist/index.js +14 -3
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -144,7 +144,6 @@ var CustomerMinifiedSchema_default = CustomerMinifiedSchema;
|
|
|
144
144
|
|
|
145
145
|
// src/models/schemas/CustomerSchema.ts
|
|
146
146
|
var CustomerSchema = {
|
|
147
|
-
// id: { type: Schema.Types.UUID, default: true },
|
|
148
147
|
minified: CustomerMinifiedSchema_default,
|
|
149
148
|
minifiedRef: {
|
|
150
149
|
type: import_mongoose3.Schema.ObjectId,
|
|
@@ -163,7 +162,17 @@ var SubscriptionSchema = {
|
|
|
163
162
|
id: { type: import_mongoose4.Schema.Types.UUID, default: true },
|
|
164
163
|
subscriptionId: { type: String, required: true },
|
|
165
164
|
user: UserSchema_default,
|
|
166
|
-
|
|
165
|
+
userRef: {
|
|
166
|
+
type: import_mongoose4.Schema.Types.ObjectId,
|
|
167
|
+
ref: "User",
|
|
168
|
+
required: true
|
|
169
|
+
},
|
|
170
|
+
entity: CustomerSchema_default,
|
|
171
|
+
entityRef: {
|
|
172
|
+
type: import_mongoose4.Schema.Types.ObjectId,
|
|
173
|
+
ref: "Customer",
|
|
174
|
+
required: true
|
|
175
|
+
}
|
|
167
176
|
};
|
|
168
177
|
var SubscriptionSchema_default = SubscriptionSchema;
|
|
169
178
|
|
|
@@ -185,9 +194,11 @@ var import_mongoose7 = require("mongoose");
|
|
|
185
194
|
|
|
186
195
|
// src/models/schemas/NotiTypeSchema.ts
|
|
187
196
|
var import_mongoose6 = require("mongoose");
|
|
197
|
+
var import_uuid = require("uuid");
|
|
188
198
|
var NotiTypeSchema = {
|
|
189
|
-
id: { type:
|
|
199
|
+
id: { type: String, default: (0, import_uuid.v4)().toString() },
|
|
190
200
|
entity: CustomerSchema_default,
|
|
201
|
+
entityRef: { type: import_mongoose6.Schema.Types.ObjectId, ref: "Customer", required: true },
|
|
191
202
|
type: { type: String, required: true }
|
|
192
203
|
};
|
|
193
204
|
var NotiTypeSchema_default = NotiTypeSchema;
|
package/dist/index.js
CHANGED
|
@@ -93,7 +93,6 @@ var CustomerMinifiedSchema_default = CustomerMinifiedSchema;
|
|
|
93
93
|
|
|
94
94
|
// src/models/schemas/CustomerSchema.ts
|
|
95
95
|
var CustomerSchema = {
|
|
96
|
-
// id: { type: Schema.Types.UUID, default: true },
|
|
97
96
|
minified: CustomerMinifiedSchema_default,
|
|
98
97
|
minifiedRef: {
|
|
99
98
|
type: Schema3.ObjectId,
|
|
@@ -112,7 +111,17 @@ var SubscriptionSchema = {
|
|
|
112
111
|
id: { type: Schema4.Types.UUID, default: true },
|
|
113
112
|
subscriptionId: { type: String, required: true },
|
|
114
113
|
user: UserSchema_default,
|
|
115
|
-
|
|
114
|
+
userRef: {
|
|
115
|
+
type: Schema4.Types.ObjectId,
|
|
116
|
+
ref: "User",
|
|
117
|
+
required: true
|
|
118
|
+
},
|
|
119
|
+
entity: CustomerSchema_default,
|
|
120
|
+
entityRef: {
|
|
121
|
+
type: Schema4.Types.ObjectId,
|
|
122
|
+
ref: "Customer",
|
|
123
|
+
required: true
|
|
124
|
+
}
|
|
116
125
|
};
|
|
117
126
|
var SubscriptionSchema_default = SubscriptionSchema;
|
|
118
127
|
|
|
@@ -134,9 +143,11 @@ import { Schema as Schema7, model as model3 } from "mongoose";
|
|
|
134
143
|
|
|
135
144
|
// src/models/schemas/NotiTypeSchema.ts
|
|
136
145
|
import { Schema as Schema6 } from "mongoose";
|
|
146
|
+
import { v4 as uuidv4 } from "uuid";
|
|
137
147
|
var NotiTypeSchema = {
|
|
138
|
-
id: { type:
|
|
148
|
+
id: { type: String, default: uuidv4().toString() },
|
|
139
149
|
entity: CustomerSchema_default,
|
|
150
|
+
entityRef: { type: Schema6.Types.ObjectId, ref: "Customer", required: true },
|
|
140
151
|
type: { type: String, required: true }
|
|
141
152
|
};
|
|
142
153
|
var NotiTypeSchema_default = NotiTypeSchema;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amohamud23/notihub",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.93",
|
|
4
4
|
"description": "Notihub Package",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.cts",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"mongoose": "^8.7.2",
|
|
29
|
-
"tsup": "^8.3.5"
|
|
29
|
+
"tsup": "^8.3.5",
|
|
30
|
+
"uuid": "^11.0.2"
|
|
30
31
|
}
|
|
31
32
|
}
|