@timardex/cluemart-server-shared 1.1.38 → 2.0.0
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/{Affiliate-CZKOOaz_.d.ts → Affiliate-CMJdECzs.d.mts} +43 -30
- package/dist/{Affiliate-xCVhO2Cy.d.mts → Affiliate-VLZdlt5K.d.ts} +43 -30
- package/dist/chunk-3QS3WKRC.mjs +31 -0
- package/dist/chunk-3QS3WKRC.mjs.map +1 -0
- package/dist/{chunk-DJHOLZ3J.mjs → chunk-EGUFWI7R.mjs} +2336 -417
- package/dist/chunk-EGUFWI7R.mjs.map +1 -0
- package/dist/{Chat-Wn7yfc3v.d.mts → index-Bq-lT7a2.d.mts} +35 -35
- package/dist/{Chat-Wn7yfc3v.d.ts → index-Bq-lT7a2.d.ts} +35 -35
- package/dist/index.cjs +2379 -424
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +159 -84
- package/dist/index.d.ts +159 -84
- package/dist/index.mjs +2394 -421
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +2341 -421
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +69 -9
- package/dist/mongoose/index.d.ts +69 -9
- package/dist/mongoose/index.mjs +10 -1
- package/dist/service/index.cjs +2320 -431
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.d.mts +12 -10
- package/dist/service/index.d.ts +12 -10
- package/dist/service/index.mjs +52 -16
- package/dist/service/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -0
- package/package.json +2 -2
- package/dist/chunk-DJHOLZ3J.mjs.map +0 -1
|
@@ -1,7 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import mongoose__default from 'mongoose';
|
|
1
|
+
import { ChatType, ParticipantType, ChatMessageType, NotificationType, CreateBulkNotificationInput, EnumUserRole } from '@timardex/cluemart-shared';
|
|
3
2
|
import { NotificationCount } from '@timardex/cluemart-shared/types';
|
|
4
3
|
import express from 'express';
|
|
4
|
+
import mongoose__default from 'mongoose';
|
|
5
|
+
|
|
6
|
+
type SchemaChatMessageReplyPreviewType = Omit<NonNullable<ChatMessageType["replyPreview"]>, "senderId"> & {
|
|
7
|
+
senderId: ObjectId;
|
|
8
|
+
};
|
|
9
|
+
type SchemaChatMessageReactionType = Omit<NonNullable<ChatMessageType["likedBy"]>[number], "userId"> & {
|
|
10
|
+
userId: ObjectId;
|
|
11
|
+
};
|
|
12
|
+
type SchemaChatMessageSeenType = Omit<NonNullable<ChatMessageType["seenBy"]>[number], "userId"> & {
|
|
13
|
+
userId: ObjectId;
|
|
14
|
+
};
|
|
15
|
+
type SchemaChatMessageType = Omit<ChatMessageType, "senderId" | "replyToMessageId" | "replyPreview" | "likedBy" | "seenBy"> & {
|
|
16
|
+
senderId: ObjectId;
|
|
17
|
+
replyToMessageId?: ObjectId | null;
|
|
18
|
+
replyPreview?: SchemaChatMessageReplyPreviewType | null;
|
|
19
|
+
likedBy?: SchemaChatMessageReactionType[];
|
|
20
|
+
seenBy?: SchemaChatMessageSeenType[];
|
|
21
|
+
};
|
|
22
|
+
type SchemaParticipantType = Omit<ParticipantType, "userId"> & {
|
|
23
|
+
userId: ObjectId;
|
|
24
|
+
};
|
|
25
|
+
type SchemaChatType = Omit<ChatType, "participants" | "messages"> & {
|
|
26
|
+
participants: SchemaParticipantType[];
|
|
27
|
+
messages: SchemaChatMessageType[];
|
|
28
|
+
};
|
|
29
|
+
declare const ChatModel: mongoose__default.Model<SchemaChatType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaChatType, {}, {}> & Omit<ChatType, "participants" | "messages"> & {
|
|
30
|
+
participants: SchemaParticipantType[];
|
|
31
|
+
messages: SchemaChatMessageType[];
|
|
32
|
+
} & Required<{
|
|
33
|
+
_id: string;
|
|
34
|
+
}> & {
|
|
35
|
+
__v: number;
|
|
36
|
+
}, any>;
|
|
5
37
|
|
|
6
38
|
type SchemaCreateBulkNotificationInput = Omit<CreateBulkNotificationInput, "userIds"> & {
|
|
7
39
|
userIds: ObjectId[];
|
|
@@ -49,36 +81,4 @@ interface GraphQLContext {
|
|
|
49
81
|
response: express.Response;
|
|
50
82
|
}
|
|
51
83
|
|
|
52
|
-
type SchemaChatMessageReplyPreviewType
|
|
53
|
-
senderId: ObjectId;
|
|
54
|
-
};
|
|
55
|
-
type SchemaChatMessageReactionType = Omit<NonNullable<ChatMessageType["likedBy"]>[number], "userId"> & {
|
|
56
|
-
userId: ObjectId;
|
|
57
|
-
};
|
|
58
|
-
type SchemaChatMessageSeenType = Omit<NonNullable<ChatMessageType["seenBy"]>[number], "userId"> & {
|
|
59
|
-
userId: ObjectId;
|
|
60
|
-
};
|
|
61
|
-
type SchemaChatMessageType = Omit<ChatMessageType, "senderId" | "replyToMessageId" | "replyPreview" | "likedBy" | "seenBy"> & {
|
|
62
|
-
senderId: ObjectId;
|
|
63
|
-
replyToMessageId?: ObjectId | null;
|
|
64
|
-
replyPreview?: SchemaChatMessageReplyPreviewType | null;
|
|
65
|
-
likedBy?: SchemaChatMessageReactionType[];
|
|
66
|
-
seenBy?: SchemaChatMessageSeenType[];
|
|
67
|
-
};
|
|
68
|
-
type SchemaParticipantType = Omit<ParticipantType, "userId"> & {
|
|
69
|
-
userId: ObjectId;
|
|
70
|
-
};
|
|
71
|
-
type SchemaChatType = Omit<ChatType, "participants" | "messages"> & {
|
|
72
|
-
participants: SchemaParticipantType[];
|
|
73
|
-
messages: SchemaChatMessageType[];
|
|
74
|
-
};
|
|
75
|
-
declare const ChatModel: mongoose__default.Model<SchemaChatType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaChatType, {}, {}> & Omit<ChatType, "participants" | "messages"> & {
|
|
76
|
-
participants: SchemaParticipantType[];
|
|
77
|
-
messages: SchemaChatMessageType[];
|
|
78
|
-
} & Required<{
|
|
79
|
-
_id: string;
|
|
80
|
-
}> & {
|
|
81
|
-
__v: number;
|
|
82
|
-
}, any>;
|
|
83
|
-
|
|
84
|
-
export { type AuthUser as A, ChatModel as C, EnumPubSubEvents as E, type GraphQLContext as G, NotificationModel as N, type ObjectId as O, type SchemaChatMessageReplyPreviewType as S, type SchemaChatMessageReactionType as a, type SchemaChatMessageSeenType as b, type SchemaChatMessageType as c, type SchemaParticipantType as d, type SchemaChatType as e, type SchemaCreateBulkNotificationInput as f, type SchemaNotificationType as g, type SubscriptionPayload as h };
|
|
84
|
+
export { type AuthUser as A, ChatModel as C, EnumPubSubEvents as E, type GraphQLContext as G, NotificationModel as N, type ObjectId as O, type SchemaChatMessageReactionType as S, type SchemaChatMessageReplyPreviewType as a, type SchemaChatMessageSeenType as b, type SchemaChatMessageType as c, type SchemaChatType as d, type SchemaCreateBulkNotificationInput as e, type SchemaNotificationType as f, type SchemaParticipantType as g, type SubscriptionPayload as h };
|
|
@@ -1,7 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import mongoose__default from 'mongoose';
|
|
1
|
+
import { ChatType, ParticipantType, ChatMessageType, NotificationType, CreateBulkNotificationInput, EnumUserRole } from '@timardex/cluemart-shared';
|
|
3
2
|
import { NotificationCount } from '@timardex/cluemart-shared/types';
|
|
4
3
|
import express from 'express';
|
|
4
|
+
import mongoose__default from 'mongoose';
|
|
5
|
+
|
|
6
|
+
type SchemaChatMessageReplyPreviewType = Omit<NonNullable<ChatMessageType["replyPreview"]>, "senderId"> & {
|
|
7
|
+
senderId: ObjectId;
|
|
8
|
+
};
|
|
9
|
+
type SchemaChatMessageReactionType = Omit<NonNullable<ChatMessageType["likedBy"]>[number], "userId"> & {
|
|
10
|
+
userId: ObjectId;
|
|
11
|
+
};
|
|
12
|
+
type SchemaChatMessageSeenType = Omit<NonNullable<ChatMessageType["seenBy"]>[number], "userId"> & {
|
|
13
|
+
userId: ObjectId;
|
|
14
|
+
};
|
|
15
|
+
type SchemaChatMessageType = Omit<ChatMessageType, "senderId" | "replyToMessageId" | "replyPreview" | "likedBy" | "seenBy"> & {
|
|
16
|
+
senderId: ObjectId;
|
|
17
|
+
replyToMessageId?: ObjectId | null;
|
|
18
|
+
replyPreview?: SchemaChatMessageReplyPreviewType | null;
|
|
19
|
+
likedBy?: SchemaChatMessageReactionType[];
|
|
20
|
+
seenBy?: SchemaChatMessageSeenType[];
|
|
21
|
+
};
|
|
22
|
+
type SchemaParticipantType = Omit<ParticipantType, "userId"> & {
|
|
23
|
+
userId: ObjectId;
|
|
24
|
+
};
|
|
25
|
+
type SchemaChatType = Omit<ChatType, "participants" | "messages"> & {
|
|
26
|
+
participants: SchemaParticipantType[];
|
|
27
|
+
messages: SchemaChatMessageType[];
|
|
28
|
+
};
|
|
29
|
+
declare const ChatModel: mongoose__default.Model<SchemaChatType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaChatType, {}, {}> & Omit<ChatType, "participants" | "messages"> & {
|
|
30
|
+
participants: SchemaParticipantType[];
|
|
31
|
+
messages: SchemaChatMessageType[];
|
|
32
|
+
} & Required<{
|
|
33
|
+
_id: string;
|
|
34
|
+
}> & {
|
|
35
|
+
__v: number;
|
|
36
|
+
}, any>;
|
|
5
37
|
|
|
6
38
|
type SchemaCreateBulkNotificationInput = Omit<CreateBulkNotificationInput, "userIds"> & {
|
|
7
39
|
userIds: ObjectId[];
|
|
@@ -49,36 +81,4 @@ interface GraphQLContext {
|
|
|
49
81
|
response: express.Response;
|
|
50
82
|
}
|
|
51
83
|
|
|
52
|
-
type SchemaChatMessageReplyPreviewType
|
|
53
|
-
senderId: ObjectId;
|
|
54
|
-
};
|
|
55
|
-
type SchemaChatMessageReactionType = Omit<NonNullable<ChatMessageType["likedBy"]>[number], "userId"> & {
|
|
56
|
-
userId: ObjectId;
|
|
57
|
-
};
|
|
58
|
-
type SchemaChatMessageSeenType = Omit<NonNullable<ChatMessageType["seenBy"]>[number], "userId"> & {
|
|
59
|
-
userId: ObjectId;
|
|
60
|
-
};
|
|
61
|
-
type SchemaChatMessageType = Omit<ChatMessageType, "senderId" | "replyToMessageId" | "replyPreview" | "likedBy" | "seenBy"> & {
|
|
62
|
-
senderId: ObjectId;
|
|
63
|
-
replyToMessageId?: ObjectId | null;
|
|
64
|
-
replyPreview?: SchemaChatMessageReplyPreviewType | null;
|
|
65
|
-
likedBy?: SchemaChatMessageReactionType[];
|
|
66
|
-
seenBy?: SchemaChatMessageSeenType[];
|
|
67
|
-
};
|
|
68
|
-
type SchemaParticipantType = Omit<ParticipantType, "userId"> & {
|
|
69
|
-
userId: ObjectId;
|
|
70
|
-
};
|
|
71
|
-
type SchemaChatType = Omit<ChatType, "participants" | "messages"> & {
|
|
72
|
-
participants: SchemaParticipantType[];
|
|
73
|
-
messages: SchemaChatMessageType[];
|
|
74
|
-
};
|
|
75
|
-
declare const ChatModel: mongoose__default.Model<SchemaChatType, {}, {}, {}, mongoose__default.Document<unknown, {}, SchemaChatType, {}, {}> & Omit<ChatType, "participants" | "messages"> & {
|
|
76
|
-
participants: SchemaParticipantType[];
|
|
77
|
-
messages: SchemaChatMessageType[];
|
|
78
|
-
} & Required<{
|
|
79
|
-
_id: string;
|
|
80
|
-
}> & {
|
|
81
|
-
__v: number;
|
|
82
|
-
}, any>;
|
|
83
|
-
|
|
84
|
-
export { type AuthUser as A, ChatModel as C, EnumPubSubEvents as E, type GraphQLContext as G, NotificationModel as N, type ObjectId as O, type SchemaChatMessageReplyPreviewType as S, type SchemaChatMessageReactionType as a, type SchemaChatMessageSeenType as b, type SchemaChatMessageType as c, type SchemaParticipantType as d, type SchemaChatType as e, type SchemaCreateBulkNotificationInput as f, type SchemaNotificationType as g, type SubscriptionPayload as h };
|
|
84
|
+
export { type AuthUser as A, ChatModel as C, EnumPubSubEvents as E, type GraphQLContext as G, NotificationModel as N, type ObjectId as O, type SchemaChatMessageReactionType as S, type SchemaChatMessageReplyPreviewType as a, type SchemaChatMessageSeenType as b, type SchemaChatMessageType as c, type SchemaChatType as d, type SchemaCreateBulkNotificationInput as e, type SchemaNotificationType as f, type SchemaParticipantType as g, type SubscriptionPayload as h };
|