@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/{chunk-ZKPPP7DX.mjs → chunk-RZ3OQKLX.mjs} +27 -16
- package/dist/chunk-RZ3OQKLX.mjs.map +1 -0
- package/dist/index.cjs +26 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +26 -15
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +26 -15
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +2 -2
- package/dist/mongoose/index.d.ts +2 -2
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +26 -15
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-ZKPPP7DX.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared 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';
|
|
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, PostResource, 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';
|
|
@@ -553,7 +553,7 @@ declare const PostModel: mongoose.Model<PostType, {}, {}, {}, mongoose.Document<
|
|
|
553
553
|
_id: string;
|
|
554
554
|
content: PostContentType[];
|
|
555
555
|
slug: string;
|
|
556
|
-
resource?:
|
|
556
|
+
resource?: PostResource | null;
|
|
557
557
|
createdAt: Date;
|
|
558
558
|
deletedAt: Date | null;
|
|
559
559
|
updatedAt: Date | null;
|
package/dist/mongoose/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared 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';
|
|
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, PostResource, 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';
|
|
@@ -553,7 +553,7 @@ declare const PostModel: mongoose.Model<PostType, {}, {}, {}, mongoose.Document<
|
|
|
553
553
|
_id: string;
|
|
554
554
|
content: PostContentType[];
|
|
555
555
|
slug: string;
|
|
556
|
-
resource?:
|
|
556
|
+
resource?: PostResource | null;
|
|
557
557
|
createdAt: Date;
|
|
558
558
|
deletedAt: Date | null;
|
|
559
559
|
updatedAt: Date | null;
|
package/dist/mongoose/index.mjs
CHANGED
package/dist/service/index.cjs
CHANGED
|
@@ -5838,6 +5838,14 @@ var POST_CONTENT_FIELDS_FRAGMENT = gql`
|
|
|
5838
5838
|
}
|
|
5839
5839
|
${POST_CONTENT_DATA_FIELDS_FRAGMENT}
|
|
5840
5840
|
`;
|
|
5841
|
+
var POST_RESOURCE_FIELDS_FRAGMENT = gql`
|
|
5842
|
+
fragment PostResourceFields on PostResourceType {
|
|
5843
|
+
resourceId
|
|
5844
|
+
resourceSlug
|
|
5845
|
+
resourceRegion
|
|
5846
|
+
resourceType
|
|
5847
|
+
}
|
|
5848
|
+
`;
|
|
5841
5849
|
var POST_FIELDS_FRAGMENT = gql`
|
|
5842
5850
|
fragment PostFields on PostType {
|
|
5843
5851
|
_id
|
|
@@ -5853,10 +5861,7 @@ var POST_FIELDS_FRAGMENT = gql`
|
|
|
5853
5861
|
deletedAt
|
|
5854
5862
|
postType
|
|
5855
5863
|
resource {
|
|
5856
|
-
|
|
5857
|
-
resourceSlug
|
|
5858
|
-
resourceRegion
|
|
5859
|
-
resourceType
|
|
5864
|
+
...PostResourceFields
|
|
5860
5865
|
}
|
|
5861
5866
|
tags
|
|
5862
5867
|
title
|
|
@@ -5865,6 +5870,7 @@ var POST_FIELDS_FRAGMENT = gql`
|
|
|
5865
5870
|
}
|
|
5866
5871
|
${POST_CONTENT_FIELDS_FRAGMENT}
|
|
5867
5872
|
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
5873
|
+
${POST_RESOURCE_FIELDS_FRAGMENT}
|
|
5868
5874
|
`;
|
|
5869
5875
|
var GET_POSTS = gql`
|
|
5870
5876
|
query getPosts {
|
|
@@ -8103,7 +8109,7 @@ var SocialMediaTypeSchema = new MongooseSchema8(
|
|
|
8103
8109
|
);
|
|
8104
8110
|
var ResourceImageTypeSchema = new MongooseSchema8(
|
|
8105
8111
|
{
|
|
8106
|
-
active: { default: true, type: Boolean },
|
|
8112
|
+
active: { default: true, required: true, type: Boolean },
|
|
8107
8113
|
source: { required: false, type: String },
|
|
8108
8114
|
title: { required: false, type: String }
|
|
8109
8115
|
},
|
|
@@ -8921,6 +8927,19 @@ var contentSchema = new MongooseSchema18(
|
|
|
8921
8927
|
},
|
|
8922
8928
|
{ _id: false }
|
|
8923
8929
|
);
|
|
8930
|
+
var resourceSchema = new MongooseSchema18(
|
|
8931
|
+
{
|
|
8932
|
+
resourceId: { required: true, type: String },
|
|
8933
|
+
resourceRegion: { required: true, type: String },
|
|
8934
|
+
resourceSlug: { required: true, type: String },
|
|
8935
|
+
resourceType: {
|
|
8936
|
+
enum: Object.values(EnumResourceType),
|
|
8937
|
+
required: true,
|
|
8938
|
+
type: String
|
|
8939
|
+
}
|
|
8940
|
+
},
|
|
8941
|
+
{ _id: false }
|
|
8942
|
+
);
|
|
8924
8943
|
var schema14 = new MongooseSchema18(
|
|
8925
8944
|
{
|
|
8926
8945
|
active: { default: false, required: true, type: Boolean },
|
|
@@ -8942,15 +8961,7 @@ var schema14 = new MongooseSchema18(
|
|
|
8942
8961
|
},
|
|
8943
8962
|
resource: {
|
|
8944
8963
|
required: false,
|
|
8945
|
-
type:
|
|
8946
|
-
resourceId: { required: true, type: String },
|
|
8947
|
-
resourceRegion: { required: true, type: String },
|
|
8948
|
-
resourceType: {
|
|
8949
|
-
enum: Object.values(EnumResourceType),
|
|
8950
|
-
required: true,
|
|
8951
|
-
type: String
|
|
8952
|
-
}
|
|
8953
|
-
}
|
|
8964
|
+
type: resourceSchema
|
|
8954
8965
|
},
|
|
8955
8966
|
slug: { required: true, type: String },
|
|
8956
8967
|
tags: { default: [], required: false, type: [String] },
|
|
@@ -8960,7 +8971,7 @@ var schema14 = new MongooseSchema18(
|
|
|
8960
8971
|
);
|
|
8961
8972
|
schema14.index({ title: 1 });
|
|
8962
8973
|
schema14.index({ tags: 1 });
|
|
8963
|
-
schema14.index({ postType: 1, slug: 1 });
|
|
8974
|
+
schema14.index({ postType: 1, slug: 1 }, { unique: true });
|
|
8964
8975
|
var PostModel = import_mongoose19.default.models.Post || import_mongoose19.default.model("Post", schema14);
|
|
8965
8976
|
|
|
8966
8977
|
// src/mongoose/AppSetting.ts
|