@timardex/cluemart-server-shared 2.1.5 → 2.1.7
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/{chunk-M4ZWI4YC.mjs → chunk-OVAGFPTP.mjs} +10 -6
- package/dist/chunk-OVAGFPTP.mjs.map +1 -0
- package/dist/index.cjs +12 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.mjs +12 -8
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +9 -5
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +13 -2
- package/dist/mongoose/index.d.ts +13 -2
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +12 -8
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +4 -4
- package/dist/service/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-M4ZWI4YC.mjs.map +0 -1
|
@@ -307,13 +307,24 @@ declare const PostModel: mongoose__default.Model<PostType, {}, {}, {}, mongoose_
|
|
|
307
307
|
}, any>;
|
|
308
308
|
|
|
309
309
|
declare const APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
|
|
310
|
-
|
|
310
|
+
type SchemaAppSettingsType = AppSettingsType & {
|
|
311
|
+
adSettings: {
|
|
312
|
+
mobileDisplayEnabled: boolean;
|
|
313
|
+
webDisplayEnabled: boolean;
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
declare const AppSettingModel: mongoose__default.Model<SchemaAppSettingsType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaAppSettingsType, {}, {}> & _timardex_cluemart_shared.AppSettingsFormData & {
|
|
311
317
|
_id: string;
|
|
312
318
|
activeSchoolsStudentCountTotal: number;
|
|
313
319
|
activeSchoolsStudentCountUpdatedAt: Date;
|
|
314
320
|
createdAt: Date;
|
|
315
321
|
key: string;
|
|
316
322
|
updatedAt: Date | null;
|
|
323
|
+
} & {
|
|
324
|
+
adSettings: {
|
|
325
|
+
mobileDisplayEnabled: boolean;
|
|
326
|
+
webDisplayEnabled: boolean;
|
|
327
|
+
};
|
|
317
328
|
} & Required<{
|
|
318
329
|
_id: string;
|
|
319
330
|
}> & {
|
|
@@ -360,4 +371,4 @@ declare const CouponModel: mongoose__default.Model<CouponDocument, {}, {}, {}, m
|
|
|
360
371
|
__v: number;
|
|
361
372
|
}, any>;
|
|
362
373
|
|
|
363
|
-
export { AD_BILLING_CATALOG_COLLECTION_NAME, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, type AdImpressionEntry, AdImpressionModel, AdModel, AdSettingsModel, AppSettingModel, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, ChatReportModel, type CouponDocument, CouponModel, DEFAULT_AD_SETTINGS, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, StallTypeSchema, UnregisteredVendorModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, buildInitialBillingCatalogEntries, getBillingCatalogDefinition, refundPolicySchema, schemaAdresource, vendorProductTypeSchema };
|
|
374
|
+
export { AD_BILLING_CATALOG_COLLECTION_NAME, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, type AdImpressionEntry, AdImpressionModel, AdModel, AdSettingsModel, AppSettingModel, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, ChatReportModel, type CouponDocument, CouponModel, DEFAULT_AD_SETTINGS, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, type SchemaAppSettingsType, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, StallTypeSchema, UnregisteredVendorModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, buildInitialBillingCatalogEntries, getBillingCatalogDefinition, refundPolicySchema, schemaAdresource, vendorProductTypeSchema };
|
package/dist/mongoose/index.d.ts
CHANGED
|
@@ -307,13 +307,24 @@ declare const PostModel: mongoose__default.Model<PostType, {}, {}, {}, mongoose_
|
|
|
307
307
|
}, any>;
|
|
308
308
|
|
|
309
309
|
declare const APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
|
|
310
|
-
|
|
310
|
+
type SchemaAppSettingsType = AppSettingsType & {
|
|
311
|
+
adSettings: {
|
|
312
|
+
mobileDisplayEnabled: boolean;
|
|
313
|
+
webDisplayEnabled: boolean;
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
declare const AppSettingModel: mongoose__default.Model<SchemaAppSettingsType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaAppSettingsType, {}, {}> & _timardex_cluemart_shared.AppSettingsFormData & {
|
|
311
317
|
_id: string;
|
|
312
318
|
activeSchoolsStudentCountTotal: number;
|
|
313
319
|
activeSchoolsStudentCountUpdatedAt: Date;
|
|
314
320
|
createdAt: Date;
|
|
315
321
|
key: string;
|
|
316
322
|
updatedAt: Date | null;
|
|
323
|
+
} & {
|
|
324
|
+
adSettings: {
|
|
325
|
+
mobileDisplayEnabled: boolean;
|
|
326
|
+
webDisplayEnabled: boolean;
|
|
327
|
+
};
|
|
317
328
|
} & Required<{
|
|
318
329
|
_id: string;
|
|
319
330
|
}> & {
|
|
@@ -360,4 +371,4 @@ declare const CouponModel: mongoose__default.Model<CouponDocument, {}, {}, {}, m
|
|
|
360
371
|
__v: number;
|
|
361
372
|
}, any>;
|
|
362
373
|
|
|
363
|
-
export { AD_BILLING_CATALOG_COLLECTION_NAME, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, type AdImpressionEntry, AdImpressionModel, AdModel, AdSettingsModel, AppSettingModel, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, ChatReportModel, type CouponDocument, CouponModel, DEFAULT_AD_SETTINGS, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, StallTypeSchema, UnregisteredVendorModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, buildInitialBillingCatalogEntries, getBillingCatalogDefinition, refundPolicySchema, schemaAdresource, vendorProductTypeSchema };
|
|
374
|
+
export { AD_BILLING_CATALOG_COLLECTION_NAME, APP_SETTINGS_ID, AdBillingCatalogModel, AdBookingModel, type AdImpressionEntry, AdImpressionModel, AdModel, AdSettingsModel, AppSettingModel, BILLING_CATALOG_COLLECTION_NAME, BillingCatalogModel, ChatReportModel, type CouponDocument, CouponModel, DEFAULT_AD_SETTINGS, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, type SchemaAppSettingsType, type SchemaBillingCatalogEntry, type SchemaBillingCatalogPriceHistoryEntry, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, StallTypeSchema, UnregisteredVendorModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, buildInitialBillingCatalogEntries, getBillingCatalogDefinition, refundPolicySchema, schemaAdresource, vendorProductTypeSchema };
|
package/dist/mongoose/index.mjs
CHANGED
package/dist/service/index.cjs
CHANGED
|
@@ -94,7 +94,7 @@ __export(service_exports, {
|
|
|
94
94
|
});
|
|
95
95
|
module.exports = __toCommonJS(service_exports);
|
|
96
96
|
|
|
97
|
-
// src/mongoose/Ad.ts
|
|
97
|
+
// src/mongoose/ad/Ad.ts
|
|
98
98
|
var import_cluemart_shared = require("@timardex/cluemart-shared");
|
|
99
99
|
var import_mongoose = __toESM(require("mongoose"));
|
|
100
100
|
var MongooseSchema = import_mongoose.default.Schema;
|
|
@@ -191,7 +191,7 @@ schema.index(
|
|
|
191
191
|
);
|
|
192
192
|
var AdModel = import_mongoose.default.models.Ad || import_mongoose.default.model("Ad", schema);
|
|
193
193
|
|
|
194
|
-
// src/mongoose/AdBillingCatalog.ts
|
|
194
|
+
// src/mongoose/ad/AdBillingCatalog.ts
|
|
195
195
|
var import_mongoose2 = __toESM(require("mongoose"));
|
|
196
196
|
var AD_BILLING_CATALOG_COLLECTION_NAME = "adBillingCatalog";
|
|
197
197
|
var schema2 = new import_mongoose2.default.Schema(
|
|
@@ -230,7 +230,7 @@ var AdBillingCatalogModel = import_mongoose2.default.models.AdBillingCatalog ||
|
|
|
230
230
|
AD_BILLING_CATALOG_COLLECTION_NAME
|
|
231
231
|
);
|
|
232
232
|
|
|
233
|
-
// src/mongoose/AdBooking.ts
|
|
233
|
+
// src/mongoose/ad/AdBooking.ts
|
|
234
234
|
var import_cluemart_shared2 = require("@timardex/cluemart-shared");
|
|
235
235
|
var import_mongoose3 = __toESM(require("mongoose"));
|
|
236
236
|
var liveStates = [
|
|
@@ -371,7 +371,7 @@ schema3.index(
|
|
|
371
371
|
);
|
|
372
372
|
var AdBookingModel = import_mongoose3.default.models.AdBooking || import_mongoose3.default.model("AdBooking", schema3);
|
|
373
373
|
|
|
374
|
-
// src/mongoose/AdImpression.ts
|
|
374
|
+
// src/mongoose/ad/AdImpression.ts
|
|
375
375
|
var import_cluemart_shared3 = require("@timardex/cluemart-shared");
|
|
376
376
|
var import_mongoose4 = __toESM(require("mongoose"));
|
|
377
377
|
var schema4 = new import_mongoose4.default.Schema(
|
|
@@ -395,7 +395,7 @@ schema4.index({ recordedAt: 1 }, { expireAfterSeconds: 7 * 24 * 60 * 60 });
|
|
|
395
395
|
schema4.index({ dayKey: 1, placement: 1, adId: 1 });
|
|
396
396
|
var AdImpressionModel = import_mongoose4.default.models.AdImpression || import_mongoose4.default.model("AdImpression", schema4, "adImpressions");
|
|
397
397
|
|
|
398
|
-
// src/mongoose/AdSettings.ts
|
|
398
|
+
// src/mongoose/ad/AdSettings.ts
|
|
399
399
|
var import_mongoose5 = __toESM(require("mongoose"));
|
|
400
400
|
var schema5 = new import_mongoose5.default.Schema(
|
|
401
401
|
{
|
|
@@ -2058,6 +2058,10 @@ var AppSettingSchema = new MongooseSchema20(
|
|
|
2058
2058
|
required: true,
|
|
2059
2059
|
type: Date
|
|
2060
2060
|
},
|
|
2061
|
+
adSettings: {
|
|
2062
|
+
mobileDisplayEnabled: { default: false, required: true, type: Boolean },
|
|
2063
|
+
webDisplayEnabled: { default: false, required: true, type: Boolean }
|
|
2064
|
+
},
|
|
2061
2065
|
appVersion: { default: "1.0.1", required: true, type: String },
|
|
2062
2066
|
isOfflineMode: { default: false, required: true, type: Boolean },
|
|
2063
2067
|
key: {
|
|
@@ -3929,8 +3933,8 @@ async function handleVendorLicenceCompliance(user, now) {
|
|
|
3929
3933
|
resourceName: vendor.name,
|
|
3930
3934
|
resourceType: import_cluemart_shared30.EnumNotificationResourceType.DOWNGRADED_VENDOR
|
|
3931
3935
|
},
|
|
3932
|
-
message: `Your Vendor
|
|
3933
|
-
title: `Vendor
|
|
3936
|
+
message: `Your Vendor licence has been downgraded due to licence expiration.`,
|
|
3937
|
+
title: `Vendor Licence Downgraded`,
|
|
3934
3938
|
type: import_cluemart_shared30.EnumNotificationType.SYSTEM,
|
|
3935
3939
|
userIds: [user._id]
|
|
3936
3940
|
};
|
|
@@ -4264,7 +4268,7 @@ async function sendLicenseReminder(user, licence) {
|
|
|
4264
4268
|
resourceType: resourceInfo.resourceType
|
|
4265
4269
|
},
|
|
4266
4270
|
message: isExtension ? `Your ${licenceName} will be automatically extended for another year on ${(0, import_utils8.formatDate)(expiryDate, "date")}.` : `Your ${licenceName} expires in 7 days (${(0, import_utils8.formatDate)(expiryDate, "date")}). Renew now to avoid deactivation.`,
|
|
4267
|
-
title: isExtension ? "
|
|
4271
|
+
title: isExtension ? "Licence Extension Reminder" : "Licence Expiring Soon",
|
|
4268
4272
|
type: resourceInfo.notificationType,
|
|
4269
4273
|
userIds: [user._id]
|
|
4270
4274
|
};
|