@timardex/cluemart-server-shared 1.0.213 → 1.0.214

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.
@@ -1,5 +1,5 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
- import { AdType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, GoogleImportedMarket, PushTokenType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType, GameType, GameDocType, SchoolType } from '@timardex/cluemart-shared';
2
+ import { AdType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, GoogleImportedMarket, PushTokenType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType, GameType, GameDocType, SchoolType } from '@timardex/cluemart-shared';
3
3
  import mongoose from 'mongoose';
4
4
  import { O as ObjectId } from '../Chat-DYkhie3G.mjs';
5
5
  export { C as ChatModel, N as NotificationModel, a as SchemaChatMessageReactionType, S as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, e as SchemaChatType, f as SchemaCreateBulkNotificationInput, g as SchemaNotificationType, d as SchemaParticipantType } from '../Chat-DYkhie3G.mjs';
@@ -28,6 +28,9 @@ declare const ChatReportModel: mongoose.Model<SchemaChatReportType, {}, {}, {},
28
28
  __v: number;
29
29
  }, any>;
30
30
 
31
+ type SchemaRelatedPostType = Omit<RelatedPostType, "postId"> & {
32
+ postId: ObjectId;
33
+ };
31
34
  type SchemaOwnerType = Omit<OwnerType, "userId"> & {
32
35
  userId: ObjectId;
33
36
  };
@@ -164,6 +167,17 @@ declare const locationsSchema: mongoose.Schema<LocationType, mongoose.Model<Loca
164
167
  } & {
165
168
  __v: number;
166
169
  }>;
170
+ declare const relatedPostSchema: mongoose.Schema<SchemaRelatedPostType, mongoose.Model<SchemaRelatedPostType, any, any, any, mongoose.Document<unknown, any, SchemaRelatedPostType, any, {}> & Omit<RelatedPostType, "postId"> & {
171
+ postId: ObjectId;
172
+ } & {
173
+ _id: mongoose.Types.ObjectId;
174
+ } & {
175
+ __v: number;
176
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, SchemaRelatedPostType, mongoose.Document<unknown, {}, mongoose.FlatRecord<SchemaRelatedPostType>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<SchemaRelatedPostType> & {
177
+ _id: mongoose.Types.ObjectId;
178
+ } & {
179
+ __v: number;
180
+ }>;
167
181
  declare const baseResourceFields: {
168
182
  active: {
169
183
  default: boolean;
@@ -286,6 +300,20 @@ declare const baseResourceFields: {
286
300
  required: boolean;
287
301
  type: StringConstructor;
288
302
  };
303
+ relatedPost: {
304
+ required: boolean;
305
+ type: mongoose.Schema<SchemaRelatedPostType, mongoose.Model<SchemaRelatedPostType, any, any, any, mongoose.Document<unknown, any, SchemaRelatedPostType, any, {}> & Omit<RelatedPostType, "postId"> & {
306
+ postId: ObjectId;
307
+ } & {
308
+ _id: mongoose.Types.ObjectId;
309
+ } & {
310
+ __v: number;
311
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, SchemaRelatedPostType, mongoose.Document<unknown, {}, mongoose.FlatRecord<SchemaRelatedPostType>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<SchemaRelatedPostType> & {
312
+ _id: mongoose.Types.ObjectId;
313
+ } & {
314
+ __v: number;
315
+ }>;
316
+ };
289
317
  reviewCount: {
290
318
  required: boolean;
291
319
  type: NumberConstructor;
@@ -559,4 +587,4 @@ declare const SchoolModel: mongoose.Model<SchoolDocument, {}, {}, {}, mongoose.D
559
587
  __v: number;
560
588
  }, any>;
561
589
 
562
- export { APP_SETTINGS_ID, AdModel, AppSettingModel, CategorySchema, ChatReportModel, ContactDetailsSchema, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, ResourceImageTypeSchema, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, SocialMediaTypeSchema, StallTypeSchema, UnregisteredVendorModel, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, associatesSchema, baseResourceFields, dateTimeSchema, locationGeoSchema, locationsSchema, refundPolicySchema, resourceRelationsSchema, termsAgreementSchema, userLicenseSchema };
590
+ export { APP_SETTINGS_ID, AdModel, AppSettingModel, CategorySchema, ChatReportModel, ContactDetailsSchema, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, ResourceImageTypeSchema, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaRelatedPostType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, SocialMediaTypeSchema, StallTypeSchema, UnregisteredVendorModel, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, associatesSchema, baseResourceFields, dateTimeSchema, locationGeoSchema, locationsSchema, refundPolicySchema, relatedPostSchema, resourceRelationsSchema, termsAgreementSchema, userLicenseSchema };
@@ -1,5 +1,5 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
- import { AdType, ReportChatUser, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, GoogleImportedMarket, PushTokenType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType, GameType, GameDocType, SchoolType } from '@timardex/cluemart-shared';
2
+ import { AdType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, GoogleImportedMarket, PushTokenType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType, GameType, GameDocType, SchoolType } from '@timardex/cluemart-shared';
3
3
  import mongoose from 'mongoose';
4
4
  import { O as ObjectId } from '../Chat-DYkhie3G.js';
5
5
  export { C as ChatModel, N as NotificationModel, a as SchemaChatMessageReactionType, S as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, e as SchemaChatType, f as SchemaCreateBulkNotificationInput, g as SchemaNotificationType, d as SchemaParticipantType } from '../Chat-DYkhie3G.js';
@@ -28,6 +28,9 @@ declare const ChatReportModel: mongoose.Model<SchemaChatReportType, {}, {}, {},
28
28
  __v: number;
29
29
  }, any>;
30
30
 
31
+ type SchemaRelatedPostType = Omit<RelatedPostType, "postId"> & {
32
+ postId: ObjectId;
33
+ };
31
34
  type SchemaOwnerType = Omit<OwnerType, "userId"> & {
32
35
  userId: ObjectId;
33
36
  };
@@ -164,6 +167,17 @@ declare const locationsSchema: mongoose.Schema<LocationType, mongoose.Model<Loca
164
167
  } & {
165
168
  __v: number;
166
169
  }>;
170
+ declare const relatedPostSchema: mongoose.Schema<SchemaRelatedPostType, mongoose.Model<SchemaRelatedPostType, any, any, any, mongoose.Document<unknown, any, SchemaRelatedPostType, any, {}> & Omit<RelatedPostType, "postId"> & {
171
+ postId: ObjectId;
172
+ } & {
173
+ _id: mongoose.Types.ObjectId;
174
+ } & {
175
+ __v: number;
176
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, SchemaRelatedPostType, mongoose.Document<unknown, {}, mongoose.FlatRecord<SchemaRelatedPostType>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<SchemaRelatedPostType> & {
177
+ _id: mongoose.Types.ObjectId;
178
+ } & {
179
+ __v: number;
180
+ }>;
167
181
  declare const baseResourceFields: {
168
182
  active: {
169
183
  default: boolean;
@@ -286,6 +300,20 @@ declare const baseResourceFields: {
286
300
  required: boolean;
287
301
  type: StringConstructor;
288
302
  };
303
+ relatedPost: {
304
+ required: boolean;
305
+ type: mongoose.Schema<SchemaRelatedPostType, mongoose.Model<SchemaRelatedPostType, any, any, any, mongoose.Document<unknown, any, SchemaRelatedPostType, any, {}> & Omit<RelatedPostType, "postId"> & {
306
+ postId: ObjectId;
307
+ } & {
308
+ _id: mongoose.Types.ObjectId;
309
+ } & {
310
+ __v: number;
311
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, SchemaRelatedPostType, mongoose.Document<unknown, {}, mongoose.FlatRecord<SchemaRelatedPostType>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<SchemaRelatedPostType> & {
312
+ _id: mongoose.Types.ObjectId;
313
+ } & {
314
+ __v: number;
315
+ }>;
316
+ };
289
317
  reviewCount: {
290
318
  required: boolean;
291
319
  type: NumberConstructor;
@@ -559,4 +587,4 @@ declare const SchoolModel: mongoose.Model<SchoolDocument, {}, {}, {}, mongoose.D
559
587
  __v: number;
560
588
  }, any>;
561
589
 
562
- export { APP_SETTINGS_ID, AdModel, AppSettingModel, CategorySchema, ChatReportModel, ContactDetailsSchema, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, ResourceImageTypeSchema, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, SocialMediaTypeSchema, StallTypeSchema, UnregisteredVendorModel, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, associatesSchema, baseResourceFields, dateTimeSchema, locationGeoSchema, locationsSchema, refundPolicySchema, resourceRelationsSchema, termsAgreementSchema, userLicenseSchema };
590
+ export { APP_SETTINGS_ID, AdModel, AppSettingModel, CategorySchema, ChatReportModel, ContactDetailsSchema, EventInfoModel, EventModel, GameModel, GoogleImportedMarketModel, OwnerTypeSchema, PartnerModel, PostModel, PushTokenModel, ResourceActivityModel, ResourceImageTypeSchema, type SchemaChatReportType, type SchemaEventInfoType, type SchemaEventType, type SchemaGameType, type SchemaGoogleImportedMarket, type SchemaOwnerType, type SchemaPartnerType, type SchemaPostType, type SchemaPushTokenType, type SchemaRelatedPostType, type SchemaUnregisteredVendorInvitationType, type SchemaUnregisteredVendorType, type SchemaUserActivityEvent, type SchemaUserType, type SchemaVendorInfoType, type SchemaVendorType, SchoolModel, SocialMediaTypeSchema, StallTypeSchema, UnregisteredVendorModel, UserModel, VendorInfoModel, VendorModel, VerificationTokenModel, type VerificationTokenType, associatesSchema, baseResourceFields, dateTimeSchema, locationGeoSchema, locationsSchema, refundPolicySchema, relatedPostSchema, resourceRelationsSchema, termsAgreementSchema, userLicenseSchema };
@@ -33,11 +33,12 @@ import {
33
33
  locationGeoSchema,
34
34
  locationsSchema,
35
35
  refundPolicySchema,
36
+ relatedPostSchema,
36
37
  relationDatesSchema,
37
38
  resourceRelationsSchema,
38
39
  termsAgreementSchema,
39
40
  userLicenseSchema
40
- } from "../chunk-5PTF25RX.mjs";
41
+ } from "../chunk-IFNK65HN.mjs";
41
42
  export {
42
43
  APP_SETTINGS_ID,
43
44
  AdModel,
@@ -73,6 +74,7 @@ export {
73
74
  locationGeoSchema,
74
75
  locationsSchema,
75
76
  refundPolicySchema,
77
+ relatedPostSchema,
76
78
  relationDatesSchema,
77
79
  resourceRelationsSchema,
78
80
  termsAgreementSchema,
@@ -3549,12 +3549,6 @@ var gameScreenIdentifierList = [
3549
3549
  match: "/visitors"
3550
3550
  }
3551
3551
  ];
3552
- var dateFormat = "DD-MM-YYYY";
3553
- var timeFormat = "HH:mm";
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
3552
  var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
3559
3553
  EnumAdShowOn2["EVENTS_PAGE"] = "Events_page";
3560
3554
  EnumAdShowOn2["FRONT_PAGE"] = "Front_page";
@@ -3630,6 +3624,21 @@ var paymentMethodOptions = mapArrayToOptions(
3630
3624
  Object.values(EnumPaymentMethod)
3631
3625
  );
3632
3626
  var CLUEMART_MAIN_DOMAIN_URL = "https://cluemart.co.nz";
3627
+ var dateFormat = "DD-MM-YYYY";
3628
+ var timeFormat = "HH:mm";
3629
+ import_dayjs.default.extend(import_customParseFormat.default);
3630
+ import_dayjs.default.extend(import_utc.default);
3631
+ import_dayjs.default.extend(import_timezone.default);
3632
+ import_dayjs.default.extend(import_isSameOrAfter.default);
3633
+ var futureTimePeriods = mapArrayToOptions(
3634
+ Object.values(EnumEventDateStatus)
3635
+ ).filter(
3636
+ (period) => period.value !== "Starting_Soon" && period.value !== "Canceled" && period.value !== "Rescheduled" && period.value !== "Started" && period.value !== "Ended" && period.value !== "Invalid"
3637
+ /* INVALID */
3638
+ ).map((period) => ({
3639
+ label: period.value.replaceAll("_", " "),
3640
+ value: period.value
3641
+ }));
3633
3642
  var packagingTypes = [
3634
3643
  "Biodegradable",
3635
3644
  "Compostable",
@@ -5164,6 +5173,12 @@ var EVENT_LIST_ITEM = gql`
5164
5173
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5165
5174
  ${RELATION_DATES_FRAGMENT}
5166
5175
  `;
5176
+ var RELATED_POST_FIELDS_FRAGMENT = gql`
5177
+ fragment RelatedPostFields on RelatedPostType {
5178
+ postId
5179
+ postType
5180
+ }
5181
+ `;
5167
5182
  var EVENT_INFO = gql`
5168
5183
  fragment EventInfoFields on EventInfoType {
5169
5184
  _id
@@ -5253,6 +5268,9 @@ var EVENT = gql`
5253
5268
  rating
5254
5269
  reviewCount
5255
5270
  rainOrShine
5271
+ relatedPost {
5272
+ ...RelatedPostFields
5273
+ }
5256
5274
  socialMedia {
5257
5275
  ...SocialMediaFields
5258
5276
  }
@@ -5272,6 +5290,7 @@ var EVENT = gql`
5272
5290
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
5273
5291
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
5274
5292
  ${RELATION_DATES_FRAGMENT}
5293
+ ${RELATED_POST_FIELDS_FRAGMENT}
5275
5294
  `;
5276
5295
  var GET_EVENTS = gql`
5277
5296
  query getEvents($dateStatus: EventDateStatusEnumType) {
@@ -5438,6 +5457,9 @@ var VENDOR = gql`
5438
5457
  rating
5439
5458
  region
5440
5459
  reviewCount
5460
+ relatedPost {
5461
+ ...RelatedPostFields
5462
+ }
5441
5463
  relations {
5442
5464
  relationId
5443
5465
  relationDates {
@@ -5466,6 +5488,7 @@ var VENDOR = gql`
5466
5488
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
5467
5489
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
5468
5490
  ${RELATION_DATES_FRAGMENT}
5491
+ ${RELATED_POST_FIELDS_FRAGMENT}
5469
5492
  `;
5470
5493
  var VENDOR_ATTRIBUTES_FRAGMENT = gql`
5471
5494
  fragment VendorAttributesFields on VendorAttributesType {
@@ -5924,6 +5947,9 @@ var PARTNER = gql`
5924
5947
  rating
5925
5948
  region
5926
5949
  reviewCount
5950
+ relatedPost {
5951
+ ...RelatedPostFields
5952
+ }
5927
5953
  socialMedia {
5928
5954
  ...SocialMediaFields
5929
5955
  }
@@ -5940,6 +5966,7 @@ var PARTNER = gql`
5940
5966
  ${POSTER_USAGE_FIELDS_FRAGMENT}
5941
5967
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
5942
5968
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
5969
+ ${RELATED_POST_FIELDS_FRAGMENT}
5943
5970
  `;
5944
5971
  var GET_PARTNERS = gql`
5945
5972
  query getPartners {
@@ -8047,6 +8074,22 @@ var locationsSchema = new MongooseSchema8(
8047
8074
  { _id: false }
8048
8075
  // Prevents Mongoose from creating an additional _id field for subdocuments
8049
8076
  );
8077
+ var relatedPostSchema = new MongooseSchema8(
8078
+ {
8079
+ postId: {
8080
+ ref: "Post",
8081
+ required: true,
8082
+ type: import_mongoose9.default.Schema.Types.ObjectId
8083
+ },
8084
+ postType: {
8085
+ enum: Object.values(EnumPostType),
8086
+ required: true,
8087
+ type: String
8088
+ }
8089
+ },
8090
+ { _id: false }
8091
+ // Prevents Mongoose from creating an additional _id field for subdocuments
8092
+ );
8050
8093
  var baseResourceFields = {
8051
8094
  active: { default: false, required: true, type: Boolean },
8052
8095
  adIds: {
@@ -8076,6 +8119,7 @@ var baseResourceFields = {
8076
8119
  promoCodes: { required: false, type: [String] },
8077
8120
  rating: { required: false, type: Number },
8078
8121
  region: { required: true, type: String },
8122
+ relatedPost: { required: false, type: relatedPostSchema },
8079
8123
  reviewCount: { required: false, type: Number },
8080
8124
  socialMedia: { required: false, type: [SocialMediaTypeSchema] },
8081
8125
  termsAgreement: { required: true, type: termsAgreementSchema }