@timardex/cluemart-shared 1.1.4 → 1.1.7
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/graphql/index.cjs +38 -5
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +1 -1
- package/dist/graphql/index.d.ts +1 -1
- package/dist/graphql/index.mjs +38 -5
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/index.cjs +38 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +38 -5
- package/dist/index.mjs.map +1 -1
- package/dist/{notification-Dq_zOeXk.d.mts → notification-BH5_z_Wh.d.mts} +1 -1
- package/dist/{notification-BXTu-Oww.d.ts → notification-CqoTwwqU.d.ts} +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -468,12 +468,12 @@ type ParticipantType = Omit<OwnerType, "licences"> & {
|
|
|
468
468
|
interface ChatMessageInput {
|
|
469
469
|
content: string;
|
|
470
470
|
senderId: string;
|
|
471
|
-
senderName: string;
|
|
472
471
|
}
|
|
473
472
|
interface ChatMessageType {
|
|
474
473
|
_id?: string;
|
|
475
474
|
content: string;
|
|
476
475
|
createdAt?: string;
|
|
476
|
+
senderAvatar: string | null;
|
|
477
477
|
senderId: string;
|
|
478
478
|
senderName: string;
|
|
479
479
|
updatedAt?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -468,12 +468,12 @@ type ParticipantType = Omit<OwnerType, "licences"> & {
|
|
|
468
468
|
interface ChatMessageInput {
|
|
469
469
|
content: string;
|
|
470
470
|
senderId: string;
|
|
471
|
-
senderName: string;
|
|
472
471
|
}
|
|
473
472
|
interface ChatMessageType {
|
|
474
473
|
_id?: string;
|
|
475
474
|
content: string;
|
|
476
475
|
createdAt?: string;
|
|
476
|
+
senderAvatar: string | null;
|
|
477
477
|
senderId: string;
|
|
478
478
|
senderName: string;
|
|
479
479
|
updatedAt?: string;
|
package/dist/index.mjs
CHANGED
|
@@ -2314,6 +2314,7 @@ var CHAT_MESSAGE_FIELDS_FRAGMENT = gql6`
|
|
|
2314
2314
|
_id
|
|
2315
2315
|
content
|
|
2316
2316
|
createdAt
|
|
2317
|
+
senderAvatar
|
|
2317
2318
|
senderId
|
|
2318
2319
|
senderName
|
|
2319
2320
|
updatedAt
|
|
@@ -2378,7 +2379,7 @@ var DELETE_CHAT_MUTATION = gql7`
|
|
|
2378
2379
|
`;
|
|
2379
2380
|
var ADD_PARTICIPANT_TO_CHAT_MUTATION = gql7`
|
|
2380
2381
|
mutation addParticipantToChat($chatId: ID!, $userId: ID!) {
|
|
2381
|
-
addParticipantToChat(
|
|
2382
|
+
addParticipantToChat(chatId: $chatId, userId: $userId) {
|
|
2382
2383
|
...ChatFields
|
|
2383
2384
|
}
|
|
2384
2385
|
}
|
|
@@ -2386,7 +2387,7 @@ var ADD_PARTICIPANT_TO_CHAT_MUTATION = gql7`
|
|
|
2386
2387
|
`;
|
|
2387
2388
|
var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = gql7`
|
|
2388
2389
|
mutation removeParticipantFromChat($chatId: ID!, $userId: ID!) {
|
|
2389
|
-
removeParticipantFromChat(
|
|
2390
|
+
removeParticipantFromChat(chatId: $chatId, userId: $userId) {
|
|
2390
2391
|
...ChatFields
|
|
2391
2392
|
}
|
|
2392
2393
|
}
|
|
@@ -2430,6 +2431,9 @@ var useAddParticipantToChat = () => {
|
|
|
2430
2431
|
{
|
|
2431
2432
|
query: CHAT,
|
|
2432
2433
|
variables: { _id: chatId }
|
|
2434
|
+
},
|
|
2435
|
+
{
|
|
2436
|
+
query: USER_CHATS
|
|
2433
2437
|
}
|
|
2434
2438
|
];
|
|
2435
2439
|
}
|
|
@@ -2448,6 +2452,9 @@ var useRemoveParticipantFromChat = () => {
|
|
|
2448
2452
|
{
|
|
2449
2453
|
query: CHAT,
|
|
2450
2454
|
variables: { _id: chatId }
|
|
2455
|
+
},
|
|
2456
|
+
{
|
|
2457
|
+
query: USER_CHATS
|
|
2451
2458
|
}
|
|
2452
2459
|
];
|
|
2453
2460
|
}
|
|
@@ -2809,18 +2816,44 @@ var useCreateBulkNotifications = () => {
|
|
|
2809
2816
|
};
|
|
2810
2817
|
var useMarkNotificationRead = () => {
|
|
2811
2818
|
const [markNotificationRead, { loading, error }] = useMutation6(
|
|
2812
|
-
MARK_NOTIFICATION_READ
|
|
2819
|
+
MARK_NOTIFICATION_READ,
|
|
2820
|
+
{
|
|
2821
|
+
awaitRefetchQueries: true,
|
|
2822
|
+
fetchPolicy: "no-cache",
|
|
2823
|
+
refetchQueries: [
|
|
2824
|
+
{ query: GET_USER_NOTIFICATIONS },
|
|
2825
|
+
{ query: GET_NOTIFICATION_COUNT }
|
|
2826
|
+
]
|
|
2827
|
+
}
|
|
2813
2828
|
);
|
|
2814
2829
|
return { error, loading, markNotificationRead };
|
|
2815
2830
|
};
|
|
2816
2831
|
var useMarkAllNotificationsRead = () => {
|
|
2817
2832
|
const [markAllNotificationsRead, { loading, error }] = useMutation6(
|
|
2818
|
-
MARK_ALL_NOTIFICATIONS_READ
|
|
2833
|
+
MARK_ALL_NOTIFICATIONS_READ,
|
|
2834
|
+
{
|
|
2835
|
+
awaitRefetchQueries: true,
|
|
2836
|
+
fetchPolicy: "no-cache",
|
|
2837
|
+
refetchQueries: [
|
|
2838
|
+
{ query: GET_USER_NOTIFICATIONS },
|
|
2839
|
+
{ query: GET_NOTIFICATION_COUNT }
|
|
2840
|
+
]
|
|
2841
|
+
}
|
|
2819
2842
|
);
|
|
2820
2843
|
return { error, loading, markAllNotificationsRead };
|
|
2821
2844
|
};
|
|
2822
2845
|
var useDeleteNotification = () => {
|
|
2823
|
-
const [deleteNotification, { loading, error }] = useMutation6(
|
|
2846
|
+
const [deleteNotification, { loading, error }] = useMutation6(
|
|
2847
|
+
DELETE_NOTIFICATION,
|
|
2848
|
+
{
|
|
2849
|
+
awaitRefetchQueries: true,
|
|
2850
|
+
fetchPolicy: "no-cache",
|
|
2851
|
+
refetchQueries: [
|
|
2852
|
+
{ query: GET_USER_NOTIFICATIONS },
|
|
2853
|
+
{ query: GET_NOTIFICATION_COUNT }
|
|
2854
|
+
]
|
|
2855
|
+
}
|
|
2856
|
+
);
|
|
2824
2857
|
return { deleteNotification, error, loading };
|
|
2825
2858
|
};
|
|
2826
2859
|
|