@timardex/cluemart-server-shared 1.0.88 → 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-H4HID6QS.mjs → chunk-5PNTTWNZ.mjs} +81 -16
- package/dist/chunk-5PNTTWNZ.mjs.map +1 -0
- package/dist/index.cjs +81 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +32 -2
- package/dist/index.d.ts +32 -2
- package/dist/index.mjs +80 -15
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +81 -15
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +32 -2
- package/dist/mongoose/index.d.ts +32 -2
- package/dist/mongoose/index.mjs +3 -1
- package/dist/service/index.cjs +79 -15
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-H4HID6QS.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,
|
|
@@ -8251,6 +8252,7 @@ var LICENCE_FIELDS_FRAGMENT = gql`
|
|
|
8251
8252
|
expiryDate
|
|
8252
8253
|
issuedDate
|
|
8253
8254
|
licenceType
|
|
8255
|
+
prevLicenceType
|
|
8254
8256
|
}
|
|
8255
8257
|
`;
|
|
8256
8258
|
var ASSOCIATES_FIELDS_FRAGMENT = gql`
|
|
@@ -8487,6 +8489,10 @@ var EVENT_INFO = gql`
|
|
|
8487
8489
|
link
|
|
8488
8490
|
paymentMethod
|
|
8489
8491
|
}
|
|
8492
|
+
refundPolicy {
|
|
8493
|
+
cancelledByOrganiser
|
|
8494
|
+
cancelledByVendor
|
|
8495
|
+
}
|
|
8490
8496
|
requirements {
|
|
8491
8497
|
category
|
|
8492
8498
|
label
|
|
@@ -9992,9 +9998,6 @@ var DELETE_PARTNER_MUTATION = gql`
|
|
|
9992
9998
|
`;
|
|
9993
9999
|
var POST_CONTENT_DATA_FIELDS_FRAGMENT = gql`
|
|
9994
10000
|
fragment PostContentDataFields on PostContentData {
|
|
9995
|
-
cover {
|
|
9996
|
-
...ResourceImageFields
|
|
9997
|
-
}
|
|
9998
10001
|
textarea {
|
|
9999
10002
|
title
|
|
10000
10003
|
data
|
|
@@ -10033,6 +10036,9 @@ var POST_FIELDS_FRAGMENT = gql`
|
|
|
10033
10036
|
content {
|
|
10034
10037
|
...PostContentFields
|
|
10035
10038
|
}
|
|
10039
|
+
cover {
|
|
10040
|
+
...ResourceImageFields
|
|
10041
|
+
}
|
|
10036
10042
|
createdAt
|
|
10037
10043
|
deletedAt
|
|
10038
10044
|
postType
|
|
@@ -10045,6 +10051,7 @@ var POST_FIELDS_FRAGMENT = gql`
|
|
|
10045
10051
|
updatedAt
|
|
10046
10052
|
}
|
|
10047
10053
|
${POST_CONTENT_FIELDS_FRAGMENT}
|
|
10054
|
+
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
10048
10055
|
`;
|
|
10049
10056
|
var GET_POSTS = gql`
|
|
10050
10057
|
query getPosts {
|
|
@@ -10388,7 +10395,17 @@ var eventInfoSchema = create$3().shape({
|
|
|
10388
10395
|
return value < applicationDeadlineHours;
|
|
10389
10396
|
}
|
|
10390
10397
|
),
|
|
10391
|
-
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
|
+
})
|
|
10392
10409
|
});
|
|
10393
10410
|
var vendroMenuSchema = create$3().shape({
|
|
10394
10411
|
description: create$6().trim().nullable().defined().test(
|
|
@@ -10441,15 +10458,27 @@ var vendorInfoSchema = create$3().shape({
|
|
|
10441
10458
|
).min(1, "Food flavors list must contain at least one item").required("Food flavors are required"),
|
|
10442
10459
|
packaging: create$2().of(create$6().defined()).min(1, "Packaging list must contain at least one item").required("Packaging is required"),
|
|
10443
10460
|
priceRange: create$3().shape({
|
|
10444
|
-
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(
|
|
10445
10466
|
"is-greater",
|
|
10446
10467
|
"Max price must be greater than or equal to Min price",
|
|
10447
10468
|
function(max) {
|
|
10448
10469
|
const { min } = this.parent;
|
|
10449
|
-
|
|
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;
|
|
10450
10475
|
}
|
|
10451
10476
|
),
|
|
10452
|
-
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
|
+
)
|
|
10453
10482
|
}),
|
|
10454
10483
|
producedIn: create$2().of(create$6().defined()).min(1, "Produced in list must contain at least one item").required("Produced in is required")
|
|
10455
10484
|
}),
|
|
@@ -10487,8 +10516,24 @@ var vendorInfoSchema = create$3().shape({
|
|
|
10487
10516
|
}).optional(),
|
|
10488
10517
|
stallInfo: create$3().shape({
|
|
10489
10518
|
size: create$3().shape({
|
|
10490
|
-
depth: create$
|
|
10491
|
-
|
|
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
|
+
)
|
|
10492
10537
|
})
|
|
10493
10538
|
}),
|
|
10494
10539
|
vendorId: create$6().trim().required("Vendor ID is required")
|
|
@@ -10726,7 +10771,6 @@ var EnumPostType = /* @__PURE__ */ ((EnumPostType2) => {
|
|
|
10726
10771
|
return EnumPostType2;
|
|
10727
10772
|
})(EnumPostType || {});
|
|
10728
10773
|
var EnumPostContentType = /* @__PURE__ */ ((EnumPostContentType2) => {
|
|
10729
|
-
EnumPostContentType2["COVER"] = "cover";
|
|
10730
10774
|
EnumPostContentType2["IMAGE"] = "image";
|
|
10731
10775
|
EnumPostContentType2["LIST"] = "list";
|
|
10732
10776
|
EnumPostContentType2["TEXTAREA"] = "textarea";
|
|
@@ -10912,6 +10956,13 @@ var requirementsSchema = new MongooseSchema(
|
|
|
10912
10956
|
// Prevents Mongoose from creating an additional _id field for
|
|
10913
10957
|
}
|
|
10914
10958
|
);
|
|
10959
|
+
var refundPolicySchema = new MongooseSchema(
|
|
10960
|
+
{
|
|
10961
|
+
cancelledByOrganiser: { required: true, type: [String] },
|
|
10962
|
+
cancelledByVendor: { required: true, type: [String] }
|
|
10963
|
+
},
|
|
10964
|
+
{ _id: false }
|
|
10965
|
+
);
|
|
10915
10966
|
var schema = new MongooseSchema(
|
|
10916
10967
|
{
|
|
10917
10968
|
applicationDeadlineHours: { required: true, type: Number },
|
|
@@ -10924,6 +10975,7 @@ var schema = new MongooseSchema(
|
|
|
10924
10975
|
packInTime: { required: true, type: Number },
|
|
10925
10976
|
paymentDueHours: { required: true, type: Number },
|
|
10926
10977
|
paymentInfo: [paymentInfoSchema2],
|
|
10978
|
+
refundPolicy: { required: true, type: refundPolicySchema },
|
|
10927
10979
|
requirements: [requirementsSchema]
|
|
10928
10980
|
},
|
|
10929
10981
|
{ timestamps: true }
|
|
@@ -11077,6 +11129,11 @@ var userLicenseSchema = new MongooseSchema3(
|
|
|
11077
11129
|
enum: Object.values(EnumUserLicence),
|
|
11078
11130
|
required: true,
|
|
11079
11131
|
type: String
|
|
11132
|
+
},
|
|
11133
|
+
prevLicenceType: {
|
|
11134
|
+
enum: Object.values(EnumUserLicence),
|
|
11135
|
+
required: false,
|
|
11136
|
+
type: String
|
|
11080
11137
|
}
|
|
11081
11138
|
},
|
|
11082
11139
|
{ _id: false, timestamps: false }
|
|
@@ -12034,8 +12091,8 @@ var schema10 = new MongooseSchema15(
|
|
|
12034
12091
|
},
|
|
12035
12092
|
packaging: { required: true, type: [String] },
|
|
12036
12093
|
priceRange: {
|
|
12037
|
-
max: { required: true, type:
|
|
12038
|
-
min: { required: true, type:
|
|
12094
|
+
max: { required: true, type: String },
|
|
12095
|
+
min: { required: true, type: String }
|
|
12039
12096
|
},
|
|
12040
12097
|
producedIn: { required: true, type: [String] }
|
|
12041
12098
|
},
|
|
@@ -12046,8 +12103,8 @@ var schema10 = new MongooseSchema15(
|
|
|
12046
12103
|
},
|
|
12047
12104
|
stallInfo: {
|
|
12048
12105
|
size: {
|
|
12049
|
-
depth: { required: true, type:
|
|
12050
|
-
width: { required: true, type:
|
|
12106
|
+
depth: { required: true, type: String },
|
|
12107
|
+
width: { required: true, type: String }
|
|
12051
12108
|
}
|
|
12052
12109
|
},
|
|
12053
12110
|
vendorId: {
|
|
@@ -12153,7 +12210,15 @@ var schema13 = new MongooseSchema18(
|
|
|
12153
12210
|
{
|
|
12154
12211
|
active: { default: true, required: true, type: Boolean },
|
|
12155
12212
|
caption: { required: true, type: String },
|
|
12156
|
-
content:
|
|
12213
|
+
content: {
|
|
12214
|
+
default: [],
|
|
12215
|
+
required: false,
|
|
12216
|
+
type: [contentSchema]
|
|
12217
|
+
},
|
|
12218
|
+
cover: {
|
|
12219
|
+
required: false,
|
|
12220
|
+
type: ResourceImageTypeSchema
|
|
12221
|
+
},
|
|
12157
12222
|
deletedAt: { default: null, required: false, type: Date },
|
|
12158
12223
|
postType: {
|
|
12159
12224
|
enum: Object.values(EnumPostType),
|
|
@@ -12439,6 +12504,7 @@ var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
|
|
|
12439
12504
|
locationGeoSchema,
|
|
12440
12505
|
locationsSchema,
|
|
12441
12506
|
mongoose,
|
|
12507
|
+
refundPolicySchema,
|
|
12442
12508
|
relationDatesSchema,
|
|
12443
12509
|
resourceRelationsSchema,
|
|
12444
12510
|
saveNotificationsInDb,
|