@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.
@@ -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-DfRb-Tdc.js';
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
- favourites: {
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, EnumAdShowOn as f, EnumAdType as g, EnumAdStyle as h };
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-BpCkzdeB.mjs';
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
- favourites: {
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, EnumAdShowOn as f, EnumAdType as g, EnumAdStyle as h };
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 { x as CreateFormData, T as TermsAgreement } from './global-BpCkzdeB.mjs';
1
+ import { x as CreateFormData, T as TermsAgreement } from './global-BEqzo5Z2.mjs';
2
2
  import { EnumOSPlatform } from './enums/index.mjs';
3
3
 
4
4
  type ContactUsFormData = {
@@ -1,4 +1,4 @@
1
- import { x as CreateFormData, T as TermsAgreement } from './global-DfRb-Tdc.js';
1
+ import { x as CreateFormData, T as TermsAgreement } from './global-BA84KF8J.js';
2
2
  import { EnumOSPlatform } from './enums/index.js';
3
3
 
4
4
  type ContactUsFormData = {
@@ -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-BpCkzdeB.mjs';
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-DfRb-Tdc.js';
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
- relationDates?: RelationDate[] | null;
240
- relationIds: string[] | null;
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
- relationDates?: RelationDate[] | null;
240
- relationIds: string[] | null;
239
+ relations: {
240
+ relationId: string | null;
241
+ relationDates: RelationDate[] | null;
242
+ }[] | null;
241
243
  updatedAt: string;
242
244
  };
243
245
  type LocationType = {
@@ -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
- relationIds
353
- relationDates {
354
- ...RelationDates
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
- relationIds
511
- relationDates {
512
- ...RelationDates
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 GET_USER_FAVOURITES = import_client16.gql`
1060
- query getUserFavourites {
1061
- userFavourites {
1062
- events {
1063
- ...EventFields
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
- vendors {
1066
- ...VendorFields
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: GET_USER_FAVOURITES }]
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: GET_USER_FAVOURITES }]
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 useGetUserFavourites = () => {
2260
- const { loading, error, data, refetch } = (0, import_client42.useQuery)(GET_USER_FAVOURITES, {
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?.userFavourites.events;
2264
- const vendors = data?.userFavourites.vendors;
2265
- const userFavourites = {
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, userFavourites };
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,