@amohamud23/notihub 1.0.115 → 1.0.116

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 CHANGED
@@ -303,50 +303,58 @@ var CustomerMinified = (0, import_mongoose12.model)(
303
303
  var CustomerMinifiedModel_default = CustomerMinified;
304
304
 
305
305
  // src/models/SubscriptionTypeModel.ts
306
- var import_mongoose13 = require("mongoose");
306
+ var import_mongoose14 = require("mongoose");
307
307
 
308
308
  // src/models/schemas/SubscriptionTypeSchema.ts
309
+ var import_mongoose13 = require("mongoose");
309
310
  var SubscriptionTypeSchema = {
310
311
  userId: { type: String, required: true },
312
+ userRef: { type: import_mongoose13.Schema.Types.ObjectId, ref: "User", required: true },
311
313
  entityId: { type: String, required: true },
314
+ entityRef: { type: import_mongoose13.Schema.Types.ObjectId, ref: "Entity", required: true },
312
315
  notiTypeId: { type: String, required: true },
316
+ notiTypeRef: {
317
+ type: import_mongoose13.Schema.Types.ObjectId,
318
+ ref: "NotificationType",
319
+ required: true
320
+ },
313
321
  subscriptionId: { type: String, required: true }
314
322
  };
315
323
  var SubscriptionTypeSchema_default = SubscriptionTypeSchema;
316
324
 
317
325
  // src/models/SubscriptionTypeModel.ts
318
- var subscriptionTypeSchema = new import_mongoose13.Schema(
326
+ var subscriptionTypeSchema = new import_mongoose14.Schema(
319
327
  SubscriptionTypeSchema_default,
320
328
  {
321
329
  timestamps: true
322
330
  }
323
331
  );
324
- var SubscriptionType = (0, import_mongoose13.model)(
332
+ var SubscriptionType = (0, import_mongoose14.model)(
325
333
  "SubscriptionTypes",
326
334
  subscriptionTypeSchema
327
335
  );
328
336
  var SubscriptionTypeModel_default = SubscriptionType;
329
337
 
330
338
  // src/models/CustomerNotiHubStatsModel.ts
331
- var import_mongoose14 = require("mongoose");
332
- var customerNotiHubStatsSchema = new import_mongoose14.Schema(
339
+ var import_mongoose15 = require("mongoose");
340
+ var customerNotiHubStatsSchema = new import_mongoose15.Schema(
333
341
  {
334
342
  entity: CustomerSchema_default,
335
- entityRef: { type: import_mongoose14.Schema.Types.ObjectId, ref: "Customer", required: true },
343
+ entityRef: { type: import_mongoose15.Schema.Types.ObjectId, ref: "Customer", required: true },
336
344
  notifications: { type: Number, default: 0 },
337
345
  subscription: { type: Number, default: 0 },
338
346
  views: { type: Number, default: 0 }
339
347
  },
340
348
  { timestamps: true }
341
349
  );
342
- var CustomerNotiHubStats = (0, import_mongoose14.model)(
350
+ var CustomerNotiHubStats = (0, import_mongoose15.model)(
343
351
  "CustomerNotiHubStats",
344
352
  customerNotiHubStatsSchema
345
353
  );
346
354
  var CustomerNotiHubStatsModel_default = CustomerNotiHubStats;
347
355
 
348
356
  // src/models/ViewsModel.ts
349
- var import_mongoose15 = require("mongoose");
357
+ var import_mongoose16 = require("mongoose");
350
358
 
351
359
  // src/models/schemas/ViewSchema.ts
352
360
  var ViewsSchema = {
@@ -357,37 +365,37 @@ var ViewsSchema = {
357
365
  var ViewSchema_default = ViewsSchema;
358
366
 
359
367
  // src/models/ViewsModel.ts
360
- var viewsSchema = new import_mongoose15.Schema(ViewSchema_default, {
368
+ var viewsSchema = new import_mongoose16.Schema(ViewSchema_default, {
361
369
  timestamps: true
362
370
  });
363
- var ViewsModel = (0, import_mongoose15.model)("Views", viewsSchema);
371
+ var ViewsModel = (0, import_mongoose16.model)("Views", viewsSchema);
364
372
  var ViewsModel_default = ViewsModel;
365
373
 
366
374
  // src/models/NotiTypeStatsModel.ts
367
- var import_mongoose17 = require("mongoose");
375
+ var import_mongoose18 = require("mongoose");
368
376
 
369
377
  // src/models/schemas/NotiTypeStatsSchema.ts
370
- var import_mongoose16 = require("mongoose");
378
+ var import_mongoose17 = require("mongoose");
371
379
  var NotiTypeStatsSchema = {
372
- notiType: { type: import_mongoose16.Schema.Types.ObjectId, ref: "NotiTypes", required: true },
380
+ notiType: { type: import_mongoose17.Schema.Types.ObjectId, ref: "NotiTypes", required: true },
373
381
  subscribed: { type: Number, default: 0, required: true },
374
382
  views: { type: Number, default: 0, required: true }
375
383
  };
376
384
  var NotiTypeStatsSchema_default = NotiTypeStatsSchema;
377
385
 
378
386
  // src/models/NotiTypeStatsModel.ts
379
- var notiTypeStatsSchema = new import_mongoose17.Schema(NotiTypeStatsSchema_default, {
387
+ var notiTypeStatsSchema = new import_mongoose18.Schema(NotiTypeStatsSchema_default, {
380
388
  timestamps: true
381
389
  });
382
- var NotiTypeStatsModel = (0, import_mongoose17.model)(
390
+ var NotiTypeStatsModel = (0, import_mongoose18.model)(
383
391
  "NotiTypesStats",
384
392
  notiTypeStatsSchema
385
393
  );
386
394
  var NotiTypeStatsModel_default = NotiTypeStatsModel;
387
395
 
388
396
  // src/client/MongooseClient.ts
389
- var import_mongoose18 = __toESM(require("mongoose"), 1);
390
- var Connect = () => import_mongoose18.default.connect(
397
+ var import_mongoose19 = __toESM(require("mongoose"), 1);
398
+ var Connect = () => import_mongoose19.default.connect(
391
399
  "mongodb+srv://admin:YF6ImNWyAMUUu72I@nftcluster.llzxp.mongodb.net/test?authSource=admin&replicaSet=atlas-p5dddq-shard-0&readPreference=primary&ssl=true",
392
400
  { dbName: "notihub" }
393
401
  ).then(() => {
package/dist/index.js CHANGED
@@ -256,19 +256,27 @@ var CustomerMinified = model8(
256
256
  var CustomerMinifiedModel_default = CustomerMinified;
257
257
 
258
258
  // src/models/SubscriptionTypeModel.ts
259
- import { Schema as Schema13, model as model9 } from "mongoose";
259
+ import { Schema as Schema14, model as model9 } from "mongoose";
260
260
 
261
261
  // src/models/schemas/SubscriptionTypeSchema.ts
262
+ import { Schema as Schema13 } from "mongoose";
262
263
  var SubscriptionTypeSchema = {
263
264
  userId: { type: String, required: true },
265
+ userRef: { type: Schema13.Types.ObjectId, ref: "User", required: true },
264
266
  entityId: { type: String, required: true },
267
+ entityRef: { type: Schema13.Types.ObjectId, ref: "Entity", required: true },
265
268
  notiTypeId: { type: String, required: true },
269
+ notiTypeRef: {
270
+ type: Schema13.Types.ObjectId,
271
+ ref: "NotificationType",
272
+ required: true
273
+ },
266
274
  subscriptionId: { type: String, required: true }
267
275
  };
268
276
  var SubscriptionTypeSchema_default = SubscriptionTypeSchema;
269
277
 
270
278
  // src/models/SubscriptionTypeModel.ts
271
- var subscriptionTypeSchema = new Schema13(
279
+ var subscriptionTypeSchema = new Schema14(
272
280
  SubscriptionTypeSchema_default,
273
281
  {
274
282
  timestamps: true
@@ -281,11 +289,11 @@ var SubscriptionType = model9(
281
289
  var SubscriptionTypeModel_default = SubscriptionType;
282
290
 
283
291
  // src/models/CustomerNotiHubStatsModel.ts
284
- import { Schema as Schema14, model as model10 } from "mongoose";
285
- var customerNotiHubStatsSchema = new Schema14(
292
+ import { Schema as Schema15, model as model10 } from "mongoose";
293
+ var customerNotiHubStatsSchema = new Schema15(
286
294
  {
287
295
  entity: CustomerSchema_default,
288
- entityRef: { type: Schema14.Types.ObjectId, ref: "Customer", required: true },
296
+ entityRef: { type: Schema15.Types.ObjectId, ref: "Customer", required: true },
289
297
  notifications: { type: Number, default: 0 },
290
298
  subscription: { type: Number, default: 0 },
291
299
  views: { type: Number, default: 0 }
@@ -299,7 +307,7 @@ var CustomerNotiHubStats = model10(
299
307
  var CustomerNotiHubStatsModel_default = CustomerNotiHubStats;
300
308
 
301
309
  // src/models/ViewsModel.ts
302
- import { Schema as Schema15, model as model11 } from "mongoose";
310
+ import { Schema as Schema16, model as model11 } from "mongoose";
303
311
 
304
312
  // src/models/schemas/ViewSchema.ts
305
313
  var ViewsSchema = {
@@ -310,26 +318,26 @@ var ViewsSchema = {
310
318
  var ViewSchema_default = ViewsSchema;
311
319
 
312
320
  // src/models/ViewsModel.ts
313
- var viewsSchema = new Schema15(ViewSchema_default, {
321
+ var viewsSchema = new Schema16(ViewSchema_default, {
314
322
  timestamps: true
315
323
  });
316
324
  var ViewsModel = model11("Views", viewsSchema);
317
325
  var ViewsModel_default = ViewsModel;
318
326
 
319
327
  // src/models/NotiTypeStatsModel.ts
320
- import { Schema as Schema17, model as model12 } from "mongoose";
328
+ import { Schema as Schema18, model as model12 } from "mongoose";
321
329
 
322
330
  // src/models/schemas/NotiTypeStatsSchema.ts
323
- import { Schema as Schema16 } from "mongoose";
331
+ import { Schema as Schema17 } from "mongoose";
324
332
  var NotiTypeStatsSchema = {
325
- notiType: { type: Schema16.Types.ObjectId, ref: "NotiTypes", required: true },
333
+ notiType: { type: Schema17.Types.ObjectId, ref: "NotiTypes", required: true },
326
334
  subscribed: { type: Number, default: 0, required: true },
327
335
  views: { type: Number, default: 0, required: true }
328
336
  };
329
337
  var NotiTypeStatsSchema_default = NotiTypeStatsSchema;
330
338
 
331
339
  // src/models/NotiTypeStatsModel.ts
332
- var notiTypeStatsSchema = new Schema17(NotiTypeStatsSchema_default, {
340
+ var notiTypeStatsSchema = new Schema18(NotiTypeStatsSchema_default, {
333
341
  timestamps: true
334
342
  });
335
343
  var NotiTypeStatsModel = model12(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amohamud23/notihub",
3
- "version": "1.0.115",
3
+ "version": "1.0.116",
4
4
  "description": "Notihub Package",
5
5
  "main": "./dist/index.cjs",
6
6
  "types": "./dist/index.d.cts",