@timardex/cluemart-server-shared 1.1.37 → 1.1.39
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/{Affiliate-xCVhO2Cy.d.mts → Affiliate-BLh0EcNI.d.mts} +18 -5
- package/dist/{Affiliate-CZKOOaz_.d.ts → Affiliate-CBp0M850.d.ts} +18 -5
- package/dist/{chunk-DBGVZNUX.mjs → chunk-6RUQHYTK.mjs} +644 -287
- package/dist/chunk-6RUQHYTK.mjs.map +1 -0
- package/dist/{Chat-Wn7yfc3v.d.mts → index-zC8a3adw.d.mts} +34 -34
- package/dist/{Chat-Wn7yfc3v.d.ts → index-zC8a3adw.d.ts} +34 -34
- package/dist/index.cjs +704 -309
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +113 -58
- package/dist/index.d.ts +113 -58
- package/dist/index.mjs +698 -308
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +646 -286
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +46 -6
- package/dist/mongoose/index.d.ts +46 -6
- package/dist/mongoose/index.mjs +9 -1
- package/dist/service/index.cjs +637 -308
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +14 -12
- package/dist/service/index.d.ts +14 -12
- package/dist/service/index.mjs +53 -18
- package/dist/service/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/chunk-DBGVZNUX.mjs.map +0 -1
package/dist/mongoose/index.cjs
CHANGED
|
@@ -34,6 +34,8 @@ __export(mongoose_exports, {
|
|
|
34
34
|
AdModel: () => AdModel,
|
|
35
35
|
AffiliateModel: () => AffiliateModel,
|
|
36
36
|
AppSettingModel: () => AppSettingModel,
|
|
37
|
+
BILLING_CATALOG_COLLECTION_NAME: () => BILLING_CATALOG_COLLECTION_NAME,
|
|
38
|
+
BillingCatalogModel: () => BillingCatalogModel,
|
|
37
39
|
CategorySchema: () => CategorySchema,
|
|
38
40
|
ChatModel: () => ChatModel,
|
|
39
41
|
ChatReportModel: () => ChatReportModel,
|
|
@@ -61,7 +63,9 @@ __export(mongoose_exports, {
|
|
|
61
63
|
VendorModel: () => VendorModel,
|
|
62
64
|
VerificationTokenModel: () => VerificationTokenModel,
|
|
63
65
|
baseResourceFields: () => baseResourceFields,
|
|
66
|
+
buildInitialBillingCatalogEntries: () => buildInitialBillingCatalogEntries,
|
|
64
67
|
dateTimeSchema: () => dateTimeSchema2,
|
|
68
|
+
getBillingCatalogDefinition: () => getBillingCatalogDefinition,
|
|
65
69
|
locationGeoSchema: () => locationGeoSchema,
|
|
66
70
|
locationsSchema: () => locationsSchema,
|
|
67
71
|
refundPolicySchema: () => refundPolicySchema,
|
|
@@ -366,8 +370,8 @@ var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource22) => {
|
|
|
366
370
|
return EnumRelationResource22;
|
|
367
371
|
})(EnumRelationResource || {});
|
|
368
372
|
var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceType22) => {
|
|
369
|
-
EnumNotificationResourceType22["APPROVED_AFFILIATE"] = "approved_affiliate";
|
|
370
373
|
EnumNotificationResourceType22["AFFILIATE_REWARD_RECEIVED"] = "affiliate_reward_received";
|
|
374
|
+
EnumNotificationResourceType22["APPROVED_AFFILIATE"] = "approved_affiliate";
|
|
371
375
|
EnumNotificationResourceType22["APPROVED_EVENT"] = "approved_event";
|
|
372
376
|
EnumNotificationResourceType22["APPROVED_PARTNER"] = "approved_partner";
|
|
373
377
|
EnumNotificationResourceType22["APPROVED_SCHOOL"] = "approved_school";
|
|
@@ -395,6 +399,7 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
|
|
|
395
399
|
EnumNotificationResourceType22["NEW_POST_CREATED"] = "new_post_created";
|
|
396
400
|
EnumNotificationResourceType22["REGISTERED_USER_BY_SCHOOL_CODE"] = "registered_user_by_school_code";
|
|
397
401
|
EnumNotificationResourceType22["SYSTEM_ALERT"] = "system_alert";
|
|
402
|
+
EnumNotificationResourceType22["USER_COUPON_REDEEMED"] = "user_coupon_redeemed";
|
|
398
403
|
EnumNotificationResourceType22["VENDOR_APPLICATION_TO_EVENT"] = "vendor_application_to_event";
|
|
399
404
|
EnumNotificationResourceType22["VENDOR_UPDATE_RELATION_TO_EVENT"] = "vendor_update_relation_to_event";
|
|
400
405
|
return EnumNotificationResourceType22;
|
|
@@ -469,6 +474,11 @@ var EnumSubscriptionStatus = /* @__PURE__ */ ((EnumSubscriptionStatus22) => {
|
|
|
469
474
|
EnumSubscriptionStatus22["TRIALING"] = "trialing";
|
|
470
475
|
return EnumSubscriptionStatus22;
|
|
471
476
|
})(EnumSubscriptionStatus || {});
|
|
477
|
+
var EnumBillingPeriod = /* @__PURE__ */ ((EnumBillingPeriod22) => {
|
|
478
|
+
EnumBillingPeriod22["MONTHLY_CANCEL_ANYTIME"] = "monthly_cancel_anytime";
|
|
479
|
+
EnumBillingPeriod22["YEARLY_ANNUAL_BILLED"] = "yearly_annual_billed";
|
|
480
|
+
return EnumBillingPeriod22;
|
|
481
|
+
})(EnumBillingPeriod || {});
|
|
472
482
|
var EnumReward = /* @__PURE__ */ ((EnumReward22) => {
|
|
473
483
|
EnumReward22["MYSTERY_JOY_BOX"] = "mystery_joy_box";
|
|
474
484
|
EnumReward22["MYSTERY_SQUEEZE_BOX"] = "mystery_squeeze_box";
|
|
@@ -1711,6 +1721,80 @@ var availableCategories = assignColorToCategories([
|
|
|
1711
1721
|
...petProductsAndAnimalGoods,
|
|
1712
1722
|
...serviceAndExperience
|
|
1713
1723
|
]);
|
|
1724
|
+
var BILLING_CATALOG_KEYS = [
|
|
1725
|
+
"pro_vendor_monthly",
|
|
1726
|
+
"pro_vendor_yearly",
|
|
1727
|
+
"pro_plus_vendor_monthly",
|
|
1728
|
+
"pro_plus_vendor_yearly"
|
|
1729
|
+
];
|
|
1730
|
+
var BILLING_CATALOG_CURRENCY = "nzd";
|
|
1731
|
+
var BILLING_CATALOG_DEFINITIONS = {
|
|
1732
|
+
pro_plus_vendor_monthly: {
|
|
1733
|
+
billingPeriod: "monthly_cancel_anytime",
|
|
1734
|
+
licenceType: "pro_plus_vendor"
|
|
1735
|
+
/* PRO_PLUS_VENDOR */
|
|
1736
|
+
},
|
|
1737
|
+
pro_plus_vendor_yearly: {
|
|
1738
|
+
billingPeriod: "yearly_annual_billed",
|
|
1739
|
+
licenceType: "pro_plus_vendor"
|
|
1740
|
+
/* PRO_PLUS_VENDOR */
|
|
1741
|
+
},
|
|
1742
|
+
pro_vendor_monthly: {
|
|
1743
|
+
billingPeriod: "monthly_cancel_anytime",
|
|
1744
|
+
licenceType: "pro_vendor"
|
|
1745
|
+
/* PRO_VENDOR */
|
|
1746
|
+
},
|
|
1747
|
+
pro_vendor_yearly: {
|
|
1748
|
+
billingPeriod: "yearly_annual_billed",
|
|
1749
|
+
licenceType: "pro_vendor"
|
|
1750
|
+
/* PRO_VENDOR */
|
|
1751
|
+
}
|
|
1752
|
+
};
|
|
1753
|
+
var INITIAL_BILLING_CATALOG = [
|
|
1754
|
+
{
|
|
1755
|
+
active: true,
|
|
1756
|
+
billingPeriod: "monthly_cancel_anytime",
|
|
1757
|
+
currency: BILLING_CATALOG_CURRENCY,
|
|
1758
|
+
key: "pro_vendor_monthly",
|
|
1759
|
+
licenceType: "pro_vendor",
|
|
1760
|
+
taxInclusive: true,
|
|
1761
|
+
unitAmount: 3999
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
active: true,
|
|
1765
|
+
billingPeriod: "yearly_annual_billed",
|
|
1766
|
+
currency: BILLING_CATALOG_CURRENCY,
|
|
1767
|
+
key: "pro_vendor_yearly",
|
|
1768
|
+
licenceType: "pro_vendor",
|
|
1769
|
+
taxInclusive: true,
|
|
1770
|
+
unitAmount: 40788
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
active: true,
|
|
1774
|
+
billingPeriod: "monthly_cancel_anytime",
|
|
1775
|
+
currency: BILLING_CATALOG_CURRENCY,
|
|
1776
|
+
key: "pro_plus_vendor_monthly",
|
|
1777
|
+
licenceType: "pro_plus_vendor",
|
|
1778
|
+
taxInclusive: true,
|
|
1779
|
+
unitAmount: 6499
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
active: true,
|
|
1783
|
+
billingPeriod: "yearly_annual_billed",
|
|
1784
|
+
currency: BILLING_CATALOG_CURRENCY,
|
|
1785
|
+
key: "pro_plus_vendor_yearly",
|
|
1786
|
+
licenceType: "pro_plus_vendor",
|
|
1787
|
+
taxInclusive: true,
|
|
1788
|
+
unitAmount: 62388
|
|
1789
|
+
}
|
|
1790
|
+
];
|
|
1791
|
+
function billingCatalogDefinitionMatches(entry) {
|
|
1792
|
+
const definition = BILLING_CATALOG_DEFINITIONS[entry.key];
|
|
1793
|
+
if (!definition) {
|
|
1794
|
+
return false;
|
|
1795
|
+
}
|
|
1796
|
+
return definition.billingPeriod === entry.billingPeriod && definition.licenceType === entry.licenceType;
|
|
1797
|
+
}
|
|
1714
1798
|
var packagingTypes = [
|
|
1715
1799
|
"Biodegradable",
|
|
1716
1800
|
"Compostable",
|
|
@@ -2155,12 +2239,19 @@ var REDEEMED_REWARD_FIELDS_FRAGMENT = gql`
|
|
|
2155
2239
|
`;
|
|
2156
2240
|
var STRIPE_FIELDS_FRAGMENT = gql`
|
|
2157
2241
|
fragment StripeSubscriptionFields on StripeSubscriptionType {
|
|
2242
|
+
billingPeriod
|
|
2243
|
+
cancelAtPeriodEnd
|
|
2158
2244
|
customerId
|
|
2159
2245
|
subscriptionId
|
|
2160
2246
|
status
|
|
2161
2247
|
currentPlan
|
|
2162
2248
|
startDate
|
|
2163
2249
|
endDate
|
|
2250
|
+
pendingPlan
|
|
2251
|
+
pendingBillingPeriod
|
|
2252
|
+
pendingChangeEffectiveAt
|
|
2253
|
+
priceId
|
|
2254
|
+
scheduleId
|
|
2164
2255
|
}
|
|
2165
2256
|
`;
|
|
2166
2257
|
var USER_FIELDS_FRAGMENT = gql`
|
|
@@ -2452,6 +2543,14 @@ var GET_EVENT = gql`
|
|
|
2452
2543
|
}
|
|
2453
2544
|
${EVENT}
|
|
2454
2545
|
`;
|
|
2546
|
+
var GET_OWNED_EVENT = gql`
|
|
2547
|
+
query getOwnedEvent($_id: ID!) {
|
|
2548
|
+
ownedEvent(_id: $_id) {
|
|
2549
|
+
...EventFields
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
${EVENT}
|
|
2553
|
+
`;
|
|
2455
2554
|
var GET_EVENT_BY_PLACE_ID = gql`
|
|
2456
2555
|
query getEventByPlaceId($googlePlaceId: String!) {
|
|
2457
2556
|
eventByPlaceId(googlePlaceId: $googlePlaceId) {
|
|
@@ -4186,11 +4285,8 @@ var GET_RESOURCE_ACTIVITY = gql`
|
|
|
4186
4285
|
${RESOURCE_ACTIVITY_FIELDS_FRAGMENT}
|
|
4187
4286
|
`;
|
|
4188
4287
|
var CREATE_CHECKOUT_SESSION_MUTATION = gql`
|
|
4189
|
-
mutation createCheckoutSession(
|
|
4190
|
-
|
|
4191
|
-
$billingPeriod: BillingPeriodEnumType
|
|
4192
|
-
) {
|
|
4193
|
-
createCheckoutSession(planId: $planId, billingPeriod: $billingPeriod) {
|
|
4288
|
+
mutation createCheckoutSession($input: CreateCheckoutSessionInputType!) {
|
|
4289
|
+
createCheckoutSession(input: $input) {
|
|
4194
4290
|
data {
|
|
4195
4291
|
sessionId
|
|
4196
4292
|
checkoutUrl
|
|
@@ -4202,25 +4298,38 @@ var CREATE_CHECKOUT_SESSION_MUTATION = gql`
|
|
|
4202
4298
|
var CANCEL_SUBSCRIPTION_MUTATION = gql`
|
|
4203
4299
|
mutation cancelSubscription {
|
|
4204
4300
|
cancelSubscription {
|
|
4205
|
-
data
|
|
4301
|
+
data {
|
|
4302
|
+
billingPeriod
|
|
4303
|
+
cancelAtPeriodEnd
|
|
4304
|
+
currentPlan
|
|
4305
|
+
endDate
|
|
4306
|
+
pendingBillingPeriod
|
|
4307
|
+
pendingChangeEffectiveAt
|
|
4308
|
+
pendingPlan
|
|
4309
|
+
priceId
|
|
4310
|
+
scheduleId
|
|
4311
|
+
status
|
|
4312
|
+
subscriptionId
|
|
4313
|
+
}
|
|
4206
4314
|
message
|
|
4207
4315
|
}
|
|
4208
4316
|
}
|
|
4209
4317
|
`;
|
|
4210
4318
|
var UPDATE_SUBSCRIPTION_PLAN_MUTATION = gql`
|
|
4211
|
-
mutation updateSubscriptionPlan(
|
|
4212
|
-
|
|
4213
|
-
$billingPeriod: BillingPeriodEnumType
|
|
4214
|
-
) {
|
|
4215
|
-
updateSubscriptionPlan(
|
|
4216
|
-
newPlanId: $newPlanId
|
|
4217
|
-
billingPeriod: $billingPeriod
|
|
4218
|
-
) {
|
|
4319
|
+
mutation updateSubscriptionPlan($input: UpdateSubscriptionPlanInputType!) {
|
|
4320
|
+
updateSubscriptionPlan(input: $input) {
|
|
4219
4321
|
data {
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
priceId
|
|
4322
|
+
billingPeriod
|
|
4323
|
+
cancelAtPeriodEnd
|
|
4223
4324
|
currentPlan
|
|
4325
|
+
endDate
|
|
4326
|
+
pendingBillingPeriod
|
|
4327
|
+
pendingChangeEffectiveAt
|
|
4328
|
+
pendingPlan
|
|
4329
|
+
priceId
|
|
4330
|
+
scheduleId
|
|
4331
|
+
status
|
|
4332
|
+
subscriptionId
|
|
4224
4333
|
}
|
|
4225
4334
|
message
|
|
4226
4335
|
}
|
|
@@ -4236,36 +4345,20 @@ var CREATE_CUSTOMER_PORTAL = gql`
|
|
|
4236
4345
|
}
|
|
4237
4346
|
}
|
|
4238
4347
|
`;
|
|
4239
|
-
var SELECT_PACKAGE_MUTATION = gql`
|
|
4240
|
-
mutation selectPackage(
|
|
4241
|
-
$billingPeriod: BillingPeriodEnumType
|
|
4242
|
-
$selectedLicence: LicencesEnumType!
|
|
4243
|
-
$useStripe: Boolean
|
|
4244
|
-
) {
|
|
4245
|
-
selectPackage(
|
|
4246
|
-
billingPeriod: $billingPeriod
|
|
4247
|
-
selectedLicence: $selectedLicence
|
|
4248
|
-
useStripe: $useStripe
|
|
4249
|
-
) {
|
|
4250
|
-
data {
|
|
4251
|
-
checkoutUrl
|
|
4252
|
-
licences {
|
|
4253
|
-
...LicenceFields
|
|
4254
|
-
}
|
|
4255
|
-
userId
|
|
4256
|
-
}
|
|
4257
|
-
message
|
|
4258
|
-
}
|
|
4259
|
-
}
|
|
4260
|
-
${LICENCE_FIELDS_FRAGMENT}
|
|
4261
|
-
`;
|
|
4262
4348
|
var GET_SUBSCRIPTION_STATUS = gql`
|
|
4263
4349
|
query getSubscriptionStatus {
|
|
4264
4350
|
getSubscriptionStatus {
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
priceId
|
|
4351
|
+
billingPeriod
|
|
4352
|
+
cancelAtPeriodEnd
|
|
4268
4353
|
currentPlan
|
|
4354
|
+
endDate
|
|
4355
|
+
pendingBillingPeriod
|
|
4356
|
+
pendingChangeEffectiveAt
|
|
4357
|
+
pendingPlan
|
|
4358
|
+
priceId
|
|
4359
|
+
scheduleId
|
|
4360
|
+
status
|
|
4361
|
+
subscriptionId
|
|
4269
4362
|
}
|
|
4270
4363
|
}
|
|
4271
4364
|
`;
|
|
@@ -4292,7 +4385,6 @@ var GET_SUBSCRIPTION_PLANS = gql`
|
|
|
4292
4385
|
}
|
|
4293
4386
|
}
|
|
4294
4387
|
isNewUser
|
|
4295
|
-
isTester
|
|
4296
4388
|
appliedDiscountType
|
|
4297
4389
|
}
|
|
4298
4390
|
}
|
|
@@ -4400,6 +4492,57 @@ var GET_APP_SETTINGS = gql`
|
|
|
4400
4492
|
}
|
|
4401
4493
|
${APP_SETTINGS_FIELDS_FRAGMENT}
|
|
4402
4494
|
`;
|
|
4495
|
+
var BILLING_CATALOG_FIELDS_FRAGMENT = gql`
|
|
4496
|
+
fragment BillingCatalogFields on BillingCatalogEntryType {
|
|
4497
|
+
_id
|
|
4498
|
+
active
|
|
4499
|
+
billingPeriod
|
|
4500
|
+
createdAt
|
|
4501
|
+
currency
|
|
4502
|
+
effectiveFrom
|
|
4503
|
+
key
|
|
4504
|
+
licenceType
|
|
4505
|
+
revision
|
|
4506
|
+
stripePriceId
|
|
4507
|
+
stripeProductId
|
|
4508
|
+
taxInclusive
|
|
4509
|
+
unitAmount
|
|
4510
|
+
updatedAt
|
|
4511
|
+
updatedBy
|
|
4512
|
+
}
|
|
4513
|
+
`;
|
|
4514
|
+
var GET_BILLING_CATALOG = gql`
|
|
4515
|
+
query getBillingCatalog {
|
|
4516
|
+
billingCatalog {
|
|
4517
|
+
...BillingCatalogFields
|
|
4518
|
+
}
|
|
4519
|
+
}
|
|
4520
|
+
${BILLING_CATALOG_FIELDS_FRAGMENT}
|
|
4521
|
+
`;
|
|
4522
|
+
var UPDATE_BILLING_CATALOG_PRICE_MUTATION = gql`
|
|
4523
|
+
mutation updateBillingCatalogPrice(
|
|
4524
|
+
$input: UpdateBillingCatalogPriceInputType!
|
|
4525
|
+
) {
|
|
4526
|
+
updateBillingCatalogPrice(input: $input) {
|
|
4527
|
+
data {
|
|
4528
|
+
...BillingCatalogFields
|
|
4529
|
+
}
|
|
4530
|
+
message
|
|
4531
|
+
}
|
|
4532
|
+
}
|
|
4533
|
+
${BILLING_CATALOG_FIELDS_FRAGMENT}
|
|
4534
|
+
`;
|
|
4535
|
+
var SYNC_BILLING_CATALOG_PRICE_MUTATION = gql`
|
|
4536
|
+
mutation syncBillingCatalogPrice($input: SyncBillingCatalogPriceInputType!) {
|
|
4537
|
+
syncBillingCatalogPrice(input: $input) {
|
|
4538
|
+
data {
|
|
4539
|
+
...BillingCatalogFields
|
|
4540
|
+
}
|
|
4541
|
+
message
|
|
4542
|
+
}
|
|
4543
|
+
}
|
|
4544
|
+
${BILLING_CATALOG_FIELDS_FRAGMENT}
|
|
4545
|
+
`;
|
|
4403
4546
|
var GAME_HISTORY_FIELDS_FRAGMENT = gql`
|
|
4404
4547
|
fragment GameHistoryFields on GameHistoryType {
|
|
4405
4548
|
createdAt
|
|
@@ -5238,46 +5381,220 @@ schema.index({
|
|
|
5238
5381
|
start: 1,
|
|
5239
5382
|
status: 1
|
|
5240
5383
|
});
|
|
5384
|
+
schema.index({
|
|
5385
|
+
status: 1,
|
|
5386
|
+
targetRegion: 1,
|
|
5387
|
+
// eslint-disable-next-line sort-keys
|
|
5388
|
+
start: -1
|
|
5389
|
+
});
|
|
5241
5390
|
var AdModel = import_mongoose.default.models.Ad || import_mongoose.default.model("Ad", schema);
|
|
5242
5391
|
|
|
5243
|
-
// src/mongoose/
|
|
5392
|
+
// src/mongoose/BillingCatalog.ts
|
|
5244
5393
|
var import_mongoose2 = __toESM(require("mongoose"));
|
|
5245
5394
|
var MongooseSchema2 = import_mongoose2.default.Schema;
|
|
5246
|
-
var
|
|
5395
|
+
var BILLING_CATALOG_COLLECTION_NAME = "billingCatalog";
|
|
5396
|
+
var paidVendorLicences = [
|
|
5397
|
+
EnumUserLicence.PRO_VENDOR,
|
|
5398
|
+
EnumUserLicence.PRO_PLUS_VENDOR
|
|
5399
|
+
];
|
|
5400
|
+
var supportedBillingPeriods = [
|
|
5401
|
+
EnumBillingPeriod.MONTHLY_CANCEL_ANYTIME,
|
|
5402
|
+
EnumBillingPeriod.YEARLY_ANNUAL_BILLED
|
|
5403
|
+
];
|
|
5404
|
+
var unitAmountField = {
|
|
5405
|
+
min: 1,
|
|
5406
|
+
required: true,
|
|
5407
|
+
type: Number,
|
|
5408
|
+
validate: {
|
|
5409
|
+
message: "Billing catalogue price must be a positive integer.",
|
|
5410
|
+
validator: Number.isInteger
|
|
5411
|
+
}
|
|
5412
|
+
};
|
|
5413
|
+
var currencyField = {
|
|
5414
|
+
default: BILLING_CATALOG_CURRENCY,
|
|
5415
|
+
enum: [BILLING_CATALOG_CURRENCY],
|
|
5416
|
+
immutable: true,
|
|
5417
|
+
lowercase: true,
|
|
5418
|
+
required: true,
|
|
5419
|
+
trim: true,
|
|
5420
|
+
type: String
|
|
5421
|
+
};
|
|
5422
|
+
var stripePriceIdField = {
|
|
5423
|
+
default: null,
|
|
5424
|
+
required: false,
|
|
5425
|
+
trim: true,
|
|
5426
|
+
type: String
|
|
5427
|
+
};
|
|
5428
|
+
var stripeProductIdField = {
|
|
5429
|
+
default: null,
|
|
5430
|
+
required: false,
|
|
5431
|
+
trim: true,
|
|
5432
|
+
type: String
|
|
5433
|
+
};
|
|
5434
|
+
var priceHistorySchema = new MongooseSchema2(
|
|
5435
|
+
{
|
|
5436
|
+
changedAt: { required: true, type: Date },
|
|
5437
|
+
changedBy: {
|
|
5438
|
+
default: null,
|
|
5439
|
+
ref: "User",
|
|
5440
|
+
required: false,
|
|
5441
|
+
type: import_mongoose2.default.Schema.Types.ObjectId
|
|
5442
|
+
},
|
|
5443
|
+
currency: currencyField,
|
|
5444
|
+
effectiveFrom: { required: true, type: Date },
|
|
5445
|
+
effectiveTo: { required: true, type: Date },
|
|
5446
|
+
stripePriceId: stripePriceIdField,
|
|
5447
|
+
stripeProductId: stripeProductIdField,
|
|
5448
|
+
unitAmount: unitAmountField
|
|
5449
|
+
},
|
|
5450
|
+
{ _id: false }
|
|
5451
|
+
);
|
|
5452
|
+
var schema2 = new MongooseSchema2(
|
|
5453
|
+
{
|
|
5454
|
+
active: { default: true, required: true, type: Boolean },
|
|
5455
|
+
billingPeriod: {
|
|
5456
|
+
enum: supportedBillingPeriods,
|
|
5457
|
+
immutable: true,
|
|
5458
|
+
required: true,
|
|
5459
|
+
type: String
|
|
5460
|
+
},
|
|
5461
|
+
currency: currencyField,
|
|
5462
|
+
effectiveFrom: { default: Date.now, required: true, type: Date },
|
|
5463
|
+
key: {
|
|
5464
|
+
enum: BILLING_CATALOG_KEYS,
|
|
5465
|
+
immutable: true,
|
|
5466
|
+
required: true,
|
|
5467
|
+
type: String,
|
|
5468
|
+
unique: true
|
|
5469
|
+
},
|
|
5470
|
+
licenceType: {
|
|
5471
|
+
enum: paidVendorLicences,
|
|
5472
|
+
immutable: true,
|
|
5473
|
+
required: true,
|
|
5474
|
+
type: String
|
|
5475
|
+
},
|
|
5476
|
+
priceHistory: {
|
|
5477
|
+
default: [],
|
|
5478
|
+
required: true,
|
|
5479
|
+
type: [priceHistorySchema]
|
|
5480
|
+
},
|
|
5481
|
+
revision: {
|
|
5482
|
+
default: 1,
|
|
5483
|
+
min: 1,
|
|
5484
|
+
required: true,
|
|
5485
|
+
type: Number,
|
|
5486
|
+
validate: {
|
|
5487
|
+
message: "Billing catalogue revision must be a positive integer.",
|
|
5488
|
+
validator: Number.isInteger
|
|
5489
|
+
}
|
|
5490
|
+
},
|
|
5491
|
+
stripePriceId: stripePriceIdField,
|
|
5492
|
+
stripeProductId: stripeProductIdField,
|
|
5493
|
+
taxInclusive: {
|
|
5494
|
+
default: true,
|
|
5495
|
+
immutable: true,
|
|
5496
|
+
required: true,
|
|
5497
|
+
type: Boolean,
|
|
5498
|
+
validate: {
|
|
5499
|
+
message: "Billing catalogue prices must include GST.",
|
|
5500
|
+
validator: (value) => value === true
|
|
5501
|
+
}
|
|
5502
|
+
},
|
|
5503
|
+
unitAmount: unitAmountField,
|
|
5504
|
+
updatedBy: {
|
|
5505
|
+
default: null,
|
|
5506
|
+
ref: "User",
|
|
5507
|
+
required: false,
|
|
5508
|
+
type: import_mongoose2.default.Schema.Types.ObjectId
|
|
5509
|
+
}
|
|
5510
|
+
},
|
|
5511
|
+
{
|
|
5512
|
+
collection: BILLING_CATALOG_COLLECTION_NAME,
|
|
5513
|
+
strict: true,
|
|
5514
|
+
timestamps: true
|
|
5515
|
+
}
|
|
5516
|
+
);
|
|
5517
|
+
schema2.pre("validate", function validateDefinition() {
|
|
5518
|
+
if (!billingCatalogDefinitionMatches(this)) {
|
|
5519
|
+
this.invalidate(
|
|
5520
|
+
"key",
|
|
5521
|
+
"Billing catalogue key does not match its licence and billing period."
|
|
5522
|
+
);
|
|
5523
|
+
}
|
|
5524
|
+
});
|
|
5525
|
+
schema2.index({ billingPeriod: 1, licenceType: 1 }, { unique: true });
|
|
5526
|
+
schema2.index({ active: 1, licenceType: 1 });
|
|
5527
|
+
schema2.index(
|
|
5528
|
+
{ stripePriceId: 1 },
|
|
5529
|
+
{
|
|
5530
|
+
partialFilterExpression: { stripePriceId: { $type: "string" } },
|
|
5531
|
+
unique: true
|
|
5532
|
+
}
|
|
5533
|
+
);
|
|
5534
|
+
var BillingCatalogModel = import_mongoose2.default.models.BillingCatalogEntry || import_mongoose2.default.model(
|
|
5535
|
+
"BillingCatalogEntry",
|
|
5536
|
+
schema2,
|
|
5537
|
+
BILLING_CATALOG_COLLECTION_NAME
|
|
5538
|
+
);
|
|
5539
|
+
function buildInitialBillingCatalogEntries(now = /* @__PURE__ */ new Date()) {
|
|
5540
|
+
return INITIAL_BILLING_CATALOG.map((entry) => ({
|
|
5541
|
+
active: entry.active,
|
|
5542
|
+
billingPeriod: entry.billingPeriod,
|
|
5543
|
+
currency: entry.currency,
|
|
5544
|
+
effectiveFrom: new Date(now.getTime()),
|
|
5545
|
+
key: entry.key,
|
|
5546
|
+
licenceType: entry.licenceType,
|
|
5547
|
+
priceHistory: [],
|
|
5548
|
+
revision: 1,
|
|
5549
|
+
stripePriceId: null,
|
|
5550
|
+
stripeProductId: null,
|
|
5551
|
+
taxInclusive: entry.taxInclusive,
|
|
5552
|
+
unitAmount: entry.unitAmount,
|
|
5553
|
+
updatedBy: null
|
|
5554
|
+
}));
|
|
5555
|
+
}
|
|
5556
|
+
function getBillingCatalogDefinition(key) {
|
|
5557
|
+
return BILLING_CATALOG_DEFINITIONS[key];
|
|
5558
|
+
}
|
|
5559
|
+
|
|
5560
|
+
// src/mongoose/chat/Chat.ts
|
|
5561
|
+
var import_mongoose3 = __toESM(require("mongoose"));
|
|
5562
|
+
var MongooseSchema3 = import_mongoose3.default.Schema;
|
|
5563
|
+
var MessageReplyPreviewSchema = new MongooseSchema3(
|
|
5247
5564
|
{
|
|
5248
5565
|
contentPreview: { required: true, type: String },
|
|
5249
5566
|
senderId: {
|
|
5250
5567
|
ref: "User",
|
|
5251
5568
|
required: true,
|
|
5252
|
-
type:
|
|
5569
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
5253
5570
|
},
|
|
5254
5571
|
senderName: { required: true, type: String }
|
|
5255
5572
|
},
|
|
5256
5573
|
{ _id: false }
|
|
5257
5574
|
);
|
|
5258
|
-
var MessageReactionSchema = new
|
|
5575
|
+
var MessageReactionSchema = new MongooseSchema3(
|
|
5259
5576
|
{
|
|
5260
5577
|
createdAt: { required: true, type: Date },
|
|
5261
5578
|
userId: {
|
|
5262
5579
|
ref: "User",
|
|
5263
5580
|
required: true,
|
|
5264
|
-
type:
|
|
5581
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
5265
5582
|
}
|
|
5266
5583
|
},
|
|
5267
5584
|
{ _id: false }
|
|
5268
5585
|
);
|
|
5269
|
-
var MessageSeenSchema = new
|
|
5586
|
+
var MessageSeenSchema = new MongooseSchema3(
|
|
5270
5587
|
{
|
|
5271
5588
|
seenAt: { required: true, type: Date },
|
|
5272
5589
|
userId: {
|
|
5273
5590
|
ref: "User",
|
|
5274
5591
|
required: true,
|
|
5275
|
-
type:
|
|
5592
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
5276
5593
|
}
|
|
5277
5594
|
},
|
|
5278
5595
|
{ _id: false }
|
|
5279
5596
|
);
|
|
5280
|
-
var MessageSchema = new
|
|
5597
|
+
var MessageSchema = new MongooseSchema3(
|
|
5281
5598
|
{
|
|
5282
5599
|
content: { required: true, type: String },
|
|
5283
5600
|
likedBy: { default: [], required: false, type: [MessageReactionSchema] },
|
|
@@ -5288,18 +5605,18 @@ var MessageSchema = new MongooseSchema2(
|
|
|
5288
5605
|
replyToMessageId: {
|
|
5289
5606
|
ref: "Chat.messages",
|
|
5290
5607
|
required: false,
|
|
5291
|
-
type:
|
|
5608
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
5292
5609
|
},
|
|
5293
5610
|
seenBy: { default: [], required: false, type: [MessageSeenSchema] },
|
|
5294
5611
|
senderId: {
|
|
5295
5612
|
ref: "User",
|
|
5296
5613
|
required: true,
|
|
5297
|
-
type:
|
|
5614
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
5298
5615
|
}
|
|
5299
5616
|
},
|
|
5300
5617
|
{ timestamps: true }
|
|
5301
5618
|
);
|
|
5302
|
-
var ParticipantSchema = new
|
|
5619
|
+
var ParticipantSchema = new MongooseSchema3(
|
|
5303
5620
|
{
|
|
5304
5621
|
active: { default: true, required: true, type: Boolean },
|
|
5305
5622
|
userAvatar: { required: false, type: String },
|
|
@@ -5307,14 +5624,14 @@ var ParticipantSchema = new MongooseSchema2(
|
|
|
5307
5624
|
userId: {
|
|
5308
5625
|
ref: "User",
|
|
5309
5626
|
required: true,
|
|
5310
|
-
type:
|
|
5627
|
+
type: import_mongoose3.default.Schema.Types.ObjectId
|
|
5311
5628
|
},
|
|
5312
5629
|
userName: { required: true, type: String }
|
|
5313
5630
|
},
|
|
5314
5631
|
{ _id: false }
|
|
5315
5632
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5316
5633
|
);
|
|
5317
|
-
var ChatSchema = new
|
|
5634
|
+
var ChatSchema = new MongooseSchema3(
|
|
5318
5635
|
{
|
|
5319
5636
|
active: { default: true, required: true, type: Boolean },
|
|
5320
5637
|
chatDescription: { required: false, type: String },
|
|
@@ -5338,12 +5655,12 @@ ChatSchema.index({
|
|
|
5338
5655
|
"participants.userId": 1,
|
|
5339
5656
|
updatedAt: -1
|
|
5340
5657
|
});
|
|
5341
|
-
var ChatModel =
|
|
5658
|
+
var ChatModel = import_mongoose3.default.models.Chat || import_mongoose3.default.model("Chat", ChatSchema);
|
|
5342
5659
|
|
|
5343
5660
|
// src/mongoose/chat/ChatReport.ts
|
|
5344
|
-
var
|
|
5345
|
-
var
|
|
5346
|
-
var ReasonSchema = new
|
|
5661
|
+
var import_mongoose4 = __toESM(require("mongoose"));
|
|
5662
|
+
var MongooseSchema4 = import_mongoose4.default.Schema;
|
|
5663
|
+
var ReasonSchema = new MongooseSchema4(
|
|
5347
5664
|
{
|
|
5348
5665
|
details: { default: null, required: false, type: String },
|
|
5349
5666
|
reasonType: {
|
|
@@ -5354,23 +5671,23 @@ var ReasonSchema = new MongooseSchema3(
|
|
|
5354
5671
|
},
|
|
5355
5672
|
{ _id: false }
|
|
5356
5673
|
);
|
|
5357
|
-
var ChatReportSchema = new
|
|
5674
|
+
var ChatReportSchema = new MongooseSchema4(
|
|
5358
5675
|
{
|
|
5359
5676
|
chatId: {
|
|
5360
5677
|
ref: "Chat",
|
|
5361
5678
|
required: true,
|
|
5362
|
-
type:
|
|
5679
|
+
type: import_mongoose4.default.Schema.Types.ObjectId
|
|
5363
5680
|
},
|
|
5364
5681
|
reason: { required: true, type: ReasonSchema },
|
|
5365
5682
|
reportedUserId: {
|
|
5366
5683
|
ref: "User",
|
|
5367
5684
|
required: true,
|
|
5368
|
-
type:
|
|
5685
|
+
type: import_mongoose4.default.Schema.Types.ObjectId
|
|
5369
5686
|
},
|
|
5370
5687
|
reporterUserId: {
|
|
5371
5688
|
ref: "User",
|
|
5372
5689
|
required: true,
|
|
5373
|
-
type:
|
|
5690
|
+
type: import_mongoose4.default.Schema.Types.ObjectId
|
|
5374
5691
|
},
|
|
5375
5692
|
resolved: { default: false, required: true, type: Boolean }
|
|
5376
5693
|
},
|
|
@@ -5378,18 +5695,18 @@ var ChatReportSchema = new MongooseSchema3(
|
|
|
5378
5695
|
);
|
|
5379
5696
|
ChatReportSchema.index({ chatId: 1, reportedUserId: 1 });
|
|
5380
5697
|
ChatReportSchema.index({ createdAt: -1, reporterUserId: 1 });
|
|
5381
|
-
var ChatReportModel =
|
|
5698
|
+
var ChatReportModel = import_mongoose4.default.models.ChatReport || import_mongoose4.default.model("ChatReport", ChatReportSchema);
|
|
5382
5699
|
|
|
5383
5700
|
// src/mongoose/global.ts
|
|
5384
|
-
var
|
|
5701
|
+
var import_mongoose7 = __toESM(require("mongoose"));
|
|
5385
5702
|
|
|
5386
5703
|
// src/mongoose/Relation.ts
|
|
5387
|
-
var
|
|
5704
|
+
var import_mongoose6 = __toESM(require("mongoose"));
|
|
5388
5705
|
|
|
5389
5706
|
// src/mongoose/event/EventInfo.ts
|
|
5390
|
-
var
|
|
5391
|
-
var
|
|
5392
|
-
var StallTypeSchema = new
|
|
5707
|
+
var import_mongoose5 = __toESM(require("mongoose"));
|
|
5708
|
+
var MongooseSchema5 = import_mongoose5.default.Schema;
|
|
5709
|
+
var StallTypeSchema = new MongooseSchema5(
|
|
5393
5710
|
{
|
|
5394
5711
|
label: { required: false, type: String },
|
|
5395
5712
|
price: { required: false, type: Number },
|
|
@@ -5400,7 +5717,7 @@ var StallTypeSchema = new MongooseSchema4(
|
|
|
5400
5717
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5401
5718
|
}
|
|
5402
5719
|
);
|
|
5403
|
-
var dateTimeSchema = new
|
|
5720
|
+
var dateTimeSchema = new MongooseSchema5(
|
|
5404
5721
|
{
|
|
5405
5722
|
dateStatus: {
|
|
5406
5723
|
enum: Object.values(EnumEventDateStatus),
|
|
@@ -5416,7 +5733,7 @@ var dateTimeSchema = new MongooseSchema4(
|
|
|
5416
5733
|
{ _id: false }
|
|
5417
5734
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5418
5735
|
);
|
|
5419
|
-
var paymentInfoSchema = new
|
|
5736
|
+
var paymentInfoSchema = new MongooseSchema5(
|
|
5420
5737
|
{
|
|
5421
5738
|
accountHolderName: { required: false, type: String },
|
|
5422
5739
|
accountNumber: { required: false, type: String },
|
|
@@ -5430,7 +5747,7 @@ var paymentInfoSchema = new MongooseSchema4(
|
|
|
5430
5747
|
{ _id: false }
|
|
5431
5748
|
// Prevents Mongoose from creating an additional _id field
|
|
5432
5749
|
);
|
|
5433
|
-
var requirementsSchema = new
|
|
5750
|
+
var requirementsSchema = new MongooseSchema5(
|
|
5434
5751
|
{
|
|
5435
5752
|
category: { required: true, type: String },
|
|
5436
5753
|
label: { required: true, type: String },
|
|
@@ -5441,7 +5758,7 @@ var requirementsSchema = new MongooseSchema4(
|
|
|
5441
5758
|
// Prevents Mongoose from creating an additional _id field for
|
|
5442
5759
|
}
|
|
5443
5760
|
);
|
|
5444
|
-
var refundPolicySchema = new
|
|
5761
|
+
var refundPolicySchema = new MongooseSchema5(
|
|
5445
5762
|
{
|
|
5446
5763
|
category: { required: true, type: String },
|
|
5447
5764
|
label: { required: true, type: String },
|
|
@@ -5449,7 +5766,7 @@ var refundPolicySchema = new MongooseSchema4(
|
|
|
5449
5766
|
},
|
|
5450
5767
|
{ _id: false }
|
|
5451
5768
|
);
|
|
5452
|
-
var
|
|
5769
|
+
var schema3 = new MongooseSchema5(
|
|
5453
5770
|
{
|
|
5454
5771
|
active: { default: true, type: Boolean },
|
|
5455
5772
|
applicationDeadlineHours: { required: true, type: Number },
|
|
@@ -5457,7 +5774,7 @@ var schema2 = new MongooseSchema4(
|
|
|
5457
5774
|
eventId: {
|
|
5458
5775
|
ref: "Event",
|
|
5459
5776
|
required: true,
|
|
5460
|
-
type:
|
|
5777
|
+
type: import_mongoose5.default.Schema.Types.ObjectId
|
|
5461
5778
|
},
|
|
5462
5779
|
packInTime: { required: true, type: Number },
|
|
5463
5780
|
paymentDueHours: { required: true, type: Number },
|
|
@@ -5467,11 +5784,11 @@ var schema2 = new MongooseSchema4(
|
|
|
5467
5784
|
},
|
|
5468
5785
|
{ timestamps: true }
|
|
5469
5786
|
);
|
|
5470
|
-
var EventInfoModel =
|
|
5787
|
+
var EventInfoModel = import_mongoose5.default.models.EventInfo || import_mongoose5.default.model("EventInfo", schema3);
|
|
5471
5788
|
|
|
5472
5789
|
// src/mongoose/Relation.ts
|
|
5473
|
-
var
|
|
5474
|
-
var relationDateTimeSchema = new
|
|
5790
|
+
var MongooseSchema6 = import_mongoose6.default.Schema;
|
|
5791
|
+
var relationDateTimeSchema = new MongooseSchema6(
|
|
5475
5792
|
{
|
|
5476
5793
|
dateStatus: {
|
|
5477
5794
|
enum: Object.values(EnumEventDateStatus),
|
|
@@ -5486,7 +5803,7 @@ var relationDateTimeSchema = new MongooseSchema5(
|
|
|
5486
5803
|
},
|
|
5487
5804
|
{ _id: false }
|
|
5488
5805
|
);
|
|
5489
|
-
var relationDatesSchema = new
|
|
5806
|
+
var relationDatesSchema = new MongooseSchema6(
|
|
5490
5807
|
{
|
|
5491
5808
|
dateTime: {
|
|
5492
5809
|
required: true,
|
|
@@ -5505,19 +5822,19 @@ var relationDatesSchema = new MongooseSchema5(
|
|
|
5505
5822
|
},
|
|
5506
5823
|
{ _id: false }
|
|
5507
5824
|
);
|
|
5508
|
-
var RelationTypeSchema = new
|
|
5825
|
+
var RelationTypeSchema = new MongooseSchema6(
|
|
5509
5826
|
{
|
|
5510
5827
|
active: { default: true, required: true, type: Boolean },
|
|
5511
5828
|
chatId: {
|
|
5512
5829
|
ref: "Chat",
|
|
5513
5830
|
required: true,
|
|
5514
|
-
type:
|
|
5831
|
+
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
5515
5832
|
},
|
|
5516
5833
|
deletedAt: { default: null, required: false, type: Date },
|
|
5517
5834
|
eventId: {
|
|
5518
5835
|
ref: "Event",
|
|
5519
5836
|
required: true,
|
|
5520
|
-
type:
|
|
5837
|
+
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
5521
5838
|
},
|
|
5522
5839
|
lastUpdateBy: {
|
|
5523
5840
|
enum: Object.values(EnumResourceType),
|
|
@@ -5533,7 +5850,7 @@ var RelationTypeSchema = new MongooseSchema5(
|
|
|
5533
5850
|
vendorId: {
|
|
5534
5851
|
ref: "Vendor",
|
|
5535
5852
|
required: true,
|
|
5536
|
-
type:
|
|
5853
|
+
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
5537
5854
|
}
|
|
5538
5855
|
},
|
|
5539
5856
|
{ timestamps: true }
|
|
@@ -5545,23 +5862,23 @@ RelationTypeSchema.index({
|
|
|
5545
5862
|
"relationDates.status": 1,
|
|
5546
5863
|
vendorId: 1
|
|
5547
5864
|
});
|
|
5548
|
-
var RelationModel =
|
|
5865
|
+
var RelationModel = import_mongoose6.default.models.Relation || import_mongoose6.default.model("Relation", RelationTypeSchema);
|
|
5549
5866
|
|
|
5550
5867
|
// src/mongoose/global.ts
|
|
5551
|
-
var
|
|
5552
|
-
var OwnerTypeSchema = new
|
|
5868
|
+
var MongooseSchema7 = import_mongoose7.default.Schema;
|
|
5869
|
+
var OwnerTypeSchema = new MongooseSchema7(
|
|
5553
5870
|
{
|
|
5554
5871
|
email: { required: true, type: String },
|
|
5555
5872
|
userId: {
|
|
5556
5873
|
ref: "User",
|
|
5557
5874
|
required: true,
|
|
5558
|
-
type:
|
|
5875
|
+
type: import_mongoose7.default.Schema.Types.ObjectId
|
|
5559
5876
|
}
|
|
5560
5877
|
},
|
|
5561
5878
|
{ _id: false }
|
|
5562
5879
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5563
5880
|
);
|
|
5564
|
-
var SocialMediaTypeSchema = new
|
|
5881
|
+
var SocialMediaTypeSchema = new MongooseSchema7(
|
|
5565
5882
|
{
|
|
5566
5883
|
link: { required: true, type: String },
|
|
5567
5884
|
name: { required: true, type: String }
|
|
@@ -5569,7 +5886,7 @@ var SocialMediaTypeSchema = new MongooseSchema6(
|
|
|
5569
5886
|
{ _id: false }
|
|
5570
5887
|
// Prevents Mongoose from creating an additional _id field
|
|
5571
5888
|
);
|
|
5572
|
-
var ResourceImageTypeSchema = new
|
|
5889
|
+
var ResourceImageTypeSchema = new MongooseSchema7(
|
|
5573
5890
|
{
|
|
5574
5891
|
active: { default: true, required: true, type: Boolean },
|
|
5575
5892
|
source: { required: false, type: String },
|
|
@@ -5578,7 +5895,7 @@ var ResourceImageTypeSchema = new MongooseSchema6(
|
|
|
5578
5895
|
{ _id: false }
|
|
5579
5896
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5580
5897
|
);
|
|
5581
|
-
var SubCategorySchema = new
|
|
5898
|
+
var SubCategorySchema = new MongooseSchema7(
|
|
5582
5899
|
{
|
|
5583
5900
|
id: { required: false, type: String },
|
|
5584
5901
|
items: [
|
|
@@ -5592,7 +5909,7 @@ var SubCategorySchema = new MongooseSchema6(
|
|
|
5592
5909
|
{ _id: false }
|
|
5593
5910
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5594
5911
|
);
|
|
5595
|
-
var CategorySchema = new
|
|
5912
|
+
var CategorySchema = new MongooseSchema7(
|
|
5596
5913
|
{
|
|
5597
5914
|
id: { required: true, type: String },
|
|
5598
5915
|
name: { required: true, type: String },
|
|
@@ -5601,7 +5918,7 @@ var CategorySchema = new MongooseSchema6(
|
|
|
5601
5918
|
{ _id: false }
|
|
5602
5919
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5603
5920
|
);
|
|
5604
|
-
var PosterUsageTypeSchema = new
|
|
5921
|
+
var PosterUsageTypeSchema = new MongooseSchema7(
|
|
5605
5922
|
{
|
|
5606
5923
|
count: { default: 0, required: false, type: Number },
|
|
5607
5924
|
month: { required: false, type: String }
|
|
@@ -5609,7 +5926,7 @@ var PosterUsageTypeSchema = new MongooseSchema6(
|
|
|
5609
5926
|
{ _id: false }
|
|
5610
5927
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5611
5928
|
);
|
|
5612
|
-
var userLicenseSchema = new
|
|
5929
|
+
var userLicenseSchema = new MongooseSchema7(
|
|
5613
5930
|
{
|
|
5614
5931
|
expiryDate: { required: true, type: Date },
|
|
5615
5932
|
issuedDate: { required: true, type: Date },
|
|
@@ -5626,7 +5943,7 @@ var userLicenseSchema = new MongooseSchema6(
|
|
|
5626
5943
|
},
|
|
5627
5944
|
{ _id: false, timestamps: false }
|
|
5628
5945
|
);
|
|
5629
|
-
var ContactDetailsSchema = new
|
|
5946
|
+
var ContactDetailsSchema = new MongooseSchema7(
|
|
5630
5947
|
{
|
|
5631
5948
|
email: { required: false, type: String },
|
|
5632
5949
|
landlinePhone: { required: false, type: String },
|
|
@@ -5635,7 +5952,7 @@ var ContactDetailsSchema = new MongooseSchema6(
|
|
|
5635
5952
|
{ _id: false }
|
|
5636
5953
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5637
5954
|
);
|
|
5638
|
-
var termsAgreementSchema = new
|
|
5955
|
+
var termsAgreementSchema = new MongooseSchema7(
|
|
5639
5956
|
{
|
|
5640
5957
|
appBuildNumber: { required: true, type: String },
|
|
5641
5958
|
appId: { required: true, type: String },
|
|
@@ -5652,7 +5969,7 @@ var termsAgreementSchema = new MongooseSchema6(
|
|
|
5652
5969
|
},
|
|
5653
5970
|
{ _id: false }
|
|
5654
5971
|
);
|
|
5655
|
-
var resourceRelationsSchema = new
|
|
5972
|
+
var resourceRelationsSchema = new MongooseSchema7(
|
|
5656
5973
|
{
|
|
5657
5974
|
relationDates: {
|
|
5658
5975
|
default: [],
|
|
@@ -5662,12 +5979,12 @@ var resourceRelationsSchema = new MongooseSchema6(
|
|
|
5662
5979
|
relationId: {
|
|
5663
5980
|
ref: "Relation",
|
|
5664
5981
|
required: false,
|
|
5665
|
-
type:
|
|
5982
|
+
type: import_mongoose7.default.Schema.Types.ObjectId
|
|
5666
5983
|
}
|
|
5667
5984
|
},
|
|
5668
5985
|
{ _id: false }
|
|
5669
5986
|
);
|
|
5670
|
-
var dateTimeSchema2 = new
|
|
5987
|
+
var dateTimeSchema2 = new MongooseSchema7(
|
|
5671
5988
|
{
|
|
5672
5989
|
dateStatus: {
|
|
5673
5990
|
enum: Object.values(EnumEventDateStatus),
|
|
@@ -5682,7 +5999,7 @@ var dateTimeSchema2 = new MongooseSchema6(
|
|
|
5682
5999
|
{ _id: false }
|
|
5683
6000
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5684
6001
|
);
|
|
5685
|
-
var locationGeoSchema = new
|
|
6002
|
+
var locationGeoSchema = new MongooseSchema7(
|
|
5686
6003
|
{
|
|
5687
6004
|
coordinates: { required: true, type: [Number] },
|
|
5688
6005
|
// [longitude, latitude]
|
|
@@ -5691,7 +6008,7 @@ var locationGeoSchema = new MongooseSchema6(
|
|
|
5691
6008
|
{ _id: false }
|
|
5692
6009
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5693
6010
|
);
|
|
5694
|
-
var locationsSchema = new
|
|
6011
|
+
var locationsSchema = new MongooseSchema7(
|
|
5695
6012
|
{
|
|
5696
6013
|
city: { required: true, type: String },
|
|
5697
6014
|
country: { required: true, type: String },
|
|
@@ -5707,13 +6024,13 @@ var locationsSchema = new MongooseSchema6(
|
|
|
5707
6024
|
{ _id: false }
|
|
5708
6025
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5709
6026
|
);
|
|
5710
|
-
var relatedPostSchema = new
|
|
6027
|
+
var relatedPostSchema = new MongooseSchema7(
|
|
5711
6028
|
{
|
|
5712
6029
|
postActive: { default: true, required: true, type: Boolean },
|
|
5713
6030
|
postId: {
|
|
5714
6031
|
ref: "Post",
|
|
5715
6032
|
required: true,
|
|
5716
|
-
type:
|
|
6033
|
+
type: import_mongoose7.default.Schema.Types.ObjectId
|
|
5717
6034
|
},
|
|
5718
6035
|
postSlug: { required: true, type: String },
|
|
5719
6036
|
postType: {
|
|
@@ -5725,7 +6042,7 @@ var relatedPostSchema = new MongooseSchema6(
|
|
|
5725
6042
|
{ _id: false }
|
|
5726
6043
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
5727
6044
|
);
|
|
5728
|
-
var socialShareResourceSchema = new
|
|
6045
|
+
var socialShareResourceSchema = new MongooseSchema7(
|
|
5729
6046
|
{
|
|
5730
6047
|
qrCode: { required: true, type: ResourceImageTypeSchema },
|
|
5731
6048
|
socialImage: { required: true, type: ResourceImageTypeSchema }
|
|
@@ -5738,7 +6055,7 @@ var baseResourceFields = {
|
|
|
5738
6055
|
adIds: {
|
|
5739
6056
|
ref: "Ad",
|
|
5740
6057
|
required: false,
|
|
5741
|
-
type: [
|
|
6058
|
+
type: [import_mongoose7.default.Schema.Types.ObjectId]
|
|
5742
6059
|
},
|
|
5743
6060
|
approvedAt: { default: null, required: false, type: Date },
|
|
5744
6061
|
contactDetails: { required: false, type: ContactDetailsSchema },
|
|
@@ -5768,9 +6085,9 @@ var baseResourceFields = {
|
|
|
5768
6085
|
};
|
|
5769
6086
|
|
|
5770
6087
|
// src/mongoose/GoogleImportedMarket.ts
|
|
5771
|
-
var
|
|
5772
|
-
var
|
|
5773
|
-
var addressComponentSchema = new
|
|
6088
|
+
var import_mongoose8 = __toESM(require("mongoose"));
|
|
6089
|
+
var MongooseSchema8 = import_mongoose8.default.Schema;
|
|
6090
|
+
var addressComponentSchema = new MongooseSchema8(
|
|
5774
6091
|
{
|
|
5775
6092
|
longName: { required: false, type: String },
|
|
5776
6093
|
shortName: { required: false, type: String },
|
|
@@ -5778,7 +6095,7 @@ var addressComponentSchema = new MongooseSchema7(
|
|
|
5778
6095
|
},
|
|
5779
6096
|
{ _id: false }
|
|
5780
6097
|
);
|
|
5781
|
-
var
|
|
6098
|
+
var schema4 = new MongooseSchema8(
|
|
5782
6099
|
{
|
|
5783
6100
|
active: { default: false, required: true, type: Boolean },
|
|
5784
6101
|
address: { required: true, type: String },
|
|
@@ -5790,7 +6107,7 @@ var schema3 = new MongooseSchema7(
|
|
|
5790
6107
|
claimedByUserId: {
|
|
5791
6108
|
ref: "User",
|
|
5792
6109
|
required: false,
|
|
5793
|
-
type:
|
|
6110
|
+
type: import_mongoose8.default.Schema.Types.ObjectId
|
|
5794
6111
|
},
|
|
5795
6112
|
cover: {
|
|
5796
6113
|
required: false,
|
|
@@ -5802,7 +6119,7 @@ var schema3 = new MongooseSchema7(
|
|
|
5802
6119
|
eventId: {
|
|
5803
6120
|
ref: "Event",
|
|
5804
6121
|
required: false,
|
|
5805
|
-
type:
|
|
6122
|
+
type: import_mongoose8.default.Schema.Types.ObjectId
|
|
5806
6123
|
},
|
|
5807
6124
|
eventType: {
|
|
5808
6125
|
enum: Object.values(EnumEventType),
|
|
@@ -5841,18 +6158,18 @@ var schema3 = new MongooseSchema7(
|
|
|
5841
6158
|
},
|
|
5842
6159
|
{ timestamps: true }
|
|
5843
6160
|
);
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
var GoogleImportedMarketModel =
|
|
6161
|
+
schema4.index({ "location.geo": "2dsphere" });
|
|
6162
|
+
schema4.index({ name: 1 });
|
|
6163
|
+
schema4.index({ region: 1 });
|
|
6164
|
+
schema4.index({ deletedAt: 1 });
|
|
6165
|
+
schema4.index({ "dateTime.dateStatus": 1 });
|
|
6166
|
+
schema4.index({ slug: 1 });
|
|
6167
|
+
var GoogleImportedMarketModel = import_mongoose8.default.models.GoogleImportedMarket || import_mongoose8.default.model("GoogleImportedMarket", schema4);
|
|
5851
6168
|
|
|
5852
6169
|
// src/mongoose/Notification.ts
|
|
5853
|
-
var
|
|
5854
|
-
var
|
|
5855
|
-
var
|
|
6170
|
+
var import_mongoose9 = __toESM(require("mongoose"));
|
|
6171
|
+
var MongooseSchema9 = import_mongoose9.default.Schema;
|
|
6172
|
+
var schema5 = new MongooseSchema9(
|
|
5856
6173
|
{
|
|
5857
6174
|
data: {
|
|
5858
6175
|
resourceId: { required: true, type: String },
|
|
@@ -5875,16 +6192,16 @@ var schema4 = new MongooseSchema8(
|
|
|
5875
6192
|
userId: {
|
|
5876
6193
|
ref: "User",
|
|
5877
6194
|
required: true,
|
|
5878
|
-
type:
|
|
6195
|
+
type: import_mongoose9.default.Schema.Types.ObjectId
|
|
5879
6196
|
}
|
|
5880
6197
|
},
|
|
5881
6198
|
{ timestamps: true }
|
|
5882
6199
|
);
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
var NotificationModel =
|
|
6200
|
+
schema5.index({ isRead: 1, userId: 1 });
|
|
6201
|
+
schema5.index({ createdAt: -1, userId: 1 });
|
|
6202
|
+
var NotificationModel = import_mongoose9.default.models.Notification || import_mongoose9.default.model("Notification", schema5);
|
|
5886
6203
|
|
|
5887
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
6204
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-P4NLBWEJ.mjs
|
|
5888
6205
|
var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
|
|
5889
6206
|
EnumOSPlatform22["ANDROID"] = "android";
|
|
5890
6207
|
EnumOSPlatform22["IOS"] = "ios";
|
|
@@ -5893,9 +6210,9 @@ var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
|
|
|
5893
6210
|
})(EnumOSPlatform2 || {});
|
|
5894
6211
|
|
|
5895
6212
|
// src/mongoose/PushToken.ts
|
|
5896
|
-
var
|
|
5897
|
-
var
|
|
5898
|
-
var
|
|
6213
|
+
var import_mongoose10 = __toESM(require("mongoose"));
|
|
6214
|
+
var MongooseSchema10 = import_mongoose10.default.Schema;
|
|
6215
|
+
var schema6 = new MongooseSchema10(
|
|
5899
6216
|
{
|
|
5900
6217
|
platform: {
|
|
5901
6218
|
enum: Object.values(EnumOSPlatform2),
|
|
@@ -5906,17 +6223,17 @@ var schema5 = new MongooseSchema9(
|
|
|
5906
6223
|
userId: {
|
|
5907
6224
|
ref: "User",
|
|
5908
6225
|
required: true,
|
|
5909
|
-
type:
|
|
6226
|
+
type: import_mongoose10.default.Schema.Types.ObjectId
|
|
5910
6227
|
}
|
|
5911
6228
|
},
|
|
5912
6229
|
{ timestamps: true }
|
|
5913
6230
|
);
|
|
5914
|
-
var PushTokenModel =
|
|
6231
|
+
var PushTokenModel = import_mongoose10.default.models.PushToken || import_mongoose10.default.model("PushToken", schema6);
|
|
5915
6232
|
|
|
5916
6233
|
// src/mongoose/ResourceActivity.ts
|
|
5917
|
-
var
|
|
5918
|
-
var
|
|
5919
|
-
var ActivitySchema = new
|
|
6234
|
+
var import_mongoose11 = __toESM(require("mongoose"));
|
|
6235
|
+
var MongooseSchema11 = import_mongoose11.default.Schema;
|
|
6236
|
+
var ActivitySchema = new MongooseSchema11(
|
|
5920
6237
|
{
|
|
5921
6238
|
activityType: {
|
|
5922
6239
|
enum: Object.values(EnumActivity),
|
|
@@ -5944,7 +6261,7 @@ var ActivitySchema = new MongooseSchema10(
|
|
|
5944
6261
|
},
|
|
5945
6262
|
{ _id: false }
|
|
5946
6263
|
);
|
|
5947
|
-
var
|
|
6264
|
+
var schema7 = new MongooseSchema11(
|
|
5948
6265
|
{
|
|
5949
6266
|
activity: { default: [], type: [ActivitySchema] },
|
|
5950
6267
|
resourceId: { required: true, type: String },
|
|
@@ -5956,46 +6273,55 @@ var schema6 = new MongooseSchema10(
|
|
|
5956
6273
|
},
|
|
5957
6274
|
{ timestamps: true }
|
|
5958
6275
|
);
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
var ResourceActivityModel =
|
|
6276
|
+
schema7.index({ resourceId: 1, resourceType: 1 }, { unique: true });
|
|
6277
|
+
schema7.index({ "views.location": "2dsphere" });
|
|
6278
|
+
var ResourceActivityModel = import_mongoose11.default.models.ResourceActivity || import_mongoose11.default.model("ResourceActivity", schema7);
|
|
5962
6279
|
|
|
5963
6280
|
// src/mongoose/User.ts
|
|
5964
|
-
var
|
|
5965
|
-
var
|
|
5966
|
-
var userActivityEventSchema = new
|
|
6281
|
+
var import_mongoose12 = __toESM(require("mongoose"));
|
|
6282
|
+
var MongooseSchema12 = import_mongoose12.default.Schema;
|
|
6283
|
+
var userActivityEventSchema = new MongooseSchema12(
|
|
5967
6284
|
{
|
|
5968
6285
|
dateTime: dateTimeSchema2,
|
|
5969
6286
|
resourceId: {
|
|
5970
6287
|
ref: "Event",
|
|
5971
6288
|
required: false,
|
|
5972
|
-
type:
|
|
6289
|
+
type: import_mongoose12.default.Schema.Types.ObjectId
|
|
5973
6290
|
}
|
|
5974
6291
|
},
|
|
5975
6292
|
{ _id: false }
|
|
5976
6293
|
);
|
|
5977
|
-
var userActivityFavouritesSchema = new
|
|
6294
|
+
var userActivityFavouritesSchema = new MongooseSchema12(
|
|
5978
6295
|
{
|
|
5979
6296
|
events: {
|
|
5980
6297
|
ref: "Event",
|
|
5981
6298
|
required: false,
|
|
5982
|
-
type: [
|
|
6299
|
+
type: [import_mongoose12.default.Schema.Types.ObjectId]
|
|
5983
6300
|
},
|
|
5984
6301
|
partners: {
|
|
5985
6302
|
ref: "Partner",
|
|
5986
6303
|
required: false,
|
|
5987
|
-
type: [
|
|
6304
|
+
type: [import_mongoose12.default.Schema.Types.ObjectId]
|
|
5988
6305
|
},
|
|
5989
6306
|
vendors: {
|
|
5990
6307
|
ref: "Vendor",
|
|
5991
6308
|
required: false,
|
|
5992
|
-
type: [
|
|
6309
|
+
type: [import_mongoose12.default.Schema.Types.ObjectId]
|
|
5993
6310
|
}
|
|
5994
6311
|
},
|
|
5995
6312
|
{ _id: false }
|
|
5996
6313
|
);
|
|
5997
|
-
var stripeSchema = new
|
|
6314
|
+
var stripeSchema = new MongooseSchema12(
|
|
5998
6315
|
{
|
|
6316
|
+
billingPeriod: {
|
|
6317
|
+
enum: Object.values(EnumBillingPeriod),
|
|
6318
|
+
required: false,
|
|
6319
|
+
type: String
|
|
6320
|
+
},
|
|
6321
|
+
cancelAtPeriodEnd: {
|
|
6322
|
+
required: false,
|
|
6323
|
+
type: Boolean
|
|
6324
|
+
},
|
|
5999
6325
|
currentPlan: {
|
|
6000
6326
|
enum: Object.values(EnumUserLicence),
|
|
6001
6327
|
required: false,
|
|
@@ -6009,6 +6335,28 @@ var stripeSchema = new MongooseSchema11(
|
|
|
6009
6335
|
required: false,
|
|
6010
6336
|
type: Date
|
|
6011
6337
|
},
|
|
6338
|
+
pendingBillingPeriod: {
|
|
6339
|
+
enum: Object.values(EnumBillingPeriod),
|
|
6340
|
+
required: false,
|
|
6341
|
+
type: String
|
|
6342
|
+
},
|
|
6343
|
+
pendingChangeEffectiveAt: {
|
|
6344
|
+
required: false,
|
|
6345
|
+
type: Date
|
|
6346
|
+
},
|
|
6347
|
+
pendingPlan: {
|
|
6348
|
+
enum: Object.values(EnumUserLicence),
|
|
6349
|
+
required: false,
|
|
6350
|
+
type: String
|
|
6351
|
+
},
|
|
6352
|
+
priceId: {
|
|
6353
|
+
required: false,
|
|
6354
|
+
type: String
|
|
6355
|
+
},
|
|
6356
|
+
scheduleId: {
|
|
6357
|
+
required: false,
|
|
6358
|
+
type: String
|
|
6359
|
+
},
|
|
6012
6360
|
startDate: {
|
|
6013
6361
|
required: false,
|
|
6014
6362
|
type: Date
|
|
@@ -6021,11 +6369,19 @@ var stripeSchema = new MongooseSchema11(
|
|
|
6021
6369
|
subscriptionId: {
|
|
6022
6370
|
required: false,
|
|
6023
6371
|
type: String
|
|
6372
|
+
},
|
|
6373
|
+
subscriptionMutationLockExpiresAt: {
|
|
6374
|
+
required: false,
|
|
6375
|
+
type: Date
|
|
6376
|
+
},
|
|
6377
|
+
subscriptionMutationLockId: {
|
|
6378
|
+
required: false,
|
|
6379
|
+
type: String
|
|
6024
6380
|
}
|
|
6025
6381
|
},
|
|
6026
6382
|
{ _id: false }
|
|
6027
6383
|
);
|
|
6028
|
-
var redeemedRewardSchema = new
|
|
6384
|
+
var redeemedRewardSchema = new MongooseSchema12(
|
|
6029
6385
|
{
|
|
6030
6386
|
name: {
|
|
6031
6387
|
enum: Object.values(EnumReward),
|
|
@@ -6037,13 +6393,13 @@ var redeemedRewardSchema = new MongooseSchema11(
|
|
|
6037
6393
|
},
|
|
6038
6394
|
{ _id: false }
|
|
6039
6395
|
);
|
|
6040
|
-
var
|
|
6396
|
+
var schema8 = new MongooseSchema12(
|
|
6041
6397
|
{
|
|
6042
6398
|
active: { default: false, required: true, type: Boolean },
|
|
6043
6399
|
affiliate: {
|
|
6044
6400
|
ref: "Affiliate",
|
|
6045
6401
|
required: false,
|
|
6046
|
-
type:
|
|
6402
|
+
type: import_mongoose12.default.Schema.Types.ObjectId
|
|
6047
6403
|
},
|
|
6048
6404
|
avatar: {
|
|
6049
6405
|
required: false,
|
|
@@ -6052,7 +6408,7 @@ var schema7 = new MongooseSchema11(
|
|
|
6052
6408
|
coupon: {
|
|
6053
6409
|
ref: "Coupon",
|
|
6054
6410
|
required: false,
|
|
6055
|
-
type:
|
|
6411
|
+
type: import_mongoose12.default.Schema.Types.ObjectId
|
|
6056
6412
|
},
|
|
6057
6413
|
deletedAt: { default: null, required: false, type: Date },
|
|
6058
6414
|
email: { required: true, type: String },
|
|
@@ -6064,13 +6420,13 @@ var schema7 = new MongooseSchema11(
|
|
|
6064
6420
|
events: {
|
|
6065
6421
|
ref: "Event",
|
|
6066
6422
|
required: false,
|
|
6067
|
-
type: [
|
|
6423
|
+
type: [import_mongoose12.default.Schema.Types.ObjectId]
|
|
6068
6424
|
},
|
|
6069
6425
|
firstName: { required: true, type: String },
|
|
6070
6426
|
game: {
|
|
6071
6427
|
ref: "Game",
|
|
6072
6428
|
required: false,
|
|
6073
|
-
type:
|
|
6429
|
+
type: import_mongoose12.default.Schema.Types.ObjectId
|
|
6074
6430
|
},
|
|
6075
6431
|
interests: {
|
|
6076
6432
|
enum: Object.values(EnumResourceType),
|
|
@@ -6092,7 +6448,7 @@ var schema7 = new MongooseSchema11(
|
|
|
6092
6448
|
partner: {
|
|
6093
6449
|
ref: "Partner",
|
|
6094
6450
|
required: false,
|
|
6095
|
-
type:
|
|
6451
|
+
type: import_mongoose12.default.Schema.Types.ObjectId
|
|
6096
6452
|
},
|
|
6097
6453
|
password: { required: true, type: String },
|
|
6098
6454
|
platform: {
|
|
@@ -6125,7 +6481,7 @@ var schema7 = new MongooseSchema11(
|
|
|
6125
6481
|
school: {
|
|
6126
6482
|
ref: "School",
|
|
6127
6483
|
required: false,
|
|
6128
|
-
type:
|
|
6484
|
+
type: import_mongoose12.default.Schema.Types.ObjectId
|
|
6129
6485
|
},
|
|
6130
6486
|
stripe: {
|
|
6131
6487
|
required: false,
|
|
@@ -6150,19 +6506,19 @@ var schema7 = new MongooseSchema11(
|
|
|
6150
6506
|
vendor: {
|
|
6151
6507
|
ref: "Vendor",
|
|
6152
6508
|
required: false,
|
|
6153
|
-
type:
|
|
6509
|
+
type: import_mongoose12.default.Schema.Types.ObjectId
|
|
6154
6510
|
}
|
|
6155
6511
|
},
|
|
6156
6512
|
{ strict: false, timestamps: true }
|
|
6157
6513
|
);
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
var UserModel =
|
|
6514
|
+
schema8.index({ "licences.expiryDate": 1 });
|
|
6515
|
+
schema8.index({ "licences.licenceType": 1 });
|
|
6516
|
+
var UserModel = import_mongoose12.default.models.User || import_mongoose12.default.model("User", schema8);
|
|
6161
6517
|
|
|
6162
6518
|
// src/mongoose/VerificationToken.ts
|
|
6163
|
-
var
|
|
6164
|
-
var
|
|
6165
|
-
var
|
|
6519
|
+
var import_mongoose13 = __toESM(require("mongoose"));
|
|
6520
|
+
var MongooseSchema13 = import_mongoose13.default.Schema;
|
|
6521
|
+
var schema9 = new MongooseSchema13(
|
|
6166
6522
|
{
|
|
6167
6523
|
createdAt: {
|
|
6168
6524
|
default: Date.now,
|
|
@@ -6177,12 +6533,12 @@ var schema8 = new MongooseSchema12(
|
|
|
6177
6533
|
},
|
|
6178
6534
|
{ timestamps: true }
|
|
6179
6535
|
);
|
|
6180
|
-
var VerificationTokenModel =
|
|
6536
|
+
var VerificationTokenModel = import_mongoose13.default.models.VerificationToken || import_mongoose13.default.model("VerificationToken", schema9);
|
|
6181
6537
|
|
|
6182
6538
|
// src/mongoose/vendor/Vendor.ts
|
|
6183
|
-
var
|
|
6184
|
-
var
|
|
6185
|
-
var vendorProductTypeSchema = new
|
|
6539
|
+
var import_mongoose14 = __toESM(require("mongoose"));
|
|
6540
|
+
var MongooseSchema14 = import_mongoose14.default.Schema;
|
|
6541
|
+
var vendorProductTypeSchema = new MongooseSchema14(
|
|
6186
6542
|
{
|
|
6187
6543
|
description: { required: false, type: String },
|
|
6188
6544
|
name: { required: true, type: String },
|
|
@@ -6193,14 +6549,14 @@ var vendorProductTypeSchema = new MongooseSchema13(
|
|
|
6193
6549
|
},
|
|
6194
6550
|
{ timestamps: true }
|
|
6195
6551
|
);
|
|
6196
|
-
var productWrapperSchema = new
|
|
6552
|
+
var productWrapperSchema = new MongooseSchema14(
|
|
6197
6553
|
{
|
|
6198
6554
|
active: { default: false, required: false, type: Boolean },
|
|
6199
6555
|
productsList: { required: false, type: [vendorProductTypeSchema] }
|
|
6200
6556
|
},
|
|
6201
6557
|
{ _id: false }
|
|
6202
6558
|
);
|
|
6203
|
-
var calendarSchema = new
|
|
6559
|
+
var calendarSchema = new MongooseSchema14(
|
|
6204
6560
|
{
|
|
6205
6561
|
dateTime: {
|
|
6206
6562
|
dateStatus: {
|
|
@@ -6221,14 +6577,14 @@ var calendarSchema = new MongooseSchema13(
|
|
|
6221
6577
|
},
|
|
6222
6578
|
{ _id: false }
|
|
6223
6579
|
);
|
|
6224
|
-
var calendarWrapperSchema = new
|
|
6580
|
+
var calendarWrapperSchema = new MongooseSchema14(
|
|
6225
6581
|
{
|
|
6226
6582
|
active: { default: false, required: true, type: Boolean },
|
|
6227
6583
|
calendarData: { required: false, type: [calendarSchema] }
|
|
6228
6584
|
},
|
|
6229
6585
|
{ _id: false }
|
|
6230
6586
|
);
|
|
6231
|
-
var
|
|
6587
|
+
var schema10 = new MongooseSchema14(
|
|
6232
6588
|
{
|
|
6233
6589
|
...baseResourceFields,
|
|
6234
6590
|
// Importing base resource fields from global.ts
|
|
@@ -6254,12 +6610,12 @@ var schema9 = new MongooseSchema13(
|
|
|
6254
6610
|
unregisteredVendorId: {
|
|
6255
6611
|
ref: "UnregisteredVendor",
|
|
6256
6612
|
required: false,
|
|
6257
|
-
type:
|
|
6613
|
+
type: import_mongoose14.default.Schema.Types.ObjectId
|
|
6258
6614
|
},
|
|
6259
6615
|
vendorInfoId: {
|
|
6260
6616
|
ref: "VendorInfo",
|
|
6261
6617
|
required: false,
|
|
6262
|
-
type:
|
|
6618
|
+
type: import_mongoose14.default.Schema.Types.ObjectId
|
|
6263
6619
|
},
|
|
6264
6620
|
vendorType: {
|
|
6265
6621
|
enum: Object.values(EnumVendorType),
|
|
@@ -6269,24 +6625,24 @@ var schema9 = new MongooseSchema13(
|
|
|
6269
6625
|
},
|
|
6270
6626
|
{ timestamps: true }
|
|
6271
6627
|
);
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
var VendorModel =
|
|
6628
|
+
schema10.index({ name: 1 });
|
|
6629
|
+
schema10.index({ description: 1 });
|
|
6630
|
+
schema10.index({ region: 1 });
|
|
6631
|
+
schema10.index({ "categories.name": 1 });
|
|
6632
|
+
schema10.index({ slug: 1 });
|
|
6633
|
+
var VendorModel = import_mongoose14.default.models.Vendor || import_mongoose14.default.model("Vendor", schema10);
|
|
6278
6634
|
|
|
6279
6635
|
// src/mongoose/vendor/VendorInfo.ts
|
|
6280
|
-
var
|
|
6281
|
-
var
|
|
6282
|
-
var AttributesSchema = new
|
|
6636
|
+
var import_mongoose15 = __toESM(require("mongoose"));
|
|
6637
|
+
var MongooseSchema15 = import_mongoose15.default.Schema;
|
|
6638
|
+
var AttributesSchema = new MongooseSchema15(
|
|
6283
6639
|
{
|
|
6284
6640
|
details: { required: false, type: String },
|
|
6285
6641
|
isRequired: { default: false, required: true, type: Boolean }
|
|
6286
6642
|
},
|
|
6287
6643
|
{ _id: false }
|
|
6288
6644
|
);
|
|
6289
|
-
var
|
|
6645
|
+
var schema11 = new MongooseSchema15(
|
|
6290
6646
|
{
|
|
6291
6647
|
active: { default: true, type: Boolean },
|
|
6292
6648
|
compliance: {
|
|
@@ -6321,28 +6677,28 @@ var schema10 = new MongooseSchema14(
|
|
|
6321
6677
|
vendorId: {
|
|
6322
6678
|
ref: "Vendor",
|
|
6323
6679
|
required: true,
|
|
6324
|
-
type:
|
|
6680
|
+
type: import_mongoose15.default.Schema.Types.ObjectId
|
|
6325
6681
|
}
|
|
6326
6682
|
},
|
|
6327
6683
|
{ timestamps: true }
|
|
6328
6684
|
);
|
|
6329
|
-
var VendorInfoModel =
|
|
6685
|
+
var VendorInfoModel = import_mongoose15.default.models.VendorInfo || import_mongoose15.default.model("VendorInfo", schema11);
|
|
6330
6686
|
|
|
6331
6687
|
// src/mongoose/vendor/UnregisteredVendor.ts
|
|
6332
|
-
var
|
|
6333
|
-
var
|
|
6334
|
-
var invitationSchema = new
|
|
6688
|
+
var import_mongoose16 = __toESM(require("mongoose"));
|
|
6689
|
+
var MongooseSchema16 = import_mongoose16.default.Schema;
|
|
6690
|
+
var invitationSchema = new MongooseSchema16(
|
|
6335
6691
|
{
|
|
6336
6692
|
dateTime: { required: true, type: [dateTimeSchema2] },
|
|
6337
6693
|
inviterId: {
|
|
6338
6694
|
ref: "Event",
|
|
6339
6695
|
required: true,
|
|
6340
|
-
type:
|
|
6696
|
+
type: import_mongoose16.default.Schema.Types.ObjectId
|
|
6341
6697
|
}
|
|
6342
6698
|
},
|
|
6343
6699
|
{ _id: false }
|
|
6344
6700
|
);
|
|
6345
|
-
var
|
|
6701
|
+
var schema12 = new MongooseSchema16(
|
|
6346
6702
|
{
|
|
6347
6703
|
active: { default: true, required: true, type: Boolean },
|
|
6348
6704
|
categoryIds: { required: true, type: [String] },
|
|
@@ -6351,7 +6707,7 @@ var schema11 = new MongooseSchema15(
|
|
|
6351
6707
|
claimedByUserId: {
|
|
6352
6708
|
ref: "User",
|
|
6353
6709
|
required: false,
|
|
6354
|
-
type:
|
|
6710
|
+
type: import_mongoose16.default.Schema.Types.ObjectId
|
|
6355
6711
|
},
|
|
6356
6712
|
claimInitiatedAt: { default: null, required: false, type: Date },
|
|
6357
6713
|
claimToken: { default: null, required: false, type: String },
|
|
@@ -6364,14 +6720,14 @@ var schema11 = new MongooseSchema15(
|
|
|
6364
6720
|
},
|
|
6365
6721
|
{ timestamps: true }
|
|
6366
6722
|
);
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
var UnregisteredVendorModel =
|
|
6723
|
+
schema12.index({ name: 1 });
|
|
6724
|
+
schema12.index({ email: 1 });
|
|
6725
|
+
var UnregisteredVendorModel = import_mongoose16.default.models.UnregisteredVendor || import_mongoose16.default.model("UnregisteredVendor", schema12);
|
|
6370
6726
|
|
|
6371
6727
|
// src/mongoose/event/Event.ts
|
|
6372
|
-
var
|
|
6373
|
-
var
|
|
6374
|
-
var
|
|
6728
|
+
var import_mongoose17 = __toESM(require("mongoose"));
|
|
6729
|
+
var MongooseSchema17 = import_mongoose17.default.Schema;
|
|
6730
|
+
var schema13 = new MongooseSchema17(
|
|
6375
6731
|
{
|
|
6376
6732
|
...baseResourceFields,
|
|
6377
6733
|
// Importing base resource fields from global.ts
|
|
@@ -6380,7 +6736,7 @@ var schema12 = new MongooseSchema16(
|
|
|
6380
6736
|
eventInfoId: {
|
|
6381
6737
|
ref: "EventInfo",
|
|
6382
6738
|
required: false,
|
|
6383
|
-
type:
|
|
6739
|
+
type: import_mongoose17.default.Schema.Types.ObjectId
|
|
6384
6740
|
},
|
|
6385
6741
|
eventType: {
|
|
6386
6742
|
enum: Object.values(EnumEventType),
|
|
@@ -6409,20 +6765,20 @@ var schema12 = new MongooseSchema16(
|
|
|
6409
6765
|
},
|
|
6410
6766
|
{ timestamps: true }
|
|
6411
6767
|
);
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
var EventModel =
|
|
6768
|
+
schema13.index({ name: 1 });
|
|
6769
|
+
schema13.index({ description: 1 });
|
|
6770
|
+
schema13.index({ region: 1 });
|
|
6771
|
+
schema13.index({ "location.geo": "2dsphere" });
|
|
6772
|
+
schema13.index({ tags: 1 });
|
|
6773
|
+
schema13.index({ deletedAt: 1 });
|
|
6774
|
+
schema13.index({ "dateTime.dateStatus": 1 });
|
|
6775
|
+
schema13.index({ slug: 1 });
|
|
6776
|
+
var EventModel = import_mongoose17.default.models.Event || import_mongoose17.default.model("Event", schema13);
|
|
6421
6777
|
|
|
6422
6778
|
// src/mongoose/Partner.ts
|
|
6423
|
-
var
|
|
6424
|
-
var
|
|
6425
|
-
var
|
|
6779
|
+
var import_mongoose18 = __toESM(require("mongoose"));
|
|
6780
|
+
var MongooseSchema18 = import_mongoose18.default.Schema;
|
|
6781
|
+
var schema14 = new MongooseSchema18(
|
|
6426
6782
|
{
|
|
6427
6783
|
...baseResourceFields,
|
|
6428
6784
|
location: {
|
|
@@ -6438,19 +6794,19 @@ var schema13 = new MongooseSchema17(
|
|
|
6438
6794
|
},
|
|
6439
6795
|
{ timestamps: true }
|
|
6440
6796
|
);
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
var PartnerModel =
|
|
6797
|
+
schema14.index({ name: 1 });
|
|
6798
|
+
schema14.index({ description: 1 });
|
|
6799
|
+
schema14.index({ region: 1 });
|
|
6800
|
+
schema14.index({ "location.geo": "2dsphere" });
|
|
6801
|
+
schema14.index({ slug: 1 });
|
|
6802
|
+
var PartnerModel = import_mongoose18.default.models.Partner || import_mongoose18.default.model("Partner", schema14);
|
|
6447
6803
|
|
|
6448
6804
|
// src/mongoose/Post.ts
|
|
6449
|
-
var
|
|
6450
|
-
var
|
|
6451
|
-
var contentSchema = new
|
|
6805
|
+
var import_mongoose19 = __toESM(require("mongoose"));
|
|
6806
|
+
var MongooseSchema19 = import_mongoose19.default.Schema;
|
|
6807
|
+
var contentSchema = new MongooseSchema19(
|
|
6452
6808
|
{
|
|
6453
|
-
contentData:
|
|
6809
|
+
contentData: import_mongoose19.Schema.Types.Mixed,
|
|
6454
6810
|
contentOrder: { required: true, type: Number },
|
|
6455
6811
|
contentType: {
|
|
6456
6812
|
enum: Object.values(EnumPostContentType),
|
|
@@ -6460,7 +6816,7 @@ var contentSchema = new MongooseSchema18(
|
|
|
6460
6816
|
},
|
|
6461
6817
|
{ _id: false }
|
|
6462
6818
|
);
|
|
6463
|
-
var resourceSchema = new
|
|
6819
|
+
var resourceSchema = new MongooseSchema19(
|
|
6464
6820
|
{
|
|
6465
6821
|
resourceId: { required: true, type: String },
|
|
6466
6822
|
resourceRegion: { required: true, type: String },
|
|
@@ -6473,7 +6829,7 @@ var resourceSchema = new MongooseSchema18(
|
|
|
6473
6829
|
},
|
|
6474
6830
|
{ _id: false }
|
|
6475
6831
|
);
|
|
6476
|
-
var
|
|
6832
|
+
var schema15 = new MongooseSchema19(
|
|
6477
6833
|
{
|
|
6478
6834
|
active: { default: false, required: true, type: Boolean },
|
|
6479
6835
|
approvedAt: { default: null, required: false, type: Date },
|
|
@@ -6504,16 +6860,16 @@ var schema14 = new MongooseSchema18(
|
|
|
6504
6860
|
},
|
|
6505
6861
|
{ timestamps: true }
|
|
6506
6862
|
);
|
|
6507
|
-
|
|
6508
|
-
|
|
6509
|
-
|
|
6510
|
-
var PostModel =
|
|
6863
|
+
schema15.index({ title: 1 });
|
|
6864
|
+
schema15.index({ tags: 1 });
|
|
6865
|
+
schema15.index({ postType: 1, slug: 1 }, { unique: true });
|
|
6866
|
+
var PostModel = import_mongoose19.default.models.Post || import_mongoose19.default.model("Post", schema15);
|
|
6511
6867
|
|
|
6512
6868
|
// src/mongoose/AppSetting.ts
|
|
6513
|
-
var
|
|
6514
|
-
var
|
|
6869
|
+
var import_mongoose20 = __toESM(require("mongoose"));
|
|
6870
|
+
var MongooseSchema20 = import_mongoose20.default.Schema;
|
|
6515
6871
|
var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
|
|
6516
|
-
var AppSettingSchema = new
|
|
6872
|
+
var AppSettingSchema = new MongooseSchema20(
|
|
6517
6873
|
{
|
|
6518
6874
|
activeSchoolsStudentCountTotal: {
|
|
6519
6875
|
default: 0,
|
|
@@ -6544,18 +6900,18 @@ var AppSettingSchema = new MongooseSchema19(
|
|
|
6544
6900
|
},
|
|
6545
6901
|
{ timestamps: true }
|
|
6546
6902
|
);
|
|
6547
|
-
var AppSettingModel =
|
|
6903
|
+
var AppSettingModel = import_mongoose20.default.models.AppSetting || import_mongoose20.default.model("AppSetting", AppSettingSchema);
|
|
6548
6904
|
|
|
6549
6905
|
// src/mongoose/game/Game.ts
|
|
6550
|
-
var
|
|
6906
|
+
var import_mongoose24 = __toESM(require("mongoose"));
|
|
6551
6907
|
|
|
6552
6908
|
// src/mongoose/game/DailyClue.ts
|
|
6553
|
-
var
|
|
6909
|
+
var import_mongoose22 = __toESM(require("mongoose"));
|
|
6554
6910
|
|
|
6555
6911
|
// src/mongoose/game/utils.ts
|
|
6556
|
-
var
|
|
6557
|
-
var
|
|
6558
|
-
var schemaGameDate = new
|
|
6912
|
+
var import_mongoose21 = __toESM(require("mongoose"));
|
|
6913
|
+
var MongooseSchema21 = import_mongoose21.default.Schema;
|
|
6914
|
+
var schemaGameDate = new MongooseSchema21(
|
|
6559
6915
|
{
|
|
6560
6916
|
endDate: { required: true, type: Date },
|
|
6561
6917
|
startDate: { required: true, type: Date }
|
|
@@ -6564,8 +6920,8 @@ var schemaGameDate = new MongooseSchema20(
|
|
|
6564
6920
|
);
|
|
6565
6921
|
|
|
6566
6922
|
// src/mongoose/game/DailyClue.ts
|
|
6567
|
-
var
|
|
6568
|
-
var schemaLetters = new
|
|
6923
|
+
var MongooseSchema22 = import_mongoose22.default.Schema;
|
|
6924
|
+
var schemaLetters = new MongooseSchema22(
|
|
6569
6925
|
{
|
|
6570
6926
|
collected: { required: false, type: [String] },
|
|
6571
6927
|
solutionShuffled: { required: true, type: [String] }
|
|
@@ -6573,14 +6929,14 @@ var schemaLetters = new MongooseSchema21(
|
|
|
6573
6929
|
},
|
|
6574
6930
|
{ _id: false }
|
|
6575
6931
|
);
|
|
6576
|
-
var schemaDailyClueBaseGame = new
|
|
6932
|
+
var schemaDailyClueBaseGame = new MongooseSchema22(
|
|
6577
6933
|
{
|
|
6578
6934
|
gameDate: { required: true, type: schemaGameDate },
|
|
6579
6935
|
gameSolution: { required: true, type: String }
|
|
6580
6936
|
},
|
|
6581
6937
|
{ _id: false }
|
|
6582
6938
|
);
|
|
6583
|
-
var schemaDailyClueGameData = new
|
|
6939
|
+
var schemaDailyClueGameData = new MongooseSchema22(
|
|
6584
6940
|
{
|
|
6585
6941
|
gameFields: { required: true, type: schemaDailyClueBaseGame },
|
|
6586
6942
|
lastFoundDate: { default: null, required: false, type: Date },
|
|
@@ -6595,9 +6951,9 @@ var schemaDailyClueGameData = new MongooseSchema21(
|
|
|
6595
6951
|
);
|
|
6596
6952
|
|
|
6597
6953
|
// src/mongoose/game/PuzzleGame.ts
|
|
6598
|
-
var
|
|
6599
|
-
var
|
|
6600
|
-
var schemaPuzzleAnswer = new
|
|
6954
|
+
var import_mongoose23 = __toESM(require("mongoose"));
|
|
6955
|
+
var MongooseSchema23 = import_mongoose23.default.Schema;
|
|
6956
|
+
var schemaPuzzleAnswer = new MongooseSchema23(
|
|
6601
6957
|
{
|
|
6602
6958
|
answer: { required: true, type: String },
|
|
6603
6959
|
answerId: { required: true, type: String },
|
|
@@ -6605,7 +6961,7 @@ var schemaPuzzleAnswer = new MongooseSchema22(
|
|
|
6605
6961
|
},
|
|
6606
6962
|
{ _id: false }
|
|
6607
6963
|
);
|
|
6608
|
-
var schemaPuzzleQuestion = new
|
|
6964
|
+
var schemaPuzzleQuestion = new MongooseSchema23(
|
|
6609
6965
|
{
|
|
6610
6966
|
answers: { required: true, type: [schemaPuzzleAnswer] },
|
|
6611
6967
|
question: { required: true, type: String },
|
|
@@ -6613,20 +6969,20 @@ var schemaPuzzleQuestion = new MongooseSchema22(
|
|
|
6613
6969
|
},
|
|
6614
6970
|
{ _id: false }
|
|
6615
6971
|
);
|
|
6616
|
-
var schemaPuzzleBaseGame = new
|
|
6972
|
+
var schemaPuzzleBaseGame = new MongooseSchema23(
|
|
6617
6973
|
{
|
|
6618
6974
|
questions: { required: true, type: [schemaPuzzleQuestion] }
|
|
6619
6975
|
},
|
|
6620
6976
|
{ _id: false }
|
|
6621
6977
|
);
|
|
6622
|
-
var schemaPuzzleAnsweredQuestion = new
|
|
6978
|
+
var schemaPuzzleAnsweredQuestion = new MongooseSchema23(
|
|
6623
6979
|
{
|
|
6624
6980
|
questionId: { required: true, type: String },
|
|
6625
6981
|
selectedAnswerId: { required: true, type: String }
|
|
6626
6982
|
},
|
|
6627
6983
|
{ _id: false }
|
|
6628
6984
|
);
|
|
6629
|
-
var schemaPuzzleGameData = new
|
|
6985
|
+
var schemaPuzzleGameData = new MongooseSchema23(
|
|
6630
6986
|
{
|
|
6631
6987
|
answeredQuestions: {
|
|
6632
6988
|
default: null,
|
|
@@ -6641,19 +6997,19 @@ var schemaPuzzleGameData = new MongooseSchema22(
|
|
|
6641
6997
|
);
|
|
6642
6998
|
|
|
6643
6999
|
// src/mongoose/game/Game.ts
|
|
6644
|
-
var
|
|
7000
|
+
var MongooseSchema24 = import_mongoose24.default.Schema;
|
|
6645
7001
|
var gameDataSchemas = {
|
|
6646
7002
|
[EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,
|
|
6647
7003
|
[EnumGameType.MINI_QUIZ]: schemaPuzzleGameData,
|
|
6648
7004
|
[EnumGameType.ODD_ONE_OUT]: schemaPuzzleGameData
|
|
6649
7005
|
};
|
|
6650
7006
|
var gameDataDefinition = Object.fromEntries(
|
|
6651
|
-
Object.entries(gameDataSchemas).map(([key,
|
|
7007
|
+
Object.entries(gameDataSchemas).map(([key, schema20]) => [
|
|
6652
7008
|
key,
|
|
6653
|
-
{ default: null, required: false, type:
|
|
7009
|
+
{ default: null, required: false, type: schema20 }
|
|
6654
7010
|
])
|
|
6655
7011
|
);
|
|
6656
|
-
var gameHistorySchema = new
|
|
7012
|
+
var gameHistorySchema = new MongooseSchema24(
|
|
6657
7013
|
{
|
|
6658
7014
|
createdAt: { required: true, type: Date },
|
|
6659
7015
|
gameDate: { required: true, type: schemaGameDate },
|
|
@@ -6673,7 +7029,7 @@ var gameHistorySchema = new MongooseSchema23(
|
|
|
6673
7029
|
},
|
|
6674
7030
|
{ _id: false }
|
|
6675
7031
|
);
|
|
6676
|
-
var gameTypeSchema = new
|
|
7032
|
+
var gameTypeSchema = new MongooseSchema24(
|
|
6677
7033
|
{
|
|
6678
7034
|
active: { default: true, required: true, type: Boolean },
|
|
6679
7035
|
gameData: gameDataDefinition,
|
|
@@ -6688,7 +7044,7 @@ var gameTypeSchema = new MongooseSchema23(
|
|
|
6688
7044
|
},
|
|
6689
7045
|
{ timestamps: true }
|
|
6690
7046
|
);
|
|
6691
|
-
var
|
|
7047
|
+
var schema16 = new MongooseSchema24(
|
|
6692
7048
|
{
|
|
6693
7049
|
active: { default: false, required: true, type: Boolean },
|
|
6694
7050
|
deletedAt: { default: null, required: false, type: Date },
|
|
@@ -6701,12 +7057,12 @@ var schema15 = new MongooseSchema23(
|
|
|
6701
7057
|
},
|
|
6702
7058
|
{ timestamps: true }
|
|
6703
7059
|
);
|
|
6704
|
-
var GameModel =
|
|
7060
|
+
var GameModel = import_mongoose24.default.models.Game || import_mongoose24.default.model("Game", schema16);
|
|
6705
7061
|
|
|
6706
7062
|
// src/mongoose/School.ts
|
|
6707
|
-
var
|
|
6708
|
-
var
|
|
6709
|
-
var campaignsSchema = new
|
|
7063
|
+
var import_mongoose25 = __toESM(require("mongoose"));
|
|
7064
|
+
var MongooseSchema25 = import_mongoose25.default.Schema;
|
|
7065
|
+
var campaignsSchema = new MongooseSchema25(
|
|
6710
7066
|
{
|
|
6711
7067
|
endDate: { required: true, type: Date },
|
|
6712
7068
|
name: { required: true, type: String },
|
|
@@ -6714,7 +7070,7 @@ var campaignsSchema = new MongooseSchema24(
|
|
|
6714
7070
|
},
|
|
6715
7071
|
{ _id: false }
|
|
6716
7072
|
);
|
|
6717
|
-
var
|
|
7073
|
+
var schema17 = new MongooseSchema25(
|
|
6718
7074
|
{
|
|
6719
7075
|
// New schools are active by default
|
|
6720
7076
|
active: { default: false, required: true, type: Boolean },
|
|
@@ -6741,19 +7097,19 @@ var schema16 = new MongooseSchema24(
|
|
|
6741
7097
|
},
|
|
6742
7098
|
{ timestamps: true }
|
|
6743
7099
|
);
|
|
6744
|
-
|
|
7100
|
+
schema17.index(
|
|
6745
7101
|
{ schoolCode: 1 },
|
|
6746
7102
|
{
|
|
6747
7103
|
partialFilterExpression: { active: true, deletedAt: null },
|
|
6748
7104
|
unique: true
|
|
6749
7105
|
}
|
|
6750
7106
|
);
|
|
6751
|
-
var SchoolModel =
|
|
7107
|
+
var SchoolModel = import_mongoose25.default.models.School || import_mongoose25.default.model("School", schema17);
|
|
6752
7108
|
|
|
6753
7109
|
// src/mongoose/Affiliate.ts
|
|
6754
|
-
var
|
|
6755
|
-
var
|
|
6756
|
-
var affiliateRewardSchema = new
|
|
7110
|
+
var import_mongoose26 = __toESM(require("mongoose"));
|
|
7111
|
+
var MongooseSchema26 = import_mongoose26.default.Schema;
|
|
7112
|
+
var affiliateRewardSchema = new MongooseSchema26(
|
|
6757
7113
|
{
|
|
6758
7114
|
createdAt: { required: true, type: Date },
|
|
6759
7115
|
redeemedAt: { default: null, required: false, type: Date },
|
|
@@ -6767,13 +7123,13 @@ var affiliateRewardSchema = new MongooseSchema25(
|
|
|
6767
7123
|
},
|
|
6768
7124
|
{ _id: false }
|
|
6769
7125
|
);
|
|
6770
|
-
var affiliateResourceSchema = new
|
|
7126
|
+
var affiliateResourceSchema = new MongooseSchema26(
|
|
6771
7127
|
{
|
|
6772
7128
|
resourceActive: { default: true, required: true, type: Boolean },
|
|
6773
7129
|
resourceDeletedAt: { default: null, required: false, type: Date },
|
|
6774
7130
|
resourceId: {
|
|
6775
7131
|
required: true,
|
|
6776
|
-
type:
|
|
7132
|
+
type: import_mongoose26.default.Schema.Types.ObjectId
|
|
6777
7133
|
},
|
|
6778
7134
|
resourceName: { required: true, type: String },
|
|
6779
7135
|
resourceOwner: {
|
|
@@ -6793,20 +7149,20 @@ var affiliateResourceSchema = new MongooseSchema25(
|
|
|
6793
7149
|
},
|
|
6794
7150
|
{ _id: false }
|
|
6795
7151
|
);
|
|
6796
|
-
var affiliateContactDetailsSchema = new
|
|
7152
|
+
var affiliateContactDetailsSchema = new MongooseSchema26(
|
|
6797
7153
|
{
|
|
6798
7154
|
mobilePhone: { required: true, type: String }
|
|
6799
7155
|
},
|
|
6800
7156
|
{ _id: false }
|
|
6801
7157
|
);
|
|
6802
|
-
var affiliateBankAccountDetailsSchema = new
|
|
7158
|
+
var affiliateBankAccountDetailsSchema = new MongooseSchema26(
|
|
6803
7159
|
{
|
|
6804
7160
|
accountHolderName: { required: true, type: String },
|
|
6805
7161
|
accountNumber: { required: true, type: String }
|
|
6806
7162
|
},
|
|
6807
7163
|
{ _id: false }
|
|
6808
7164
|
);
|
|
6809
|
-
var affiliateDetailsSchema = new
|
|
7165
|
+
var affiliateDetailsSchema = new MongooseSchema26(
|
|
6810
7166
|
{
|
|
6811
7167
|
bankAccountDetails: {
|
|
6812
7168
|
required: true,
|
|
@@ -6828,7 +7184,7 @@ var affiliateDetailsSchema = new MongooseSchema25(
|
|
|
6828
7184
|
},
|
|
6829
7185
|
{ _id: false }
|
|
6830
7186
|
);
|
|
6831
|
-
var redeemHistorySchema = new
|
|
7187
|
+
var redeemHistorySchema = new MongooseSchema26(
|
|
6832
7188
|
{
|
|
6833
7189
|
paidAt: { default: null, required: false, type: Date },
|
|
6834
7190
|
redeemedAt: { required: true, type: Date },
|
|
@@ -6836,7 +7192,7 @@ var redeemHistorySchema = new MongooseSchema25(
|
|
|
6836
7192
|
},
|
|
6837
7193
|
{ _id: false }
|
|
6838
7194
|
);
|
|
6839
|
-
var
|
|
7195
|
+
var schema18 = new MongooseSchema26(
|
|
6840
7196
|
{
|
|
6841
7197
|
active: { default: false, required: true, type: Boolean },
|
|
6842
7198
|
affiliateBonusRewards: {
|
|
@@ -6866,19 +7222,19 @@ var schema17 = new MongooseSchema25(
|
|
|
6866
7222
|
},
|
|
6867
7223
|
{ timestamps: true }
|
|
6868
7224
|
);
|
|
6869
|
-
|
|
7225
|
+
schema18.index(
|
|
6870
7226
|
{ affiliateCode: 1 },
|
|
6871
7227
|
{
|
|
6872
7228
|
partialFilterExpression: { active: true, deletedAt: null },
|
|
6873
7229
|
unique: true
|
|
6874
7230
|
}
|
|
6875
7231
|
);
|
|
6876
|
-
var AffiliateModel =
|
|
7232
|
+
var AffiliateModel = import_mongoose26.default.models.Affiliate || import_mongoose26.default.model("Affiliate", schema18);
|
|
6877
7233
|
|
|
6878
7234
|
// src/mongoose/Coupon.ts
|
|
6879
|
-
var
|
|
6880
|
-
var
|
|
6881
|
-
var couponOptionSchema = new
|
|
7235
|
+
var import_mongoose27 = __toESM(require("mongoose"));
|
|
7236
|
+
var MongooseSchema27 = import_mongoose27.default.Schema;
|
|
7237
|
+
var couponOptionSchema = new MongooseSchema27(
|
|
6882
7238
|
{
|
|
6883
7239
|
buy: { required: false, type: Number },
|
|
6884
7240
|
get: { required: false, type: Number },
|
|
@@ -6893,29 +7249,29 @@ var couponOptionSchema = new MongooseSchema26(
|
|
|
6893
7249
|
},
|
|
6894
7250
|
{ _id: false }
|
|
6895
7251
|
);
|
|
6896
|
-
var couponVendorProductSchema = new
|
|
7252
|
+
var couponVendorProductSchema = new MongooseSchema27(
|
|
6897
7253
|
{
|
|
6898
7254
|
couponId: {
|
|
6899
7255
|
required: true,
|
|
6900
|
-
type:
|
|
7256
|
+
type: import_mongoose27.default.Schema.Types.ObjectId
|
|
6901
7257
|
},
|
|
6902
7258
|
productId: {
|
|
6903
7259
|
required: true,
|
|
6904
|
-
type:
|
|
7260
|
+
type: import_mongoose27.default.Schema.Types.ObjectId
|
|
6905
7261
|
},
|
|
6906
7262
|
vendorCouponId: {
|
|
6907
7263
|
required: false,
|
|
6908
|
-
type:
|
|
7264
|
+
type: import_mongoose27.default.Schema.Types.ObjectId
|
|
6909
7265
|
},
|
|
6910
7266
|
vendorId: {
|
|
6911
7267
|
ref: "Vendor",
|
|
6912
7268
|
required: true,
|
|
6913
|
-
type:
|
|
7269
|
+
type: import_mongoose27.default.Schema.Types.ObjectId
|
|
6914
7270
|
}
|
|
6915
7271
|
},
|
|
6916
7272
|
{ _id: false }
|
|
6917
7273
|
);
|
|
6918
|
-
var couponCodeSchema = new
|
|
7274
|
+
var couponCodeSchema = new MongooseSchema27(
|
|
6919
7275
|
{
|
|
6920
7276
|
code: { required: true, type: String },
|
|
6921
7277
|
qrCode: { required: true, type: ResourceImageTypeSchema },
|
|
@@ -6923,7 +7279,7 @@ var couponCodeSchema = new MongooseSchema26(
|
|
|
6923
7279
|
},
|
|
6924
7280
|
{ _id: false }
|
|
6925
7281
|
);
|
|
6926
|
-
var couponParticipantUserSchema = new
|
|
7282
|
+
var couponParticipantUserSchema = new MongooseSchema27(
|
|
6927
7283
|
{
|
|
6928
7284
|
couponCollectedCount: { default: 0, required: true, type: Number },
|
|
6929
7285
|
couponCycleRedeemed: { default: false, required: true, type: Boolean },
|
|
@@ -6932,12 +7288,12 @@ var couponParticipantUserSchema = new MongooseSchema26(
|
|
|
6932
7288
|
userId: {
|
|
6933
7289
|
ref: "User",
|
|
6934
7290
|
required: true,
|
|
6935
|
-
type:
|
|
7291
|
+
type: import_mongoose27.default.Schema.Types.ObjectId
|
|
6936
7292
|
}
|
|
6937
7293
|
},
|
|
6938
7294
|
{ timestamps: true }
|
|
6939
7295
|
);
|
|
6940
|
-
var couponDataSchema = new
|
|
7296
|
+
var couponDataSchema = new MongooseSchema27(
|
|
6941
7297
|
{
|
|
6942
7298
|
active: { default: true, required: true, type: Boolean },
|
|
6943
7299
|
couponCode: { required: false, type: couponCodeSchema },
|
|
@@ -6964,7 +7320,7 @@ var couponDataSchema = new MongooseSchema26(
|
|
|
6964
7320
|
},
|
|
6965
7321
|
{ timestamps: true }
|
|
6966
7322
|
);
|
|
6967
|
-
var
|
|
7323
|
+
var schema19 = new MongooseSchema27(
|
|
6968
7324
|
{
|
|
6969
7325
|
active: { default: true, required: true, type: Boolean },
|
|
6970
7326
|
couponData: { default: [], required: false, type: [couponDataSchema] },
|
|
@@ -6976,13 +7332,15 @@ var schema18 = new MongooseSchema26(
|
|
|
6976
7332
|
},
|
|
6977
7333
|
{ timestamps: true }
|
|
6978
7334
|
);
|
|
6979
|
-
var CouponModel =
|
|
7335
|
+
var CouponModel = import_mongoose27.default.models.Coupon || import_mongoose27.default.model("Coupon", schema19);
|
|
6980
7336
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6981
7337
|
0 && (module.exports = {
|
|
6982
7338
|
APP_SETTINGS_ID,
|
|
6983
7339
|
AdModel,
|
|
6984
7340
|
AffiliateModel,
|
|
6985
7341
|
AppSettingModel,
|
|
7342
|
+
BILLING_CATALOG_COLLECTION_NAME,
|
|
7343
|
+
BillingCatalogModel,
|
|
6986
7344
|
CategorySchema,
|
|
6987
7345
|
ChatModel,
|
|
6988
7346
|
ChatReportModel,
|
|
@@ -7010,7 +7368,9 @@ var CouponModel = import_mongoose26.default.models.Coupon || import_mongoose26.d
|
|
|
7010
7368
|
VendorModel,
|
|
7011
7369
|
VerificationTokenModel,
|
|
7012
7370
|
baseResourceFields,
|
|
7371
|
+
buildInitialBillingCatalogEntries,
|
|
7013
7372
|
dateTimeSchema,
|
|
7373
|
+
getBillingCatalogDefinition,
|
|
7014
7374
|
locationGeoSchema,
|
|
7015
7375
|
locationsSchema,
|
|
7016
7376
|
refundPolicySchema,
|