@timardex/cluemart-server-shared 1.0.77 → 1.0.78
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/{Chat-Cc3rfu3L.d.mts → Chat-DjrJ0LKo.d.mts} +17 -2
- package/dist/{Chat-Cc3rfu3L.d.ts → Chat-DjrJ0LKo.d.ts} +17 -2
- package/dist/{chunk-YWPI5EO2.mjs → chunk-TPZF5OZA.mjs} +90 -2
- package/dist/chunk-TPZF5OZA.mjs.map +1 -0
- package/dist/index.cjs +89 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.mjs +89 -1
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +89 -1
- 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 +89 -1
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +1 -1
- package/dist/service/index.d.ts +1 -1
- package/dist/service/index.mjs +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
- package/dist/chunk-YWPI5EO2.mjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
2
|
import { AdType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, TermsAgreement, RelationDate, DateTimeType, LocationType, ResourceContactDetailsType, PosterUsageType, GoogleImportedMarket, RelationType, ResourceActivityType, TesterType, UserActivityEvent, UserType, VendorType, VendorInfoType, EventType, StallType, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType } from '@timardex/cluemart-shared';
|
|
3
3
|
import mongoose from 'mongoose';
|
|
4
|
-
import { O as ObjectId } from '../Chat-
|
|
5
|
-
export { C as ChatModel, N as NotificationModel, P as ParticipantSchema, S as
|
|
4
|
+
import { O as ObjectId } from '../Chat-DjrJ0LKo.mjs';
|
|
5
|
+
export { C as ChatModel, N as NotificationModel, P as ParticipantSchema, 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-DjrJ0LKo.mjs';
|
|
6
6
|
import { EnumOSPlatform } from '@timardex/cluemart-shared/enums';
|
|
7
7
|
import '@timardex/cluemart-shared/types';
|
|
8
8
|
import 'express';
|
package/dist/mongoose/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
2
|
import { AdType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, AssociateType, TermsAgreement, RelationDate, DateTimeType, LocationType, ResourceContactDetailsType, PosterUsageType, GoogleImportedMarket, RelationType, ResourceActivityType, TesterType, UserActivityEvent, UserType, VendorType, VendorInfoType, EventType, StallType, EventInfoType, PartnerType, PostType, PostContentType, AppSettingsType } from '@timardex/cluemart-shared';
|
|
3
3
|
import mongoose from 'mongoose';
|
|
4
|
-
import { O as ObjectId } from '../Chat-
|
|
5
|
-
export { C as ChatModel, N as NotificationModel, P as ParticipantSchema, S as
|
|
4
|
+
import { O as ObjectId } from '../Chat-DjrJ0LKo.js';
|
|
5
|
+
export { C as ChatModel, N as NotificationModel, P as ParticipantSchema, 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-DjrJ0LKo.js';
|
|
6
6
|
import { EnumOSPlatform } from '@timardex/cluemart-shared/enums';
|
|
7
7
|
import '@timardex/cluemart-shared/types';
|
|
8
8
|
import 'express';
|
package/dist/mongoose/index.mjs
CHANGED
package/dist/service/index.cjs
CHANGED
|
@@ -6890,13 +6890,25 @@ var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource22) => {
|
|
|
6890
6890
|
})(EnumRelationResource || {});
|
|
6891
6891
|
var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceType22) => {
|
|
6892
6892
|
EnumNotificationResourceType22["ADDED_AS_ASSOCIATE_EVENT"] = "added_as_associate_event";
|
|
6893
|
+
EnumNotificationResourceType22["ADDED_AS_ASSOCIATE_PARTNER"] = "added_as_associate_partner";
|
|
6893
6894
|
EnumNotificationResourceType22["ADDED_AS_ASSOCIATE_VENDOR"] = "added_as_associate_vendor";
|
|
6894
6895
|
EnumNotificationResourceType22["APPROVED_EVENT"] = "approved_event";
|
|
6896
|
+
EnumNotificationResourceType22["APPROVED_PARTNER"] = "approved_partner";
|
|
6895
6897
|
EnumNotificationResourceType22["APPROVED_VENDOR"] = "approved_vendor";
|
|
6896
6898
|
EnumNotificationResourceType22["CREATED_EVENT"] = "created_event";
|
|
6899
|
+
EnumNotificationResourceType22["CREATED_PARTNER"] = "created_partner";
|
|
6897
6900
|
EnumNotificationResourceType22["CREATED_VENDOR"] = "created_vendor";
|
|
6901
|
+
EnumNotificationResourceType22["DEACTIVATED_EVENT"] = "deactivated_event";
|
|
6902
|
+
EnumNotificationResourceType22["DEACTIVATED_PARTNER"] = "deactivated_partner";
|
|
6903
|
+
EnumNotificationResourceType22["DEACTIVATED_VENDOR"] = "deactivated_vendor";
|
|
6904
|
+
EnumNotificationResourceType22["DECLINED_EVENT"] = "declined_event";
|
|
6905
|
+
EnumNotificationResourceType22["DECLINED_PARTNER"] = "declined_partner";
|
|
6906
|
+
EnumNotificationResourceType22["DECLINED_VENDOR"] = "declined_vendor";
|
|
6898
6907
|
EnumNotificationResourceType22["EVENT_INVITE_VENDOR"] = "event_invite_vendor";
|
|
6899
6908
|
EnumNotificationResourceType22["EVENT_STARTING_SOON"] = "event_starting_soon";
|
|
6909
|
+
EnumNotificationResourceType22["EXPIRATION_REMINDER_EVENT"] = "expiration_reminder_event";
|
|
6910
|
+
EnumNotificationResourceType22["EXPIRATION_REMINDER_PARTNER"] = "expiration_reminder_partner";
|
|
6911
|
+
EnumNotificationResourceType22["EXPIRATION_REMINDER_VENDOR"] = "expiration_reminder_vendor";
|
|
6900
6912
|
EnumNotificationResourceType22["NEW_CHAT_MESSAGE"] = "new_chat_message";
|
|
6901
6913
|
EnumNotificationResourceType22["SYSTEM_ALERT"] = "system_alert";
|
|
6902
6914
|
EnumNotificationResourceType22["VENDOR_APPLICATION_TO_EVENT"] = "vendor_application_to_event";
|
|
@@ -8419,6 +8431,7 @@ var USER_FIELDS_FRAGMENT = gql`
|
|
|
8419
8431
|
licences {
|
|
8420
8432
|
...LicenceFields
|
|
8421
8433
|
}
|
|
8434
|
+
partner
|
|
8422
8435
|
platform
|
|
8423
8436
|
preferredRegion
|
|
8424
8437
|
refreshToken
|
|
@@ -9105,7 +9118,21 @@ var CHAT_MESSAGE_FIELDS_FRAGMENT = gql`
|
|
|
9105
9118
|
_id
|
|
9106
9119
|
content
|
|
9107
9120
|
createdAt
|
|
9121
|
+
replyToMessageId
|
|
9122
|
+
replyPreview {
|
|
9123
|
+
senderId
|
|
9124
|
+
senderName
|
|
9125
|
+
contentPreview
|
|
9126
|
+
}
|
|
9127
|
+
likedBy {
|
|
9128
|
+
userId
|
|
9129
|
+
createdAt
|
|
9130
|
+
}
|
|
9108
9131
|
senderId
|
|
9132
|
+
seenBy {
|
|
9133
|
+
userId
|
|
9134
|
+
seenAt
|
|
9135
|
+
}
|
|
9109
9136
|
updatedAt
|
|
9110
9137
|
}
|
|
9111
9138
|
`;
|
|
@@ -9179,6 +9206,22 @@ var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = gql`
|
|
|
9179
9206
|
removeParticipantFromChat(chatId: $chatId, userId: $userId)
|
|
9180
9207
|
}
|
|
9181
9208
|
`;
|
|
9209
|
+
var TOGGLE_CHAT_MESSAGE_LIKE_MUTATION = gql`
|
|
9210
|
+
mutation toggleChatMessageLike($chatId: ID!, $messageId: ID!) {
|
|
9211
|
+
toggleChatMessageLike(chatId: $chatId, messageId: $messageId) {
|
|
9212
|
+
...ChatFields
|
|
9213
|
+
}
|
|
9214
|
+
}
|
|
9215
|
+
${CHAT_FIELDS_FRAGMENT}
|
|
9216
|
+
`;
|
|
9217
|
+
var MARK_CHAT_MESSAGES_SEEN_MUTATION = gql`
|
|
9218
|
+
mutation markChatMessagesSeen($chatId: ID!, $messageIds: [ID!]!) {
|
|
9219
|
+
markChatMessagesSeen(chatId: $chatId, messageIds: $messageIds) {
|
|
9220
|
+
...ChatFields
|
|
9221
|
+
}
|
|
9222
|
+
}
|
|
9223
|
+
${CHAT_FIELDS_FRAGMENT}
|
|
9224
|
+
`;
|
|
9182
9225
|
var GET_CHAT_MESSAGE = gql`
|
|
9183
9226
|
subscription {
|
|
9184
9227
|
getChatMessage {
|
|
@@ -10888,7 +10931,7 @@ async function saveNotificationsInDb(payload) {
|
|
|
10888
10931
|
// src/service/sendPushNotifications.ts
|
|
10889
10932
|
var import_expo_server_sdk = require("expo-server-sdk");
|
|
10890
10933
|
|
|
10891
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
10934
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-R5HMLIJS.mjs
|
|
10892
10935
|
var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
|
|
10893
10936
|
EnumOSPlatform22["ANDROID"] = "android";
|
|
10894
10937
|
EnumOSPlatform22["IOS"] = "ios";
|
|
@@ -11455,9 +11498,54 @@ var AdModel = import_mongoose7.default.models.Ad || import_mongoose7.default.mod
|
|
|
11455
11498
|
// src/mongoose/Chat.ts
|
|
11456
11499
|
var import_mongoose8 = __toESM(require("mongoose"));
|
|
11457
11500
|
var MongooseSchema7 = import_mongoose8.default.Schema;
|
|
11501
|
+
var MessageReplyPreviewSchema = new MongooseSchema7(
|
|
11502
|
+
{
|
|
11503
|
+
contentPreview: { required: true, type: String },
|
|
11504
|
+
senderId: {
|
|
11505
|
+
ref: "User",
|
|
11506
|
+
required: true,
|
|
11507
|
+
type: import_mongoose8.default.Schema.Types.ObjectId
|
|
11508
|
+
},
|
|
11509
|
+
senderName: { required: true, type: String }
|
|
11510
|
+
},
|
|
11511
|
+
{ _id: false }
|
|
11512
|
+
);
|
|
11513
|
+
var MessageReactionSchema = new MongooseSchema7(
|
|
11514
|
+
{
|
|
11515
|
+
createdAt: { required: true, type: Date },
|
|
11516
|
+
userId: {
|
|
11517
|
+
ref: "User",
|
|
11518
|
+
required: true,
|
|
11519
|
+
type: import_mongoose8.default.Schema.Types.ObjectId
|
|
11520
|
+
}
|
|
11521
|
+
},
|
|
11522
|
+
{ _id: false }
|
|
11523
|
+
);
|
|
11524
|
+
var MessageSeenSchema = new MongooseSchema7(
|
|
11525
|
+
{
|
|
11526
|
+
seenAt: { required: true, type: Date },
|
|
11527
|
+
userId: {
|
|
11528
|
+
ref: "User",
|
|
11529
|
+
required: true,
|
|
11530
|
+
type: import_mongoose8.default.Schema.Types.ObjectId
|
|
11531
|
+
}
|
|
11532
|
+
},
|
|
11533
|
+
{ _id: false }
|
|
11534
|
+
);
|
|
11458
11535
|
var MessageSchema = new MongooseSchema7(
|
|
11459
11536
|
{
|
|
11460
11537
|
content: { required: true, type: String },
|
|
11538
|
+
likedBy: { default: [], required: false, type: [MessageReactionSchema] },
|
|
11539
|
+
replyPreview: {
|
|
11540
|
+
required: false,
|
|
11541
|
+
type: MessageReplyPreviewSchema
|
|
11542
|
+
},
|
|
11543
|
+
replyToMessageId: {
|
|
11544
|
+
ref: "Chat.messages",
|
|
11545
|
+
required: false,
|
|
11546
|
+
type: import_mongoose8.default.Schema.Types.ObjectId
|
|
11547
|
+
},
|
|
11548
|
+
seenBy: { default: [], required: false, type: [MessageSeenSchema] },
|
|
11461
11549
|
senderId: {
|
|
11462
11550
|
ref: "User",
|
|
11463
11551
|
required: true,
|