@timardex/cluemart-server-shared 1.0.256 → 1.0.259

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/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
- import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, GoogleImportedMarket, PushTokenType, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType, GameType, GameDocType, SchoolType, EnumUserLicence, EventListItemType, DateTimeWithPriceType } from '@timardex/cluemart-shared';
2
+ import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, GoogleImportedMarket, PushTokenType, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, EnumUserLicence, EventListItemType, DateTimeWithPriceType } from '@timardex/cluemart-shared';
3
3
  import mongoose from 'mongoose';
4
4
  export { default as mongoose } from 'mongoose';
5
5
  import { NotificationCount, DateTimeType as DateTimeType$1 } from '@timardex/cluemart-shared/types';
@@ -673,7 +673,7 @@ declare const PostModel: mongoose.Model<PostType, {}, {}, {}, mongoose.Document<
673
673
  _id: string;
674
674
  content: PostContentType[];
675
675
  slug: string;
676
- resource?: _timardex_cluemart_shared.PostResource | null;
676
+ resource?: PostResource | null;
677
677
  createdAt: Date;
678
678
  deletedAt: Date | null;
679
679
  updatedAt: Date | null;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
2
- import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, GoogleImportedMarket, PushTokenType, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType, GameType, GameDocType, SchoolType, EnumUserLicence, EventListItemType, DateTimeWithPriceType } from '@timardex/cluemart-shared';
2
+ import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, PosterUsageType, GoogleImportedMarket, PushTokenType, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, EnumUserLicence, EventListItemType, DateTimeWithPriceType } from '@timardex/cluemart-shared';
3
3
  import mongoose from 'mongoose';
4
4
  export { default as mongoose } from 'mongoose';
5
5
  import { NotificationCount, DateTimeType as DateTimeType$1 } from '@timardex/cluemart-shared/types';
@@ -673,7 +673,7 @@ declare const PostModel: mongoose.Model<PostType, {}, {}, {}, mongoose.Document<
673
673
  _id: string;
674
674
  content: PostContentType[];
675
675
  slug: string;
676
- resource?: _timardex_cluemart_shared.PostResource | null;
676
+ resource?: PostResource | null;
677
677
  createdAt: Date;
678
678
  deletedAt: Date | null;
679
679
  updatedAt: Date | null;
package/dist/index.mjs CHANGED
@@ -5767,6 +5767,14 @@ var POST_CONTENT_FIELDS_FRAGMENT = gql`
5767
5767
  }
5768
5768
  ${POST_CONTENT_DATA_FIELDS_FRAGMENT}
5769
5769
  `;
5770
+ var POST_RESOURCE_FIELDS_FRAGMENT = gql`
5771
+ fragment PostResourceFields on PostResourceType {
5772
+ resourceId
5773
+ resourceSlug
5774
+ resourceRegion
5775
+ resourceType
5776
+ }
5777
+ `;
5770
5778
  var POST_FIELDS_FRAGMENT = gql`
5771
5779
  fragment PostFields on PostType {
5772
5780
  _id
@@ -5782,10 +5790,7 @@ var POST_FIELDS_FRAGMENT = gql`
5782
5790
  deletedAt
5783
5791
  postType
5784
5792
  resource {
5785
- resourceId
5786
- resourceSlug
5787
- resourceRegion
5788
- resourceType
5793
+ ...PostResourceFields
5789
5794
  }
5790
5795
  tags
5791
5796
  title
@@ -5794,6 +5799,7 @@ var POST_FIELDS_FRAGMENT = gql`
5794
5799
  }
5795
5800
  ${POST_CONTENT_FIELDS_FRAGMENT}
5796
5801
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5802
+ ${POST_RESOURCE_FIELDS_FRAGMENT}
5797
5803
  `;
5798
5804
  var GET_POSTS = gql`
5799
5805
  query getPosts {
@@ -7833,7 +7839,7 @@ var SocialMediaTypeSchema = new MongooseSchema6(
7833
7839
  );
7834
7840
  var ResourceImageTypeSchema = new MongooseSchema6(
7835
7841
  {
7836
- active: { default: true, type: Boolean },
7842
+ active: { default: true, required: true, type: Boolean },
7837
7843
  source: { required: false, type: String },
7838
7844
  title: { required: false, type: String }
7839
7845
  },
@@ -8715,6 +8721,19 @@ var contentSchema = new MongooseSchema18(
8715
8721
  },
8716
8722
  { _id: false }
8717
8723
  );
8724
+ var resourceSchema = new MongooseSchema18(
8725
+ {
8726
+ resourceId: { required: true, type: String },
8727
+ resourceRegion: { required: true, type: String },
8728
+ resourceSlug: { required: true, type: String },
8729
+ resourceType: {
8730
+ enum: Object.values(EnumResourceType),
8731
+ required: true,
8732
+ type: String
8733
+ }
8734
+ },
8735
+ { _id: false }
8736
+ );
8718
8737
  var schema14 = new MongooseSchema18(
8719
8738
  {
8720
8739
  active: { default: false, required: true, type: Boolean },
@@ -8736,15 +8755,7 @@ var schema14 = new MongooseSchema18(
8736
8755
  },
8737
8756
  resource: {
8738
8757
  required: false,
8739
- type: {
8740
- resourceId: { required: true, type: String },
8741
- resourceRegion: { required: true, type: String },
8742
- resourceType: {
8743
- enum: Object.values(EnumResourceType),
8744
- required: true,
8745
- type: String
8746
- }
8747
- }
8758
+ type: resourceSchema
8748
8759
  },
8749
8760
  slug: { required: true, type: String },
8750
8761
  tags: { default: [], required: false, type: [String] },
@@ -8754,7 +8765,7 @@ var schema14 = new MongooseSchema18(
8754
8765
  );
8755
8766
  schema14.index({ title: 1 });
8756
8767
  schema14.index({ tags: 1 });
8757
- schema14.index({ postType: 1, slug: 1 });
8768
+ schema14.index({ postType: 1, slug: 1 }, { unique: true });
8758
8769
  var PostModel = mongoose18.models.Post || mongoose18.model("Post", schema14);
8759
8770
 
8760
8771
  // src/mongoose/AppSetting.ts