@amohamud23/notihub 1.0.129 → 1.0.130
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 +37 -2
- package/dist/index.d.cts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +34 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -44,6 +44,7 @@ __export(src_exports, {
|
|
|
44
44
|
PaymentSessionModel: () => PaymentSessionModel_default,
|
|
45
45
|
StripScriptionModel: () => StripeSubscriptionModel_default,
|
|
46
46
|
Subscription: () => SubscriptionModel_default,
|
|
47
|
+
SubscriptionActivity: () => SubscriptionActivity_default,
|
|
47
48
|
SubscriptionType: () => SubscriptionTypeModel_default,
|
|
48
49
|
UserModel: () => UserModel_default,
|
|
49
50
|
ViewsModel: () => ViewsModel_default,
|
|
@@ -439,9 +440,42 @@ var PaymentSessionModel = (0, import_mongoose21.model)(
|
|
|
439
440
|
);
|
|
440
441
|
var PaymentSessionModel_default = PaymentSessionModel;
|
|
441
442
|
|
|
443
|
+
// src/models/SubscriptionActivity.ts
|
|
444
|
+
var import_mongoose22 = require("mongoose");
|
|
445
|
+
|
|
446
|
+
// src/models/schemas/SubscriptionActivitySchema.ts
|
|
447
|
+
var subscriptionActivitySchema = {
|
|
448
|
+
entityId: {
|
|
449
|
+
type: String,
|
|
450
|
+
required: true
|
|
451
|
+
},
|
|
452
|
+
userId: {
|
|
453
|
+
type: String,
|
|
454
|
+
required: true
|
|
455
|
+
},
|
|
456
|
+
activity: {
|
|
457
|
+
type: String,
|
|
458
|
+
required: true
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
var SubscriptionActivitySchema_default = subscriptionActivitySchema;
|
|
462
|
+
|
|
463
|
+
// src/models/SubscriptionActivity.ts
|
|
464
|
+
var subscriptionActivitySchema2 = new import_mongoose22.Schema(
|
|
465
|
+
SubscriptionActivitySchema_default,
|
|
466
|
+
{
|
|
467
|
+
timestamps: true
|
|
468
|
+
}
|
|
469
|
+
);
|
|
470
|
+
var SubscriptionActivity = (0, import_mongoose22.model)(
|
|
471
|
+
"SubscriptionActivity",
|
|
472
|
+
subscriptionActivitySchema2
|
|
473
|
+
);
|
|
474
|
+
var SubscriptionActivity_default = SubscriptionActivity;
|
|
475
|
+
|
|
442
476
|
// src/client/MongooseClient.ts
|
|
443
|
-
var
|
|
444
|
-
var Connect = () =>
|
|
477
|
+
var import_mongoose23 = __toESM(require("mongoose"), 1);
|
|
478
|
+
var Connect = () => import_mongoose23.default.connect(
|
|
445
479
|
"mongodb+srv://admin:YF6ImNWyAMUUu72I@nftcluster.llzxp.mongodb.net/test?authSource=admin&replicaSet=atlas-p5dddq-shard-0&readPreference=primary&ssl=true",
|
|
446
480
|
{ dbName: "notihub" }
|
|
447
481
|
).then(() => {
|
|
@@ -493,6 +527,7 @@ var InvalidPushToken = "4009";
|
|
|
493
527
|
PaymentSessionModel,
|
|
494
528
|
StripScriptionModel,
|
|
495
529
|
Subscription,
|
|
530
|
+
SubscriptionActivity,
|
|
496
531
|
SubscriptionType,
|
|
497
532
|
UserModel,
|
|
498
533
|
ViewsModel,
|
package/dist/index.d.cts
CHANGED
|
@@ -144,6 +144,14 @@ type INotiHubSubscription = {
|
|
|
144
144
|
createdAt: string;
|
|
145
145
|
updatedAt: string;
|
|
146
146
|
};
|
|
147
|
+
type INotiHubSubscriptionActivity = {
|
|
148
|
+
_id?: string;
|
|
149
|
+
entityId: string;
|
|
150
|
+
userId: string;
|
|
151
|
+
activity: "SUBSCRIBED" | "UNSUBSCRIBED";
|
|
152
|
+
createdAt: string;
|
|
153
|
+
updatedAt: string;
|
|
154
|
+
};
|
|
147
155
|
type INotiHubStripeSubscription = {
|
|
148
156
|
id: string;
|
|
149
157
|
customer: string;
|
|
@@ -263,6 +271,12 @@ declare const PaymentSessionModel: mongoose.Model<INotiHubPaymentSession, {}, {}
|
|
|
263
271
|
__v?: number | undefined;
|
|
264
272
|
}, any>;
|
|
265
273
|
|
|
274
|
+
declare const SubscriptionActivity: mongoose.Model<INotiHubSubscriptionActivity, {}, {}, {}, mongoose.Document<unknown, {}, INotiHubSubscriptionActivity> & INotiHubSubscriptionActivity & Required<{
|
|
275
|
+
_id: string;
|
|
276
|
+
}> & {
|
|
277
|
+
__v?: number | undefined;
|
|
278
|
+
}, any>;
|
|
279
|
+
|
|
266
280
|
declare const Connect: () => Promise<void>;
|
|
267
281
|
|
|
268
282
|
declare class DocumentNotFoundException extends Error {
|
|
@@ -288,4 +302,4 @@ declare namespace errorcodes {
|
|
|
288
302
|
export { errorcodes_CustomerNotFound as CustomerNotFound, errorcodes_DocumentNotFound as DocumentNotFound, errorcodes_InvalidEmail as InvalidEmail, errorcodes_InvalidName as InvalidName, errorcodes_InvalidPassword as InvalidPassword, errorcodes_InvalidPushToken as InvalidPushToken, errorcodes_UserNotFound as UserNotFound };
|
|
289
303
|
}
|
|
290
304
|
|
|
291
|
-
export { type CreateNotiRequestBody, type CreateSubscriptionRequestBody, type CreateUserRequestBody, Customer, CustomerMinified, CustomerNotiHubStats, DocumentNotFoundException, errorcodes as ErrorCode, type ICreateCustomerRequestBody, type ICreateNotiRequestBody, type INotiHubCustomer, type INotiHubCustomerMinified, type INotiHubImage, type INotiHubNotification, type INotiHubNotificationStats, type INotiHubPaymentSession, type INotiHubStats, type INotiHubStatsHistory, type INotiHubStripeSubscription, type INotiHubSubscription, type INotiHubUser, type INotiHubUserView, type INotiType, type INotiTypeStats, type IUserSubscribeNotifier, type IUserSubscription, Connect as MongooseClient, NotiHubStatsHistory, type NotiHubTypes, NotiTypeModel, NotiTypeStatsModel, NotificationModel, NotificationStatsModel as NotificationStats, PaymentSessionModel, StripScriptionModel, Subscription, SubscriptionType, UserModel, ViewsModel, addMonths, getDate, getDateFormat };
|
|
305
|
+
export { type CreateNotiRequestBody, type CreateSubscriptionRequestBody, type CreateUserRequestBody, Customer, CustomerMinified, CustomerNotiHubStats, DocumentNotFoundException, errorcodes as ErrorCode, type ICreateCustomerRequestBody, type ICreateNotiRequestBody, type INotiHubCustomer, type INotiHubCustomerMinified, type INotiHubImage, type INotiHubNotification, type INotiHubNotificationStats, type INotiHubPaymentSession, type INotiHubStats, type INotiHubStatsHistory, type INotiHubStripeSubscription, type INotiHubSubscription, type INotiHubSubscriptionActivity, type INotiHubUser, type INotiHubUserView, type INotiType, type INotiTypeStats, type IUserSubscribeNotifier, type IUserSubscription, Connect as MongooseClient, NotiHubStatsHistory, type NotiHubTypes, NotiTypeModel, NotiTypeStatsModel, NotificationModel, NotificationStatsModel as NotificationStats, PaymentSessionModel, StripScriptionModel, Subscription, SubscriptionActivity, SubscriptionType, UserModel, ViewsModel, addMonths, getDate, getDateFormat };
|
package/dist/index.d.ts
CHANGED
|
@@ -144,6 +144,14 @@ type INotiHubSubscription = {
|
|
|
144
144
|
createdAt: string;
|
|
145
145
|
updatedAt: string;
|
|
146
146
|
};
|
|
147
|
+
type INotiHubSubscriptionActivity = {
|
|
148
|
+
_id?: string;
|
|
149
|
+
entityId: string;
|
|
150
|
+
userId: string;
|
|
151
|
+
activity: "SUBSCRIBED" | "UNSUBSCRIBED";
|
|
152
|
+
createdAt: string;
|
|
153
|
+
updatedAt: string;
|
|
154
|
+
};
|
|
147
155
|
type INotiHubStripeSubscription = {
|
|
148
156
|
id: string;
|
|
149
157
|
customer: string;
|
|
@@ -263,6 +271,12 @@ declare const PaymentSessionModel: mongoose.Model<INotiHubPaymentSession, {}, {}
|
|
|
263
271
|
__v?: number | undefined;
|
|
264
272
|
}, any>;
|
|
265
273
|
|
|
274
|
+
declare const SubscriptionActivity: mongoose.Model<INotiHubSubscriptionActivity, {}, {}, {}, mongoose.Document<unknown, {}, INotiHubSubscriptionActivity> & INotiHubSubscriptionActivity & Required<{
|
|
275
|
+
_id: string;
|
|
276
|
+
}> & {
|
|
277
|
+
__v?: number | undefined;
|
|
278
|
+
}, any>;
|
|
279
|
+
|
|
266
280
|
declare const Connect: () => Promise<void>;
|
|
267
281
|
|
|
268
282
|
declare class DocumentNotFoundException extends Error {
|
|
@@ -288,4 +302,4 @@ declare namespace errorcodes {
|
|
|
288
302
|
export { errorcodes_CustomerNotFound as CustomerNotFound, errorcodes_DocumentNotFound as DocumentNotFound, errorcodes_InvalidEmail as InvalidEmail, errorcodes_InvalidName as InvalidName, errorcodes_InvalidPassword as InvalidPassword, errorcodes_InvalidPushToken as InvalidPushToken, errorcodes_UserNotFound as UserNotFound };
|
|
289
303
|
}
|
|
290
304
|
|
|
291
|
-
export { type CreateNotiRequestBody, type CreateSubscriptionRequestBody, type CreateUserRequestBody, Customer, CustomerMinified, CustomerNotiHubStats, DocumentNotFoundException, errorcodes as ErrorCode, type ICreateCustomerRequestBody, type ICreateNotiRequestBody, type INotiHubCustomer, type INotiHubCustomerMinified, type INotiHubImage, type INotiHubNotification, type INotiHubNotificationStats, type INotiHubPaymentSession, type INotiHubStats, type INotiHubStatsHistory, type INotiHubStripeSubscription, type INotiHubSubscription, type INotiHubUser, type INotiHubUserView, type INotiType, type INotiTypeStats, type IUserSubscribeNotifier, type IUserSubscription, Connect as MongooseClient, NotiHubStatsHistory, type NotiHubTypes, NotiTypeModel, NotiTypeStatsModel, NotificationModel, NotificationStatsModel as NotificationStats, PaymentSessionModel, StripScriptionModel, Subscription, SubscriptionType, UserModel, ViewsModel, addMonths, getDate, getDateFormat };
|
|
305
|
+
export { type CreateNotiRequestBody, type CreateSubscriptionRequestBody, type CreateUserRequestBody, Customer, CustomerMinified, CustomerNotiHubStats, DocumentNotFoundException, errorcodes as ErrorCode, type ICreateCustomerRequestBody, type ICreateNotiRequestBody, type INotiHubCustomer, type INotiHubCustomerMinified, type INotiHubImage, type INotiHubNotification, type INotiHubNotificationStats, type INotiHubPaymentSession, type INotiHubStats, type INotiHubStatsHistory, type INotiHubStripeSubscription, type INotiHubSubscription, type INotiHubSubscriptionActivity, type INotiHubUser, type INotiHubUserView, type INotiType, type INotiTypeStats, type IUserSubscribeNotifier, type IUserSubscription, Connect as MongooseClient, NotiHubStatsHistory, type NotiHubTypes, NotiTypeModel, NotiTypeStatsModel, NotificationModel, NotificationStatsModel as NotificationStats, PaymentSessionModel, StripScriptionModel, Subscription, SubscriptionActivity, SubscriptionType, UserModel, ViewsModel, addMonths, getDate, getDateFormat };
|
package/dist/index.js
CHANGED
|
@@ -390,6 +390,39 @@ var PaymentSessionModel = model14(
|
|
|
390
390
|
);
|
|
391
391
|
var PaymentSessionModel_default = PaymentSessionModel;
|
|
392
392
|
|
|
393
|
+
// src/models/SubscriptionActivity.ts
|
|
394
|
+
import { Schema as Schema22, model as model15 } from "mongoose";
|
|
395
|
+
|
|
396
|
+
// src/models/schemas/SubscriptionActivitySchema.ts
|
|
397
|
+
var subscriptionActivitySchema = {
|
|
398
|
+
entityId: {
|
|
399
|
+
type: String,
|
|
400
|
+
required: true
|
|
401
|
+
},
|
|
402
|
+
userId: {
|
|
403
|
+
type: String,
|
|
404
|
+
required: true
|
|
405
|
+
},
|
|
406
|
+
activity: {
|
|
407
|
+
type: String,
|
|
408
|
+
required: true
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
var SubscriptionActivitySchema_default = subscriptionActivitySchema;
|
|
412
|
+
|
|
413
|
+
// src/models/SubscriptionActivity.ts
|
|
414
|
+
var subscriptionActivitySchema2 = new Schema22(
|
|
415
|
+
SubscriptionActivitySchema_default,
|
|
416
|
+
{
|
|
417
|
+
timestamps: true
|
|
418
|
+
}
|
|
419
|
+
);
|
|
420
|
+
var SubscriptionActivity = model15(
|
|
421
|
+
"SubscriptionActivity",
|
|
422
|
+
subscriptionActivitySchema2
|
|
423
|
+
);
|
|
424
|
+
var SubscriptionActivity_default = SubscriptionActivity;
|
|
425
|
+
|
|
393
426
|
// src/client/MongooseClient.ts
|
|
394
427
|
import mongoose3 from "mongoose";
|
|
395
428
|
var Connect = () => mongoose3.connect(
|
|
@@ -443,6 +476,7 @@ export {
|
|
|
443
476
|
PaymentSessionModel_default as PaymentSessionModel,
|
|
444
477
|
StripeSubscriptionModel_default as StripScriptionModel,
|
|
445
478
|
SubscriptionModel_default as Subscription,
|
|
479
|
+
SubscriptionActivity_default as SubscriptionActivity,
|
|
446
480
|
SubscriptionTypeModel_default as SubscriptionType,
|
|
447
481
|
UserModel_default as UserModel,
|
|
448
482
|
ViewsModel_default as ViewsModel,
|