@timardex/cluemart-shared 1.2.14 → 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-vOHYPnqC.d.ts → ad-D6-mYEzV.d.ts} +21 -6
- package/dist/{ad-D6PyfsyB.d.mts → ad-Dj1GOSzC.d.mts} +21 -6
- package/dist/{auth-DETM5FhC.d.mts → auth-BVGs-5Vm.d.mts} +1 -1
- package/dist/{auth-CS7JARU5.d.ts → auth-BhUIvvZ2.d.ts} +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/{global-DfRb-Tdc.d.ts → global-BA84KF8J.d.ts} +4 -2
- package/dist/{global-BpCkzdeB.d.mts → global-BEqzo5Z2.d.mts} +4 -2
- package/dist/graphql/index.cjs +63 -27
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +5 -5
- package/dist/graphql/index.d.ts +5 -5
- package/dist/graphql/index.mjs +62 -26
- package/dist/graphql/index.mjs.map +1 -1
- package/dist/hooks/index.d.mts +3 -3
- package/dist/hooks/index.d.ts +3 -3
- package/dist/index.cjs +63 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +26 -9
- package/dist/index.d.ts +26 -9
- package/dist/index.mjs +62 -26
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnumOSPlatform, EnumResourceType, EnumUserLicence, EnumUserRole } from './enums/index.js';
|
|
2
|
-
import { C as Category, x as CreateFormData, o as ResourceImageType, P as PartnerType, T as TermsAgreement, p as SocialMediaType } from './global-
|
|
2
|
+
import { C as Category, x as CreateFormData, o as ResourceImageType, P as PartnerType, T as TermsAgreement, p as SocialMediaType } from './global-BA84KF8J.js';
|
|
3
3
|
|
|
4
4
|
interface TestersFormData {
|
|
5
5
|
categories?: Category[] | null;
|
|
@@ -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 };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnumOSPlatform, EnumResourceType, EnumUserLicence, EnumUserRole } from './enums/index.mjs';
|
|
2
|
-
import { C as Category, x as CreateFormData, o as ResourceImageType, P as PartnerType, T as TermsAgreement, p as SocialMediaType } from './global-
|
|
2
|
+
import { C as Category, x as CreateFormData, o as ResourceImageType, P as PartnerType, T as TermsAgreement, p as SocialMediaType } from './global-BEqzo5Z2.mjs';
|
|
3
3
|
|
|
4
4
|
interface TestersFormData {
|
|
5
5
|
categories?: Category[] | null;
|
|
@@ -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 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-
|
|
1
|
+
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-BEqzo5Z2.mjs';
|
|
2
2
|
import 'react-hook-form';
|
|
3
3
|
import '../enums/index.mjs';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-
|
|
1
|
+
import { F as FormField, a as FormDateField, O as OptionItem, R as Requirement, S as StallType, C as Category } from '../global-BA84KF8J.js';
|
|
2
2
|
import 'react-hook-form';
|
|
3
3
|
import '../enums/index.js';
|
|
4
4
|
|
|
@@ -236,8 +236,10 @@ type BaseResourceType = Omit<BaseResourceTypeFormData, "_id" | "coverUpload" | "
|
|
|
236
236
|
deletedAt: string | null;
|
|
237
237
|
owner: OwnerType;
|
|
238
238
|
posterUsage?: PosterUsageType | null;
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
relations: {
|
|
240
|
+
relationId: string | null;
|
|
241
|
+
relationDates: RelationDate[] | null;
|
|
242
|
+
}[] | null;
|
|
241
243
|
updatedAt: string;
|
|
242
244
|
};
|
|
243
245
|
type LocationType = {
|
|
@@ -236,8 +236,10 @@ type BaseResourceType = Omit<BaseResourceTypeFormData, "_id" | "coverUpload" | "
|
|
|
236
236
|
deletedAt: string | null;
|
|
237
237
|
owner: OwnerType;
|
|
238
238
|
posterUsage?: PosterUsageType | null;
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
relations: {
|
|
240
|
+
relationId: string | null;
|
|
241
|
+
relationDates: RelationDate[] | null;
|
|
242
|
+
}[] | null;
|
|
241
243
|
updatedAt: string;
|
|
242
244
|
};
|
|
243
245
|
type LocationType = {
|
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 {
|
|
@@ -349,9 +369,11 @@ var EVENT = import_client3.gql`
|
|
|
349
369
|
...PosterUsageFields
|
|
350
370
|
}
|
|
351
371
|
region
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
372
|
+
relations {
|
|
373
|
+
relationId
|
|
374
|
+
relationDates {
|
|
375
|
+
...RelationDates
|
|
376
|
+
}
|
|
355
377
|
}
|
|
356
378
|
socialMedia {
|
|
357
379
|
...SocialMediaFields
|
|
@@ -507,9 +529,11 @@ var VENDOR = import_client4.gql`
|
|
|
507
529
|
...PosterUsageFields
|
|
508
530
|
}
|
|
509
531
|
region
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
532
|
+
relations {
|
|
533
|
+
relationId
|
|
534
|
+
relationDates {
|
|
535
|
+
...RelationDates
|
|
536
|
+
}
|
|
513
537
|
}
|
|
514
538
|
socialMedia {
|
|
515
539
|
...SocialMediaFields
|
|
@@ -1056,14 +1080,26 @@ var GET_USER_VENDORS = import_client16.gql`
|
|
|
1056
1080
|
}
|
|
1057
1081
|
${VENDOR}
|
|
1058
1082
|
`;
|
|
1059
|
-
var
|
|
1060
|
-
query
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
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
|
+
}
|
|
1064
1093
|
}
|
|
1065
|
-
|
|
1066
|
-
|
|
1094
|
+
interests {
|
|
1095
|
+
events {
|
|
1096
|
+
...EventFields
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
going {
|
|
1100
|
+
events {
|
|
1101
|
+
...EventFields
|
|
1102
|
+
}
|
|
1067
1103
|
}
|
|
1068
1104
|
}
|
|
1069
1105
|
}
|
|
@@ -2192,7 +2228,7 @@ var useAddUserFavouriteResource = () => {
|
|
|
2192
2228
|
ADD_USER_FAVOURITE_RESOURCE_MUTATION,
|
|
2193
2229
|
{
|
|
2194
2230
|
awaitRefetchQueries: true,
|
|
2195
|
-
refetchQueries: [{ query:
|
|
2231
|
+
refetchQueries: [{ query: GET_USER_ACTIVITIES }]
|
|
2196
2232
|
}
|
|
2197
2233
|
);
|
|
2198
2234
|
return { addUserFavouriteResource, error, loading };
|
|
@@ -2202,7 +2238,7 @@ var useRemoveUserFavouriteResource = () => {
|
|
|
2202
2238
|
REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
|
|
2203
2239
|
{
|
|
2204
2240
|
awaitRefetchQueries: true,
|
|
2205
|
-
refetchQueries: [{ query:
|
|
2241
|
+
refetchQueries: [{ query: GET_USER_ACTIVITIES }]
|
|
2206
2242
|
}
|
|
2207
2243
|
);
|
|
2208
2244
|
return { error, loading, removeUserFavouriteResource };
|
|
@@ -2256,17 +2292,17 @@ var useGetUserVendors = () => {
|
|
|
2256
2292
|
const userVendors = data?.userVendors;
|
|
2257
2293
|
return { error, loading, refetch, userVendors };
|
|
2258
2294
|
};
|
|
2259
|
-
var
|
|
2260
|
-
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, {
|
|
2261
2297
|
fetchPolicy: "network-only"
|
|
2262
2298
|
});
|
|
2263
|
-
const events = data?.
|
|
2264
|
-
const vendors = data?.
|
|
2265
|
-
const
|
|
2299
|
+
const events = data?.userActivities.events;
|
|
2300
|
+
const vendors = data?.userActivities.vendors;
|
|
2301
|
+
const userActivities = {
|
|
2266
2302
|
events,
|
|
2267
2303
|
vendors
|
|
2268
2304
|
};
|
|
2269
|
-
return { error, loading, refetch,
|
|
2305
|
+
return { error, loading, refetch, userActivities };
|
|
2270
2306
|
};
|
|
2271
2307
|
|
|
2272
2308
|
// src/graphql/hooks/ad/hooksMutation.ts
|
|
@@ -2538,9 +2574,9 @@ var useGetResourceViews = (resourceId, resourceType) => {
|
|
|
2538
2574
|
useGetTester,
|
|
2539
2575
|
useGetTesters,
|
|
2540
2576
|
useGetUser,
|
|
2577
|
+
useGetUserActivities,
|
|
2541
2578
|
useGetUserChats,
|
|
2542
2579
|
useGetUserEvents,
|
|
2543
|
-
useGetUserFavourites,
|
|
2544
2580
|
useGetUserNotifications,
|
|
2545
2581
|
useGetUserNotificationsSubscription,
|
|
2546
2582
|
useGetUserVendors,
|