@timardex/cluemart-server-shared 1.0.213 → 1.0.215
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-5PTF25RX.mjs → chunk-PF56GXHT.mjs} +101 -8
- package/dist/chunk-PF56GXHT.mjs.map +1 -0
- package/dist/index.cjs +102 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +60 -2
- package/dist/index.d.ts +60 -2
- package/dist/index.mjs +99 -6
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +100 -4
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +60 -2
- package/dist/mongoose/index.d.ts +60 -2
- package/dist/mongoose/index.mjs +7 -1
- package/dist/service/index.cjs +96 -6
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-5PTF25RX.mjs.map +0 -1
package/dist/mongoose/index.cjs
CHANGED
|
@@ -64,8 +64,11 @@ __export(mongoose_exports, {
|
|
|
64
64
|
locationGeoSchema: () => locationGeoSchema,
|
|
65
65
|
locationsSchema: () => locationsSchema,
|
|
66
66
|
refundPolicySchema: () => refundPolicySchema,
|
|
67
|
+
relatedPostSchema: () => relatedPostSchema,
|
|
67
68
|
relationDatesSchema: () => relationDatesSchema,
|
|
68
69
|
resourceRelationsSchema: () => resourceRelationsSchema,
|
|
70
|
+
socialImageSchema: () => socialImageSchema,
|
|
71
|
+
socialImageUrlSchema: () => socialImageUrlSchema,
|
|
69
72
|
termsAgreementSchema: () => termsAgreementSchema,
|
|
70
73
|
userLicenseSchema: () => userLicenseSchema
|
|
71
74
|
});
|
|
@@ -3551,10 +3554,6 @@ var gameScreenIdentifierList = [
|
|
|
3551
3554
|
match: "/visitors"
|
|
3552
3555
|
}
|
|
3553
3556
|
];
|
|
3554
|
-
import_dayjs.default.extend(import_customParseFormat.default);
|
|
3555
|
-
import_dayjs.default.extend(import_utc.default);
|
|
3556
|
-
import_dayjs.default.extend(import_timezone.default);
|
|
3557
|
-
import_dayjs.default.extend(import_isSameOrAfter.default);
|
|
3558
3557
|
var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
|
|
3559
3558
|
EnumAdShowOn2["EVENTS_PAGE"] = "Events_page";
|
|
3560
3559
|
EnumAdShowOn2["FRONT_PAGE"] = "Front_page";
|
|
@@ -3630,6 +3629,19 @@ var paymentMethodOptions = mapArrayToOptions(
|
|
|
3630
3629
|
Object.values(EnumPaymentMethod)
|
|
3631
3630
|
);
|
|
3632
3631
|
var CLUEMART_MAIN_DOMAIN_URL = "https://cluemart.co.nz";
|
|
3632
|
+
import_dayjs.default.extend(import_customParseFormat.default);
|
|
3633
|
+
import_dayjs.default.extend(import_utc.default);
|
|
3634
|
+
import_dayjs.default.extend(import_timezone.default);
|
|
3635
|
+
import_dayjs.default.extend(import_isSameOrAfter.default);
|
|
3636
|
+
var futureTimePeriods = mapArrayToOptions(
|
|
3637
|
+
Object.values(EnumEventDateStatus)
|
|
3638
|
+
).filter(
|
|
3639
|
+
(period) => period.value !== "Starting_Soon" && period.value !== "Canceled" && period.value !== "Rescheduled" && period.value !== "Started" && period.value !== "Ended" && period.value !== "Invalid"
|
|
3640
|
+
/* INVALID */
|
|
3641
|
+
).map((period) => ({
|
|
3642
|
+
label: period.value.replaceAll("_", " "),
|
|
3643
|
+
value: period.value
|
|
3644
|
+
}));
|
|
3633
3645
|
var packagingTypes = [
|
|
3634
3646
|
"Biodegradable",
|
|
3635
3647
|
"Compostable",
|
|
@@ -5164,6 +5176,29 @@ var EVENT_LIST_ITEM = gql`
|
|
|
5164
5176
|
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
5165
5177
|
${RELATION_DATES_FRAGMENT}
|
|
5166
5178
|
`;
|
|
5179
|
+
var RELATED_POST_FIELDS_FRAGMENT = gql`
|
|
5180
|
+
fragment RelatedPostFields on RelatedPostType {
|
|
5181
|
+
postId
|
|
5182
|
+
postType
|
|
5183
|
+
}
|
|
5184
|
+
`;
|
|
5185
|
+
var SOCIAL_IMAGE_URL_FIELDS_FRAGMENT = gql`
|
|
5186
|
+
fragment SocialImageUrlFields on SocialImageUrlType {
|
|
5187
|
+
url
|
|
5188
|
+
qrCode
|
|
5189
|
+
}
|
|
5190
|
+
`;
|
|
5191
|
+
var SOCIAL_IMAGE_FIELDS_FRAGMENT = gql`
|
|
5192
|
+
fragment SocialImageFields on SocialImageType {
|
|
5193
|
+
public {
|
|
5194
|
+
...SocialImageUrlFields
|
|
5195
|
+
}
|
|
5196
|
+
relation {
|
|
5197
|
+
...SocialImageUrlFields
|
|
5198
|
+
}
|
|
5199
|
+
}
|
|
5200
|
+
${SOCIAL_IMAGE_URL_FIELDS_FRAGMENT}
|
|
5201
|
+
`;
|
|
5167
5202
|
var EVENT_INFO = gql`
|
|
5168
5203
|
fragment EventInfoFields on EventInfoType {
|
|
5169
5204
|
_id
|
|
@@ -5253,9 +5288,15 @@ var EVENT = gql`
|
|
|
5253
5288
|
rating
|
|
5254
5289
|
reviewCount
|
|
5255
5290
|
rainOrShine
|
|
5291
|
+
relatedPost {
|
|
5292
|
+
...RelatedPostFields
|
|
5293
|
+
}
|
|
5256
5294
|
socialMedia {
|
|
5257
5295
|
...SocialMediaFields
|
|
5258
5296
|
}
|
|
5297
|
+
socialImage {
|
|
5298
|
+
...SocialImageFields
|
|
5299
|
+
}
|
|
5259
5300
|
tags
|
|
5260
5301
|
termsAgreement {
|
|
5261
5302
|
...TermsAgreementFields
|
|
@@ -5272,6 +5313,8 @@ var EVENT = gql`
|
|
|
5272
5313
|
${CONTACT_DETAILS_FIELDS_FRAGMENT}
|
|
5273
5314
|
${TERMS_AGREEMENT_FIELDS_FRAGMENT}
|
|
5274
5315
|
${RELATION_DATES_FRAGMENT}
|
|
5316
|
+
${RELATED_POST_FIELDS_FRAGMENT}
|
|
5317
|
+
${SOCIAL_IMAGE_FIELDS_FRAGMENT}
|
|
5275
5318
|
`;
|
|
5276
5319
|
var GET_EVENTS = gql`
|
|
5277
5320
|
query getEvents($dateStatus: EventDateStatusEnumType) {
|
|
@@ -5438,6 +5481,9 @@ var VENDOR = gql`
|
|
|
5438
5481
|
rating
|
|
5439
5482
|
region
|
|
5440
5483
|
reviewCount
|
|
5484
|
+
relatedPost {
|
|
5485
|
+
...RelatedPostFields
|
|
5486
|
+
}
|
|
5441
5487
|
relations {
|
|
5442
5488
|
relationId
|
|
5443
5489
|
relationDates {
|
|
@@ -5447,6 +5493,9 @@ var VENDOR = gql`
|
|
|
5447
5493
|
socialMedia {
|
|
5448
5494
|
...SocialMediaFields
|
|
5449
5495
|
}
|
|
5496
|
+
socialImage {
|
|
5497
|
+
...SocialImageFields
|
|
5498
|
+
}
|
|
5450
5499
|
termsAgreement {
|
|
5451
5500
|
...TermsAgreementFields
|
|
5452
5501
|
}
|
|
@@ -5466,6 +5515,8 @@ var VENDOR = gql`
|
|
|
5466
5515
|
${CONTACT_DETAILS_FIELDS_FRAGMENT}
|
|
5467
5516
|
${TERMS_AGREEMENT_FIELDS_FRAGMENT}
|
|
5468
5517
|
${RELATION_DATES_FRAGMENT}
|
|
5518
|
+
${RELATED_POST_FIELDS_FRAGMENT}
|
|
5519
|
+
${SOCIAL_IMAGE_FIELDS_FRAGMENT}
|
|
5469
5520
|
`;
|
|
5470
5521
|
var VENDOR_ATTRIBUTES_FRAGMENT = gql`
|
|
5471
5522
|
fragment VendorAttributesFields on VendorAttributesType {
|
|
@@ -5924,9 +5975,15 @@ var PARTNER = gql`
|
|
|
5924
5975
|
rating
|
|
5925
5976
|
region
|
|
5926
5977
|
reviewCount
|
|
5978
|
+
relatedPost {
|
|
5979
|
+
...RelatedPostFields
|
|
5980
|
+
}
|
|
5927
5981
|
socialMedia {
|
|
5928
5982
|
...SocialMediaFields
|
|
5929
5983
|
}
|
|
5984
|
+
socialImage {
|
|
5985
|
+
...SocialImageFields
|
|
5986
|
+
}
|
|
5930
5987
|
termsAgreement {
|
|
5931
5988
|
...TermsAgreementFields
|
|
5932
5989
|
}
|
|
@@ -5940,6 +5997,8 @@ var PARTNER = gql`
|
|
|
5940
5997
|
${POSTER_USAGE_FIELDS_FRAGMENT}
|
|
5941
5998
|
${SOCIAL_MEDIA_FIELDS_FRAGMENT}
|
|
5942
5999
|
${CONTACT_DETAILS_FIELDS_FRAGMENT}
|
|
6000
|
+
${RELATED_POST_FIELDS_FRAGMENT}
|
|
6001
|
+
${SOCIAL_IMAGE_FIELDS_FRAGMENT}
|
|
5943
6002
|
`;
|
|
5944
6003
|
var GET_PARTNERS = gql`
|
|
5945
6004
|
query getPartners {
|
|
@@ -7848,6 +7907,38 @@ var locationsSchema = new MongooseSchema6(
|
|
|
7848
7907
|
{ _id: false }
|
|
7849
7908
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
7850
7909
|
);
|
|
7910
|
+
var relatedPostSchema = new MongooseSchema6(
|
|
7911
|
+
{
|
|
7912
|
+
postId: {
|
|
7913
|
+
ref: "Post",
|
|
7914
|
+
required: true,
|
|
7915
|
+
type: import_mongoose6.default.Schema.Types.ObjectId
|
|
7916
|
+
},
|
|
7917
|
+
postType: {
|
|
7918
|
+
enum: Object.values(EnumPostType),
|
|
7919
|
+
required: true,
|
|
7920
|
+
type: String
|
|
7921
|
+
}
|
|
7922
|
+
},
|
|
7923
|
+
{ _id: false }
|
|
7924
|
+
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
7925
|
+
);
|
|
7926
|
+
var socialImageUrlSchema = new MongooseSchema6(
|
|
7927
|
+
{
|
|
7928
|
+
qrCode: { required: true, type: String },
|
|
7929
|
+
url: { required: true, type: String }
|
|
7930
|
+
},
|
|
7931
|
+
{ _id: false }
|
|
7932
|
+
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
7933
|
+
);
|
|
7934
|
+
var socialImageSchema = new MongooseSchema6(
|
|
7935
|
+
{
|
|
7936
|
+
public: { required: true, type: socialImageUrlSchema },
|
|
7937
|
+
relation: { required: false, type: socialImageUrlSchema }
|
|
7938
|
+
},
|
|
7939
|
+
{ _id: false }
|
|
7940
|
+
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
7941
|
+
);
|
|
7851
7942
|
var baseResourceFields = {
|
|
7852
7943
|
active: { default: false, required: true, type: Boolean },
|
|
7853
7944
|
adIds: {
|
|
@@ -7877,7 +7968,9 @@ var baseResourceFields = {
|
|
|
7877
7968
|
promoCodes: { required: false, type: [String] },
|
|
7878
7969
|
rating: { required: false, type: Number },
|
|
7879
7970
|
region: { required: true, type: String },
|
|
7971
|
+
relatedPost: { required: false, type: relatedPostSchema },
|
|
7880
7972
|
reviewCount: { required: false, type: Number },
|
|
7973
|
+
socialImage: { required: false, type: socialImageSchema },
|
|
7881
7974
|
socialMedia: { required: false, type: [SocialMediaTypeSchema] },
|
|
7882
7975
|
termsAgreement: { required: true, type: termsAgreementSchema }
|
|
7883
7976
|
};
|
|
@@ -8854,8 +8947,11 @@ var SchoolModel = import_mongoose24.default.models.School || import_mongoose24.d
|
|
|
8854
8947
|
locationGeoSchema,
|
|
8855
8948
|
locationsSchema,
|
|
8856
8949
|
refundPolicySchema,
|
|
8950
|
+
relatedPostSchema,
|
|
8857
8951
|
relationDatesSchema,
|
|
8858
8952
|
resourceRelationsSchema,
|
|
8953
|
+
socialImageSchema,
|
|
8954
|
+
socialImageUrlSchema,
|
|
8859
8955
|
termsAgreementSchema,
|
|
8860
8956
|
userLicenseSchema
|
|
8861
8957
|
});
|