@amohamud23/notihub 1.0.108 → 1.0.110

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