@timardex/cluemart-shared 1.0.81 → 1.0.82
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 +282 -171
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +29 -9
- package/dist/graphql/index.d.ts +29 -9
- package/dist/graphql/index.mjs +279 -69
- 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 +280 -265
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +28 -30
- package/dist/index.d.ts +28 -30
- package/dist/index.mjs +216 -196
- package/dist/index.mjs.map +1 -1
- package/dist/notification-P3Vnadx_.d.mts +64 -0
- package/dist/notification-P3Vnadx_.d.ts +64 -0
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- 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,64 @@
|
|
|
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
|
+
type NotificationTypeMap = "market" | "stallholder" | "relation" | "chat" | "system";
|
|
28
|
+
interface NotificationType {
|
|
29
|
+
id: string;
|
|
30
|
+
userId: string;
|
|
31
|
+
title: string;
|
|
32
|
+
message: string;
|
|
33
|
+
type: NotificationTypeMap;
|
|
34
|
+
isRead: boolean;
|
|
35
|
+
data?: Record<string, unknown>;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
}
|
|
39
|
+
interface NotificationCount {
|
|
40
|
+
total: number;
|
|
41
|
+
unread: number;
|
|
42
|
+
}
|
|
43
|
+
interface CreateNotificationInput {
|
|
44
|
+
userId: string;
|
|
45
|
+
title: string;
|
|
46
|
+
message: string;
|
|
47
|
+
type?: NotificationTypeMap;
|
|
48
|
+
data?: Record<string, unknown>;
|
|
49
|
+
}
|
|
50
|
+
interface CreateBulkNotificationInput {
|
|
51
|
+
userIds: string[];
|
|
52
|
+
title: string;
|
|
53
|
+
message: string;
|
|
54
|
+
type?: NotificationTypeMap;
|
|
55
|
+
data?: Record<string, unknown>;
|
|
56
|
+
}
|
|
57
|
+
interface MarkNotificationReadInput {
|
|
58
|
+
notificationIds: string[];
|
|
59
|
+
}
|
|
60
|
+
interface MarkAllNotificationsReadInput {
|
|
61
|
+
userId: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type { ChatType as C, MarkNotificationReadInput as M, NotificationTypeMap as N, CreateNotificationInput as a, CreateBulkNotificationInput as b, MarkAllNotificationsReadInput as c, ChatInput as d, ChatMessageInput as e, ChatMessageType as f, NotificationType as g, NotificationCount as h };
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
type NotificationTypeMap = "market" | "stallholder" | "relation" | "chat" | "system";
|
|
28
|
+
interface NotificationType {
|
|
29
|
+
id: string;
|
|
30
|
+
userId: string;
|
|
31
|
+
title: string;
|
|
32
|
+
message: string;
|
|
33
|
+
type: NotificationTypeMap;
|
|
34
|
+
isRead: boolean;
|
|
35
|
+
data?: Record<string, unknown>;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
updatedAt: string;
|
|
38
|
+
}
|
|
39
|
+
interface NotificationCount {
|
|
40
|
+
total: number;
|
|
41
|
+
unread: number;
|
|
42
|
+
}
|
|
43
|
+
interface CreateNotificationInput {
|
|
44
|
+
userId: string;
|
|
45
|
+
title: string;
|
|
46
|
+
message: string;
|
|
47
|
+
type?: NotificationTypeMap;
|
|
48
|
+
data?: Record<string, unknown>;
|
|
49
|
+
}
|
|
50
|
+
interface CreateBulkNotificationInput {
|
|
51
|
+
userIds: string[];
|
|
52
|
+
title: string;
|
|
53
|
+
message: string;
|
|
54
|
+
type?: NotificationTypeMap;
|
|
55
|
+
data?: Record<string, unknown>;
|
|
56
|
+
}
|
|
57
|
+
interface MarkNotificationReadInput {
|
|
58
|
+
notificationIds: string[];
|
|
59
|
+
}
|
|
60
|
+
interface MarkAllNotificationsReadInput {
|
|
61
|
+
userId: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export type { ChatType as C, MarkNotificationReadInput as M, NotificationTypeMap as N, CreateNotificationInput as a, CreateBulkNotificationInput as b, MarkAllNotificationsReadInput as c, ChatInput as d, ChatMessageInput as e, ChatMessageType as f, NotificationType as g, NotificationCount as h };
|
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 { d as ChatInput, e as ChatMessageInput, f as ChatMessageType, C as ChatType, b as CreateBulkNotificationInput, a as CreateNotificationInput, c as MarkAllNotificationsReadInput, M as MarkNotificationReadInput, h as NotificationCount, g as NotificationType, N as NotificationTypeMap } from '../notification-P3Vnadx_.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 { d as ChatInput, e as ChatMessageInput, f as ChatMessageType, C as ChatType, b as CreateBulkNotificationInput, a as CreateNotificationInput, c as MarkAllNotificationsReadInput, M as MarkNotificationReadInput, h as NotificationCount, g as NotificationType, N as NotificationTypeMap } from '../notification-P3Vnadx_.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/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"]}
|