@timardex/cluemart-shared 1.2.7 → 1.2.9

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.
Files changed (46) hide show
  1. package/dist/{auth-Dcif6SZD.d.mts → ad-BdkvVgTG.d.mts} +2 -51
  2. package/dist/{auth-BS0Z8xN3.d.ts → ad-CaHFwLDq.d.ts} +2 -51
  3. package/dist/auth-Bdbu0AYI.d.ts +45 -0
  4. package/dist/auth-DEMvXVbh.d.mts +45 -0
  5. package/dist/{chunk-JUZHLSQK.mjs → chunk-NLDCBJIQ.mjs} +2 -2
  6. package/dist/{chunk-4RWXISXJ.mjs → chunk-U6WFPNBJ.mjs} +8 -8
  7. package/dist/{chunk-4RWXISXJ.mjs.map → chunk-U6WFPNBJ.mjs.map} +1 -1
  8. package/dist/enums/index.cjs +7 -7
  9. package/dist/enums/index.cjs.map +1 -1
  10. package/dist/enums/index.d.mts +7 -7
  11. package/dist/enums/index.d.ts +7 -7
  12. package/dist/enums/index.mjs +1 -1
  13. package/dist/formFields/index.cjs.map +1 -1
  14. package/dist/formFields/index.d.mts +1 -1
  15. package/dist/formFields/index.d.ts +1 -1
  16. package/dist/formFields/index.mjs +2 -2
  17. package/dist/{global-CNiNcYkF.d.mts → global-BT5qyeKd.d.mts} +27 -11
  18. package/dist/{global-Clh5l5eo.d.ts → global-BvXtqVsE.d.ts} +27 -11
  19. package/dist/graphql/index.cjs +65 -24
  20. package/dist/graphql/index.cjs.map +1 -1
  21. package/dist/graphql/index.d.mts +2 -2
  22. package/dist/graphql/index.d.ts +2 -2
  23. package/dist/graphql/index.mjs +66 -25
  24. package/dist/graphql/index.mjs.map +1 -1
  25. package/dist/hooks/index.cjs +47 -72
  26. package/dist/hooks/index.cjs.map +1 -1
  27. package/dist/hooks/index.d.mts +3 -3
  28. package/dist/hooks/index.d.ts +3 -3
  29. package/dist/hooks/index.mjs +42 -67
  30. package/dist/hooks/index.mjs.map +1 -1
  31. package/dist/index.cjs +112 -96
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.mts +32 -32
  34. package/dist/index.d.ts +32 -32
  35. package/dist/index.mjs +112 -96
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/types/index.d.mts +3 -3
  38. package/dist/types/index.d.ts +3 -3
  39. package/dist/utils/index.cjs.map +1 -1
  40. package/dist/utils/index.d.mts +1 -1
  41. package/dist/utils/index.d.ts +1 -1
  42. package/dist/utils/index.mjs +2 -2
  43. package/package.json +1 -1
  44. package/dist/contactUs-BTRh2D7-.d.mts +0 -11
  45. package/dist/contactUs-OR-5Mkkg.d.ts +0 -11
  46. /package/dist/{chunk-JUZHLSQK.mjs.map → chunk-NLDCBJIQ.mjs.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { FieldValues, Control, FieldErrors, UseFormHandleSubmit, UseFormReset, UseFormSetValue, UseFormWatch } from 'react-hook-form';
2
- import { EnumResourceType, EnumInviteStatus, EnumRelationResource, EnumEventType, EnumPaymentMethod, EnumVendorType, EnumFoodFlavor, EnumSocialMedia, EnumUserLicence } from './enums/index.js';
2
+ import { EnumResourceType, EnumInviteStatus, EnumRelationResource, EnumEventType, EnumPaymentMethod, EnumVendorType, EnumFoodFlavor, EnumUserLicence, EnumSocialMedia } from './enums/index.js';
3
3
 
4
4
  type RelationDate = {
5
5
  lastUpdateBy: {
@@ -53,7 +53,6 @@ type Requirement = {
53
53
  interface EventInfoFormData {
54
54
  _id?: string;
55
55
  applicationDeadlineHours: number;
56
- contactDetails?: ResourceContactDetailsType | null;
57
56
  dateTime: DateTimeWithPriceType[];
58
57
  eventId: string;
59
58
  packInTime: number;
@@ -126,7 +125,6 @@ type VendorInfoFormData = {
126
125
  liabilityInsurance: boolean;
127
126
  foodBeverageLicense: boolean;
128
127
  };
129
- contactDetails?: ResourceContactDetailsType | null;
130
128
  documents?: ResourceImageType[] | null;
131
129
  documentsUpload?: ResourceImageType[] | null;
132
130
  product: {
@@ -175,6 +173,27 @@ interface VendorWithConnectionDatesType extends VendorType {
175
173
  type Nullable<T> = {
176
174
  [K in keyof T]: T[K] | null | undefined;
177
175
  };
176
+ type DeviceInfo = {
177
+ appBuildNumber: string;
178
+ appId: string;
179
+ appVersion: string;
180
+ brand: string;
181
+ deviceName: string;
182
+ installationId: string;
183
+ manufacturer: string;
184
+ modelName: string;
185
+ osName: string;
186
+ osVersion: string;
187
+ timestamp: string;
188
+ };
189
+ type TermsAgreement = DeviceInfo & {
190
+ termVersion: string;
191
+ };
192
+ type ResourceContactDetailsType = {
193
+ email?: string | null;
194
+ landlinePhone?: string | null;
195
+ mobilePhone?: string | null;
196
+ };
178
197
  type ResourceImageType = {
179
198
  source: string;
180
199
  title: string;
@@ -196,6 +215,7 @@ type OwnerType = {
196
215
  interface BaseResourceTypeFormData {
197
216
  _id?: string;
198
217
  active: boolean;
218
+ contactDetails?: ResourceContactDetailsType | null;
199
219
  cover: ResourceImageType;
200
220
  coverUpload?: ResourceImageType | null;
201
221
  description: string;
@@ -204,11 +224,12 @@ interface BaseResourceTypeFormData {
204
224
  logo?: ResourceImageType | null;
205
225
  logoUpload?: ResourceImageType | null;
206
226
  name: string;
227
+ owner?: OwnerType | null;
228
+ partners?: PartnerType[] | null;
207
229
  promoCodes?: string[] | null;
208
230
  region: string;
209
231
  socialMedia?: SocialMediaType[] | null;
210
- partners?: PartnerType[] | null;
211
- owner?: OwnerType | null;
232
+ termsAgreement?: TermsAgreement | null;
212
233
  }
213
234
  type PosterUsageType = {
214
235
  month: string;
@@ -310,10 +331,5 @@ interface CreateFormData<T extends FieldValues> {
310
331
  setValue: UseFormSetValue<T>;
311
332
  watch: UseFormWatch<T>;
312
333
  }
313
- type ResourceContactDetailsType = {
314
- email?: string | null;
315
- landlinePhone?: string | null;
316
- mobilePhone?: string | null;
317
- };
318
334
 
319
- export type { RelationDate as A, BaseResourceTypeFormData as B, Category as C, DateTimeType as D, EventType as E, FormField as F, GeocodeLocation as G, VendorLocation as H, ImageObjectType as I, VendorMenuType as J, VendorAttributes as K, LocationType as L, MapMultiLocation as M, Nullable as N, OptionItem as O, PartnerType as P, VendorWithConnectionDatesType as Q, Requirement as R, StallType as S, VendorType as V, FormDateField as a, EventInfoType as b, RelationType as c, ResourceConnectionsType as d, VendorInfoType as e, VendorFormData as f, CreateVendorFormData as g, VendorInfoFormData as h, CreateVendorInfoFormData as i, EventFormData as j, CreateEventFormData as k, EventInfoFormData as l, CreateEventInfoFormData as m, ResourceImageType as n, SocialMediaType as o, OwnerType as p, PosterUsageType as q, BaseResourceType as r, Region as s, SubcategoryItems as t, Subcategory as u, CreateFormData as v, ResourceContactDetailsType as w, DateTimeWithPriceType as x, PaymentInfoType as y, EventWithConnectionDatesType as z };
335
+ export type { EventWithConnectionDatesType as A, BaseResourceTypeFormData as B, Category as C, DeviceInfo as D, EventType as E, FormField as F, GeocodeLocation as G, RelationDate as H, ImageObjectType as I, VendorLocation as J, VendorMenuType as K, LocationType as L, MapMultiLocation as M, Nullable as N, OptionItem as O, PartnerType as P, VendorAttributes as Q, Requirement as R, StallType as S, TermsAgreement as T, VendorWithConnectionDatesType as U, VendorType as V, FormDateField as a, EventInfoType as b, RelationType as c, ResourceConnectionsType as d, VendorInfoType as e, VendorFormData as f, CreateVendorFormData as g, VendorInfoFormData as h, CreateVendorInfoFormData as i, EventFormData as j, CreateEventFormData as k, EventInfoFormData as l, CreateEventInfoFormData as m, ResourceContactDetailsType as n, ResourceImageType as o, SocialMediaType as p, OwnerType as q, PosterUsageType as r, BaseResourceType as s, DateTimeType as t, Region as u, SubcategoryItems as v, Subcategory as w, CreateFormData as x, DateTimeWithPriceType as y, PaymentInfoType as z };
@@ -169,6 +169,22 @@ var PARTNER_FIELDS_FRAGMENT = import_client2.gql`
169
169
  licence
170
170
  }
171
171
  `;
172
+ var TERMS_AGREEMENT_FIELDS_FRAGMENT = import_client2.gql`
173
+ fragment TermsAgreementFields on TermsAgreementType {
174
+ appBuildNumber
175
+ appId
176
+ appVersion
177
+ brand
178
+ deviceName
179
+ installationId
180
+ manufacturer
181
+ modelName
182
+ osName
183
+ osVersion
184
+ termVersion
185
+ timestamp
186
+ }
187
+ `;
172
188
  var USER_FIELDS_FRAGMENT = import_client2.gql`
173
189
  fragment UserFields on UserType {
174
190
  _id
@@ -196,24 +212,14 @@ var USER_FIELDS_FRAGMENT = import_client2.gql`
196
212
  refreshToken
197
213
  role
198
214
  termsAgreement {
199
- appBuildNumber
200
- appId
201
- appVersion
202
- brand
203
- deviceName
204
- installationId
205
- manufacturer
206
- modelName
207
- osName
208
- osVersion
209
- termVersion
210
- timestamp
215
+ ...TermsAgreementFields
211
216
  }
212
217
  vendor
213
218
  updatedAt
214
219
  }
215
220
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
216
221
  ${PARTNER_FIELDS_FRAGMENT}
222
+ ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
217
223
  `;
218
224
  var STALL_TYPE_FIELDS_FRAGMENT = import_client2.gql`
219
225
  fragment StallTypeFields on StallTypeType {
@@ -226,6 +232,13 @@ var STALL_TYPE_FIELDS_FRAGMENT = import_client2.gql`
226
232
  }
227
233
  }
228
234
  `;
235
+ var CONTACT_DETAILS_FIELDS_FRAGMENT = import_client2.gql`
236
+ fragment ContactDetailsFields on ContactDetailsType {
237
+ email
238
+ landlinePhone
239
+ mobilePhone
240
+ }
241
+ `;
229
242
 
230
243
  // src/graphql/queries/event.ts
231
244
  var EVENT_DATETIME_FIELDS_FRAGMENT = import_client3.gql`
@@ -252,11 +265,6 @@ var EVENT_INFO = import_client3.gql`
252
265
  fragment EventInfoFields on EventInfoType {
253
266
  _id
254
267
  applicationDeadlineHours
255
- contactDetails {
256
- email
257
- landlinePhone
258
- mobilePhone
259
- }
260
268
  dateTime {
261
269
  endDate
262
270
  endTime
@@ -292,6 +300,9 @@ var EVENT = import_client3.gql`
292
300
  ...ResourceImageFields
293
301
  }
294
302
  createdAt
303
+ contactDetails {
304
+ ...ContactDetailsFields
305
+ }
295
306
  dateTime {
296
307
  ...EventDateTimeFields
297
308
  }
@@ -328,6 +339,9 @@ var EVENT = import_client3.gql`
328
339
  }
329
340
  rainOrShine
330
341
  tags
342
+ termsAgreement {
343
+ ...TermsAgreementFields
344
+ }
331
345
  updatedAt
332
346
  }
333
347
  ${EVENT_DATETIME_FIELDS_FRAGMENT}
@@ -337,6 +351,8 @@ var EVENT = import_client3.gql`
337
351
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
338
352
  ${POSTER_USAGE_FIELDS_FRAGMENT}
339
353
  ${PARTNER_FIELDS_FRAGMENT}
354
+ ${CONTACT_DETAILS_FIELDS_FRAGMENT}
355
+ ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
340
356
  `;
341
357
  var GET_EVENTS = import_client3.gql`
342
358
  query getEvents {
@@ -431,6 +447,9 @@ var VENDOR = import_client4.gql`
431
447
  categories {
432
448
  ...CategoryFields
433
449
  }
450
+ contactDetails {
451
+ ...ContactDetailsFields
452
+ }
434
453
  cover {
435
454
  ...ResourceImageFields
436
455
  }
@@ -472,6 +491,9 @@ var VENDOR = import_client4.gql`
472
491
  socialMedia {
473
492
  ...SocialMediaFields
474
493
  }
494
+ termsAgreement {
495
+ ...TermsAgreementFields
496
+ }
475
497
  updatedAt
476
498
  vendorType
477
499
  }
@@ -484,6 +506,8 @@ var VENDOR = import_client4.gql`
484
506
  ${POSTER_USAGE_FIELDS_FRAGMENT}
485
507
  ${PARTNER_FIELDS_FRAGMENT}
486
508
  ${VENDOR_MENU_FIELDS_FRAGMENT}
509
+ ${CONTACT_DETAILS_FIELDS_FRAGMENT}
510
+ ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
487
511
  `;
488
512
  var VENDOR_ATTRIBUTES_FRAGMENT = import_client4.gql`
489
513
  fragment VendorAttributesFields on VendorAttributesType {
@@ -498,11 +522,6 @@ var VENDOR_INFO = import_client4.gql`
498
522
  foodBeverageLicense
499
523
  liabilityInsurance
500
524
  }
501
- contactDetails {
502
- email
503
- landlinePhone
504
- mobilePhone
505
- }
506
525
  documents {
507
526
  ...ResourceImageFields
508
527
  }
@@ -1064,11 +1083,14 @@ var useCreateEventInfo = () => {
1064
1083
  variables: { eventId }
1065
1084
  // Pass the eventId for refetching
1066
1085
  },
1086
+ {
1087
+ fetchPolicy: "network-only",
1088
+ query: GET_USER_EVENTS
1089
+ },
1067
1090
  {
1068
1091
  fetchPolicy: "no-cache",
1069
1092
  query: GET_EVENT,
1070
1093
  variables: { _id: eventId }
1071
- // Pass the eventId for refetching
1072
1094
  }
1073
1095
  ];
1074
1096
  }
@@ -1522,6 +1544,9 @@ var GET_RESOURCE_CONNECTIONS = import_client29.gql`
1522
1544
  cover {
1523
1545
  ...ResourceImageFields
1524
1546
  }
1547
+ contactDetails {
1548
+ ...ContactDetailsFields
1549
+ }
1525
1550
  createdAt
1526
1551
  dateTime {
1527
1552
  ...EventDateTimeFields
@@ -1559,6 +1584,9 @@ var GET_RESOURCE_CONNECTIONS = import_client29.gql`
1559
1584
  }
1560
1585
  rainOrShine
1561
1586
  tags
1587
+ termsAgreement {
1588
+ ...TermsAgreementFields
1589
+ }
1562
1590
  updatedAt
1563
1591
  relationDates {
1564
1592
  ...RelationDates
@@ -1577,6 +1605,9 @@ var GET_RESOURCE_CONNECTIONS = import_client29.gql`
1577
1605
  categories {
1578
1606
  ...CategoryFields
1579
1607
  }
1608
+ contactDetails {
1609
+ ...ContactDetailsFields
1610
+ }
1580
1611
  cover {
1581
1612
  ...ResourceImageFields
1582
1613
  }
@@ -1622,6 +1653,9 @@ var GET_RESOURCE_CONNECTIONS = import_client29.gql`
1622
1653
  relationDates {
1623
1654
  ...RelationDates
1624
1655
  }
1656
+ termsAgreement {
1657
+ ...TermsAgreementFields
1658
+ }
1625
1659
  vendorType
1626
1660
  }
1627
1661
  }
@@ -1638,6 +1672,8 @@ var GET_RESOURCE_CONNECTIONS = import_client29.gql`
1638
1672
  ${POSTER_USAGE_FIELDS_FRAGMENT}
1639
1673
  ${PARTNER_FIELDS_FRAGMENT}
1640
1674
  ${VENDOR_MENU_FIELDS_FRAGMENT}
1675
+ ${CONTACT_DETAILS_FIELDS_FRAGMENT}
1676
+ ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
1641
1677
  `;
1642
1678
 
1643
1679
  // src/graphql/mutations/relation.ts
@@ -1965,8 +2001,13 @@ var useCreateVendorInfo = () => {
1965
2001
  // Pass the vendorId for refetching
1966
2002
  },
1967
2003
  {
1968
- fetchPolicy: "no-cache",
2004
+ fetchPolicy: "network-only",
1969
2005
  query: GET_USER_VENDORS
2006
+ },
2007
+ {
2008
+ fetchPolicy: "no-cache",
2009
+ query: GET_VENDOR,
2010
+ variables: { _id: vendorId }
1970
2011
  }
1971
2012
  ];
1972
2013
  }