@timardex/cluemart-shared 1.0.81 → 1.0.83
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/{notification-BVKetNZq.d.mts → contactUs-CQ9xTjlE.d.mts} +1 -38
- package/dist/{notification-BVKetNZq.d.ts → contactUs-CQ9xTjlE.d.ts} +1 -38
- package/dist/graphql/index.cjs +313 -242
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +48 -16
- package/dist/graphql/index.d.ts +48 -16
- package/dist/graphql/index.mjs +289 -124
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.cjs +0 -202
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +2 -25
- package/dist/hooks/index.d.ts +2 -25
- package/dist/hooks/index.mjs +0 -104
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +325 -338
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +68 -56
- package/dist/index.d.ts +68 -56
- package/dist/index.mjs +300 -314
- package/dist/index.mjs.map +1 -1
- package/dist/notification-Dy46qobo.d.mts +66 -0
- package/dist/notification-Dy46qobo.d.ts +66 -0
- package/dist/types/index.cjs +21 -0
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.mjs +14 -0
- package/dist/types/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/chat-BUVCf9Tu.d.mts +0 -27
- package/dist/chat-BUVCf9Tu.d.ts +0 -27
- package/dist/chunk-SCXVJDGI.mjs +0 -114
- package/dist/chunk-SCXVJDGI.mjs.map +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
interface ChatInput {
|
|
2
|
+
name: string;
|
|
3
|
+
participants: string[];
|
|
4
|
+
}
|
|
5
|
+
interface ChatMessageInput {
|
|
6
|
+
content: string;
|
|
7
|
+
senderId: string;
|
|
8
|
+
senderName: string;
|
|
9
|
+
}
|
|
10
|
+
interface ChatMessageType {
|
|
11
|
+
_id?: string;
|
|
12
|
+
content: string;
|
|
13
|
+
createdAt?: string;
|
|
14
|
+
senderId: string;
|
|
15
|
+
senderName: string;
|
|
16
|
+
updatedAt?: string;
|
|
17
|
+
}
|
|
18
|
+
interface ChatType {
|
|
19
|
+
_id: string;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
messages: ChatMessageType[];
|
|
22
|
+
name: string;
|
|
23
|
+
participants: string[];
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare enum EnumNotificationType {
|
|
28
|
+
MARKET = "market",
|
|
29
|
+
STALLHOLDER = "stallholder",
|
|
30
|
+
RELATION = "relation",
|
|
31
|
+
CHAT = "chat",
|
|
32
|
+
SYSTEM = "system"
|
|
33
|
+
}
|
|
34
|
+
type NotificationType = {
|
|
35
|
+
id: string;
|
|
36
|
+
userId: string;
|
|
37
|
+
title: string;
|
|
38
|
+
message: string;
|
|
39
|
+
type: EnumNotificationType;
|
|
40
|
+
isRead: boolean;
|
|
41
|
+
data?: Record<string, unknown>;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
updatedAt: string;
|
|
44
|
+
};
|
|
45
|
+
type NotificationCount = {
|
|
46
|
+
total: number;
|
|
47
|
+
unread: number;
|
|
48
|
+
};
|
|
49
|
+
type CreateNotificationInput = {
|
|
50
|
+
userId: string;
|
|
51
|
+
title: string;
|
|
52
|
+
message: string;
|
|
53
|
+
type?: EnumNotificationType;
|
|
54
|
+
data?: Record<string, unknown>;
|
|
55
|
+
};
|
|
56
|
+
type CreateBulkNotificationInput = Omit<CreateNotificationInput, "userId"> & {
|
|
57
|
+
userIds: string[];
|
|
58
|
+
};
|
|
59
|
+
type MarkNotificationReadInput = {
|
|
60
|
+
notificationIds: string[];
|
|
61
|
+
};
|
|
62
|
+
type MarkAllNotificationsReadInput = {
|
|
63
|
+
userId: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export { type ChatType as C, EnumNotificationType as E, type MarkNotificationReadInput as M, type NotificationType as N, type NotificationCount as a, type ChatInput as b, type ChatMessageInput as c, type ChatMessageType as d, type CreateNotificationInput as e, type CreateBulkNotificationInput as f, type MarkAllNotificationsReadInput as g };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
interface ChatInput {
|
|
2
|
+
name: string;
|
|
3
|
+
participants: string[];
|
|
4
|
+
}
|
|
5
|
+
interface ChatMessageInput {
|
|
6
|
+
content: string;
|
|
7
|
+
senderId: string;
|
|
8
|
+
senderName: string;
|
|
9
|
+
}
|
|
10
|
+
interface ChatMessageType {
|
|
11
|
+
_id?: string;
|
|
12
|
+
content: string;
|
|
13
|
+
createdAt?: string;
|
|
14
|
+
senderId: string;
|
|
15
|
+
senderName: string;
|
|
16
|
+
updatedAt?: string;
|
|
17
|
+
}
|
|
18
|
+
interface ChatType {
|
|
19
|
+
_id: string;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
messages: ChatMessageType[];
|
|
22
|
+
name: string;
|
|
23
|
+
participants: string[];
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare enum EnumNotificationType {
|
|
28
|
+
MARKET = "market",
|
|
29
|
+
STALLHOLDER = "stallholder",
|
|
30
|
+
RELATION = "relation",
|
|
31
|
+
CHAT = "chat",
|
|
32
|
+
SYSTEM = "system"
|
|
33
|
+
}
|
|
34
|
+
type NotificationType = {
|
|
35
|
+
id: string;
|
|
36
|
+
userId: string;
|
|
37
|
+
title: string;
|
|
38
|
+
message: string;
|
|
39
|
+
type: EnumNotificationType;
|
|
40
|
+
isRead: boolean;
|
|
41
|
+
data?: Record<string, unknown>;
|
|
42
|
+
createdAt: string;
|
|
43
|
+
updatedAt: string;
|
|
44
|
+
};
|
|
45
|
+
type NotificationCount = {
|
|
46
|
+
total: number;
|
|
47
|
+
unread: number;
|
|
48
|
+
};
|
|
49
|
+
type CreateNotificationInput = {
|
|
50
|
+
userId: string;
|
|
51
|
+
title: string;
|
|
52
|
+
message: string;
|
|
53
|
+
type?: EnumNotificationType;
|
|
54
|
+
data?: Record<string, unknown>;
|
|
55
|
+
};
|
|
56
|
+
type CreateBulkNotificationInput = Omit<CreateNotificationInput, "userId"> & {
|
|
57
|
+
userIds: string[];
|
|
58
|
+
};
|
|
59
|
+
type MarkNotificationReadInput = {
|
|
60
|
+
notificationIds: string[];
|
|
61
|
+
};
|
|
62
|
+
type MarkAllNotificationsReadInput = {
|
|
63
|
+
userId: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export { type ChatType as C, EnumNotificationType as E, type MarkNotificationReadInput as M, type NotificationType as N, type NotificationCount as a, type ChatInput as b, type ChatMessageInput as c, type ChatMessageType as d, type CreateNotificationInput as e, type CreateBulkNotificationInput as f, type MarkAllNotificationsReadInput as g };
|
package/dist/types/index.cjs
CHANGED
|
@@ -3,6 +3,10 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
6
10
|
var __copyProps = (to, from, except, desc) => {
|
|
7
11
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
12
|
for (let key of __getOwnPropNames(from))
|
|
@@ -15,5 +19,22 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
15
19
|
|
|
16
20
|
// src/types/index.ts
|
|
17
21
|
var types_exports = {};
|
|
22
|
+
__export(types_exports, {
|
|
23
|
+
EnumNotificationType: () => EnumNotificationType
|
|
24
|
+
});
|
|
18
25
|
module.exports = __toCommonJS(types_exports);
|
|
26
|
+
|
|
27
|
+
// src/types/notification.ts
|
|
28
|
+
var EnumNotificationType = ((EnumNotificationType2) => {
|
|
29
|
+
EnumNotificationType2[EnumNotificationType2["MARKET"] = "market" /* MARKET */] = "MARKET";
|
|
30
|
+
EnumNotificationType2[EnumNotificationType2["STALLHOLDER"] = "stallholder" /* STALLHOLDER */] = "STALLHOLDER";
|
|
31
|
+
EnumNotificationType2["RELATION"] = "relation";
|
|
32
|
+
EnumNotificationType2["CHAT"] = "chat";
|
|
33
|
+
EnumNotificationType2["SYSTEM"] = "system";
|
|
34
|
+
return EnumNotificationType2;
|
|
35
|
+
})(EnumNotificationType || {});
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
EnumNotificationType
|
|
39
|
+
});
|
|
19
40
|
//# sourceMappingURL=index.cjs.map
|
package/dist/types/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export * from \"./admin\";\nexport * from \"./auth\";\nexport * from \"./chat\";\nexport * from \"./contactUs\";\nexport * from \"./global\";\nexport * from \"./market\";\nexport * from \"./notification\";\nexport * from \"./poster\";\nexport * from \"./relation\";\nexport * from \"./stallholder\";\nexport * from \"./testers\";\nexport * from \"./user\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts","../../src/types/notification.ts"],"sourcesContent":["export * from \"./admin\";\nexport * from \"./auth\";\nexport * from \"./chat\";\nexport * from \"./contactUs\";\nexport * from \"./global\";\nexport * from \"./market\";\nexport * from \"./notification\";\nexport * from \"./poster\";\nexport * from \"./relation\";\nexport * from \"./stallholder\";\nexport * from \"./testers\";\nexport * from \"./user\";\n","import { EnumResourceType } from \"src/enums\";\n\nexport enum EnumNotificationType {\n MARKET = EnumResourceType.MARKET,\n STALLHOLDER = EnumResourceType.STALLHOLDER,\n RELATION = \"relation\",\n CHAT = \"chat\",\n SYSTEM = \"system\",\n}\n\nexport type NotificationType = {\n id: string;\n userId: string;\n title: string;\n message: string;\n type: EnumNotificationType;\n isRead: boolean;\n data?: Record<string, unknown>;\n createdAt: string;\n updatedAt: string;\n};\n\nexport type NotificationCount = {\n total: number;\n unread: number;\n};\n\nexport type CreateNotificationInput = {\n userId: string;\n title: string;\n message: string;\n type?: EnumNotificationType;\n data?: Record<string, unknown>;\n};\n\nexport type CreateBulkNotificationInput = Omit<\n CreateNotificationInput,\n \"userId\"\n> & {\n userIds: string[];\n};\n\nexport type MarkNotificationReadInput = {\n notificationIds: string[];\n};\n\nexport type MarkAllNotificationsReadInput = {\n userId: string;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,IAAK,wBAAL,CAAKA,0BAAL;AACL,EAAAA,4CAAA;AACA,EAAAA,4CAAA;AACA,EAAAA,sBAAA,cAAW;AACX,EAAAA,sBAAA,UAAO;AACP,EAAAA,sBAAA,YAAS;AALC,SAAAA;AAAA,GAAA;","names":["EnumNotificationType"]}
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EnumResourceType } from '../enums/index.mjs';
|
|
2
|
-
export { e as ContactUsFormData,
|
|
3
|
-
export {
|
|
2
|
+
export { e as ContactUsFormData, f as CreateContactUsFormData, C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, d as CreateResetPasswordFormData, c as CreateValidateVerificationTokenFormData, L as LoginFormData, R as RegisterFormData, g as RequestPasswordResetFormData, h as ResetPasswordFormData, V as ValidateVerificationTokenFormData } from '../contactUs-CQ9xTjlE.mjs';
|
|
3
|
+
export { b as ChatInput, c as ChatMessageInput, d as ChatMessageType, C as ChatType, f as CreateBulkNotificationInput, e as CreateNotificationInput, E as EnumNotificationType, g as MarkAllNotificationsReadInput, M as MarkNotificationReadInput, a as NotificationCount, N as NotificationType } from '../notification-Dy46qobo.mjs';
|
|
4
4
|
export { s as BaseResourceType, B as BaseResourceTypeFormData, C as Category, l as CreateMarketFormData, n as CreateMarketInfoFormData, h as CreateStallholderFormData, j as CreateStallholderInfoFormData, p as CreateUserFormData, D as DateTimeType, x as DateTimeWithPriceType, a as FormDateField, F as FormField, G as GeocodeLocation, I as ImageObjectType, L as LocationType, u as MapMultiLocation, k as MarketFormData, m as MarketInfoFormData, b as MarketInfoType, M as MarketType, y as MarketWithConnectionDatesType, N as Nullable, O as OptionItem, P as PaymentInfoType, t as Region, z as RelationDate, c as RelationType, R as Requirement, d as ResourceConnectionsType, q as ResourceImageType, H as SatllholderWithConnectionDatesType, r as SocialMediaType, S as StallType, E as StallholderAttributes, g as StallholderFormData, i as StallholderInfoFormData, f as StallholderInfoType, A as StallholderLocation, e as StallholderType, w as Subcategory, v as SubcategoryItems, o as UserFormData, U as UserType } from '../global-Bieh1fh8.mjs';
|
|
5
5
|
export { C as CreateTestersFormData, T as TesterType, a as TestersFormData } from '../testers-74J9OA2P.mjs';
|
|
6
6
|
import 'react-hook-form';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EnumResourceType } from '../enums/index.js';
|
|
2
|
-
export { e as ContactUsFormData,
|
|
3
|
-
export {
|
|
2
|
+
export { e as ContactUsFormData, f as CreateContactUsFormData, C as CreateLoginFormData, a as CreateRegisterFormData, b as CreateRequestPasswordResetFormData, d as CreateResetPasswordFormData, c as CreateValidateVerificationTokenFormData, L as LoginFormData, R as RegisterFormData, g as RequestPasswordResetFormData, h as ResetPasswordFormData, V as ValidateVerificationTokenFormData } from '../contactUs-CQ9xTjlE.js';
|
|
3
|
+
export { b as ChatInput, c as ChatMessageInput, d as ChatMessageType, C as ChatType, f as CreateBulkNotificationInput, e as CreateNotificationInput, E as EnumNotificationType, g as MarkAllNotificationsReadInput, M as MarkNotificationReadInput, a as NotificationCount, N as NotificationType } from '../notification-Dy46qobo.js';
|
|
4
4
|
export { s as BaseResourceType, B as BaseResourceTypeFormData, C as Category, l as CreateMarketFormData, n as CreateMarketInfoFormData, h as CreateStallholderFormData, j as CreateStallholderInfoFormData, p as CreateUserFormData, D as DateTimeType, x as DateTimeWithPriceType, a as FormDateField, F as FormField, G as GeocodeLocation, I as ImageObjectType, L as LocationType, u as MapMultiLocation, k as MarketFormData, m as MarketInfoFormData, b as MarketInfoType, M as MarketType, y as MarketWithConnectionDatesType, N as Nullable, O as OptionItem, P as PaymentInfoType, t as Region, z as RelationDate, c as RelationType, R as Requirement, d as ResourceConnectionsType, q as ResourceImageType, H as SatllholderWithConnectionDatesType, r as SocialMediaType, S as StallType, E as StallholderAttributes, g as StallholderFormData, i as StallholderInfoFormData, f as StallholderInfoType, A as StallholderLocation, e as StallholderType, w as Subcategory, v as SubcategoryItems, o as UserFormData, U as UserType } from '../global-By7aHQ1y.js';
|
|
5
5
|
export { C as CreateTestersFormData, T as TesterType, a as TestersFormData } from '../testers-CqYqJvlZ.js';
|
|
6
6
|
import 'react-hook-form';
|
package/dist/types/index.mjs
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
+
import "../chunk-3LHMZDI4.mjs";
|
|
2
|
+
|
|
3
|
+
// src/types/notification.ts
|
|
4
|
+
var EnumNotificationType = ((EnumNotificationType2) => {
|
|
5
|
+
EnumNotificationType2[EnumNotificationType2["MARKET"] = "market" /* MARKET */] = "MARKET";
|
|
6
|
+
EnumNotificationType2[EnumNotificationType2["STALLHOLDER"] = "stallholder" /* STALLHOLDER */] = "STALLHOLDER";
|
|
7
|
+
EnumNotificationType2["RELATION"] = "relation";
|
|
8
|
+
EnumNotificationType2["CHAT"] = "chat";
|
|
9
|
+
EnumNotificationType2["SYSTEM"] = "system";
|
|
10
|
+
return EnumNotificationType2;
|
|
11
|
+
})(EnumNotificationType || {});
|
|
12
|
+
export {
|
|
13
|
+
EnumNotificationType
|
|
14
|
+
};
|
|
1
15
|
//# sourceMappingURL=index.mjs.map
|
package/dist/types/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/notification.ts"],"sourcesContent":["import { EnumResourceType } from \"src/enums\";\n\nexport enum EnumNotificationType {\n MARKET = EnumResourceType.MARKET,\n STALLHOLDER = EnumResourceType.STALLHOLDER,\n RELATION = \"relation\",\n CHAT = \"chat\",\n SYSTEM = \"system\",\n}\n\nexport type NotificationType = {\n id: string;\n userId: string;\n title: string;\n message: string;\n type: EnumNotificationType;\n isRead: boolean;\n data?: Record<string, unknown>;\n createdAt: string;\n updatedAt: string;\n};\n\nexport type NotificationCount = {\n total: number;\n unread: number;\n};\n\nexport type CreateNotificationInput = {\n userId: string;\n title: string;\n message: string;\n type?: EnumNotificationType;\n data?: Record<string, unknown>;\n};\n\nexport type CreateBulkNotificationInput = Omit<\n CreateNotificationInput,\n \"userId\"\n> & {\n userIds: string[];\n};\n\nexport type MarkNotificationReadInput = {\n notificationIds: string[];\n};\n\nexport type MarkAllNotificationsReadInput = {\n userId: string;\n};\n"],"mappings":";;;AAEO,IAAK,wBAAL,CAAKA,0BAAL;AACL,EAAAA,4CAAA;AACA,EAAAA,4CAAA;AACA,EAAAA,sBAAA,cAAW;AACX,EAAAA,sBAAA,UAAO;AACP,EAAAA,sBAAA,YAAS;AALC,SAAAA;AAAA,GAAA;","names":["EnumNotificationType"]}
|
package/package.json
CHANGED
package/dist/chat-BUVCf9Tu.d.mts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
interface ChatInput {
|
|
2
|
-
name: string;
|
|
3
|
-
participants: string[];
|
|
4
|
-
}
|
|
5
|
-
interface ChatMessageInput {
|
|
6
|
-
content: string;
|
|
7
|
-
senderId: string;
|
|
8
|
-
senderName: string;
|
|
9
|
-
}
|
|
10
|
-
interface ChatMessageType {
|
|
11
|
-
_id?: string;
|
|
12
|
-
content: string;
|
|
13
|
-
createdAt?: string;
|
|
14
|
-
senderId: string;
|
|
15
|
-
senderName: string;
|
|
16
|
-
updatedAt?: string;
|
|
17
|
-
}
|
|
18
|
-
interface ChatType {
|
|
19
|
-
_id: string;
|
|
20
|
-
createdAt: string;
|
|
21
|
-
messages: ChatMessageType[];
|
|
22
|
-
name: string;
|
|
23
|
-
participants: string[];
|
|
24
|
-
updatedAt: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type { ChatType as C, ChatInput as a, ChatMessageInput as b, ChatMessageType as c };
|
package/dist/chat-BUVCf9Tu.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
interface ChatInput {
|
|
2
|
-
name: string;
|
|
3
|
-
participants: string[];
|
|
4
|
-
}
|
|
5
|
-
interface ChatMessageInput {
|
|
6
|
-
content: string;
|
|
7
|
-
senderId: string;
|
|
8
|
-
senderName: string;
|
|
9
|
-
}
|
|
10
|
-
interface ChatMessageType {
|
|
11
|
-
_id?: string;
|
|
12
|
-
content: string;
|
|
13
|
-
createdAt?: string;
|
|
14
|
-
senderId: string;
|
|
15
|
-
senderName: string;
|
|
16
|
-
updatedAt?: string;
|
|
17
|
-
}
|
|
18
|
-
interface ChatType {
|
|
19
|
-
_id: string;
|
|
20
|
-
createdAt: string;
|
|
21
|
-
messages: ChatMessageType[];
|
|
22
|
-
name: string;
|
|
23
|
-
participants: string[];
|
|
24
|
-
updatedAt: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type { ChatType as C, ChatInput as a, ChatMessageInput as b, ChatMessageType as c };
|
package/dist/chunk-SCXVJDGI.mjs
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
// src/graphql/queries/notificationQueries.ts
|
|
2
|
-
import { gql } from "@apollo/client";
|
|
3
|
-
var GET_USER_NOTIFICATIONS = gql`
|
|
4
|
-
query GetUserNotifications(
|
|
5
|
-
$userId: String!
|
|
6
|
-
$limit: Int
|
|
7
|
-
$offset: Int
|
|
8
|
-
$isRead: String
|
|
9
|
-
) {
|
|
10
|
-
userNotifications(
|
|
11
|
-
userId: $userId
|
|
12
|
-
limit: $limit
|
|
13
|
-
offset: $offset
|
|
14
|
-
isRead: $isRead
|
|
15
|
-
) {
|
|
16
|
-
id
|
|
17
|
-
userId
|
|
18
|
-
title
|
|
19
|
-
message
|
|
20
|
-
type
|
|
21
|
-
isRead
|
|
22
|
-
data
|
|
23
|
-
createdAt
|
|
24
|
-
updatedAt
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
var GET_NOTIFICATION_COUNT = gql`
|
|
29
|
-
query GetNotificationCount($userId: String!) {
|
|
30
|
-
notificationCount(userId: $userId) {
|
|
31
|
-
total
|
|
32
|
-
unread
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
36
|
-
var GET_UNREAD_NOTIFICATIONS = gql`
|
|
37
|
-
query GetUnreadNotifications($userId: String!, $limit: Int) {
|
|
38
|
-
unreadNotifications(userId: $userId, limit: $limit) {
|
|
39
|
-
id
|
|
40
|
-
userId
|
|
41
|
-
title
|
|
42
|
-
message
|
|
43
|
-
type
|
|
44
|
-
isRead
|
|
45
|
-
data
|
|
46
|
-
createdAt
|
|
47
|
-
updatedAt
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
`;
|
|
51
|
-
|
|
52
|
-
// src/graphql/mutations/notificationMutations.ts
|
|
53
|
-
import { gql as gql2 } from "@apollo/client";
|
|
54
|
-
var CREATE_NOTIFICATION = gql2`
|
|
55
|
-
mutation CreateNotification($input: CreateNotificationInput!) {
|
|
56
|
-
createNotification(input: $input) {
|
|
57
|
-
id
|
|
58
|
-
userId
|
|
59
|
-
title
|
|
60
|
-
message
|
|
61
|
-
type
|
|
62
|
-
isRead
|
|
63
|
-
data
|
|
64
|
-
createdAt
|
|
65
|
-
updatedAt
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
`;
|
|
69
|
-
var CREATE_BULK_NOTIFICATIONS = gql2`
|
|
70
|
-
mutation CreateBulkNotifications($input: CreateBulkNotificationInput!) {
|
|
71
|
-
createBulkNotifications(input: $input) {
|
|
72
|
-
id
|
|
73
|
-
userId
|
|
74
|
-
title
|
|
75
|
-
message
|
|
76
|
-
type
|
|
77
|
-
isRead
|
|
78
|
-
data
|
|
79
|
-
createdAt
|
|
80
|
-
updatedAt
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
`;
|
|
84
|
-
var MARK_NOTIFICATION_READ = gql2`
|
|
85
|
-
mutation MarkNotificationRead($input: MarkNotificationReadInput!) {
|
|
86
|
-
markNotificationRead(input: $input) {
|
|
87
|
-
id
|
|
88
|
-
userId
|
|
89
|
-
title
|
|
90
|
-
message
|
|
91
|
-
type
|
|
92
|
-
isRead
|
|
93
|
-
data
|
|
94
|
-
createdAt
|
|
95
|
-
updatedAt
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
`;
|
|
99
|
-
var MARK_ALL_NOTIFICATIONS_READ = gql2`
|
|
100
|
-
mutation MarkAllNotificationsRead($input: MarkAllNotificationsReadInput!) {
|
|
101
|
-
markAllNotificationsRead(input: $input)
|
|
102
|
-
}
|
|
103
|
-
`;
|
|
104
|
-
|
|
105
|
-
export {
|
|
106
|
-
GET_USER_NOTIFICATIONS,
|
|
107
|
-
GET_NOTIFICATION_COUNT,
|
|
108
|
-
GET_UNREAD_NOTIFICATIONS,
|
|
109
|
-
CREATE_NOTIFICATION,
|
|
110
|
-
CREATE_BULK_NOTIFICATIONS,
|
|
111
|
-
MARK_NOTIFICATION_READ,
|
|
112
|
-
MARK_ALL_NOTIFICATIONS_READ
|
|
113
|
-
};
|
|
114
|
-
//# sourceMappingURL=chunk-SCXVJDGI.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graphql/queries/notificationQueries.ts","../src/graphql/mutations/notificationMutations.ts"],"sourcesContent":["import { gql } from \"@apollo/client\";\n\nexport const GET_USER_NOTIFICATIONS = gql`\n query GetUserNotifications(\n $userId: String!\n $limit: Int\n $offset: Int\n $isRead: String\n ) {\n userNotifications(\n userId: $userId\n limit: $limit\n offset: $offset\n isRead: $isRead\n ) {\n id\n userId\n title\n message\n type\n isRead\n data\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const GET_NOTIFICATION_COUNT = gql`\n query GetNotificationCount($userId: String!) {\n notificationCount(userId: $userId) {\n total\n unread\n }\n }\n`;\n\nexport const GET_UNREAD_NOTIFICATIONS = gql`\n query GetUnreadNotifications($userId: String!, $limit: Int) {\n unreadNotifications(userId: $userId, limit: $limit) {\n id\n userId\n title\n message\n type\n isRead\n data\n createdAt\n updatedAt\n }\n }\n`;\n","import { gql } from \"@apollo/client\";\n\nexport const CREATE_NOTIFICATION = gql`\n mutation CreateNotification($input: CreateNotificationInput!) {\n createNotification(input: $input) {\n id\n userId\n title\n message\n type\n isRead\n data\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const CREATE_BULK_NOTIFICATIONS = gql`\n mutation CreateBulkNotifications($input: CreateBulkNotificationInput!) {\n createBulkNotifications(input: $input) {\n id\n userId\n title\n message\n type\n isRead\n data\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const MARK_NOTIFICATION_READ = gql`\n mutation MarkNotificationRead($input: MarkNotificationReadInput!) {\n markNotificationRead(input: $input) {\n id\n userId\n title\n message\n type\n isRead\n data\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const MARK_ALL_NOTIFICATIONS_READ = gql`\n mutation MarkAllNotificationsRead($input: MarkAllNotificationsReadInput!) {\n markAllNotificationsRead(input: $input)\n }\n`;\n"],"mappings":";AAAA,SAAS,WAAW;AAEb,IAAM,yBAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0B/B,IAAM,yBAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS/B,IAAM,2BAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACrCxC,SAAS,OAAAA,YAAW;AAEb,IAAM,sBAAsBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgB5B,IAAM,4BAA4BA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBlC,IAAM,yBAAyBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgB/B,IAAM,8BAA8BA;AAAA;AAAA;AAAA;AAAA;","names":["gql"]}
|