@timardex/cluemart-server-shared 1.0.89 → 1.0.90
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-BZT5T34F.mjs → chunk-5PNTTWNZ.mjs} +67 -12
- package/dist/chunk-5PNTTWNZ.mjs.map +1 -0
- package/dist/index.cjs +67 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.mjs +66 -11
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +67 -11
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +31 -1
- package/dist/mongoose/index.d.ts +31 -1
- package/dist/mongoose/index.mjs +3 -1
- package/dist/service/index.cjs +65 -11
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-BZT5T34F.mjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1707,6 +1707,7 @@ __export(index_exports, {
|
|
|
1707
1707
|
locationGeoSchema: () => locationGeoSchema,
|
|
1708
1708
|
locationsSchema: () => locationsSchema,
|
|
1709
1709
|
mongoose: () => import_mongoose22.default,
|
|
1710
|
+
refundPolicySchema: () => refundPolicySchema,
|
|
1710
1711
|
relationDatesSchema: () => relationDatesSchema,
|
|
1711
1712
|
resourceRelationsSchema: () => resourceRelationsSchema,
|
|
1712
1713
|
saveNotificationsInDb: () => saveNotificationsInDb,
|
|
@@ -8488,6 +8489,10 @@ var EVENT_INFO = gql`
|
|
|
8488
8489
|
link
|
|
8489
8490
|
paymentMethod
|
|
8490
8491
|
}
|
|
8492
|
+
refundPolicy {
|
|
8493
|
+
cancelledByOrganiser
|
|
8494
|
+
cancelledByVendor
|
|
8495
|
+
}
|
|
8491
8496
|
requirements {
|
|
8492
8497
|
category
|
|
8493
8498
|
label
|
|
@@ -10390,7 +10395,17 @@ var eventInfoSchema = create$3().shape({
|
|
|
10390
10395
|
return value < applicationDeadlineHours;
|
|
10391
10396
|
}
|
|
10392
10397
|
),
|
|
10393
|
-
paymentInfo: create$2().of(paymentInfoSchema).min(1, "At least one payment method is required").required("Payment info is required")
|
|
10398
|
+
paymentInfo: create$2().of(paymentInfoSchema).min(1, "At least one payment method is required").required("Payment info is required"),
|
|
10399
|
+
refundPolicy: create$3({
|
|
10400
|
+
cancelledByOrganiser: create$2().of(create$6().defined()).min(
|
|
10401
|
+
1,
|
|
10402
|
+
"At least one refund policy for cancellations by organiser is required"
|
|
10403
|
+
).required("Refund policy for cancellations by organiser is required"),
|
|
10404
|
+
cancelledByVendor: create$2().of(create$6().defined()).min(
|
|
10405
|
+
1,
|
|
10406
|
+
"At least one refund policy for cancellations by vendor is required"
|
|
10407
|
+
).required("Refund policy for cancellations by vendor is required")
|
|
10408
|
+
})
|
|
10394
10409
|
});
|
|
10395
10410
|
var vendroMenuSchema = create$3().shape({
|
|
10396
10411
|
description: create$6().trim().nullable().defined().test(
|
|
@@ -10443,15 +10458,27 @@ var vendorInfoSchema = create$3().shape({
|
|
|
10443
10458
|
).min(1, "Food flavors list must contain at least one item").required("Food flavors are required"),
|
|
10444
10459
|
packaging: create$2().of(create$6().defined()).min(1, "Packaging list must contain at least one item").required("Packaging is required"),
|
|
10445
10460
|
priceRange: create$3().shape({
|
|
10446
|
-
max: create$
|
|
10461
|
+
max: create$6().required("Max price is required").test(
|
|
10462
|
+
"is-number",
|
|
10463
|
+
"Max price must be a valid number",
|
|
10464
|
+
(value) => value !== void 0 && value !== "" && !isNaN(Number(value))
|
|
10465
|
+
).test(
|
|
10447
10466
|
"is-greater",
|
|
10448
10467
|
"Max price must be greater than or equal to Min price",
|
|
10449
10468
|
function(max) {
|
|
10450
10469
|
const { min } = this.parent;
|
|
10451
|
-
|
|
10470
|
+
if (!max || !min) return true;
|
|
10471
|
+
const maxNum = Number(max);
|
|
10472
|
+
const minNum = Number(min);
|
|
10473
|
+
if (isNaN(maxNum) || isNaN(minNum)) return true;
|
|
10474
|
+
return maxNum >= minNum;
|
|
10452
10475
|
}
|
|
10453
10476
|
),
|
|
10454
|
-
min: create$
|
|
10477
|
+
min: create$6().required("Min price is required").test(
|
|
10478
|
+
"is-number",
|
|
10479
|
+
"Min price must be a valid number",
|
|
10480
|
+
(value) => value !== void 0 && value !== "" && !isNaN(Number(value))
|
|
10481
|
+
)
|
|
10455
10482
|
}),
|
|
10456
10483
|
producedIn: create$2().of(create$6().defined()).min(1, "Produced in list must contain at least one item").required("Produced in is required")
|
|
10457
10484
|
}),
|
|
@@ -10489,8 +10516,24 @@ var vendorInfoSchema = create$3().shape({
|
|
|
10489
10516
|
}).optional(),
|
|
10490
10517
|
stallInfo: create$3().shape({
|
|
10491
10518
|
size: create$3().shape({
|
|
10492
|
-
depth: create$
|
|
10493
|
-
|
|
10519
|
+
depth: create$6().required("Depth is required").test(
|
|
10520
|
+
"is-number",
|
|
10521
|
+
"Depth must be a valid number",
|
|
10522
|
+
(value) => value !== void 0 && value !== "" && !isNaN(Number(value))
|
|
10523
|
+
).test(
|
|
10524
|
+
"is-positive",
|
|
10525
|
+
"Depth must be greater than 0",
|
|
10526
|
+
(value) => value !== void 0 && value !== "" && Number(value) > 0
|
|
10527
|
+
),
|
|
10528
|
+
width: create$6().required("Width is required").test(
|
|
10529
|
+
"is-number",
|
|
10530
|
+
"Width must be a valid number",
|
|
10531
|
+
(value) => value !== void 0 && value !== "" && !isNaN(Number(value))
|
|
10532
|
+
).test(
|
|
10533
|
+
"is-positive",
|
|
10534
|
+
"Width must be greater than 0",
|
|
10535
|
+
(value) => value !== void 0 && value !== "" && Number(value) > 0
|
|
10536
|
+
)
|
|
10494
10537
|
})
|
|
10495
10538
|
}),
|
|
10496
10539
|
vendorId: create$6().trim().required("Vendor ID is required")
|
|
@@ -10728,7 +10771,6 @@ var EnumPostType = /* @__PURE__ */ ((EnumPostType2) => {
|
|
|
10728
10771
|
return EnumPostType2;
|
|
10729
10772
|
})(EnumPostType || {});
|
|
10730
10773
|
var EnumPostContentType = /* @__PURE__ */ ((EnumPostContentType2) => {
|
|
10731
|
-
EnumPostContentType2["COVER"] = "cover";
|
|
10732
10774
|
EnumPostContentType2["IMAGE"] = "image";
|
|
10733
10775
|
EnumPostContentType2["LIST"] = "list";
|
|
10734
10776
|
EnumPostContentType2["TEXTAREA"] = "textarea";
|
|
@@ -10914,6 +10956,13 @@ var requirementsSchema = new MongooseSchema(
|
|
|
10914
10956
|
// Prevents Mongoose from creating an additional _id field for
|
|
10915
10957
|
}
|
|
10916
10958
|
);
|
|
10959
|
+
var refundPolicySchema = new MongooseSchema(
|
|
10960
|
+
{
|
|
10961
|
+
cancelledByOrganiser: { required: true, type: [String] },
|
|
10962
|
+
cancelledByVendor: { required: true, type: [String] }
|
|
10963
|
+
},
|
|
10964
|
+
{ _id: false }
|
|
10965
|
+
);
|
|
10917
10966
|
var schema = new MongooseSchema(
|
|
10918
10967
|
{
|
|
10919
10968
|
applicationDeadlineHours: { required: true, type: Number },
|
|
@@ -10926,6 +10975,7 @@ var schema = new MongooseSchema(
|
|
|
10926
10975
|
packInTime: { required: true, type: Number },
|
|
10927
10976
|
paymentDueHours: { required: true, type: Number },
|
|
10928
10977
|
paymentInfo: [paymentInfoSchema2],
|
|
10978
|
+
refundPolicy: { required: true, type: refundPolicySchema },
|
|
10929
10979
|
requirements: [requirementsSchema]
|
|
10930
10980
|
},
|
|
10931
10981
|
{ timestamps: true }
|
|
@@ -11079,6 +11129,11 @@ var userLicenseSchema = new MongooseSchema3(
|
|
|
11079
11129
|
enum: Object.values(EnumUserLicence),
|
|
11080
11130
|
required: true,
|
|
11081
11131
|
type: String
|
|
11132
|
+
},
|
|
11133
|
+
prevLicenceType: {
|
|
11134
|
+
enum: Object.values(EnumUserLicence),
|
|
11135
|
+
required: false,
|
|
11136
|
+
type: String
|
|
11082
11137
|
}
|
|
11083
11138
|
},
|
|
11084
11139
|
{ _id: false, timestamps: false }
|
|
@@ -12036,8 +12091,8 @@ var schema10 = new MongooseSchema15(
|
|
|
12036
12091
|
},
|
|
12037
12092
|
packaging: { required: true, type: [String] },
|
|
12038
12093
|
priceRange: {
|
|
12039
|
-
max: { required: true, type:
|
|
12040
|
-
min: { required: true, type:
|
|
12094
|
+
max: { required: true, type: String },
|
|
12095
|
+
min: { required: true, type: String }
|
|
12041
12096
|
},
|
|
12042
12097
|
producedIn: { required: true, type: [String] }
|
|
12043
12098
|
},
|
|
@@ -12048,8 +12103,8 @@ var schema10 = new MongooseSchema15(
|
|
|
12048
12103
|
},
|
|
12049
12104
|
stallInfo: {
|
|
12050
12105
|
size: {
|
|
12051
|
-
depth: { required: true, type:
|
|
12052
|
-
width: { required: true, type:
|
|
12106
|
+
depth: { required: true, type: String },
|
|
12107
|
+
width: { required: true, type: String }
|
|
12053
12108
|
}
|
|
12054
12109
|
},
|
|
12055
12110
|
vendorId: {
|
|
@@ -12449,6 +12504,7 @@ var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
|
|
|
12449
12504
|
locationGeoSchema,
|
|
12450
12505
|
locationsSchema,
|
|
12451
12506
|
mongoose,
|
|
12507
|
+
refundPolicySchema,
|
|
12452
12508
|
relationDatesSchema,
|
|
12453
12509
|
resourceRelationsSchema,
|
|
12454
12510
|
saveNotificationsInDb,
|