@timardex/cluemart-shared 1.2.15 → 1.2.16
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/{ad-CG4AaK6P.d.ts → ad-D6-mYEzV.d.ts} +20 -5
- package/dist/{ad-BY7DQZFI.d.mts → ad-Dj1GOSzC.d.mts} +20 -5
- package/dist/graphql/index.cjs +53 -21
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +4 -4
- package/dist/graphql/index.d.ts +4 -4
- package/dist/graphql/index.mjs +52 -20
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/index.cjs +53 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +22 -7
- package/dist/index.d.ts +22 -7
- package/dist/index.mjs +52 -20
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -35,6 +35,24 @@ type UserFormData = {
|
|
|
35
35
|
termsAgreement?: TermsAgreement | null;
|
|
36
36
|
};
|
|
37
37
|
type CreateUserFormData = CreateFormData<UserFormData>;
|
|
38
|
+
type UserActivity = {
|
|
39
|
+
favourites: {
|
|
40
|
+
events: string[];
|
|
41
|
+
vendors: string[];
|
|
42
|
+
};
|
|
43
|
+
interests: {
|
|
44
|
+
events: {
|
|
45
|
+
resourceId: string;
|
|
46
|
+
startDate: string;
|
|
47
|
+
}[];
|
|
48
|
+
};
|
|
49
|
+
going: {
|
|
50
|
+
events: {
|
|
51
|
+
resourceId: string;
|
|
52
|
+
startDate: string;
|
|
53
|
+
}[];
|
|
54
|
+
};
|
|
55
|
+
};
|
|
38
56
|
interface UserType {
|
|
39
57
|
_id: string;
|
|
40
58
|
active: boolean;
|
|
@@ -43,10 +61,7 @@ interface UserType {
|
|
|
43
61
|
deletedAt: string | null;
|
|
44
62
|
email: string;
|
|
45
63
|
isTester: boolean;
|
|
46
|
-
|
|
47
|
-
events: string[];
|
|
48
|
-
vendors: string[];
|
|
49
|
-
};
|
|
64
|
+
userActivity: UserActivity | null;
|
|
50
65
|
firstName: string;
|
|
51
66
|
lastName: string;
|
|
52
67
|
licences: EnumUserLicence[] | null;
|
|
@@ -109,4 +124,4 @@ interface AdType extends AdFormData {
|
|
|
109
124
|
updatedAt: Date;
|
|
110
125
|
}
|
|
111
126
|
|
|
112
|
-
export { type AdType as A, type CreateUserFormData as C, EnumAdStatus as E, type TesterType as T, type UserType as U, type UserFormData as a, type TestersFormData as b, type CreateTestersFormData as c, type AdFormData as d, type CreateAdFormData as e,
|
|
127
|
+
export { type AdType as A, type CreateUserFormData as C, EnumAdStatus as E, type TesterType as T, type UserType as U, type UserFormData as a, type TestersFormData as b, type CreateTestersFormData as c, type AdFormData as d, type CreateAdFormData as e, type UserActivity as f, EnumAdShowOn as g, EnumAdType as h, EnumAdStyle as i };
|
|
@@ -35,6 +35,24 @@ type UserFormData = {
|
|
|
35
35
|
termsAgreement?: TermsAgreement | null;
|
|
36
36
|
};
|
|
37
37
|
type CreateUserFormData = CreateFormData<UserFormData>;
|
|
38
|
+
type UserActivity = {
|
|
39
|
+
favourites: {
|
|
40
|
+
events: string[];
|
|
41
|
+
vendors: string[];
|
|
42
|
+
};
|
|
43
|
+
interests: {
|
|
44
|
+
events: {
|
|
45
|
+
resourceId: string;
|
|
46
|
+
startDate: string;
|
|
47
|
+
}[];
|
|
48
|
+
};
|
|
49
|
+
going: {
|
|
50
|
+
events: {
|
|
51
|
+
resourceId: string;
|
|
52
|
+
startDate: string;
|
|
53
|
+
}[];
|
|
54
|
+
};
|
|
55
|
+
};
|
|
38
56
|
interface UserType {
|
|
39
57
|
_id: string;
|
|
40
58
|
active: boolean;
|
|
@@ -43,10 +61,7 @@ interface UserType {
|
|
|
43
61
|
deletedAt: string | null;
|
|
44
62
|
email: string;
|
|
45
63
|
isTester: boolean;
|
|
46
|
-
|
|
47
|
-
events: string[];
|
|
48
|
-
vendors: string[];
|
|
49
|
-
};
|
|
64
|
+
userActivity: UserActivity | null;
|
|
50
65
|
firstName: string;
|
|
51
66
|
lastName: string;
|
|
52
67
|
licences: EnumUserLicence[] | null;
|
|
@@ -109,4 +124,4 @@ interface AdType extends AdFormData {
|
|
|
109
124
|
updatedAt: Date;
|
|
110
125
|
}
|
|
111
126
|
|
|
112
|
-
export { type AdType as A, type CreateUserFormData as C, EnumAdStatus as E, type TesterType as T, type UserType as U, type UserFormData as a, type TestersFormData as b, type CreateTestersFormData as c, type AdFormData as d, type CreateAdFormData as e,
|
|
127
|
+
export { type AdType as A, type CreateUserFormData as C, EnumAdStatus as E, type TesterType as T, type UserType as U, type UserFormData as a, type TestersFormData as b, type CreateTestersFormData as c, type AdFormData as d, type CreateAdFormData as e, type UserActivity as f, EnumAdShowOn as g, EnumAdType as h, EnumAdStyle as i };
|
package/dist/graphql/index.cjs
CHANGED
|
@@ -65,9 +65,9 @@ __export(graphql_exports, {
|
|
|
65
65
|
useGetTester: () => useGetTester,
|
|
66
66
|
useGetTesters: () => useGetTesters,
|
|
67
67
|
useGetUser: () => useGetUser,
|
|
68
|
+
useGetUserActivities: () => useGetUserActivities,
|
|
68
69
|
useGetUserChats: () => useGetUserChats,
|
|
69
70
|
useGetUserEvents: () => useGetUserEvents,
|
|
70
|
-
useGetUserFavourites: () => useGetUserFavourites,
|
|
71
71
|
useGetUserNotifications: () => useGetUserNotifications,
|
|
72
72
|
useGetUserNotificationsSubscription: () => useGetUserNotificationsSubscription,
|
|
73
73
|
useGetUserVendors: () => useGetUserVendors,
|
|
@@ -185,6 +185,26 @@ var TERMS_AGREEMENT_FIELDS_FRAGMENT = import_client2.gql`
|
|
|
185
185
|
timestamp
|
|
186
186
|
}
|
|
187
187
|
`;
|
|
188
|
+
var USER_ACTIVITY_FIELDS_FRAGMENT = import_client2.gql`
|
|
189
|
+
fragment UserActivityFields on UserActivityType {
|
|
190
|
+
favourites {
|
|
191
|
+
events
|
|
192
|
+
vendors
|
|
193
|
+
}
|
|
194
|
+
interests {
|
|
195
|
+
events {
|
|
196
|
+
resourceId
|
|
197
|
+
startDate
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
going {
|
|
201
|
+
events {
|
|
202
|
+
resourceId
|
|
203
|
+
startDate
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
`;
|
|
188
208
|
var USER_FIELDS_FRAGMENT = import_client2.gql`
|
|
189
209
|
fragment UserFields on UserType {
|
|
190
210
|
_id
|
|
@@ -196,10 +216,6 @@ var USER_FIELDS_FRAGMENT = import_client2.gql`
|
|
|
196
216
|
deletedAt
|
|
197
217
|
email
|
|
198
218
|
isTester
|
|
199
|
-
favourites {
|
|
200
|
-
events
|
|
201
|
-
vendors
|
|
202
|
-
}
|
|
203
219
|
firstName
|
|
204
220
|
lastName
|
|
205
221
|
licences
|
|
@@ -214,12 +230,16 @@ var USER_FIELDS_FRAGMENT = import_client2.gql`
|
|
|
214
230
|
termsAgreement {
|
|
215
231
|
...TermsAgreementFields
|
|
216
232
|
}
|
|
233
|
+
userActivity {
|
|
234
|
+
...UserActivityFields
|
|
235
|
+
}
|
|
217
236
|
vendor
|
|
218
237
|
updatedAt
|
|
219
238
|
}
|
|
220
239
|
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
221
240
|
${PARTNER_FIELDS_FRAGMENT}
|
|
222
241
|
${TERMS_AGREEMENT_FIELDS_FRAGMENT}
|
|
242
|
+
${USER_ACTIVITY_FIELDS_FRAGMENT}
|
|
223
243
|
`;
|
|
224
244
|
var STALL_TYPE_FIELDS_FRAGMENT = import_client2.gql`
|
|
225
245
|
fragment StallTypeFields on StallTypeType {
|
|
@@ -1060,14 +1080,26 @@ var GET_USER_VENDORS = import_client16.gql`
|
|
|
1060
1080
|
}
|
|
1061
1081
|
${VENDOR}
|
|
1062
1082
|
`;
|
|
1063
|
-
var
|
|
1064
|
-
query
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1083
|
+
var GET_USER_ACTIVITIES = import_client16.gql`
|
|
1084
|
+
query getUserActivities {
|
|
1085
|
+
userActivities {
|
|
1086
|
+
favourites {
|
|
1087
|
+
events {
|
|
1088
|
+
...EventFields
|
|
1089
|
+
}
|
|
1090
|
+
vendors {
|
|
1091
|
+
...VendorFields
|
|
1092
|
+
}
|
|
1068
1093
|
}
|
|
1069
|
-
|
|
1070
|
-
|
|
1094
|
+
interests {
|
|
1095
|
+
events {
|
|
1096
|
+
...EventFields
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
going {
|
|
1100
|
+
events {
|
|
1101
|
+
...EventFields
|
|
1102
|
+
}
|
|
1071
1103
|
}
|
|
1072
1104
|
}
|
|
1073
1105
|
}
|
|
@@ -2196,7 +2228,7 @@ var useAddUserFavouriteResource = () => {
|
|
|
2196
2228
|
ADD_USER_FAVOURITE_RESOURCE_MUTATION,
|
|
2197
2229
|
{
|
|
2198
2230
|
awaitRefetchQueries: true,
|
|
2199
|
-
refetchQueries: [{ query:
|
|
2231
|
+
refetchQueries: [{ query: GET_USER_ACTIVITIES }]
|
|
2200
2232
|
}
|
|
2201
2233
|
);
|
|
2202
2234
|
return { addUserFavouriteResource, error, loading };
|
|
@@ -2206,7 +2238,7 @@ var useRemoveUserFavouriteResource = () => {
|
|
|
2206
2238
|
REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
|
|
2207
2239
|
{
|
|
2208
2240
|
awaitRefetchQueries: true,
|
|
2209
|
-
refetchQueries: [{ query:
|
|
2241
|
+
refetchQueries: [{ query: GET_USER_ACTIVITIES }]
|
|
2210
2242
|
}
|
|
2211
2243
|
);
|
|
2212
2244
|
return { error, loading, removeUserFavouriteResource };
|
|
@@ -2260,17 +2292,17 @@ var useGetUserVendors = () => {
|
|
|
2260
2292
|
const userVendors = data?.userVendors;
|
|
2261
2293
|
return { error, loading, refetch, userVendors };
|
|
2262
2294
|
};
|
|
2263
|
-
var
|
|
2264
|
-
const { loading, error, data, refetch } = (0, import_client42.useQuery)(
|
|
2295
|
+
var useGetUserActivities = () => {
|
|
2296
|
+
const { loading, error, data, refetch } = (0, import_client42.useQuery)(GET_USER_ACTIVITIES, {
|
|
2265
2297
|
fetchPolicy: "network-only"
|
|
2266
2298
|
});
|
|
2267
|
-
const events = data?.
|
|
2268
|
-
const vendors = data?.
|
|
2269
|
-
const
|
|
2299
|
+
const events = data?.userActivities.events;
|
|
2300
|
+
const vendors = data?.userActivities.vendors;
|
|
2301
|
+
const userActivities = {
|
|
2270
2302
|
events,
|
|
2271
2303
|
vendors
|
|
2272
2304
|
};
|
|
2273
|
-
return { error, loading, refetch,
|
|
2305
|
+
return { error, loading, refetch, userActivities };
|
|
2274
2306
|
};
|
|
2275
2307
|
|
|
2276
2308
|
// src/graphql/hooks/ad/hooksMutation.ts
|
|
@@ -2542,9 +2574,9 @@ var useGetResourceViews = (resourceId, resourceType) => {
|
|
|
2542
2574
|
useGetTester,
|
|
2543
2575
|
useGetTesters,
|
|
2544
2576
|
useGetUser,
|
|
2577
|
+
useGetUserActivities,
|
|
2545
2578
|
useGetUserChats,
|
|
2546
2579
|
useGetUserEvents,
|
|
2547
|
-
useGetUserFavourites,
|
|
2548
2580
|
useGetUserNotifications,
|
|
2549
2581
|
useGetUserNotificationsSubscription,
|
|
2550
2582
|
useGetUserVendors,
|