@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/mongoose/index.cjs
CHANGED
|
@@ -1703,6 +1703,7 @@ __export(mongoose_exports, {
|
|
|
1703
1703
|
dateTimeSchema: () => dateTimeSchema3,
|
|
1704
1704
|
locationGeoSchema: () => locationGeoSchema,
|
|
1705
1705
|
locationsSchema: () => locationsSchema,
|
|
1706
|
+
refundPolicySchema: () => refundPolicySchema,
|
|
1706
1707
|
relationDatesSchema: () => relationDatesSchema,
|
|
1707
1708
|
resourceRelationsSchema: () => resourceRelationsSchema,
|
|
1708
1709
|
termsAgreementSchema: () => termsAgreementSchema,
|
|
@@ -8244,6 +8245,7 @@ var LICENCE_FIELDS_FRAGMENT = gql`
|
|
|
8244
8245
|
expiryDate
|
|
8245
8246
|
issuedDate
|
|
8246
8247
|
licenceType
|
|
8248
|
+
prevLicenceType
|
|
8247
8249
|
}
|
|
8248
8250
|
`;
|
|
8249
8251
|
var ASSOCIATES_FIELDS_FRAGMENT = gql`
|
|
@@ -8480,6 +8482,10 @@ var EVENT_INFO = gql`
|
|
|
8480
8482
|
link
|
|
8481
8483
|
paymentMethod
|
|
8482
8484
|
}
|
|
8485
|
+
refundPolicy {
|
|
8486
|
+
cancelledByOrganiser
|
|
8487
|
+
cancelledByVendor
|
|
8488
|
+
}
|
|
8483
8489
|
requirements {
|
|
8484
8490
|
category
|
|
8485
8491
|
label
|
|
@@ -9985,9 +9991,6 @@ var DELETE_PARTNER_MUTATION = gql`
|
|
|
9985
9991
|
`;
|
|
9986
9992
|
var POST_CONTENT_DATA_FIELDS_FRAGMENT = gql`
|
|
9987
9993
|
fragment PostContentDataFields on PostContentData {
|
|
9988
|
-
cover {
|
|
9989
|
-
...ResourceImageFields
|
|
9990
|
-
}
|
|
9991
9994
|
textarea {
|
|
9992
9995
|
title
|
|
9993
9996
|
data
|
|
@@ -10026,6 +10029,9 @@ var POST_FIELDS_FRAGMENT = gql`
|
|
|
10026
10029
|
content {
|
|
10027
10030
|
...PostContentFields
|
|
10028
10031
|
}
|
|
10032
|
+
cover {
|
|
10033
|
+
...ResourceImageFields
|
|
10034
|
+
}
|
|
10029
10035
|
createdAt
|
|
10030
10036
|
deletedAt
|
|
10031
10037
|
postType
|
|
@@ -10038,6 +10044,7 @@ var POST_FIELDS_FRAGMENT = gql`
|
|
|
10038
10044
|
updatedAt
|
|
10039
10045
|
}
|
|
10040
10046
|
${POST_CONTENT_FIELDS_FRAGMENT}
|
|
10047
|
+
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
10041
10048
|
`;
|
|
10042
10049
|
var GET_POSTS = gql`
|
|
10043
10050
|
query getPosts {
|
|
@@ -10381,7 +10388,17 @@ var eventInfoSchema = create$3().shape({
|
|
|
10381
10388
|
return value < applicationDeadlineHours;
|
|
10382
10389
|
}
|
|
10383
10390
|
),
|
|
10384
|
-
paymentInfo: create$2().of(paymentInfoSchema).min(1, "At least one payment method is required").required("Payment info is required")
|
|
10391
|
+
paymentInfo: create$2().of(paymentInfoSchema).min(1, "At least one payment method is required").required("Payment info is required"),
|
|
10392
|
+
refundPolicy: create$3({
|
|
10393
|
+
cancelledByOrganiser: create$2().of(create$6().defined()).min(
|
|
10394
|
+
1,
|
|
10395
|
+
"At least one refund policy for cancellations by organiser is required"
|
|
10396
|
+
).required("Refund policy for cancellations by organiser is required"),
|
|
10397
|
+
cancelledByVendor: create$2().of(create$6().defined()).min(
|
|
10398
|
+
1,
|
|
10399
|
+
"At least one refund policy for cancellations by vendor is required"
|
|
10400
|
+
).required("Refund policy for cancellations by vendor is required")
|
|
10401
|
+
})
|
|
10385
10402
|
});
|
|
10386
10403
|
var vendroMenuSchema = create$3().shape({
|
|
10387
10404
|
description: create$6().trim().nullable().defined().test(
|
|
@@ -10434,15 +10451,27 @@ var vendorInfoSchema = create$3().shape({
|
|
|
10434
10451
|
).min(1, "Food flavors list must contain at least one item").required("Food flavors are required"),
|
|
10435
10452
|
packaging: create$2().of(create$6().defined()).min(1, "Packaging list must contain at least one item").required("Packaging is required"),
|
|
10436
10453
|
priceRange: create$3().shape({
|
|
10437
|
-
max: create$
|
|
10454
|
+
max: create$6().required("Max price is required").test(
|
|
10455
|
+
"is-number",
|
|
10456
|
+
"Max price must be a valid number",
|
|
10457
|
+
(value) => value !== void 0 && value !== "" && !isNaN(Number(value))
|
|
10458
|
+
).test(
|
|
10438
10459
|
"is-greater",
|
|
10439
10460
|
"Max price must be greater than or equal to Min price",
|
|
10440
10461
|
function(max) {
|
|
10441
10462
|
const { min } = this.parent;
|
|
10442
|
-
|
|
10463
|
+
if (!max || !min) return true;
|
|
10464
|
+
const maxNum = Number(max);
|
|
10465
|
+
const minNum = Number(min);
|
|
10466
|
+
if (isNaN(maxNum) || isNaN(minNum)) return true;
|
|
10467
|
+
return maxNum >= minNum;
|
|
10443
10468
|
}
|
|
10444
10469
|
),
|
|
10445
|
-
min: create$
|
|
10470
|
+
min: create$6().required("Min price is required").test(
|
|
10471
|
+
"is-number",
|
|
10472
|
+
"Min price must be a valid number",
|
|
10473
|
+
(value) => value !== void 0 && value !== "" && !isNaN(Number(value))
|
|
10474
|
+
)
|
|
10446
10475
|
}),
|
|
10447
10476
|
producedIn: create$2().of(create$6().defined()).min(1, "Produced in list must contain at least one item").required("Produced in is required")
|
|
10448
10477
|
}),
|
|
@@ -10480,8 +10509,24 @@ var vendorInfoSchema = create$3().shape({
|
|
|
10480
10509
|
}).optional(),
|
|
10481
10510
|
stallInfo: create$3().shape({
|
|
10482
10511
|
size: create$3().shape({
|
|
10483
|
-
depth: create$
|
|
10484
|
-
|
|
10512
|
+
depth: create$6().required("Depth is required").test(
|
|
10513
|
+
"is-number",
|
|
10514
|
+
"Depth must be a valid number",
|
|
10515
|
+
(value) => value !== void 0 && value !== "" && !isNaN(Number(value))
|
|
10516
|
+
).test(
|
|
10517
|
+
"is-positive",
|
|
10518
|
+
"Depth must be greater than 0",
|
|
10519
|
+
(value) => value !== void 0 && value !== "" && Number(value) > 0
|
|
10520
|
+
),
|
|
10521
|
+
width: create$6().required("Width is required").test(
|
|
10522
|
+
"is-number",
|
|
10523
|
+
"Width must be a valid number",
|
|
10524
|
+
(value) => value !== void 0 && value !== "" && !isNaN(Number(value))
|
|
10525
|
+
).test(
|
|
10526
|
+
"is-positive",
|
|
10527
|
+
"Width must be greater than 0",
|
|
10528
|
+
(value) => value !== void 0 && value !== "" && Number(value) > 0
|
|
10529
|
+
)
|
|
10485
10530
|
})
|
|
10486
10531
|
}),
|
|
10487
10532
|
vendorId: create$6().trim().required("Vendor ID is required")
|
|
@@ -10719,7 +10764,6 @@ var EnumPostType = /* @__PURE__ */ ((EnumPostType2) => {
|
|
|
10719
10764
|
return EnumPostType2;
|
|
10720
10765
|
})(EnumPostType || {});
|
|
10721
10766
|
var EnumPostContentType = /* @__PURE__ */ ((EnumPostContentType2) => {
|
|
10722
|
-
EnumPostContentType2["COVER"] = "cover";
|
|
10723
10767
|
EnumPostContentType2["IMAGE"] = "image";
|
|
10724
10768
|
EnumPostContentType2["LIST"] = "list";
|
|
10725
10769
|
EnumPostContentType2["TEXTAREA"] = "textarea";
|
|
@@ -10905,6 +10949,13 @@ var requirementsSchema = new MongooseSchema(
|
|
|
10905
10949
|
// Prevents Mongoose from creating an additional _id field for
|
|
10906
10950
|
}
|
|
10907
10951
|
);
|
|
10952
|
+
var refundPolicySchema = new MongooseSchema(
|
|
10953
|
+
{
|
|
10954
|
+
cancelledByOrganiser: { required: true, type: [String] },
|
|
10955
|
+
cancelledByVendor: { required: true, type: [String] }
|
|
10956
|
+
},
|
|
10957
|
+
{ _id: false }
|
|
10958
|
+
);
|
|
10908
10959
|
var schema = new MongooseSchema(
|
|
10909
10960
|
{
|
|
10910
10961
|
applicationDeadlineHours: { required: true, type: Number },
|
|
@@ -10917,6 +10968,7 @@ var schema = new MongooseSchema(
|
|
|
10917
10968
|
packInTime: { required: true, type: Number },
|
|
10918
10969
|
paymentDueHours: { required: true, type: Number },
|
|
10919
10970
|
paymentInfo: [paymentInfoSchema2],
|
|
10971
|
+
refundPolicy: { required: true, type: refundPolicySchema },
|
|
10920
10972
|
requirements: [requirementsSchema]
|
|
10921
10973
|
},
|
|
10922
10974
|
{ timestamps: true }
|
|
@@ -11070,6 +11122,11 @@ var userLicenseSchema = new MongooseSchema3(
|
|
|
11070
11122
|
enum: Object.values(EnumUserLicence),
|
|
11071
11123
|
required: true,
|
|
11072
11124
|
type: String
|
|
11125
|
+
},
|
|
11126
|
+
prevLicenceType: {
|
|
11127
|
+
enum: Object.values(EnumUserLicence),
|
|
11128
|
+
required: false,
|
|
11129
|
+
type: String
|
|
11073
11130
|
}
|
|
11074
11131
|
},
|
|
11075
11132
|
{ _id: false, timestamps: false }
|
|
@@ -12027,8 +12084,8 @@ var schema10 = new MongooseSchema15(
|
|
|
12027
12084
|
},
|
|
12028
12085
|
packaging: { required: true, type: [String] },
|
|
12029
12086
|
priceRange: {
|
|
12030
|
-
max: { required: true, type:
|
|
12031
|
-
min: { required: true, type:
|
|
12087
|
+
max: { required: true, type: String },
|
|
12088
|
+
min: { required: true, type: String }
|
|
12032
12089
|
},
|
|
12033
12090
|
producedIn: { required: true, type: [String] }
|
|
12034
12091
|
},
|
|
@@ -12039,8 +12096,8 @@ var schema10 = new MongooseSchema15(
|
|
|
12039
12096
|
},
|
|
12040
12097
|
stallInfo: {
|
|
12041
12098
|
size: {
|
|
12042
|
-
depth: { required: true, type:
|
|
12043
|
-
width: { required: true, type:
|
|
12099
|
+
depth: { required: true, type: String },
|
|
12100
|
+
width: { required: true, type: String }
|
|
12044
12101
|
}
|
|
12045
12102
|
},
|
|
12046
12103
|
vendorId: {
|
|
@@ -12146,7 +12203,15 @@ var schema13 = new MongooseSchema18(
|
|
|
12146
12203
|
{
|
|
12147
12204
|
active: { default: true, required: true, type: Boolean },
|
|
12148
12205
|
caption: { required: true, type: String },
|
|
12149
|
-
content:
|
|
12206
|
+
content: {
|
|
12207
|
+
default: [],
|
|
12208
|
+
required: false,
|
|
12209
|
+
type: [contentSchema]
|
|
12210
|
+
},
|
|
12211
|
+
cover: {
|
|
12212
|
+
required: false,
|
|
12213
|
+
type: ResourceImageTypeSchema
|
|
12214
|
+
},
|
|
12150
12215
|
deletedAt: { default: null, required: false, type: Date },
|
|
12151
12216
|
postType: {
|
|
12152
12217
|
enum: Object.values(EnumPostType),
|
|
@@ -12226,6 +12291,7 @@ var AppSettingModel = import_mongoose19.default.models.AppSetting || import_mong
|
|
|
12226
12291
|
dateTimeSchema,
|
|
12227
12292
|
locationGeoSchema,
|
|
12228
12293
|
locationsSchema,
|
|
12294
|
+
refundPolicySchema,
|
|
12229
12295
|
relationDatesSchema,
|
|
12230
12296
|
resourceRelationsSchema,
|
|
12231
12297
|
termsAgreementSchema,
|