@timardex/cluemart-shared 1.2.69 → 1.2.71

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 (35) hide show
  1. package/dist/{ad-BijiW7Nn.d.ts → ad-DIpc7lyr.d.ts} +1 -1
  2. package/dist/{ad-DITy2OMe.d.mts → ad-_p1gmLNT.d.mts} +1 -1
  3. package/dist/{auth-iE9sd_mq.d.ts → auth-Bjqk92cx.d.ts} +1 -1
  4. package/dist/{auth-DCIrfDwB.d.mts → auth-CcX2zTDU.d.mts} +1 -1
  5. package/dist/formFields/index.cjs +198 -105
  6. package/dist/formFields/index.cjs.map +1 -1
  7. package/dist/formFields/index.d.mts +1 -1
  8. package/dist/formFields/index.d.ts +1 -1
  9. package/dist/formFields/index.mjs +198 -105
  10. package/dist/formFields/index.mjs.map +1 -1
  11. package/dist/{global-DhZY519g.d.mts → global-B0AzhgkH.d.mts} +7 -13
  12. package/dist/{global-08vcDEuE.d.ts → global-BH6qrlBv.d.ts} +7 -13
  13. package/dist/graphql/index.cjs +573 -565
  14. package/dist/graphql/index.cjs.map +1 -1
  15. package/dist/graphql/index.d.mts +459 -211
  16. package/dist/graphql/index.d.ts +459 -211
  17. package/dist/graphql/index.mjs +378 -370
  18. package/dist/graphql/index.mjs.map +1 -1
  19. package/dist/hooks/index.cjs +15 -6
  20. package/dist/hooks/index.cjs.map +1 -1
  21. package/dist/hooks/index.d.mts +3 -3
  22. package/dist/hooks/index.d.ts +3 -3
  23. package/dist/hooks/index.mjs +15 -6
  24. package/dist/hooks/index.mjs.map +1 -1
  25. package/dist/index.cjs +794 -684
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.mts +463 -221
  28. package/dist/index.d.ts +463 -221
  29. package/dist/index.mjs +593 -483
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/types/index.d.mts +3 -3
  32. package/dist/types/index.d.ts +3 -3
  33. package/dist/utils/index.d.mts +1 -1
  34. package/dist/utils/index.d.ts +1 -1
  35. package/package.json +24 -24
package/dist/index.cjs CHANGED
@@ -643,10 +643,10 @@ var getCurrentAndFutureDates = (dates) => {
643
643
  return dateTime.isSameOrAfter(now);
644
644
  });
645
645
  };
646
- var isFutureDatesBeforeThreshold = (date2, minHoursFromNow) => {
646
+ var isFutureDatesBeforeThreshold = (date3, minHoursFromNow) => {
647
647
  const threshold = minHoursFromNow ? (0, import_dayjs.default)().add(minHoursFromNow, "hour") : (0, import_dayjs.default)().startOf("day");
648
648
  const dateTime = (0, import_dayjs.default)(
649
- `${date2.startDate} ${date2.startTime}`,
649
+ `${date3.startDate} ${date3.startTime}`,
650
650
  `${dateFormat} ${timeFormat}`
651
651
  );
652
652
  return dateTime.isSameOrAfter(threshold);
@@ -1267,75 +1267,6 @@ var profileFields = [
1267
1267
  }
1268
1268
  ];
1269
1269
 
1270
- // src/formFields/categories/antiquesAndCollectibles.ts
1271
- var antiquesAndCollectibles = [
1272
- {
1273
- id: "antiques-collectibles",
1274
- name: "Antiques & Collectibles",
1275
- description: "Vintage and collectible goods with historic, nostalgic, or decorative value.",
1276
- subcategories: [
1277
- {
1278
- id: "vintage-fashion-personal-items",
1279
- name: "Vintage Fashion & Personal Items",
1280
- items: [
1281
- {
1282
- id: "vintage-clothing-accessories",
1283
- name: "Vintage Clothing & Accessories",
1284
- description: "Retro jackets, dresses, hats, gloves, belts, era-specific fashion."
1285
- },
1286
- {
1287
- id: "collectibles-memorabilia",
1288
- name: "Collectibles & Memorabilia",
1289
- description: "Coins, stamps, toys, postcards, comics, sports cards, vintage packaging."
1290
- },
1291
- {
1292
- id: "other-fashion-collectibles",
1293
- name: "Other fashion-related collectibles",
1294
- description: "Items with both fashion and collector value."
1295
- }
1296
- ]
1297
- },
1298
- {
1299
- id: "antique-home-curiosities",
1300
- name: "Antique Home & Curiosities",
1301
- items: [
1302
- {
1303
- id: "antique-homewares-decor",
1304
- name: "Antique Homewares & Decor",
1305
- description: "Teacups, plates, vases, mirrors, clocks, furniture accents."
1306
- },
1307
- {
1308
- id: "other-unique-finds",
1309
- name: "Other Unique Finds",
1310
- description: "Old tools, lanterns, typewriters, binoculars, relics, curios."
1311
- },
1312
- {
1313
- id: "other-antique-items",
1314
- name: "Other antique items",
1315
- description: "Vintage or handmade pieces not listed above."
1316
- }
1317
- ]
1318
- },
1319
- {
1320
- id: "media-printed-nostalgia",
1321
- name: "Media & Printed Nostalgia",
1322
- items: [
1323
- {
1324
- id: "records-books-media",
1325
- name: "Records, Books & Media",
1326
- description: "Vinyls, cassette tapes, old books, magazines, board games, DVDs, CDs."
1327
- },
1328
- {
1329
- id: "other-printed-recorded-media",
1330
- name: "Other printed or recorded media",
1331
- description: "Posters, manuals, out-of-print publications."
1332
- }
1333
- ]
1334
- }
1335
- ]
1336
- }
1337
- ];
1338
-
1339
1270
  // src/formFields/categories/clothingAndFashion.ts
1340
1271
  var clothingAndFashion = [
1341
1272
  {
@@ -1410,6 +1341,22 @@ var clothingAndFashion = [
1410
1341
  description: "Wearable art, statement pieces, bold handmade designs."
1411
1342
  }
1412
1343
  ]
1344
+ },
1345
+ {
1346
+ id: "traditional-cultural-clothing-accessories",
1347
+ name: "Traditional & Cultural Clothing and Accessories",
1348
+ items: [
1349
+ {
1350
+ id: "traditional-clothing-accessories",
1351
+ name: "Traditional Clothing & Accessories ",
1352
+ description: "raditional clothing, jewellery, accessories and footwear from around the world, including both handmade and non-handmade items."
1353
+ },
1354
+ {
1355
+ id: "other-traditional-cultural-items",
1356
+ name: "Other Traditional & Cultural Items",
1357
+ description: "traditional or culturally inspired wearables and decorative cultural pieces such as plates, table linens and similar items."
1358
+ }
1359
+ ]
1413
1360
  }
1414
1361
  ]
1415
1362
  }
@@ -1673,7 +1620,12 @@ var handmadeAndLocalProducts = [
1673
1620
  {
1674
1621
  id: "candles-home-scents",
1675
1622
  name: "Candles & Home Scents",
1676
- description: "Soy candles, beeswax candles, wax melts, incense sticks, room sprays."
1623
+ description: "Soy candles, beeswax candles, wax melts, incense sticks, room sprays and herbal sachets."
1624
+ },
1625
+ {
1626
+ id: "botanical-crafts",
1627
+ name: "Botanical Crafts",
1628
+ description: "Dried-flower d\xE9cor and pressed-flower crafts"
1677
1629
  },
1678
1630
  {
1679
1631
  id: "textiles-embroidery",
@@ -1685,6 +1637,16 @@ var handmadeAndLocalProducts = [
1685
1637
  name: "Woodcraft & Metalcraft",
1686
1638
  description: "Wooden boards, handmade frames, sculptures, metal signs, furniture."
1687
1639
  },
1640
+ {
1641
+ id: "handmade-soaps-natural-body-goods",
1642
+ name: "Handmade Soaps & Natural Body Goods",
1643
+ description: "Handmade soaps, balms, oils, bath items"
1644
+ },
1645
+ {
1646
+ id: "seasonal-festive-crafts",
1647
+ name: "Seasonal & Festive Crafts",
1648
+ description: "Christmas, Easter and seasonal handmade decor"
1649
+ },
1688
1650
  {
1689
1651
  id: "other-home-living-products",
1690
1652
  name: "Other home & living products",
@@ -1697,24 +1659,55 @@ var handmadeAndLocalProducts = [
1697
1659
  name: "Art & Personal Expression",
1698
1660
  items: [
1699
1661
  {
1700
- id: "art-illustrations",
1701
- name: "Art & Illustrations",
1702
- description: "Original artworks, prints, photography, digital art, calligraphy."
1662
+ id: "paintings-illustrations",
1663
+ name: "Paintings & Illustrations",
1664
+ description: "Paintings, canvas art, hand-drawn illustrations, digital prints, graphic art and calligraphy pieces."
1703
1665
  },
1704
1666
  {
1705
- id: "stationery-paper-goods",
1706
- name: "Stationery & Paper Goods",
1707
- description: "Handmade notebooks, journals, greeting cards, gift tags, bookmarks."
1667
+ id: "sculptures-carvings",
1668
+ name: "Sculptures & Carvings ",
1669
+ description: "Sculptures made from wood, stone, metal, clay or resin, carved decorative pieces and artistic 3D works."
1708
1670
  },
1709
1671
  {
1710
- id: "resin-art-mixed-media",
1711
- name: "Resin Art & Mixed Media",
1712
- description: "Unique creations made from resin or other alternative materials."
1672
+ id: "creative-handmade-alternative-art",
1673
+ name: "Creative Handmade & Alternative Art",
1674
+ description: "Handmade textile d\xE9cor, fabric ornaments, mixed-media art, creative craft pieces and modern handmade artworks."
1675
+ },
1676
+ {
1677
+ id: "handmade-mini-figures-decor",
1678
+ name: "Handmade Mini Figures & D\xE9cor",
1679
+ description: "Small handmade figures, tiny houses and crafted mini decorative items."
1713
1680
  },
1714
1681
  {
1715
1682
  id: "other-artistic-expressive-products",
1716
- name: "Other artistic or expressive products",
1717
- description: "Custom artworks, specialty handmade decor, unique crafts."
1683
+ name: "Other Artistic or Expressive Products",
1684
+ description: "Custom artworks, specialty handmade d\xE9cor, unique crafts."
1685
+ }
1686
+ ]
1687
+ },
1688
+ {
1689
+ id: "handmade-jewellery-accessories-cultural-crafts",
1690
+ name: "Handmade Jewellery, Accessories & Cultural Crafts",
1691
+ items: [
1692
+ {
1693
+ id: "jewellery-handmade-items-nz-traditional-materials",
1694
+ name: "Jewellery & Handmade Items from NZ Traditional Materials",
1695
+ description: "Handmade jewellery and decorative or functional items crafted from pounamu, bone, wood and other traditional New Zealand materials."
1696
+ },
1697
+ {
1698
+ id: "maori-pasifika-cultural-crafts-clothing",
1699
+ name: "M\u0101ori & Pasifika Cultural Crafts and Clothing",
1700
+ description: "Culturally inspired handmade items, accessories and garments featuring M\u0101ori or Pasifika motifs, traditional patterns and regional craftsmanship."
1701
+ },
1702
+ {
1703
+ id: "traditional-handmade-clothing-jewellery-crafts-global-cultures",
1704
+ name: "Traditional Handmade Clothing, Jewellery & Crafts from Global Cultures",
1705
+ description: "Handcrafted clothing, jewellery and cultural items from diverse traditions \u2014 including Asian, African, European, Middle Eastern, Indian, Chinese, Japanese, Pacific, and other culturally significant handmade pieces."
1706
+ },
1707
+ {
1708
+ id: "other-handmade-cultural-items",
1709
+ name: "Other Handmade Cultural Items",
1710
+ description: "Unique or culturally inspired handmade pieces not specifically covered in the categories above."
1718
1711
  }
1719
1712
  ]
1720
1713
  },
@@ -1725,12 +1718,22 @@ var handmadeAndLocalProducts = [
1725
1718
  {
1726
1719
  id: "handmade-pens-keychains-fridge-magnets",
1727
1720
  name: "Handmade Pens, Keychains and Fridge Magnets",
1728
- description: ""
1721
+ description: null
1729
1722
  },
1730
1723
  {
1731
1724
  id: "gift-packaging-wrapping-accessories",
1732
1725
  name: "Gift Packaging & Wrapping Accessories",
1733
- description: ""
1726
+ description: null
1727
+ },
1728
+ {
1729
+ id: "handmade-crochet-knitting-fibre-crafts",
1730
+ name: "Handmade Crochet, Knitting & Fibre Crafts",
1731
+ description: "Handmade crochet and knitted items, fabric-based crafts, small decorative pieces, creative fibre artworks and unique handcrafted accessories."
1732
+ },
1733
+ {
1734
+ id: "handmade-toys-mini-play-items",
1735
+ name: "Handmade Toys & Mini Play Items",
1736
+ description: "small handmade toys, soft toys, wooden miniatures, crochet or felt play pieces"
1734
1737
  },
1735
1738
  {
1736
1739
  id: "other-small-handmade-gifts-accessories",
@@ -1802,22 +1805,6 @@ var healthAndWellness = [
1802
1805
  description: "Items that aid relaxation, focus, or inner work."
1803
1806
  }
1804
1807
  ]
1805
- },
1806
- {
1807
- id: "holistic-alternative-services",
1808
- name: "Holistic & Alternative Services",
1809
- items: [
1810
- {
1811
- id: "holistic-alternative-services",
1812
- name: "Holistic & Alternative Services",
1813
- description: "Massage, Reiki, reflexology, chakra balancing, wellness consultations."
1814
- },
1815
- {
1816
- id: "other-wellness-services",
1817
- name: "Other wellness services",
1818
- description: "Please describe at registration."
1819
- }
1820
- ]
1821
1808
  }
1822
1809
  ]
1823
1810
  }
@@ -1844,6 +1831,11 @@ var homeGardenHousehold = [
1844
1831
  name: "Kitchenware & Dining",
1845
1832
  description: "Mugs, bowls, cutting boards, utensils, jars, coasters, kitchen textiles."
1846
1833
  },
1834
+ {
1835
+ id: "mini-figures-decor",
1836
+ name: "Mini Figures & D\xE9cor",
1837
+ description: "handmade or non-handmade small figures, tiny houses and miniature decorative items."
1838
+ },
1847
1839
  {
1848
1840
  id: "other-indoor-home-items",
1849
1841
  name: "Other indoor home items",
@@ -1876,6 +1868,16 @@ var homeGardenHousehold = [
1876
1868
  name: "Plants & Botanical Decor",
1877
1869
  description: "Potted herbs, succulents, dried flowers, terrariums, plant-based ornaments."
1878
1870
  },
1871
+ {
1872
+ id: "fresh-flowers-botanical-bouquets",
1873
+ name: "Fresh Flowers & Botanical Bouquets",
1874
+ description: "Cut flowers, seasonal bouquets, simple floral arrangements, native flower selections, and other fresh botanical items."
1875
+ },
1876
+ {
1877
+ id: "natural-decor-nature-inspired-elements",
1878
+ name: "Natural Decor & Nature-Inspired Elements",
1879
+ description: "Seashell d\xE9cor, driftwood pieces, sand ornaments, natural wood accents, stone or mineral decorations, and other nature-based decorative items."
1880
+ },
1879
1881
  {
1880
1882
  id: "garden-tools-outdoor-items",
1881
1883
  name: "Garden Tools & Outdoor Items",
@@ -2104,11 +2106,6 @@ var toysChildren = [
2104
2106
  name: "Educational & Developmental Tools",
2105
2107
  description: "STEM kits, Montessori toys, storybooks, picture books, flashcards, early learning games, language tools."
2106
2108
  },
2107
- {
2108
- id: "kids-experiences-extras",
2109
- name: "Kids\u2019 Experiences & Extras",
2110
- description: "Face painting, balloon animals, hair braiding, glitter tattoos, storytime, puppet shows, interactive zones, party gear."
2111
- },
2112
2109
  {
2113
2110
  id: "other-educational-experience-based-items",
2114
2111
  name: "Other educational or experience-based items",
@@ -2125,6 +2122,11 @@ var toysChildren = [
2125
2122
  name: "Baby & Kidswear + Accessories",
2126
2123
  description: "Handmade baby clothes, toddler outfits, bibs, hats, headbands, bags, pacifier clips, soft shoes."
2127
2124
  },
2125
+ {
2126
+ id: "baby-developmental-soft-toys",
2127
+ name: "Baby Developmental Soft Toys",
2128
+ description: "Sensory toys, rattles, fabric books, teething items, high-contrast cards, and early-skill. Montessori materials designed to support infants\u2019 cognitive and motor development."
2129
+ },
2128
2130
  {
2129
2131
  id: "other-childrens-clothing-accessories",
2130
2132
  name: "Other children\u2019s clothing or accessories",
@@ -2136,6 +2138,97 @@ var toysChildren = [
2136
2138
  }
2137
2139
  ];
2138
2140
 
2141
+ // src/formFields/categories/vintageAndAntique.ts
2142
+ var vintageAndAntique = [
2143
+ {
2144
+ id: "vintage-antique",
2145
+ name: "Vintage & Antique",
2146
+ description: "Unique, historic, or nostalgic items with collectible or decorative value.",
2147
+ subcategories: [
2148
+ {
2149
+ id: "vintage-antique-clothing-accessories",
2150
+ name: "Vintage & Antique Clothing & Accessories",
2151
+ items: [
2152
+ {
2153
+ id: "clothing-vintage-fashion",
2154
+ name: "Clothing and wearable items from past eras",
2155
+ description: "Vintage dresses, jackets, hats, gloves, belts, bags, shoes, jewellery."
2156
+ },
2157
+ {
2158
+ id: "other-clothing-accessory-items",
2159
+ name: "Other clothing-related items",
2160
+ description: "Hair clips, brooches, pins, scarf rings, small fashion accessories."
2161
+ }
2162
+ ]
2163
+ },
2164
+ {
2165
+ id: "collectibles-memorabilia",
2166
+ name: "Collectibles & Memorabilia",
2167
+ items: [
2168
+ {
2169
+ id: "small-collectible-items",
2170
+ name: "Small collectible items with historical or nostalgic significance",
2171
+ description: "Coins, stamps, toys, postcards, comics, sports cards, vintage packaging."
2172
+ },
2173
+ {
2174
+ id: "other-collectible-items",
2175
+ name: "Other collectible items",
2176
+ description: "Rare small objects, miniature figurines, special-edition items."
2177
+ }
2178
+ ]
2179
+ },
2180
+ {
2181
+ id: "homewares-decor-curiosities",
2182
+ name: "Homewares, Decor & Curiosities",
2183
+ items: [
2184
+ {
2185
+ id: "decorative-functional-vintage-items",
2186
+ name: "Decorative or functional items with a vintage or antique aesthetic",
2187
+ description: "Teacups, plates, vases, mirrors, clocks, furniture, old tools, lanterns, typewriters, curiosities."
2188
+ },
2189
+ {
2190
+ id: "handmade-vintage-art",
2191
+ name: "Handmade vintage art",
2192
+ description: "Paintings, sculptures, crafted pieces."
2193
+ },
2194
+ {
2195
+ id: "other-home-decor-items",
2196
+ name: "Other home or decor items",
2197
+ description: "Decorative pieces not listed above, unique household objects."
2198
+ }
2199
+ ]
2200
+ },
2201
+ {
2202
+ id: "vintage-media-printed-nostalgia",
2203
+ name: "Vintage Media & Printed Nostalgia",
2204
+ items: [
2205
+ {
2206
+ id: "older-media-printed-works",
2207
+ name: "Older media formats and printed works",
2208
+ description: "Vinyl records, cassette tapes, CDs, DVDs, books, magazines, board games, posters."
2209
+ },
2210
+ {
2211
+ id: "other-media-printed-items",
2212
+ name: "Other media or printed items",
2213
+ description: "Maps, manuals, leaflets, out-of-print materials."
2214
+ }
2215
+ ]
2216
+ },
2217
+ {
2218
+ id: "other-vintage-antique-items",
2219
+ name: "Other Vintage & Antique Items",
2220
+ items: [
2221
+ {
2222
+ id: "any-vintage-antique-items-not-listed",
2223
+ name: "Any vintage or antique items not listed above",
2224
+ description: "Unique, rare or uncategorised pieces."
2225
+ }
2226
+ ]
2227
+ }
2228
+ ]
2229
+ }
2230
+ ];
2231
+
2139
2232
  // src/formFields/categories/index.ts
2140
2233
  var categoryColors = {
2141
2234
  "antiques-collectibles": "#8D6748",
@@ -2164,7 +2257,7 @@ var availableCategories = assignColorToCategories([
2164
2257
  ...toysChildren,
2165
2258
  ...healthAndWellness,
2166
2259
  ...electronicsAndTechnology,
2167
- ...antiquesAndCollectibles,
2260
+ ...vintageAndAntique,
2168
2261
  ...petProductsAndAnimalGoods,
2169
2262
  ...serviceAndExperience
2170
2263
  ]);
@@ -2284,7 +2377,7 @@ var partnerBasicInfoFields = [
2284
2377
  ];
2285
2378
 
2286
2379
  // src/graphql/hooks/admin/hooksMutation.ts
2287
- var import_client5 = require("@apollo/client");
2380
+ var import_react = require("@apollo/client/react");
2288
2381
 
2289
2382
  // src/graphql/mutations/admin.ts
2290
2383
  var import_client = require("@apollo/client");
@@ -2365,6 +2458,13 @@ var TERMS_AGREEMENT_FIELDS_FRAGMENT = import_client2.gql`
2365
2458
  timestamp
2366
2459
  }
2367
2460
  `;
2461
+ var LICENCE_FIELDS_FRAGMENT = import_client2.gql`
2462
+ fragment LicenceFields on LicenceType {
2463
+ expiryDate
2464
+ issuedDate
2465
+ licenceType
2466
+ }
2467
+ `;
2368
2468
  var USER_ACTIVITY_FIELDS_FRAGMENT = import_client2.gql`
2369
2469
  fragment UserActivityFields on UserActivityType {
2370
2470
  favourites {
@@ -2414,7 +2514,9 @@ var USER_FIELDS_FRAGMENT = import_client2.gql`
2414
2514
  firstName
2415
2515
  isTester
2416
2516
  lastName
2417
- licences
2517
+ licences {
2518
+ ...LicenceFields
2519
+ }
2418
2520
  platform
2419
2521
  preferredRegion
2420
2522
  refreshToken
@@ -2432,6 +2534,7 @@ var USER_FIELDS_FRAGMENT = import_client2.gql`
2432
2534
  ${ASSOCIATES_FIELDS_FRAGMENT}
2433
2535
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
2434
2536
  ${USER_ACTIVITY_FIELDS_FRAGMENT}
2537
+ ${LICENCE_FIELDS_FRAGMENT}
2435
2538
  `;
2436
2539
  var STALL_TYPE_FIELDS_FRAGMENT = import_client2.gql`
2437
2540
  fragment StallTypeFields on StallTypeType {
@@ -2850,25 +2953,22 @@ var GET_VENDOR_INFO = import_client4.gql`
2850
2953
 
2851
2954
  // src/graphql/hooks/admin/hooksMutation.ts
2852
2955
  var useAdminUpdateResourceType = () => {
2853
- const [adminUpdateResourceType, { loading, error }] = (0, import_client5.useMutation)(
2854
- ADMIN_UPDATE_RESOURCE_TYPE_MUTATION,
2855
- {
2856
- awaitRefetchQueries: true,
2857
- refetchQueries: (mutationResult) => {
2858
- const adminUpdateResourceType2 = mutationResult?.data?.adminUpdateResourceType;
2859
- const resourceId = adminUpdateResourceType2?.resourceId;
2860
- const resourceType = adminUpdateResourceType2?.resourceType;
2861
- if (!resourceId) return [];
2862
- const detectQuery = resourceType === "event" /* EVENT */ ? GET_EVENT : GET_VENDOR;
2863
- return [
2864
- {
2865
- query: detectQuery,
2866
- variables: { _id: resourceId }
2867
- }
2868
- ];
2869
- }
2956
+ const [adminUpdateResourceType, { loading, error }] = (0, import_react.useMutation)(ADMIN_UPDATE_RESOURCE_TYPE_MUTATION, {
2957
+ awaitRefetchQueries: true,
2958
+ refetchQueries: (mutationResult) => {
2959
+ const adminUpdateResourceType2 = mutationResult?.data?.adminUpdateResourceType;
2960
+ const resourceId = adminUpdateResourceType2?.resourceId;
2961
+ const resourceType = adminUpdateResourceType2?.resourceType;
2962
+ if (!resourceId) return [];
2963
+ const detectQuery = resourceType === "event" /* EVENT */ ? GET_EVENT : GET_VENDOR;
2964
+ return [
2965
+ {
2966
+ query: detectQuery,
2967
+ variables: { _id: resourceId }
2968
+ }
2969
+ ];
2870
2970
  }
2871
- );
2971
+ });
2872
2972
  return {
2873
2973
  adminUpdateResourceType,
2874
2974
  error,
@@ -2877,11 +2977,11 @@ var useAdminUpdateResourceType = () => {
2877
2977
  };
2878
2978
 
2879
2979
  // src/graphql/hooks/auth.ts
2880
- var import_client7 = require("@apollo/client");
2980
+ var import_react2 = require("@apollo/client/react");
2881
2981
 
2882
2982
  // src/graphql/mutations/auth.ts
2883
- var import_client6 = require("@apollo/client");
2884
- var REGISTER_MUTATION = import_client6.gql`
2983
+ var import_client5 = require("@apollo/client");
2984
+ var REGISTER_MUTATION = import_client5.gql`
2885
2985
  mutation register($input: RegisterInputType!) {
2886
2986
  register(input: $input) {
2887
2987
  message
@@ -2894,7 +2994,7 @@ var REGISTER_MUTATION = import_client6.gql`
2894
2994
  }
2895
2995
  ${USER_FIELDS_FRAGMENT}
2896
2996
  `;
2897
- var LOGIN_MUTATION = import_client6.gql`
2997
+ var LOGIN_MUTATION = import_client5.gql`
2898
2998
  mutation login($input: LoginInputType!) {
2899
2999
  login(input: $input) {
2900
3000
  message
@@ -2907,14 +3007,14 @@ var LOGIN_MUTATION = import_client6.gql`
2907
3007
  }
2908
3008
  ${USER_FIELDS_FRAGMENT}
2909
3009
  `;
2910
- var LOGOUT_MUTATION = import_client6.gql`
3010
+ var LOGOUT_MUTATION = import_client5.gql`
2911
3011
  mutation logout {
2912
3012
  logout {
2913
3013
  message
2914
3014
  }
2915
3015
  }
2916
3016
  `;
2917
- var REFRESH_TOKEN_MUTATION = import_client6.gql`
3017
+ var REFRESH_TOKEN_MUTATION = import_client5.gql`
2918
3018
  mutation refreshToken($input: RefreshTokenInputType!) {
2919
3019
  refreshToken(input: $input) {
2920
3020
  refreshToken
@@ -2922,21 +3022,21 @@ var REFRESH_TOKEN_MUTATION = import_client6.gql`
2922
3022
  }
2923
3023
  }
2924
3024
  `;
2925
- var RESET_PASSWORD_MUTATION = import_client6.gql`
3025
+ var RESET_PASSWORD_MUTATION = import_client5.gql`
2926
3026
  mutation resetPassword($input: ResetPasswordInputType!) {
2927
3027
  resetPassword(input: $input) {
2928
3028
  message
2929
3029
  }
2930
3030
  }
2931
3031
  `;
2932
- var REQUEST_PASSWORD_RESET_MUTATION = import_client6.gql`
3032
+ var REQUEST_PASSWORD_RESET_MUTATION = import_client5.gql`
2933
3033
  mutation requestPasswordReset($input: RequestPasswordResetInputType!) {
2934
3034
  requestPasswordReset(input: $input) {
2935
3035
  message
2936
3036
  }
2937
3037
  }
2938
3038
  `;
2939
- var VALIDATE_VERIFICATION_TOKEN_MUTATION = import_client6.gql`
3039
+ var VALIDATE_VERIFICATION_TOKEN_MUTATION = import_client5.gql`
2940
3040
  mutation validateVerificationToken(
2941
3041
  $input: ValidateVerificationTokenInputType!
2942
3042
  ) {
@@ -2948,51 +3048,51 @@ var VALIDATE_VERIFICATION_TOKEN_MUTATION = import_client6.gql`
2948
3048
 
2949
3049
  // src/graphql/hooks/auth.ts
2950
3050
  var useRegister = () => {
2951
- const [register, { loading, error }] = (0, import_client7.useMutation)(REGISTER_MUTATION);
3051
+ const [register, { loading, error }] = (0, import_react2.useMutation)(REGISTER_MUTATION);
2952
3052
  return { error, loading, register };
2953
3053
  };
2954
3054
  var useLogin = () => {
2955
- const [login, { loading, error }] = (0, import_client7.useMutation)(LOGIN_MUTATION);
3055
+ const [login, { loading, error }] = (0, import_react2.useMutation)(LOGIN_MUTATION);
2956
3056
  return { error, loading, login };
2957
3057
  };
2958
3058
  var useLogout = () => {
2959
- const [logout, { loading, error }] = (0, import_client7.useMutation)(LOGOUT_MUTATION);
3059
+ const [logout, { loading, error }] = (0, import_react2.useMutation)(LOGOUT_MUTATION);
2960
3060
  return { error, loading, logout };
2961
3061
  };
2962
3062
  var useRefreshToken = () => {
2963
- const [refreshToken, { loading, error }] = (0, import_client7.useMutation)(
3063
+ const [refreshToken, { loading, error }] = (0, import_react2.useMutation)(
2964
3064
  REFRESH_TOKEN_MUTATION
2965
3065
  );
2966
3066
  return { error, loading, refreshToken };
2967
3067
  };
2968
3068
  var useRequestPasswordReset = () => {
2969
- const [requestPasswordReset, { loading, error }] = (0, import_client7.useMutation)(
3069
+ const [requestPasswordReset, { loading, error }] = (0, import_react2.useMutation)(
2970
3070
  REQUEST_PASSWORD_RESET_MUTATION
2971
3071
  );
2972
3072
  return { error, loading, requestPasswordReset };
2973
3073
  };
2974
3074
  var useValidateVerificationToken = () => {
2975
- const [validateVerificationToken, { loading, error }] = (0, import_client7.useMutation)(
3075
+ const [validateVerificationToken, { loading, error }] = (0, import_react2.useMutation)(
2976
3076
  VALIDATE_VERIFICATION_TOKEN_MUTATION
2977
3077
  );
2978
3078
  return { error, loading, validateVerificationToken };
2979
3079
  };
2980
3080
  var useResetPassword = () => {
2981
- const [resetPassword, { loading, error }] = (0, import_client7.useMutation)(
3081
+ const [resetPassword, { loading, error }] = (0, import_react2.useMutation)(
2982
3082
  RESET_PASSWORD_MUTATION
2983
3083
  );
2984
3084
  return { error, loading, resetPassword };
2985
3085
  };
2986
3086
 
2987
3087
  // src/graphql/hooks/chat/hooksMutation.ts
2988
- var import_client10 = require("@apollo/client");
3088
+ var import_react3 = require("@apollo/client/react");
2989
3089
 
2990
3090
  // src/graphql/mutations/chat.ts
2991
- var import_client9 = require("@apollo/client");
3091
+ var import_client7 = require("@apollo/client");
2992
3092
 
2993
3093
  // src/graphql/queries/chat.ts
2994
- var import_client8 = require("@apollo/client");
2995
- var CHAT_MESSAGE_FIELDS_FRAGMENT = import_client8.gql`
3094
+ var import_client6 = require("@apollo/client");
3095
+ var CHAT_MESSAGE_FIELDS_FRAGMENT = import_client6.gql`
2996
3096
  fragment ChatMessageFields on ChatMessageType {
2997
3097
  _id
2998
3098
  content
@@ -3001,7 +3101,7 @@ var CHAT_MESSAGE_FIELDS_FRAGMENT = import_client8.gql`
3001
3101
  updatedAt
3002
3102
  }
3003
3103
  `;
3004
- var CHAT_PARTICIPANT = import_client8.gql`
3104
+ var CHAT_PARTICIPANT = import_client6.gql`
3005
3105
  fragment ChatParticipantFields on ChatParticipantType {
3006
3106
  active
3007
3107
  userAvatar
@@ -3010,7 +3110,7 @@ var CHAT_PARTICIPANT = import_client8.gql`
3010
3110
  userName
3011
3111
  }
3012
3112
  `;
3013
- var CHAT_FIELDS_FRAGMENT = import_client8.gql`
3113
+ var CHAT_FIELDS_FRAGMENT = import_client6.gql`
3014
3114
  fragment ChatFields on ChatType {
3015
3115
  _id
3016
3116
  active
@@ -3034,7 +3134,7 @@ var CHAT_FIELDS_FRAGMENT = import_client8.gql`
3034
3134
  ${CHAT_MESSAGE_FIELDS_FRAGMENT}
3035
3135
  ${CHAT_PARTICIPANT}
3036
3136
  `;
3037
- var CHAT = import_client8.gql`
3137
+ var CHAT = import_client6.gql`
3038
3138
  query chat($_id: ID!) {
3039
3139
  chat(_id: $_id) {
3040
3140
  ...ChatFields
@@ -3042,7 +3142,7 @@ var CHAT = import_client8.gql`
3042
3142
  }
3043
3143
  ${CHAT_FIELDS_FRAGMENT}
3044
3144
  `;
3045
- var USER_CHATS = import_client8.gql`
3145
+ var USER_CHATS = import_client6.gql`
3046
3146
  query userChats {
3047
3147
  userChats {
3048
3148
  ...ChatFields
@@ -3052,7 +3152,7 @@ var USER_CHATS = import_client8.gql`
3052
3152
  `;
3053
3153
 
3054
3154
  // src/graphql/mutations/chat.ts
3055
- var SEND_CHAT_MESSAGE_MUTATION = import_client9.gql`
3155
+ var SEND_CHAT_MESSAGE_MUTATION = import_client7.gql`
3056
3156
  mutation sendChatMessage($_id: ID!, $input: ChatMessageInputType!) {
3057
3157
  sendChatMessage(_id: $_id, input: $input) {
3058
3158
  ...ChatFields
@@ -3060,12 +3160,12 @@ var SEND_CHAT_MESSAGE_MUTATION = import_client9.gql`
3060
3160
  }
3061
3161
  ${CHAT_FIELDS_FRAGMENT}
3062
3162
  `;
3063
- var DELETE_CHAT_MUTATION = import_client9.gql`
3163
+ var DELETE_CHAT_MUTATION = import_client7.gql`
3064
3164
  mutation deleteChat($_id: ID!) {
3065
3165
  deleteChat(_id: $_id)
3066
3166
  }
3067
3167
  `;
3068
- var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client9.gql`
3168
+ var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client7.gql`
3069
3169
  mutation addParticipantToChat($chatId: ID!, $userId: ID!) {
3070
3170
  addParticipantToChat(chatId: $chatId, userId: $userId) {
3071
3171
  ...ChatFields
@@ -3073,7 +3173,7 @@ var ADD_PARTICIPANT_TO_CHAT_MUTATION = import_client9.gql`
3073
3173
  }
3074
3174
  ${CHAT_FIELDS_FRAGMENT}
3075
3175
  `;
3076
- var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client9.gql`
3176
+ var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client7.gql`
3077
3177
  mutation removeParticipantFromChat($chatId: ID!, $userId: ID!) {
3078
3178
  removeParticipantFromChat(chatId: $chatId, userId: $userId)
3079
3179
  }
@@ -3081,53 +3181,47 @@ var REMOVE_PARTICIPANT_FROM_CHAT_MUTATION = import_client9.gql`
3081
3181
 
3082
3182
  // src/graphql/hooks/chat/hooksMutation.ts
3083
3183
  var useSendChatMessage = () => {
3084
- const [sendChatMessage, { loading, error }] = (0, import_client10.useMutation)(
3085
- SEND_CHAT_MESSAGE_MUTATION,
3086
- {
3087
- awaitRefetchQueries: true,
3088
- refetchQueries: (mutationResult) => {
3089
- const chatId = mutationResult?.data?.sendChatMessage?._id;
3090
- return [
3091
- {
3092
- query: CHAT,
3093
- variables: { _id: chatId }
3094
- }
3095
- ];
3096
- }
3184
+ const [sendChatMessage, { loading, error }] = (0, import_react3.useMutation)(SEND_CHAT_MESSAGE_MUTATION, {
3185
+ awaitRefetchQueries: true,
3186
+ refetchQueries: (mutationResult) => {
3187
+ const chatId = mutationResult?.data?.sendChatMessage?._id;
3188
+ return [
3189
+ {
3190
+ query: CHAT,
3191
+ variables: { _id: chatId }
3192
+ }
3193
+ ];
3097
3194
  }
3098
- );
3195
+ });
3099
3196
  return { error, loading, sendChatMessage };
3100
3197
  };
3101
3198
  var useDeleteChat = () => {
3102
- const [deleteChat, { loading, error }] = (0, import_client10.useMutation)(DELETE_CHAT_MUTATION, {
3199
+ const [deleteChat, { loading, error }] = (0, import_react3.useMutation)(DELETE_CHAT_MUTATION, {
3103
3200
  awaitRefetchQueries: true,
3104
3201
  refetchQueries: [{ query: USER_CHATS }]
3105
3202
  });
3106
3203
  return { deleteChat, error, loading };
3107
3204
  };
3108
3205
  var useAddParticipantToChat = () => {
3109
- const [addParticipantToChat, { loading, error }] = (0, import_client10.useMutation)(
3110
- ADD_PARTICIPANT_TO_CHAT_MUTATION,
3111
- {
3112
- awaitRefetchQueries: true,
3113
- refetchQueries: (mutationResult) => {
3114
- const chatId = mutationResult?.data?.addParticipantToChat?._id;
3115
- return [
3116
- {
3117
- query: CHAT,
3118
- variables: { _id: chatId }
3119
- },
3120
- {
3121
- query: USER_CHATS
3122
- }
3123
- ];
3124
- }
3206
+ const [addParticipantToChat, { loading, error }] = (0, import_react3.useMutation)(ADD_PARTICIPANT_TO_CHAT_MUTATION, {
3207
+ awaitRefetchQueries: true,
3208
+ refetchQueries: (mutationResult) => {
3209
+ const chatId = mutationResult?.data?.addParticipantToChat?._id;
3210
+ return [
3211
+ {
3212
+ query: CHAT,
3213
+ variables: { _id: chatId }
3214
+ },
3215
+ {
3216
+ query: USER_CHATS
3217
+ }
3218
+ ];
3125
3219
  }
3126
- );
3220
+ });
3127
3221
  return { addParticipantToChat, error, loading };
3128
3222
  };
3129
3223
  var useRemoveParticipantFromChat = () => {
3130
- const [removeParticipantFromChat, { loading, error }] = (0, import_client10.useMutation)(
3224
+ const [removeParticipantFromChat, { loading, error }] = (0, import_react3.useMutation)(
3131
3225
  REMOVE_PARTICIPANT_FROM_CHAT_MUTATION,
3132
3226
  {
3133
3227
  awaitRefetchQueries: true,
@@ -3138,11 +3232,11 @@ var useRemoveParticipantFromChat = () => {
3138
3232
  };
3139
3233
 
3140
3234
  // src/graphql/hooks/chat/hooksQuery.ts
3141
- var import_client12 = require("@apollo/client");
3235
+ var import_react4 = require("@apollo/client/react");
3142
3236
 
3143
3237
  // src/graphql/subscriptions/chat.ts
3144
- var import_client11 = require("@apollo/client");
3145
- var GET_CHAT_MESSAGE = import_client11.gql`
3238
+ var import_client8 = require("@apollo/client");
3239
+ var GET_CHAT_MESSAGE = import_client8.gql`
3146
3240
  subscription {
3147
3241
  getChatMessage {
3148
3242
  ...ChatFields
@@ -3153,7 +3247,7 @@ var GET_CHAT_MESSAGE = import_client11.gql`
3153
3247
 
3154
3248
  // src/graphql/hooks/chat/hooksQuery.ts
3155
3249
  var useGetChat = (_id) => {
3156
- const { loading, error, data, refetch } = (0, import_client12.useQuery)(CHAT, {
3250
+ const { loading, error, data, refetch } = (0, import_react4.useQuery)(CHAT, {
3157
3251
  fetchPolicy: "network-only",
3158
3252
  skip: !_id,
3159
3253
  variables: { _id }
@@ -3162,24 +3256,29 @@ var useGetChat = (_id) => {
3162
3256
  return { chat, error, loading, refetch };
3163
3257
  };
3164
3258
  var useGetUserChats = () => {
3165
- const { loading, error, data, refetch } = (0, import_client12.useQuery)(USER_CHATS, {
3166
- fetchPolicy: "network-only"
3167
- });
3168
- const userChats = data?.userChats;
3259
+ const { loading, error, data, refetch } = (0, import_react4.useQuery)(
3260
+ USER_CHATS,
3261
+ {
3262
+ fetchPolicy: "network-only"
3263
+ }
3264
+ );
3265
+ const userChats = data?.userChats || [];
3169
3266
  return { error, loading, refetch, userChats };
3170
3267
  };
3171
3268
  var useGetChatSubscription = () => {
3172
- const { data, loading, error } = (0, import_client12.useSubscription)(GET_CHAT_MESSAGE);
3269
+ const { data, loading, error } = (0, import_react4.useSubscription)(
3270
+ GET_CHAT_MESSAGE
3271
+ );
3173
3272
  const chat = data?.getChat;
3174
3273
  return { chat, error, loading };
3175
3274
  };
3176
3275
 
3177
3276
  // src/graphql/hooks/contactUs.ts
3178
- var import_client14 = require("@apollo/client");
3277
+ var import_react5 = require("@apollo/client/react");
3179
3278
 
3180
3279
  // src/graphql/mutations/contactUs.ts
3181
- var import_client13 = require("@apollo/client");
3182
- var CONTACT_US_MUTATION = import_client13.gql`
3280
+ var import_client9 = require("@apollo/client");
3281
+ var CONTACT_US_MUTATION = import_client9.gql`
3183
3282
  mutation contactUs($input: ContactUsInputType!) {
3184
3283
  contactUs(input: $input) {
3185
3284
  message
@@ -3189,16 +3288,16 @@ var CONTACT_US_MUTATION = import_client13.gql`
3189
3288
 
3190
3289
  // src/graphql/hooks/contactUs.ts
3191
3290
  var useContactUs = () => {
3192
- const [contactUs, { loading, error }] = (0, import_client14.useMutation)(CONTACT_US_MUTATION);
3291
+ const [contactUs, { loading, error }] = (0, import_react5.useMutation)(CONTACT_US_MUTATION);
3193
3292
  return { contactUs, error, loading };
3194
3293
  };
3195
3294
 
3196
3295
  // src/graphql/hooks/event/hooksMutation.ts
3197
- var import_client18 = require("@apollo/client");
3296
+ var import_react6 = require("@apollo/client/react");
3198
3297
 
3199
3298
  // src/graphql/mutations/event.ts
3200
- var import_client15 = require("@apollo/client");
3201
- var CREATE_EVENT_MUTATION = import_client15.gql`
3299
+ var import_client10 = require("@apollo/client");
3300
+ var CREATE_EVENT_MUTATION = import_client10.gql`
3202
3301
  mutation createEvent($input: EventInputType!) {
3203
3302
  createEvent(input: $input) {
3204
3303
  ...EventFields
@@ -3206,7 +3305,7 @@ var CREATE_EVENT_MUTATION = import_client15.gql`
3206
3305
  }
3207
3306
  ${EVENT}
3208
3307
  `;
3209
- var UPDATE_EVENT_MUTATION = import_client15.gql`
3308
+ var UPDATE_EVENT_MUTATION = import_client10.gql`
3210
3309
  mutation updateEvent($_id: ID!, $input: EventInputType!) {
3211
3310
  updateEvent(_id: $_id, input: $input) {
3212
3311
  ...EventFields
@@ -3214,12 +3313,12 @@ var UPDATE_EVENT_MUTATION = import_client15.gql`
3214
3313
  }
3215
3314
  ${EVENT}
3216
3315
  `;
3217
- var DELETE_EVENT_MUTATION = import_client15.gql`
3316
+ var DELETE_EVENT_MUTATION = import_client10.gql`
3218
3317
  mutation deleteEvent($_id: ID!) {
3219
3318
  deleteEvent(_id: $_id)
3220
3319
  }
3221
3320
  `;
3222
- var CREATE_EVENT_INFO_MUTATION = import_client15.gql`
3321
+ var CREATE_EVENT_INFO_MUTATION = import_client10.gql`
3223
3322
  mutation createEventInfo($input: EventInfoInputType!) {
3224
3323
  createEventInfo(input: $input) {
3225
3324
  ...EventInfoFields
@@ -3227,7 +3326,7 @@ var CREATE_EVENT_INFO_MUTATION = import_client15.gql`
3227
3326
  }
3228
3327
  ${EVENT_INFO}
3229
3328
  `;
3230
- var UPDATE_EVENT_INFO_MUTATION = import_client15.gql`
3329
+ var UPDATE_EVENT_INFO_MUTATION = import_client10.gql`
3231
3330
  mutation updateEventInfo($_id: ID!, $input: EventInfoInputType!) {
3232
3331
  updateEventInfo(_id: $_id, input: $input) {
3233
3332
  ...EventInfoFields
@@ -3237,11 +3336,11 @@ var UPDATE_EVENT_INFO_MUTATION = import_client15.gql`
3237
3336
  `;
3238
3337
 
3239
3338
  // src/graphql/queries/user.ts
3240
- var import_client17 = require("@apollo/client");
3339
+ var import_client12 = require("@apollo/client");
3241
3340
 
3242
3341
  // src/graphql/queries/partner.ts
3243
- var import_client16 = require("@apollo/client");
3244
- var PARTNER = import_client16.gql`
3342
+ var import_client11 = require("@apollo/client");
3343
+ var PARTNER = import_client11.gql`
3245
3344
  fragment PartnerFields on PartnerType {
3246
3345
  _id
3247
3346
  active
@@ -3295,7 +3394,7 @@ var PARTNER = import_client16.gql`
3295
3394
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
3296
3395
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
3297
3396
  `;
3298
- var GET_PARTNERS = import_client16.gql`
3397
+ var GET_PARTNERS = import_client11.gql`
3299
3398
  query getPartners {
3300
3399
  partners {
3301
3400
  ...PartnerFields
@@ -3303,7 +3402,7 @@ var GET_PARTNERS = import_client16.gql`
3303
3402
  }
3304
3403
  ${PARTNER}
3305
3404
  `;
3306
- var GET_PARTNER = import_client16.gql`
3405
+ var GET_PARTNER = import_client11.gql`
3307
3406
  query getPartner($_id: ID!) {
3308
3407
  partner(_id: $_id) {
3309
3408
  ...PartnerFields
@@ -3311,7 +3410,7 @@ var GET_PARTNER = import_client16.gql`
3311
3410
  }
3312
3411
  ${PARTNER}
3313
3412
  `;
3314
- var GET_PARTNERS_BY_REGION = import_client16.gql`
3413
+ var GET_PARTNERS_BY_REGION = import_client11.gql`
3315
3414
  query getPartnersByRegion($region: String!) {
3316
3415
  partnersByRegion(region: $region) {
3317
3416
  ...PartnerFields
@@ -3319,7 +3418,7 @@ var GET_PARTNERS_BY_REGION = import_client16.gql`
3319
3418
  }
3320
3419
  ${PARTNER}
3321
3420
  `;
3322
- var SEARCH_PARTNERS = import_client16.gql`
3421
+ var SEARCH_PARTNERS = import_client11.gql`
3323
3422
  query searchPartners($search: String!, $region: String) {
3324
3423
  partnersSearch(search: $search, region: $region) {
3325
3424
  ...PartnerFields
@@ -3329,7 +3428,7 @@ var SEARCH_PARTNERS = import_client16.gql`
3329
3428
  `;
3330
3429
 
3331
3430
  // src/graphql/queries/user.ts
3332
- var GET_USERS = import_client17.gql`
3431
+ var GET_USERS = import_client12.gql`
3333
3432
  query getUsers {
3334
3433
  users {
3335
3434
  ...UserFields
@@ -3337,7 +3436,7 @@ var GET_USERS = import_client17.gql`
3337
3436
  }
3338
3437
  ${USER_FIELDS_FRAGMENT}
3339
3438
  `;
3340
- var GET_USER = import_client17.gql`
3439
+ var GET_USER = import_client12.gql`
3341
3440
  query getUser($_id: ID!) {
3342
3441
  user(_id: $_id) {
3343
3442
  ...UserFields
@@ -3345,7 +3444,7 @@ var GET_USER = import_client17.gql`
3345
3444
  }
3346
3445
  ${USER_FIELDS_FRAGMENT}
3347
3446
  `;
3348
- var GET_USER_EVENTS = import_client17.gql`
3447
+ var GET_USER_EVENTS = import_client12.gql`
3349
3448
  query getUserEvents {
3350
3449
  userEvents {
3351
3450
  ...EventFields
@@ -3353,7 +3452,7 @@ var GET_USER_EVENTS = import_client17.gql`
3353
3452
  }
3354
3453
  ${EVENT}
3355
3454
  `;
3356
- var GET_USER_VENDORS = import_client17.gql`
3455
+ var GET_USER_VENDORS = import_client12.gql`
3357
3456
  query getUserVendors {
3358
3457
  userVendors {
3359
3458
  ...VendorFields
@@ -3361,7 +3460,7 @@ var GET_USER_VENDORS = import_client17.gql`
3361
3460
  }
3362
3461
  ${VENDOR}
3363
3462
  `;
3364
- var GET_USER_PARTNERS = import_client17.gql`
3463
+ var GET_USER_PARTNERS = import_client12.gql`
3365
3464
  query getUserPartners {
3366
3465
  userPartners {
3367
3466
  ...PartnerFields
@@ -3369,7 +3468,7 @@ var GET_USER_PARTNERS = import_client17.gql`
3369
3468
  }
3370
3469
  ${PARTNER}
3371
3470
  `;
3372
- var GET_USER_ACTIVITIES = import_client17.gql`
3471
+ var GET_USER_ACTIVITIES = import_client12.gql`
3373
3472
  query getUserActivities {
3374
3473
  userActivities {
3375
3474
  favourites {
@@ -3403,117 +3502,117 @@ var GET_USER_ACTIVITIES = import_client17.gql`
3403
3502
 
3404
3503
  // src/graphql/hooks/event/hooksMutation.ts
3405
3504
  var useCreateEvent = () => {
3406
- const [createEvent, { loading, error }] = (0, import_client18.useMutation)(CREATE_EVENT_MUTATION, {
3505
+ const [createEvent, { loading, error }] = (0, import_react6.useMutation)(CREATE_EVENT_MUTATION, {
3407
3506
  awaitRefetchQueries: true,
3408
3507
  refetchQueries: [{ query: GET_USER_EVENTS }]
3409
3508
  });
3410
3509
  return { createEvent, error, loading };
3411
3510
  };
3412
3511
  var useUpdateEvent = () => {
3413
- const [updateEvent, { loading, error }] = (0, import_client18.useMutation)(UPDATE_EVENT_MUTATION, {
3512
+ const [updateEvent, { loading, error }] = (0, import_react6.useMutation)(UPDATE_EVENT_MUTATION, {
3414
3513
  awaitRefetchQueries: true,
3415
3514
  refetchQueries: [{ query: GET_USER_EVENTS }]
3416
3515
  });
3417
3516
  return { error, loading, updateEvent };
3418
3517
  };
3419
3518
  var useDeleteEvent = () => {
3420
- const [deleteEvent, { loading, error }] = (0, import_client18.useMutation)(DELETE_EVENT_MUTATION, {
3519
+ const [deleteEvent, { loading, error }] = (0, import_react6.useMutation)(DELETE_EVENT_MUTATION, {
3421
3520
  awaitRefetchQueries: true,
3422
3521
  refetchQueries: [{ query: GET_USER_EVENTS }]
3423
3522
  });
3424
3523
  return { deleteEvent, error, loading };
3425
3524
  };
3426
3525
  var useCreateEventInfo = () => {
3427
- const [createEventInfo, { loading, error }] = (0, import_client18.useMutation)(
3428
- CREATE_EVENT_INFO_MUTATION,
3429
- {
3430
- awaitRefetchQueries: true,
3431
- refetchQueries: (mutationResult) => {
3432
- const eventId = mutationResult?.data?.createEventInfo?.eventId;
3433
- if (!eventId) return [];
3434
- return [
3435
- {
3436
- query: GET_EVENT_INFO,
3437
- variables: { eventId }
3438
- // Pass the eventId for refetching
3439
- },
3440
- {
3441
- query: GET_USER_EVENTS
3442
- },
3443
- {
3444
- query: GET_EVENT,
3445
- variables: { _id: eventId }
3446
- }
3447
- ];
3448
- }
3526
+ const [createEventInfo, { loading, error }] = (0, import_react6.useMutation)(CREATE_EVENT_INFO_MUTATION, {
3527
+ awaitRefetchQueries: true,
3528
+ refetchQueries: (mutationResult) => {
3529
+ const eventId = mutationResult?.data?.createEventInfo?.eventId;
3530
+ if (!eventId) return [];
3531
+ return [
3532
+ {
3533
+ query: GET_EVENT_INFO,
3534
+ variables: { eventId }
3535
+ // Pass the eventId for refetching
3536
+ },
3537
+ {
3538
+ query: GET_USER_EVENTS
3539
+ },
3540
+ {
3541
+ query: GET_EVENT,
3542
+ variables: { _id: eventId }
3543
+ }
3544
+ ];
3449
3545
  }
3450
- );
3546
+ });
3451
3547
  return { createEventInfo, error, loading };
3452
3548
  };
3453
3549
  var useUpdateEventInfo = () => {
3454
- const [updateEventInfo, { loading, error }] = (0, import_client18.useMutation)(
3455
- UPDATE_EVENT_INFO_MUTATION,
3456
- {
3457
- awaitRefetchQueries: true,
3458
- refetchQueries: (mutationResult) => {
3459
- const eventId = mutationResult?.data?.updateEventInfo?.eventId;
3460
- if (!eventId) return [];
3461
- return [
3462
- {
3463
- query: GET_EVENT_INFO,
3464
- variables: { eventId }
3465
- // Pass the eventId for refetching
3466
- },
3467
- {
3468
- query: GET_EVENT,
3469
- variables: { _id: eventId }
3470
- // Pass the eventId for refetching
3471
- }
3472
- ];
3473
- }
3550
+ const [updateEventInfo, { loading, error }] = (0, import_react6.useMutation)(UPDATE_EVENT_INFO_MUTATION, {
3551
+ awaitRefetchQueries: true,
3552
+ refetchQueries: (mutationResult) => {
3553
+ const eventId = mutationResult?.data?.updateEventInfo?.eventId;
3554
+ if (!eventId) return [];
3555
+ return [
3556
+ {
3557
+ query: GET_EVENT_INFO,
3558
+ variables: { eventId }
3559
+ // Pass the eventId for refetching
3560
+ },
3561
+ {
3562
+ query: GET_EVENT,
3563
+ variables: { _id: eventId }
3564
+ // Pass the eventId for refetching
3565
+ }
3566
+ ];
3474
3567
  }
3475
- );
3568
+ });
3476
3569
  return { error, loading, updateEventInfo };
3477
3570
  };
3478
3571
 
3479
3572
  // src/graphql/hooks/event/hooksQuery.ts
3480
- var import_client19 = require("@apollo/client");
3573
+ var import_react7 = require("@apollo/client/react");
3481
3574
  var useGetEvents = () => {
3482
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(GET_EVENTS, {
3483
- fetchPolicy: "network-only"
3484
- });
3485
- const events = data?.events;
3575
+ const { loading, error, data, refetch } = (0, import_react7.useQuery)(
3576
+ GET_EVENTS,
3577
+ {
3578
+ fetchPolicy: "network-only"
3579
+ }
3580
+ );
3581
+ const events = data?.events || [];
3486
3582
  return { error, events, loading, refetch };
3487
3583
  };
3488
3584
  var useGetEvent = (_id) => {
3489
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(GET_EVENT, {
3490
- fetchPolicy: "network-only",
3491
- skip: !_id,
3492
- variables: { _id }
3493
- });
3585
+ const { loading, error, data, refetch } = (0, import_react7.useQuery)(
3586
+ GET_EVENT,
3587
+ {
3588
+ fetchPolicy: "network-only",
3589
+ skip: !_id,
3590
+ variables: { _id }
3591
+ }
3592
+ );
3494
3593
  const event = data?.event;
3495
3594
  return { error, event, loading, refetch };
3496
3595
  };
3497
3596
  var useGetEventsByRegion = (region) => {
3498
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(GET_EVENTS_BY_REGION, {
3597
+ const { loading, error, data, refetch } = (0, import_react7.useQuery)(GET_EVENTS_BY_REGION, {
3499
3598
  fetchPolicy: "no-cache",
3500
3599
  skip: !region,
3501
3600
  variables: { region }
3502
3601
  });
3503
- const eventsByRegion = data?.eventsByRegion;
3602
+ const eventsByRegion = data?.eventsByRegion || [];
3504
3603
  return { error, eventsByRegion, loading, refetch };
3505
3604
  };
3506
3605
  var useSearchEvents = (search, region) => {
3507
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(SEARCH_EVENTS, {
3606
+ const { loading, error, data, refetch } = (0, import_react7.useQuery)(SEARCH_EVENTS, {
3508
3607
  fetchPolicy: "network-only",
3509
3608
  skip: search.length < 3,
3510
3609
  variables: { region, search }
3511
3610
  });
3512
- const eventsSearch = data?.eventsSearch;
3611
+ const eventsSearch = data?.eventsSearch || [];
3513
3612
  return { error, eventsSearch, loading, refetch };
3514
3613
  };
3515
3614
  var useGetEventsNearMe = (location) => {
3516
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(GET_EVENTS_NEAR_ME, {
3615
+ const { loading, error, data, refetch } = (0, import_react7.useQuery)(GET_EVENTS_NEAR_ME, {
3517
3616
  fetchPolicy: "network-only",
3518
3617
  skip: !location.latitude || !location.longitude,
3519
3618
  variables: {
@@ -3523,11 +3622,11 @@ var useGetEventsNearMe = (location) => {
3523
3622
  // Default to 10km if no radius is provided
3524
3623
  }
3525
3624
  });
3526
- const eventsNearMe = data?.eventsNearMe;
3625
+ const eventsNearMe = data?.eventsNearMe || [];
3527
3626
  return { error, eventsNearMe, loading, refetch };
3528
3627
  };
3529
3628
  var useGetEventInfo = (eventId) => {
3530
- const { loading, error, data, refetch } = (0, import_client19.useQuery)(GET_EVENT_INFO, {
3629
+ const { loading, error, data, refetch } = (0, import_react7.useQuery)(GET_EVENT_INFO, {
3531
3630
  fetchPolicy: "network-only",
3532
3631
  skip: !eventId,
3533
3632
  variables: { eventId }
@@ -3537,14 +3636,14 @@ var useGetEventInfo = (eventId) => {
3537
3636
  };
3538
3637
 
3539
3638
  // src/graphql/hooks/notifications/hooksMutation.ts
3540
- var import_client22 = require("@apollo/client");
3639
+ var import_react8 = require("@apollo/client/react");
3541
3640
 
3542
3641
  // src/graphql/mutations/notification.ts
3543
- var import_client21 = require("@apollo/client");
3642
+ var import_client14 = require("@apollo/client");
3544
3643
 
3545
3644
  // src/graphql/queries/notification.ts
3546
- var import_client20 = require("@apollo/client");
3547
- var NOTIFICATION_FRAGMENT = import_client20.gql`
3645
+ var import_client13 = require("@apollo/client");
3646
+ var NOTIFICATION_FRAGMENT = import_client13.gql`
3548
3647
  fragment NotificationFields on Notification {
3549
3648
  _id
3550
3649
  userId
@@ -3561,7 +3660,7 @@ var NOTIFICATION_FRAGMENT = import_client20.gql`
3561
3660
  updatedAt
3562
3661
  }
3563
3662
  `;
3564
- var GET_USER_NOTIFICATIONS = import_client20.gql`
3663
+ var GET_USER_NOTIFICATIONS = import_client13.gql`
3565
3664
  query getUserNotifications($limit: Int, $offset: Int) {
3566
3665
  userNotifications(limit: $limit, offset: $offset) {
3567
3666
  ...NotificationFields
@@ -3569,7 +3668,7 @@ var GET_USER_NOTIFICATIONS = import_client20.gql`
3569
3668
  }
3570
3669
  ${NOTIFICATION_FRAGMENT}
3571
3670
  `;
3572
- var GET_NOTIFICATION_COUNT = import_client20.gql`
3671
+ var GET_NOTIFICATION_COUNT = import_client13.gql`
3573
3672
  query getNotificationCount {
3574
3673
  notificationCount {
3575
3674
  total
@@ -3579,7 +3678,7 @@ var GET_NOTIFICATION_COUNT = import_client20.gql`
3579
3678
  `;
3580
3679
 
3581
3680
  // src/graphql/mutations/notification.ts
3582
- var CREATE_BULK_NOTIFICATIONS = import_client21.gql`
3681
+ var CREATE_BULK_NOTIFICATIONS = import_client14.gql`
3583
3682
  mutation createBulkNotifications($input: CreateBulkNotificationInput!) {
3584
3683
  createBulkNotifications(input: $input) {
3585
3684
  ...NotificationFields
@@ -3587,7 +3686,7 @@ var CREATE_BULK_NOTIFICATIONS = import_client21.gql`
3587
3686
  }
3588
3687
  ${NOTIFICATION_FRAGMENT}
3589
3688
  `;
3590
- var MARK_NOTIFICATION_READ = import_client21.gql`
3689
+ var MARK_NOTIFICATION_READ = import_client14.gql`
3591
3690
  mutation markNotificationRead($_id: ID!) {
3592
3691
  markNotificationRead(_id: $_id) {
3593
3692
  ...NotificationFields
@@ -3595,17 +3694,17 @@ var MARK_NOTIFICATION_READ = import_client21.gql`
3595
3694
  }
3596
3695
  ${NOTIFICATION_FRAGMENT}
3597
3696
  `;
3598
- var MARK_ALL_NOTIFICATIONS_READ = import_client21.gql`
3697
+ var MARK_ALL_NOTIFICATIONS_READ = import_client14.gql`
3599
3698
  mutation markAllNotificationsRead {
3600
3699
  markAllNotificationsRead
3601
3700
  }
3602
3701
  `;
3603
- var DELETE_NOTIFICATION = import_client21.gql`
3702
+ var DELETE_NOTIFICATION = import_client14.gql`
3604
3703
  mutation deleteNotification($_id: ID!) {
3605
3704
  deleteNotification(_id: $_id)
3606
3705
  }
3607
3706
  `;
3608
- var DELETE_ALL_NOTIFICATIONS = import_client21.gql`
3707
+ var DELETE_ALL_NOTIFICATIONS = import_client14.gql`
3609
3708
  mutation deleteAllNotifications {
3610
3709
  deleteAllNotifications
3611
3710
  }
@@ -3613,13 +3712,13 @@ var DELETE_ALL_NOTIFICATIONS = import_client21.gql`
3613
3712
 
3614
3713
  // src/graphql/hooks/notifications/hooksMutation.ts
3615
3714
  var useCreateBulkNotifications = () => {
3616
- const [createBulkNotifications, { loading, error }] = (0, import_client22.useMutation)(
3715
+ const [createBulkNotifications, { loading, error }] = (0, import_react8.useMutation)(
3617
3716
  CREATE_BULK_NOTIFICATIONS
3618
3717
  );
3619
3718
  return { createBulkNotifications, error, loading };
3620
3719
  };
3621
3720
  var useMarkNotificationRead = () => {
3622
- const [markNotificationRead, { loading, error }] = (0, import_client22.useMutation)(
3721
+ const [markNotificationRead, { loading, error }] = (0, import_react8.useMutation)(
3623
3722
  MARK_NOTIFICATION_READ,
3624
3723
  {
3625
3724
  refetchQueries: [
@@ -3635,7 +3734,7 @@ var useMarkNotificationRead = () => {
3635
3734
  return { error, loading, markNotificationRead };
3636
3735
  };
3637
3736
  var useMarkAllNotificationsRead = () => {
3638
- const [markAllNotificationsRead, { loading, error }] = (0, import_client22.useMutation)(
3737
+ const [markAllNotificationsRead, { loading, error }] = (0, import_react8.useMutation)(
3639
3738
  MARK_ALL_NOTIFICATIONS_READ,
3640
3739
  {
3641
3740
  refetchQueries: [
@@ -3651,7 +3750,7 @@ var useMarkAllNotificationsRead = () => {
3651
3750
  return { error, loading, markAllNotificationsRead };
3652
3751
  };
3653
3752
  var useDeleteNotification = () => {
3654
- const [deleteNotification, { loading, error }] = (0, import_client22.useMutation)(
3753
+ const [deleteNotification, { loading, error }] = (0, import_react8.useMutation)(
3655
3754
  DELETE_NOTIFICATION,
3656
3755
  {
3657
3756
  refetchQueries: [
@@ -3667,7 +3766,7 @@ var useDeleteNotification = () => {
3667
3766
  return { deleteNotification, error, loading };
3668
3767
  };
3669
3768
  var useDeleteAllNotifications = () => {
3670
- const [deleteAllNotifications, { loading, error }] = (0, import_client22.useMutation)(
3769
+ const [deleteAllNotifications, { loading, error }] = (0, import_react8.useMutation)(
3671
3770
  DELETE_ALL_NOTIFICATIONS,
3672
3771
  {
3673
3772
  refetchQueries: [
@@ -3684,9 +3783,9 @@ var useDeleteAllNotifications = () => {
3684
3783
  };
3685
3784
 
3686
3785
  // src/graphql/hooks/notifications/hooksQuery.ts
3687
- var import_client23 = require("@apollo/client");
3786
+ var import_react9 = require("@apollo/client/react");
3688
3787
  var useGetUserNotifications = (limit, offset) => {
3689
- const { data, loading, error, refetch } = (0, import_client23.useQuery)(GET_USER_NOTIFICATIONS, {
3788
+ const { data, loading, error, refetch } = (0, import_react9.useQuery)(GET_USER_NOTIFICATIONS, {
3690
3789
  fetchPolicy: "no-cache",
3691
3790
  variables: { limit, offset }
3692
3791
  });
@@ -3698,7 +3797,7 @@ var useGetUserNotifications = (limit, offset) => {
3698
3797
  };
3699
3798
  };
3700
3799
  var useGetNotificationCount = () => {
3701
- const { data, loading, error, refetch } = (0, import_client23.useQuery)(GET_NOTIFICATION_COUNT, {
3800
+ const { data, loading, error, refetch } = (0, import_react9.useQuery)(GET_NOTIFICATION_COUNT, {
3702
3801
  fetchPolicy: "no-cache"
3703
3802
  });
3704
3803
  return {
@@ -3710,11 +3809,11 @@ var useGetNotificationCount = () => {
3710
3809
  };
3711
3810
 
3712
3811
  // src/graphql/hooks/notifications/hooksSubscription.ts
3713
- var import_client25 = require("@apollo/client");
3812
+ var import_react10 = require("@apollo/client/react");
3714
3813
 
3715
3814
  // src/graphql/subscriptions/notification.ts
3716
- var import_client24 = require("@apollo/client");
3717
- var GET_NOTIFICATIONS_SUBSCRIPTION = import_client24.gql`
3815
+ var import_client15 = require("@apollo/client");
3816
+ var GET_NOTIFICATIONS_SUBSCRIPTION = import_client15.gql`
3718
3817
  subscription {
3719
3818
  getUserNotifications {
3720
3819
  ...NotificationFields
@@ -3722,7 +3821,7 @@ var GET_NOTIFICATIONS_SUBSCRIPTION = import_client24.gql`
3722
3821
  }
3723
3822
  ${NOTIFICATION_FRAGMENT}
3724
3823
  `;
3725
- var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client24.gql`
3824
+ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client15.gql`
3726
3825
  subscription {
3727
3826
  getNotificationCount {
3728
3827
  total
@@ -3733,7 +3832,7 @@ var GET_NOTIFICATION_COUNT_SUBSCRIPTION = import_client24.gql`
3733
3832
 
3734
3833
  // src/graphql/hooks/notifications/hooksSubscription.ts
3735
3834
  var useGetUserNotificationsSubscription = () => {
3736
- const { data, loading, error } = (0, import_client25.useSubscription)(GET_NOTIFICATIONS_SUBSCRIPTION, {
3835
+ const { data, loading, error } = (0, import_react10.useSubscription)(GET_NOTIFICATIONS_SUBSCRIPTION, {
3737
3836
  fetchPolicy: "no-cache",
3738
3837
  shouldResubscribe: true
3739
3838
  });
@@ -3744,7 +3843,7 @@ var useGetUserNotificationsSubscription = () => {
3744
3843
  };
3745
3844
  };
3746
3845
  var useGetNotificationCountSubscription = () => {
3747
- const { data, loading, error } = (0, import_client25.useSubscription)(GET_NOTIFICATION_COUNT_SUBSCRIPTION, {
3846
+ const { data, loading, error } = (0, import_react10.useSubscription)(GET_NOTIFICATION_COUNT_SUBSCRIPTION, {
3748
3847
  fetchPolicy: "no-cache",
3749
3848
  shouldResubscribe: true
3750
3849
  });
@@ -3756,11 +3855,11 @@ var useGetNotificationCountSubscription = () => {
3756
3855
  };
3757
3856
 
3758
3857
  // src/graphql/hooks/poster.ts
3759
- var import_client27 = require("@apollo/client");
3858
+ var import_react11 = require("@apollo/client/react");
3760
3859
 
3761
3860
  // src/graphql/mutations/poster.ts
3762
- var import_client26 = require("@apollo/client");
3763
- var CREATE_POSTER_MUTATION = import_client26.gql`
3861
+ var import_client16 = require("@apollo/client");
3862
+ var CREATE_POSTER_MUTATION = import_client16.gql`
3764
3863
  mutation createPoster($input: PosterInputType!) {
3765
3864
  createPoster(input: $input) {
3766
3865
  message
@@ -3774,7 +3873,7 @@ var CREATE_POSTER_MUTATION = import_client26.gql`
3774
3873
 
3775
3874
  // src/graphql/hooks/poster.ts
3776
3875
  var useCreatePoster = () => {
3777
- const [createPoster, { loading, error }] = (0, import_client27.useMutation)(
3876
+ const [createPoster, { loading, error }] = (0, import_react11.useMutation)(
3778
3877
  CREATE_POSTER_MUTATION,
3779
3878
  {
3780
3879
  refetchQueries: [{ query: GET_USER_EVENTS }, { query: GET_USER_VENDORS }]
@@ -3784,11 +3883,11 @@ var useCreatePoster = () => {
3784
3883
  };
3785
3884
 
3786
3885
  // src/graphql/hooks/pushToken.ts
3787
- var import_client29 = require("@apollo/client");
3886
+ var import_react12 = require("@apollo/client/react");
3788
3887
 
3789
3888
  // src/graphql/mutations/pushToken.ts
3790
- var import_client28 = require("@apollo/client");
3791
- var CREATE_PUSH_TOKEN_MUTATION = import_client28.gql`
3889
+ var import_client17 = require("@apollo/client");
3890
+ var CREATE_PUSH_TOKEN_MUTATION = import_client17.gql`
3792
3891
  mutation createPushToken($input: PushTokenInput!) {
3793
3892
  createPushToken(input: $input) {
3794
3893
  success
@@ -3798,21 +3897,21 @@ var CREATE_PUSH_TOKEN_MUTATION = import_client28.gql`
3798
3897
 
3799
3898
  // src/graphql/hooks/pushToken.ts
3800
3899
  var useCreatePushToken = () => {
3801
- const [createPushToken, { loading, error }] = (0, import_client29.useMutation)(
3900
+ const [createPushToken, { loading, error }] = (0, import_react12.useMutation)(
3802
3901
  CREATE_PUSH_TOKEN_MUTATION
3803
3902
  );
3804
3903
  return { createPushToken, error, loading };
3805
3904
  };
3806
3905
 
3807
3906
  // src/graphql/hooks/relation/hooksMutation.ts
3808
- var import_client32 = require("@apollo/client");
3907
+ var import_react13 = require("@apollo/client/react");
3809
3908
 
3810
3909
  // src/graphql/mutations/relation.ts
3811
- var import_client31 = require("@apollo/client");
3910
+ var import_client19 = require("@apollo/client");
3812
3911
 
3813
3912
  // src/graphql/queries/relation.ts
3814
- var import_client30 = require("@apollo/client");
3815
- var RELATION_FIELDS_FRAGMENT = import_client30.gql`
3913
+ var import_client18 = require("@apollo/client");
3914
+ var RELATION_FIELDS_FRAGMENT = import_client18.gql`
3816
3915
  fragment RelationFields on RelationType {
3817
3916
  _id
3818
3917
  active
@@ -3829,7 +3928,7 @@ var RELATION_FIELDS_FRAGMENT = import_client30.gql`
3829
3928
  }
3830
3929
  ${RELATION_DATES_FRAGMENT}
3831
3930
  `;
3832
- var GET_RELATION = import_client30.gql`
3931
+ var GET_RELATION = import_client18.gql`
3833
3932
  query getRelation($_id: ID!) {
3834
3933
  relation(_id: $_id) {
3835
3934
  ...RelationFields
@@ -3837,7 +3936,7 @@ var GET_RELATION = import_client30.gql`
3837
3936
  }
3838
3937
  ${RELATION_FIELDS_FRAGMENT}
3839
3938
  `;
3840
- var GET_RELATION_BY_EVENT_AND_VENDOR = import_client30.gql`
3939
+ var GET_RELATION_BY_EVENT_AND_VENDOR = import_client18.gql`
3841
3940
  query getRelationByEventAndVendor($eventId: ID!, $vendorId: ID!) {
3842
3941
  relationByEventAndVendor(eventId: $eventId, vendorId: $vendorId) {
3843
3942
  ...RelationFields
@@ -3845,7 +3944,7 @@ var GET_RELATION_BY_EVENT_AND_VENDOR = import_client30.gql`
3845
3944
  }
3846
3945
  ${RELATION_FIELDS_FRAGMENT}
3847
3946
  `;
3848
- var GET_EVENT_RELATIONS = import_client30.gql`
3947
+ var GET_EVENT_RELATIONS = import_client18.gql`
3849
3948
  query getEventRelations($eventId: ID!) {
3850
3949
  eventRelations(eventId: $eventId) {
3851
3950
  ...RelationFields
@@ -3853,7 +3952,7 @@ var GET_EVENT_RELATIONS = import_client30.gql`
3853
3952
  }
3854
3953
  ${RELATION_FIELDS_FRAGMENT}
3855
3954
  `;
3856
- var GET_VENDOR_RELATIONS = import_client30.gql`
3955
+ var GET_VENDOR_RELATIONS = import_client18.gql`
3857
3956
  query getVendorRelations($vendorId: ID!) {
3858
3957
  vendorRelations(vendorId: $vendorId) {
3859
3958
  ...RelationFields
@@ -3861,7 +3960,7 @@ var GET_VENDOR_RELATIONS = import_client30.gql`
3861
3960
  }
3862
3961
  ${RELATION_FIELDS_FRAGMENT}
3863
3962
  `;
3864
- var GET_RESOURCE_CONNECTIONS = import_client30.gql`
3963
+ var GET_RESOURCE_CONNECTIONS = import_client18.gql`
3865
3964
  query getResourceConnections(
3866
3965
  $resourceId: ID!
3867
3966
  $resourceType: ResourceTypeEnum!
@@ -3880,7 +3979,7 @@ var GET_RESOURCE_CONNECTIONS = import_client30.gql`
3880
3979
  `;
3881
3980
 
3882
3981
  // src/graphql/mutations/relation.ts
3883
- var CREATE_RELATION_MUTATION = import_client31.gql`
3982
+ var CREATE_RELATION_MUTATION = import_client19.gql`
3884
3983
  mutation createRelation($input: RelationInputType!) {
3885
3984
  createRelation(input: $input) {
3886
3985
  ...RelationFields
@@ -3888,7 +3987,7 @@ var CREATE_RELATION_MUTATION = import_client31.gql`
3888
3987
  }
3889
3988
  ${RELATION_FIELDS_FRAGMENT}
3890
3989
  `;
3891
- var UPDATE_RELATION_MUTATION = import_client31.gql`
3990
+ var UPDATE_RELATION_MUTATION = import_client19.gql`
3892
3991
  mutation updateRelation($_id: ID!, $input: RelationInputType!) {
3893
3992
  updateRelation(_id: $_id, input: $input) {
3894
3993
  ...RelationFields
@@ -3896,7 +3995,7 @@ var UPDATE_RELATION_MUTATION = import_client31.gql`
3896
3995
  }
3897
3996
  ${RELATION_FIELDS_FRAGMENT}
3898
3997
  `;
3899
- var DELETE_RELATION_MUTATION = import_client31.gql`
3998
+ var DELETE_RELATION_MUTATION = import_client19.gql`
3900
3999
  mutation deleteRelation($_id: ID!) {
3901
4000
  deleteRelation(_id: $_id) {
3902
4001
  ...RelationFields
@@ -3907,146 +4006,137 @@ var DELETE_RELATION_MUTATION = import_client31.gql`
3907
4006
 
3908
4007
  // src/graphql/hooks/relation/hooksMutation.ts
3909
4008
  var useCreateRelation = () => {
3910
- const [createRelation, { loading, error }] = (0, import_client32.useMutation)(
3911
- CREATE_RELATION_MUTATION,
3912
- {
3913
- awaitRefetchQueries: true,
3914
- refetchQueries: (mutationResult) => {
3915
- const createRelation2 = mutationResult?.data?.createRelation;
3916
- const eventId = createRelation2?.eventId;
3917
- const vendorId = createRelation2?.vendorId;
3918
- const resourceType = createRelation2?.lastUpdateBy;
3919
- const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
3920
- return [
3921
- {
3922
- query: GET_EVENT_RELATIONS,
3923
- variables: { eventId }
3924
- },
3925
- {
3926
- query: GET_EVENT,
3927
- variables: { _id: eventId }
3928
- },
3929
- {
3930
- query: GET_EVENT_INFO,
3931
- variables: { eventId }
3932
- },
3933
- {
3934
- query: GET_VENDOR_RELATIONS,
3935
- variables: { vendorId }
3936
- },
3937
- {
3938
- query: GET_VENDOR,
3939
- variables: { _id: vendorId }
3940
- },
3941
- {
3942
- query: GET_RELATION_BY_EVENT_AND_VENDOR,
3943
- variables: { eventId, vendorId }
3944
- },
3945
- {
3946
- query: GET_RESOURCE_CONNECTIONS,
3947
- variables: { resourceId, resourceType }
3948
- },
3949
- {
3950
- query: USER_CHATS
3951
- }
3952
- ];
3953
- }
4009
+ const [createRelation, { loading, error }] = (0, import_react13.useMutation)(CREATE_RELATION_MUTATION, {
4010
+ awaitRefetchQueries: true,
4011
+ refetchQueries: (mutationResult) => {
4012
+ const createRelation2 = mutationResult?.data?.createRelation;
4013
+ const eventId = createRelation2?.eventId;
4014
+ const vendorId = createRelation2?.vendorId;
4015
+ const resourceType = createRelation2?.lastUpdateBy;
4016
+ const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
4017
+ return [
4018
+ {
4019
+ query: GET_EVENT_RELATIONS,
4020
+ variables: { eventId }
4021
+ },
4022
+ {
4023
+ query: GET_EVENT,
4024
+ variables: { _id: eventId }
4025
+ },
4026
+ {
4027
+ query: GET_EVENT_INFO,
4028
+ variables: { eventId }
4029
+ },
4030
+ {
4031
+ query: GET_VENDOR_RELATIONS,
4032
+ variables: { vendorId }
4033
+ },
4034
+ {
4035
+ query: GET_VENDOR,
4036
+ variables: { _id: vendorId }
4037
+ },
4038
+ {
4039
+ query: GET_RELATION_BY_EVENT_AND_VENDOR,
4040
+ variables: { eventId, vendorId }
4041
+ },
4042
+ {
4043
+ query: GET_RESOURCE_CONNECTIONS,
4044
+ variables: { resourceId, resourceType }
4045
+ },
4046
+ {
4047
+ query: USER_CHATS
4048
+ }
4049
+ ];
3954
4050
  }
3955
- );
4051
+ });
3956
4052
  return { createRelation, error, loading };
3957
4053
  };
3958
4054
  var useUpdateRelation = () => {
3959
- const [updateRelation, { loading, error }] = (0, import_client32.useMutation)(
3960
- UPDATE_RELATION_MUTATION,
3961
- {
3962
- awaitRefetchQueries: true,
3963
- refetchQueries: (mutationResult) => {
3964
- const updateRelation2 = mutationResult?.data?.updateRelation;
3965
- const eventId = updateRelation2?.eventId;
3966
- const vendorId = updateRelation2?.vendorId;
3967
- const resourceType = updateRelation2?.lastUpdateBy;
3968
- const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
3969
- return [
3970
- {
3971
- query: GET_EVENT_RELATIONS,
3972
- variables: { eventId }
3973
- },
3974
- {
3975
- query: GET_EVENT,
3976
- variables: { _id: eventId }
3977
- },
3978
- {
3979
- query: GET_EVENT_INFO,
3980
- variables: { eventId }
3981
- },
3982
- {
3983
- query: GET_VENDOR_RELATIONS,
3984
- variables: { vendorId }
3985
- },
3986
- {
3987
- query: GET_VENDOR,
3988
- variables: { _id: vendorId }
3989
- },
3990
- {
3991
- query: GET_RELATION_BY_EVENT_AND_VENDOR,
3992
- variables: { eventId, vendorId }
3993
- },
3994
- {
3995
- query: GET_RESOURCE_CONNECTIONS,
3996
- variables: { resourceId, resourceType }
3997
- }
3998
- ];
3999
- }
4055
+ const [updateRelation, { loading, error }] = (0, import_react13.useMutation)(UPDATE_RELATION_MUTATION, {
4056
+ awaitRefetchQueries: true,
4057
+ refetchQueries: (mutationResult) => {
4058
+ const updateRelation2 = mutationResult?.data?.updateRelation;
4059
+ const eventId = updateRelation2?.eventId;
4060
+ const vendorId = updateRelation2?.vendorId;
4061
+ const resourceType = updateRelation2?.lastUpdateBy;
4062
+ const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
4063
+ return [
4064
+ {
4065
+ query: GET_EVENT_RELATIONS,
4066
+ variables: { eventId }
4067
+ },
4068
+ {
4069
+ query: GET_EVENT,
4070
+ variables: { _id: eventId }
4071
+ },
4072
+ {
4073
+ query: GET_EVENT_INFO,
4074
+ variables: { eventId }
4075
+ },
4076
+ {
4077
+ query: GET_VENDOR_RELATIONS,
4078
+ variables: { vendorId }
4079
+ },
4080
+ {
4081
+ query: GET_VENDOR,
4082
+ variables: { _id: vendorId }
4083
+ },
4084
+ {
4085
+ query: GET_RELATION_BY_EVENT_AND_VENDOR,
4086
+ variables: { eventId, vendorId }
4087
+ },
4088
+ {
4089
+ query: GET_RESOURCE_CONNECTIONS,
4090
+ variables: { resourceId, resourceType }
4091
+ }
4092
+ ];
4000
4093
  }
4001
- );
4094
+ });
4002
4095
  return { error, loading, updateRelation };
4003
4096
  };
4004
4097
  var useDeleteRelation = () => {
4005
- const [deleteRelation, { loading, error }] = (0, import_client32.useMutation)(
4006
- DELETE_RELATION_MUTATION,
4007
- {
4008
- awaitRefetchQueries: true,
4009
- refetchQueries: (mutationResult) => {
4010
- const deleteRelation2 = mutationResult?.data?.deleteRelation;
4011
- const eventId = deleteRelation2?.eventId;
4012
- const vendorId = deleteRelation2?.vendorId;
4013
- const resourceType = deleteRelation2?.lastUpdateBy;
4014
- const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
4015
- return [
4016
- {
4017
- query: GET_EVENT_INFO,
4018
- variables: { eventId }
4019
- },
4020
- {
4021
- query: GET_EVENT_RELATIONS,
4022
- variables: { eventId }
4023
- },
4024
- {
4025
- query: GET_VENDOR_RELATIONS,
4026
- variables: { vendorId }
4027
- },
4028
- {
4029
- query: GET_RELATION_BY_EVENT_AND_VENDOR,
4030
- variables: { eventId, vendorId }
4031
- },
4032
- {
4033
- query: GET_RESOURCE_CONNECTIONS,
4034
- variables: { resourceId, resourceType }
4035
- },
4036
- {
4037
- query: USER_CHATS
4038
- }
4039
- ];
4040
- }
4098
+ const [deleteRelation, { loading, error }] = (0, import_react13.useMutation)(DELETE_RELATION_MUTATION, {
4099
+ awaitRefetchQueries: true,
4100
+ refetchQueries: (mutationResult) => {
4101
+ const deleteRelation2 = mutationResult?.data?.deleteRelation;
4102
+ const eventId = deleteRelation2?.eventId;
4103
+ const vendorId = deleteRelation2?.vendorId;
4104
+ const resourceType = deleteRelation2?.lastUpdateBy;
4105
+ const resourceId = resourceType === "event" /* EVENT */ ? eventId : vendorId;
4106
+ return [
4107
+ {
4108
+ query: GET_EVENT_INFO,
4109
+ variables: { eventId }
4110
+ },
4111
+ {
4112
+ query: GET_EVENT_RELATIONS,
4113
+ variables: { eventId }
4114
+ },
4115
+ {
4116
+ query: GET_VENDOR_RELATIONS,
4117
+ variables: { vendorId }
4118
+ },
4119
+ {
4120
+ query: GET_RELATION_BY_EVENT_AND_VENDOR,
4121
+ variables: { eventId, vendorId }
4122
+ },
4123
+ {
4124
+ query: GET_RESOURCE_CONNECTIONS,
4125
+ variables: { resourceId, resourceType }
4126
+ },
4127
+ {
4128
+ query: USER_CHATS
4129
+ }
4130
+ ];
4041
4131
  }
4042
- );
4132
+ });
4043
4133
  return { deleteRelation, error, loading };
4044
4134
  };
4045
4135
 
4046
4136
  // src/graphql/hooks/relation/hooksQuery.ts
4047
- var import_client33 = require("@apollo/client");
4137
+ var import_react14 = require("@apollo/client/react");
4048
4138
  var useGetRelation = (_id) => {
4049
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_RELATION, {
4139
+ const { loading, error, data, refetch } = (0, import_react14.useQuery)(GET_RELATION, {
4050
4140
  fetchPolicy: "network-only",
4051
4141
  skip: !_id,
4052
4142
  variables: { _id }
@@ -4055,50 +4145,47 @@ var useGetRelation = (_id) => {
4055
4145
  return { error, loading, refetch, relation };
4056
4146
  };
4057
4147
  var useGetRelationByEventAndVendor = (eventId, vendorId) => {
4058
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(
4059
- GET_RELATION_BY_EVENT_AND_VENDOR,
4060
- {
4061
- fetchPolicy: "network-only",
4062
- skip: !eventId || !vendorId,
4063
- variables: { eventId, vendorId }
4064
- }
4065
- );
4148
+ const { loading, error, data, refetch } = (0, import_react14.useQuery)(GET_RELATION_BY_EVENT_AND_VENDOR, {
4149
+ fetchPolicy: "network-only",
4150
+ skip: !eventId || !vendorId,
4151
+ variables: { eventId, vendorId }
4152
+ });
4066
4153
  const relationByEventAndVendor = data?.relationByEventAndVendor;
4067
4154
  return { error, loading, refetch, relationByEventAndVendor };
4068
4155
  };
4069
4156
  var useGetEventRelations = (eventId) => {
4070
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_EVENT_RELATIONS, {
4157
+ const { loading, error, data, refetch } = (0, import_react14.useQuery)(GET_EVENT_RELATIONS, {
4071
4158
  fetchPolicy: "network-only",
4072
4159
  skip: !eventId,
4073
4160
  variables: { eventId }
4074
4161
  });
4075
- const eventRelations = data?.eventRelations;
4162
+ const eventRelations = data?.eventRelations || [];
4076
4163
  return { error, eventRelations, loading, refetch };
4077
4164
  };
4078
4165
  var useGetVendorRelations = (vendorId) => {
4079
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_VENDOR_RELATIONS, {
4166
+ const { loading, error, data, refetch } = (0, import_react14.useQuery)(GET_VENDOR_RELATIONS, {
4080
4167
  fetchPolicy: "network-only",
4081
4168
  skip: !vendorId,
4082
4169
  variables: { vendorId }
4083
4170
  });
4084
- const vendorRelations = data?.vendorRelations;
4171
+ const vendorRelations = data?.vendorRelations || [];
4085
4172
  return { error, loading, refetch, vendorRelations };
4086
4173
  };
4087
4174
  var useGetResourceConnections = (resourceId, resourceType) => {
4088
- const { loading, error, data, refetch } = (0, import_client33.useQuery)(GET_RESOURCE_CONNECTIONS, {
4175
+ const { loading, error, data, refetch } = (0, import_react14.useQuery)(GET_RESOURCE_CONNECTIONS, {
4089
4176
  fetchPolicy: "network-only",
4090
4177
  variables: { resourceId, resourceType }
4091
4178
  });
4092
- const resourceConnections = data?.resourceConnections;
4179
+ const resourceConnections = data?.resourceConnections || [];
4093
4180
  return { error, loading, refetch, resourceConnections };
4094
4181
  };
4095
4182
 
4096
4183
  // src/graphql/hooks/vendor/hooksMutation.ts
4097
- var import_client35 = require("@apollo/client");
4184
+ var import_react15 = require("@apollo/client/react");
4098
4185
 
4099
4186
  // src/graphql/mutations/vendor.ts
4100
- var import_client34 = require("@apollo/client");
4101
- var CREATE_VENDOR_MUTATION = import_client34.gql`
4187
+ var import_client20 = require("@apollo/client");
4188
+ var CREATE_VENDOR_MUTATION = import_client20.gql`
4102
4189
  mutation createVendor($input: VendorInputType!) {
4103
4190
  createVendor(input: $input) {
4104
4191
  ...VendorFields
@@ -4106,7 +4193,7 @@ var CREATE_VENDOR_MUTATION = import_client34.gql`
4106
4193
  }
4107
4194
  ${VENDOR}
4108
4195
  `;
4109
- var UPDATE_VENDOR_MUTATION = import_client34.gql`
4196
+ var UPDATE_VENDOR_MUTATION = import_client20.gql`
4110
4197
  mutation updateVendor($_id: ID!, $input: VendorInputType!) {
4111
4198
  updateVendor(_id: $_id, input: $input) {
4112
4199
  ...VendorFields
@@ -4114,12 +4201,12 @@ var UPDATE_VENDOR_MUTATION = import_client34.gql`
4114
4201
  }
4115
4202
  ${VENDOR}
4116
4203
  `;
4117
- var DELETE_VENDOR_MUTATION = import_client34.gql`
4204
+ var DELETE_VENDOR_MUTATION = import_client20.gql`
4118
4205
  mutation deleteVendor($_id: ID!) {
4119
4206
  deleteVendor(_id: $_id)
4120
4207
  }
4121
4208
  `;
4122
- var CREATE_VENDOR_INFO_MUTATION = import_client34.gql`
4209
+ var CREATE_VENDOR_INFO_MUTATION = import_client20.gql`
4123
4210
  mutation createVendorInfo($input: VendorInfoInputType!) {
4124
4211
  createVendorInfo(input: $input) {
4125
4212
  ...VendorInfoFields
@@ -4127,7 +4214,7 @@ var CREATE_VENDOR_INFO_MUTATION = import_client34.gql`
4127
4214
  }
4128
4215
  ${VENDOR_INFO}
4129
4216
  `;
4130
- var UPDATE_VENDOR_INFO_MUTATION = import_client34.gql`
4217
+ var UPDATE_VENDOR_INFO_MUTATION = import_client20.gql`
4131
4218
  mutation updateVendorInfo($_id: ID!, $input: VendorInfoInputType!) {
4132
4219
  updateVendorInfo(_id: $_id, input: $input) {
4133
4220
  ...VendorInfoFields
@@ -4138,7 +4225,7 @@ var UPDATE_VENDOR_INFO_MUTATION = import_client34.gql`
4138
4225
 
4139
4226
  // src/graphql/hooks/vendor/hooksMutation.ts
4140
4227
  var useCreateVendor = () => {
4141
- const [createVendor, { loading, error }] = (0, import_client35.useMutation)(
4228
+ const [createVendor, { loading, error }] = (0, import_react15.useMutation)(
4142
4229
  CREATE_VENDOR_MUTATION,
4143
4230
  {
4144
4231
  awaitRefetchQueries: true,
@@ -4148,7 +4235,7 @@ var useCreateVendor = () => {
4148
4235
  return { createVendor, error, loading };
4149
4236
  };
4150
4237
  var useUpdateVendor = () => {
4151
- const [updateVendor, { loading, error }] = (0, import_client35.useMutation)(
4238
+ const [updateVendor, { loading, error }] = (0, import_react15.useMutation)(
4152
4239
  UPDATE_VENDOR_MUTATION,
4153
4240
  {
4154
4241
  awaitRefetchQueries: true,
@@ -4158,7 +4245,7 @@ var useUpdateVendor = () => {
4158
4245
  return { error, loading, updateVendor };
4159
4246
  };
4160
4247
  var useDeleteVendor = () => {
4161
- const [deleteVendor, { loading, error }] = (0, import_client35.useMutation)(
4248
+ const [deleteVendor, { loading, error }] = (0, import_react15.useMutation)(
4162
4249
  DELETE_VENDOR_MUTATION,
4163
4250
  {
4164
4251
  awaitRefetchQueries: true,
@@ -4168,60 +4255,57 @@ var useDeleteVendor = () => {
4168
4255
  return { deleteVendor, error, loading };
4169
4256
  };
4170
4257
  var useCreateVendorInfo = () => {
4171
- const [createVendorInfo, { loading, error }] = (0, import_client35.useMutation)(
4172
- CREATE_VENDOR_INFO_MUTATION,
4173
- {
4174
- awaitRefetchQueries: true,
4175
- refetchQueries: (mutationResult) => {
4176
- const vendorId = mutationResult?.data?.createVendorInfo?.vendorId;
4177
- if (!vendorId) return [];
4178
- return [
4179
- {
4180
- query: GET_VENDOR_INFO,
4181
- variables: { vendorId }
4182
- // Pass the vendorId for refetching
4183
- },
4184
- {
4185
- query: GET_USER_VENDORS
4186
- },
4187
- {
4188
- query: GET_VENDOR,
4189
- variables: { _id: vendorId }
4190
- }
4191
- ];
4192
- }
4258
+ const [createVendorInfo, { loading, error }] = (0, import_react15.useMutation)(CREATE_VENDOR_INFO_MUTATION, {
4259
+ awaitRefetchQueries: true,
4260
+ refetchQueries: (mutationResult) => {
4261
+ const vendorId = mutationResult?.data?.createVendorInfo?.vendorId;
4262
+ if (!vendorId) return [];
4263
+ return [
4264
+ {
4265
+ query: GET_VENDOR_INFO,
4266
+ variables: { vendorId }
4267
+ // Pass the vendorId for refetching
4268
+ },
4269
+ {
4270
+ query: GET_USER_VENDORS
4271
+ },
4272
+ {
4273
+ query: GET_VENDOR,
4274
+ variables: { _id: vendorId }
4275
+ }
4276
+ ];
4193
4277
  }
4194
- );
4278
+ });
4195
4279
  return { createVendorInfo, error, loading };
4196
4280
  };
4197
4281
  var useUpdateVendorInfo = () => {
4198
- const [updateVendorInfo, { loading, error }] = (0, import_client35.useMutation)(
4199
- UPDATE_VENDOR_INFO_MUTATION,
4200
- {
4201
- awaitRefetchQueries: true,
4202
- refetchQueries: (mutationResult) => {
4203
- const vendorId = mutationResult?.data?.updateVendorInfo?.vendorId;
4204
- if (!vendorId) return [];
4205
- return [
4206
- {
4207
- query: GET_VENDOR_INFO,
4208
- variables: { vendorId }
4209
- // Pass the vendorId for refetching
4210
- }
4211
- ];
4212
- }
4282
+ const [updateVendorInfo, { loading, error }] = (0, import_react15.useMutation)(UPDATE_VENDOR_INFO_MUTATION, {
4283
+ awaitRefetchQueries: true,
4284
+ refetchQueries: (mutationResult) => {
4285
+ const vendorId = mutationResult?.data?.updateVendorInfo?.vendorId;
4286
+ if (!vendorId) return [];
4287
+ return [
4288
+ {
4289
+ query: GET_VENDOR_INFO,
4290
+ variables: { vendorId }
4291
+ // Pass the vendorId for refetching
4292
+ }
4293
+ ];
4213
4294
  }
4214
- );
4295
+ });
4215
4296
  return { error, loading, updateVendorInfo };
4216
4297
  };
4217
4298
 
4218
4299
  // src/graphql/hooks/vendor/hooksQuery.ts
4219
- var import_client36 = require("@apollo/client");
4300
+ var import_react16 = require("@apollo/client/react");
4220
4301
  var useGetVendors = () => {
4221
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_VENDORS, {
4222
- fetchPolicy: "network-only"
4223
- });
4224
- const vendors = data?.vendors;
4302
+ const { loading, error, data, refetch } = (0, import_react16.useQuery)(
4303
+ GET_VENDORS,
4304
+ {
4305
+ fetchPolicy: "network-only"
4306
+ }
4307
+ );
4308
+ const vendors = data?.vendors || [];
4225
4309
  return {
4226
4310
  error,
4227
4311
  loading,
@@ -4230,34 +4314,37 @@ var useGetVendors = () => {
4230
4314
  };
4231
4315
  };
4232
4316
  var useGetVendor = (_id) => {
4233
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_VENDOR, {
4234
- fetchPolicy: "network-only",
4235
- skip: !_id,
4236
- variables: { _id }
4237
- });
4317
+ const { loading, error, data, refetch } = (0, import_react16.useQuery)(
4318
+ GET_VENDOR,
4319
+ {
4320
+ fetchPolicy: "network-only",
4321
+ skip: !_id,
4322
+ variables: { _id }
4323
+ }
4324
+ );
4238
4325
  const vendor = data?.vendor;
4239
4326
  return { error, loading, refetch, vendor };
4240
4327
  };
4241
4328
  var useGetVendorsByRegion = (region) => {
4242
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_VENDORS_BY_REGION, {
4329
+ const { loading, error, data, refetch } = (0, import_react16.useQuery)(GET_VENDORS_BY_REGION, {
4243
4330
  fetchPolicy: "no-cache",
4244
4331
  skip: !region,
4245
4332
  variables: { region }
4246
4333
  });
4247
- const vendorsByRegion = data?.vendorsByRegion;
4334
+ const vendorsByRegion = data?.vendorsByRegion || [];
4248
4335
  return { error, loading, refetch, vendorsByRegion };
4249
4336
  };
4250
4337
  var useSearchVendors = (search, region) => {
4251
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(SEARCH_VENDORS, {
4338
+ const { loading, error, data, refetch } = (0, import_react16.useQuery)(SEARCH_VENDORS, {
4252
4339
  fetchPolicy: "network-only",
4253
4340
  skip: search.length < 3,
4254
4341
  variables: { region, search }
4255
4342
  });
4256
- const vendorSearch = data?.vendorSearch;
4343
+ const vendorSearch = data?.vendorSearch || [];
4257
4344
  return { error, loading, refetch, vendorSearch };
4258
4345
  };
4259
4346
  var useGetVendorInfo = (vendorId) => {
4260
- const { loading, error, data, refetch } = (0, import_client36.useQuery)(GET_VENDOR_INFO, {
4347
+ const { loading, error, data, refetch } = (0, import_react16.useQuery)(GET_VENDOR_INFO, {
4261
4348
  fetchPolicy: "network-only",
4262
4349
  skip: !vendorId,
4263
4350
  variables: { vendorId }
@@ -4272,14 +4359,14 @@ var useGetVendorInfo = (vendorId) => {
4272
4359
  };
4273
4360
 
4274
4361
  // src/graphql/hooks/tester/hooksMutation.ts
4275
- var import_client39 = require("@apollo/client");
4362
+ var import_react17 = require("@apollo/client/react");
4276
4363
 
4277
4364
  // src/graphql/mutations/tester.ts
4278
- var import_client38 = require("@apollo/client");
4365
+ var import_client22 = require("@apollo/client");
4279
4366
 
4280
4367
  // src/graphql/queries/tester.ts
4281
- var import_client37 = require("@apollo/client");
4282
- var TESTER_FIELDS_FRAGMENT = import_client37.gql`
4368
+ var import_client21 = require("@apollo/client");
4369
+ var TESTER_FIELDS_FRAGMENT = import_client21.gql`
4283
4370
  fragment TesterFields on TesterType {
4284
4371
  _id
4285
4372
  active
@@ -4299,7 +4386,7 @@ var TESTER_FIELDS_FRAGMENT = import_client37.gql`
4299
4386
  }
4300
4387
  ${CATEGORY_FIELDS_FRAGMENT}
4301
4388
  `;
4302
- var GET_TESTERS = import_client37.gql`
4389
+ var GET_TESTERS = import_client21.gql`
4303
4390
  query getTesters {
4304
4391
  testers {
4305
4392
  ...TesterFields
@@ -4307,7 +4394,7 @@ var GET_TESTERS = import_client37.gql`
4307
4394
  }
4308
4395
  ${TESTER_FIELDS_FRAGMENT}
4309
4396
  `;
4310
- var GET_TESTER = import_client37.gql`
4397
+ var GET_TESTER = import_client21.gql`
4311
4398
  query getTester($_id: ID!) {
4312
4399
  tester(_id: $_id) {
4313
4400
  ...TesterFields
@@ -4317,7 +4404,7 @@ var GET_TESTER = import_client37.gql`
4317
4404
  `;
4318
4405
 
4319
4406
  // src/graphql/mutations/tester.ts
4320
- var CREATE_TESTER_MUTATION = import_client38.gql`
4407
+ var CREATE_TESTER_MUTATION = import_client22.gql`
4321
4408
  mutation createTester($input: TesterInputType!) {
4322
4409
  createTester(input: $input) {
4323
4410
  ...TesterFields
@@ -4325,7 +4412,7 @@ var CREATE_TESTER_MUTATION = import_client38.gql`
4325
4412
  }
4326
4413
  ${TESTER_FIELDS_FRAGMENT}
4327
4414
  `;
4328
- var UPDATE_TESTER_MUTATION = import_client38.gql`
4415
+ var UPDATE_TESTER_MUTATION = import_client22.gql`
4329
4416
  mutation updateTester($_id: ID!, $input: TesterInputType!) {
4330
4417
  updateTester(_id: $_id, input: $input) {
4331
4418
  ...TesterFields
@@ -4333,7 +4420,7 @@ var UPDATE_TESTER_MUTATION = import_client38.gql`
4333
4420
  }
4334
4421
  ${TESTER_FIELDS_FRAGMENT}
4335
4422
  `;
4336
- var DELETE_TESTER_MUTATION = import_client38.gql`
4423
+ var DELETE_TESTER_MUTATION = import_client22.gql`
4337
4424
  mutation deleteTester($_id: ID!) {
4338
4425
  deleteTester(_id: $_id)
4339
4426
  }
@@ -4341,7 +4428,7 @@ var DELETE_TESTER_MUTATION = import_client38.gql`
4341
4428
 
4342
4429
  // src/graphql/hooks/tester/hooksMutation.ts
4343
4430
  var useCreateTester = () => {
4344
- const [createTester, { data, loading, error }] = (0, import_client39.useMutation)(
4431
+ const [createTester, { data, loading, error }] = (0, import_react17.useMutation)(
4345
4432
  CREATE_TESTER_MUTATION
4346
4433
  );
4347
4434
  return {
@@ -4352,7 +4439,7 @@ var useCreateTester = () => {
4352
4439
  };
4353
4440
  };
4354
4441
  var useUpdateTester = () => {
4355
- const [updateTester, { data, loading, error }] = (0, import_client39.useMutation)(
4442
+ const [updateTester, { data, loading, error }] = (0, import_react17.useMutation)(
4356
4443
  UPDATE_TESTER_MUTATION
4357
4444
  );
4358
4445
  return {
@@ -4363,17 +4450,19 @@ var useUpdateTester = () => {
4363
4450
  };
4364
4451
  };
4365
4452
  var useDeleteTester = () => {
4366
- const [deleteTester, { loading, error }] = (0, import_client39.useMutation)(
4453
+ const [deleteTester, { loading, error }] = (0, import_react17.useMutation)(
4367
4454
  DELETE_TESTER_MUTATION
4368
4455
  );
4369
4456
  return { deleteTester, error, loading };
4370
4457
  };
4371
4458
 
4372
4459
  // src/graphql/hooks/tester/hooksQuery.ts
4373
- var import_client40 = require("@apollo/client");
4460
+ var import_react18 = require("@apollo/client/react");
4374
4461
  var useGetTesters = () => {
4375
- const { data, loading, error, refetch } = (0, import_client40.useQuery)(GET_TESTERS);
4376
- const testers = data?.testers;
4462
+ const { data, loading, error, refetch } = (0, import_react18.useQuery)(
4463
+ GET_TESTERS
4464
+ );
4465
+ const testers = data?.testers || [];
4377
4466
  return {
4378
4467
  error,
4379
4468
  loading,
@@ -4382,20 +4471,23 @@ var useGetTesters = () => {
4382
4471
  };
4383
4472
  };
4384
4473
  var useGetTester = (_id) => {
4385
- const { data, loading, error, refetch } = (0, import_client40.useQuery)(GET_TESTER, {
4386
- skip: !_id,
4387
- variables: { _id }
4388
- });
4474
+ const { data, loading, error, refetch } = (0, import_react18.useQuery)(
4475
+ GET_TESTER,
4476
+ {
4477
+ skip: !_id,
4478
+ variables: { _id }
4479
+ }
4480
+ );
4389
4481
  const tester = data?.tester;
4390
4482
  return { error, loading, refetch, tester };
4391
4483
  };
4392
4484
 
4393
4485
  // src/graphql/hooks/user/hooksMutation.ts
4394
- var import_client42 = require("@apollo/client");
4486
+ var import_react19 = require("@apollo/client/react");
4395
4487
 
4396
4488
  // src/graphql/mutations/user.ts
4397
- var import_client41 = require("@apollo/client");
4398
- var CREATE_USER_MUTATION = import_client41.gql`
4489
+ var import_client23 = require("@apollo/client");
4490
+ var CREATE_USER_MUTATION = import_client23.gql`
4399
4491
  mutation createUser($input: UserInputType!) {
4400
4492
  createUser(input: $input) {
4401
4493
  ...UserFields
@@ -4403,7 +4495,7 @@ var CREATE_USER_MUTATION = import_client41.gql`
4403
4495
  }
4404
4496
  ${USER_FIELDS_FRAGMENT}
4405
4497
  `;
4406
- var UPDATE_USER_MUTATION = import_client41.gql`
4498
+ var UPDATE_USER_MUTATION = import_client23.gql`
4407
4499
  mutation updateUser($_id: ID!, $input: UserInputType!) {
4408
4500
  updateUser(_id: $_id, input: $input) {
4409
4501
  ...UserFields
@@ -4411,12 +4503,12 @@ var UPDATE_USER_MUTATION = import_client41.gql`
4411
4503
  }
4412
4504
  ${USER_FIELDS_FRAGMENT}
4413
4505
  `;
4414
- var DELETE_USER_MUTATION = import_client41.gql`
4506
+ var DELETE_USER_MUTATION = import_client23.gql`
4415
4507
  mutation deleteUser($email: String!) {
4416
4508
  deleteUser(email: $email)
4417
4509
  }
4418
4510
  `;
4419
- var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client41.gql`
4511
+ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client23.gql`
4420
4512
  mutation addUserFavouriteResource(
4421
4513
  $resourceId: ID!
4422
4514
  $resourceType: ResourceTypeEnum!
@@ -4430,7 +4522,7 @@ var ADD_USER_FAVOURITE_RESOURCE_MUTATION = import_client41.gql`
4430
4522
  }
4431
4523
  ${USER_FIELDS_FRAGMENT}
4432
4524
  `;
4433
- var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client41.gql`
4525
+ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client23.gql`
4434
4526
  mutation removeUserFavouriteResource(
4435
4527
  $resourceId: ID!
4436
4528
  $resourceType: ResourceTypeEnum!
@@ -4444,7 +4536,7 @@ var REMOVE_USER_FAVOURITE_RESOURCE_MUTATION = import_client41.gql`
4444
4536
  }
4445
4537
  ${USER_FIELDS_FRAGMENT}
4446
4538
  `;
4447
- var SELECT_PACKAGE_MUTATION = import_client41.gql`
4539
+ var SELECT_PACKAGE_MUTATION = import_client23.gql`
4448
4540
  mutation selectPackage(
4449
4541
  $selectedLicence: LicencesEnumType!
4450
4542
  $removedLicence: LicencesEnumType
@@ -4453,12 +4545,15 @@ var SELECT_PACKAGE_MUTATION = import_client41.gql`
4453
4545
  selectedLicence: $selectedLicence
4454
4546
  removedLicence: $removedLicence
4455
4547
  ) {
4456
- licences
4548
+ licences {
4549
+ ...LicenceFields
4550
+ }
4457
4551
  message
4458
4552
  }
4459
4553
  }
4554
+ ${LICENCE_FIELDS_FRAGMENT}
4460
4555
  `;
4461
- var ADD_USER_INTEREST_RESOURCE_MUTATION = import_client41.gql`
4556
+ var ADD_USER_INTEREST_RESOURCE_MUTATION = import_client23.gql`
4462
4557
  mutation addUserInterestResource($input: UserActivityInputType!) {
4463
4558
  addUserInterestResource(input: $input) {
4464
4559
  ...UserFields
@@ -4466,7 +4561,7 @@ var ADD_USER_INTEREST_RESOURCE_MUTATION = import_client41.gql`
4466
4561
  }
4467
4562
  ${USER_FIELDS_FRAGMENT}
4468
4563
  `;
4469
- var REMOVE_USER_INTEREST_RESOURCE_MUTATION = import_client41.gql`
4564
+ var REMOVE_USER_INTEREST_RESOURCE_MUTATION = import_client23.gql`
4470
4565
  mutation removeUserInterestResource($input: UserActivityInputType!) {
4471
4566
  removeUserInterestResource(input: $input) {
4472
4567
  ...UserFields
@@ -4474,7 +4569,7 @@ var REMOVE_USER_INTEREST_RESOURCE_MUTATION = import_client41.gql`
4474
4569
  }
4475
4570
  ${USER_FIELDS_FRAGMENT}
4476
4571
  `;
4477
- var ADD_USER_GOING_RESOURCE_MUTATION = import_client41.gql`
4572
+ var ADD_USER_GOING_RESOURCE_MUTATION = import_client23.gql`
4478
4573
  mutation addUserGoingResource($input: UserActivityInputType!) {
4479
4574
  addUserGoingResource(input: $input) {
4480
4575
  ...UserFields
@@ -4482,7 +4577,7 @@ var ADD_USER_GOING_RESOURCE_MUTATION = import_client41.gql`
4482
4577
  }
4483
4578
  ${USER_FIELDS_FRAGMENT}
4484
4579
  `;
4485
- var REMOVE_USER_GOING_RESOURCE_MUTATION = import_client41.gql`
4580
+ var REMOVE_USER_GOING_RESOURCE_MUTATION = import_client23.gql`
4486
4581
  mutation removeUserGoingResource($input: UserActivityInputType!) {
4487
4582
  removeUserGoingResource(input: $input) {
4488
4583
  ...UserFields
@@ -4490,7 +4585,7 @@ var REMOVE_USER_GOING_RESOURCE_MUTATION = import_client41.gql`
4490
4585
  }
4491
4586
  ${USER_FIELDS_FRAGMENT}
4492
4587
  `;
4493
- var ADD_USER_PRESENT_RESOURCE_MUTATION = import_client41.gql`
4588
+ var ADD_USER_PRESENT_RESOURCE_MUTATION = import_client23.gql`
4494
4589
  mutation addUserPresentResource($input: UserActivityInputType!) {
4495
4590
  addUserPresentResource(input: $input) {
4496
4591
  ...UserFields
@@ -4498,7 +4593,7 @@ var ADD_USER_PRESENT_RESOURCE_MUTATION = import_client41.gql`
4498
4593
  }
4499
4594
  ${USER_FIELDS_FRAGMENT}
4500
4595
  `;
4501
- var REMOVE_USER_PRESENT_RESOURCE_MUTATION = import_client41.gql`
4596
+ var REMOVE_USER_PRESENT_RESOURCE_MUTATION = import_client23.gql`
4502
4597
  mutation removeUserPresentResource($input: UserActivityInputType!) {
4503
4598
  removeUserPresentResource(input: $input) {
4504
4599
  ...UserFields
@@ -4509,11 +4604,11 @@ var REMOVE_USER_PRESENT_RESOURCE_MUTATION = import_client41.gql`
4509
4604
 
4510
4605
  // src/graphql/hooks/user/hooksMutation.ts
4511
4606
  var useCreateUser = () => {
4512
- const [createUser, { loading, error }] = (0, import_client42.useMutation)(CREATE_USER_MUTATION);
4607
+ const [createUser, { loading, error }] = (0, import_react19.useMutation)(CREATE_USER_MUTATION);
4513
4608
  return { createUser, error, loading };
4514
4609
  };
4515
4610
  var useUpdateUser = () => {
4516
- const [updateUser, { loading, error }] = (0, import_client42.useMutation)(UPDATE_USER_MUTATION, {
4611
+ const [updateUser, { loading, error }] = (0, import_react19.useMutation)(UPDATE_USER_MUTATION, {
4517
4612
  awaitRefetchQueries: true,
4518
4613
  refetchQueries: (mutationResult) => {
4519
4614
  const userId = mutationResult?.data?.updateUser?._id;
@@ -4524,11 +4619,11 @@ var useUpdateUser = () => {
4524
4619
  return { error, loading, updateUser };
4525
4620
  };
4526
4621
  var useDeleteUser = () => {
4527
- const [deleteUser, { loading, error }] = (0, import_client42.useMutation)(DELETE_USER_MUTATION);
4622
+ const [deleteUser, { loading, error }] = (0, import_react19.useMutation)(DELETE_USER_MUTATION);
4528
4623
  return { deleteUser, error, loading };
4529
4624
  };
4530
4625
  var useAddUserFavouriteResource = () => {
4531
- const [addUserFavouriteResource, { loading, error }] = (0, import_client42.useMutation)(
4626
+ const [addUserFavouriteResource, { loading, error }] = (0, import_react19.useMutation)(
4532
4627
  ADD_USER_FAVOURITE_RESOURCE_MUTATION,
4533
4628
  {
4534
4629
  awaitRefetchQueries: true,
@@ -4538,7 +4633,7 @@ var useAddUserFavouriteResource = () => {
4538
4633
  return { addUserFavouriteResource, error, loading };
4539
4634
  };
4540
4635
  var useRemoveUserFavouriteResource = () => {
4541
- const [removeUserFavouriteResource, { loading, error }] = (0, import_client42.useMutation)(
4636
+ const [removeUserFavouriteResource, { loading, error }] = (0, import_react19.useMutation)(
4542
4637
  REMOVE_USER_FAVOURITE_RESOURCE_MUTATION,
4543
4638
  {
4544
4639
  awaitRefetchQueries: true,
@@ -4548,25 +4643,22 @@ var useRemoveUserFavouriteResource = () => {
4548
4643
  return { error, loading, removeUserFavouriteResource };
4549
4644
  };
4550
4645
  var useSelectPackage = () => {
4551
- const [selectPackage, { loading, error }] = (0, import_client42.useMutation)(
4552
- SELECT_PACKAGE_MUTATION,
4553
- {
4554
- awaitRefetchQueries: true,
4555
- refetchQueries: (mutationResult) => {
4556
- const userId = mutationResult?.data?.selectPackage?.userId;
4557
- if (!userId) return [];
4558
- return [
4559
- { query: GET_USER, variables: { _id: userId } },
4560
- { query: GET_USER_EVENTS },
4561
- { query: GET_USER_VENDORS }
4562
- ];
4563
- }
4646
+ const [selectPackage, { loading, error }] = (0, import_react19.useMutation)(SELECT_PACKAGE_MUTATION, {
4647
+ awaitRefetchQueries: true,
4648
+ refetchQueries: (mutationResult) => {
4649
+ const userId = mutationResult?.data?.selectPackage?.userId;
4650
+ if (!userId) return [];
4651
+ return [
4652
+ { query: GET_USER, variables: { _id: userId } },
4653
+ { query: GET_USER_EVENTS },
4654
+ { query: GET_USER_VENDORS }
4655
+ ];
4564
4656
  }
4565
- );
4657
+ });
4566
4658
  return { error, loading, selectPackage };
4567
4659
  };
4568
4660
  var useAddUserInterestResource = () => {
4569
- const [addUserInterestResource, { loading, error }] = (0, import_client42.useMutation)(
4661
+ const [addUserInterestResource, { loading, error }] = (0, import_react19.useMutation)(
4570
4662
  ADD_USER_INTEREST_RESOURCE_MUTATION,
4571
4663
  {
4572
4664
  awaitRefetchQueries: true,
@@ -4576,7 +4668,7 @@ var useAddUserInterestResource = () => {
4576
4668
  return { addUserInterestResource, error, loading };
4577
4669
  };
4578
4670
  var useRemoveUserInterestResource = () => {
4579
- const [removeUserInterestResource, { loading, error }] = (0, import_client42.useMutation)(
4671
+ const [removeUserInterestResource, { loading, error }] = (0, import_react19.useMutation)(
4580
4672
  REMOVE_USER_INTEREST_RESOURCE_MUTATION,
4581
4673
  {
4582
4674
  awaitRefetchQueries: true,
@@ -4586,7 +4678,7 @@ var useRemoveUserInterestResource = () => {
4586
4678
  return { error, loading, removeUserInterestResource };
4587
4679
  };
4588
4680
  var useAddUserGoingResource = () => {
4589
- const [addUserGoingResource, { loading, error }] = (0, import_client42.useMutation)(
4681
+ const [addUserGoingResource, { loading, error }] = (0, import_react19.useMutation)(
4590
4682
  ADD_USER_GOING_RESOURCE_MUTATION,
4591
4683
  {
4592
4684
  awaitRefetchQueries: true,
@@ -4596,7 +4688,7 @@ var useAddUserGoingResource = () => {
4596
4688
  return { addUserGoingResource, error, loading };
4597
4689
  };
4598
4690
  var useRemoveUserGoingResource = () => {
4599
- const [removeUserGoingResource, { loading, error }] = (0, import_client42.useMutation)(
4691
+ const [removeUserGoingResource, { loading, error }] = (0, import_react19.useMutation)(
4600
4692
  REMOVE_USER_GOING_RESOURCE_MUTATION,
4601
4693
  {
4602
4694
  awaitRefetchQueries: true,
@@ -4606,7 +4698,7 @@ var useRemoveUserGoingResource = () => {
4606
4698
  return { error, loading, removeUserGoingResource };
4607
4699
  };
4608
4700
  var useAddUserPresentResource = () => {
4609
- const [addUserPresentResource, { loading, error }] = (0, import_client42.useMutation)(
4701
+ const [addUserPresentResource, { loading, error }] = (0, import_react19.useMutation)(
4610
4702
  ADD_USER_PRESENT_RESOURCE_MUTATION,
4611
4703
  {
4612
4704
  awaitRefetchQueries: true,
@@ -4616,7 +4708,7 @@ var useAddUserPresentResource = () => {
4616
4708
  return { addUserPresentResource, error, loading };
4617
4709
  };
4618
4710
  var useRemoveUserPresentResource = () => {
4619
- const [removeUserPresentResource, { loading, error }] = (0, import_client42.useMutation)(
4711
+ const [removeUserPresentResource, { loading, error }] = (0, import_react19.useMutation)(
4620
4712
  REMOVE_USER_PRESENT_RESOURCE_MUTATION,
4621
4713
  {
4622
4714
  awaitRefetchQueries: true,
@@ -4627,66 +4719,72 @@ var useRemoveUserPresentResource = () => {
4627
4719
  };
4628
4720
 
4629
4721
  // src/graphql/hooks/user/hooksQuery.ts
4630
- var import_client43 = require("@apollo/client");
4722
+ var import_react20 = require("@apollo/client/react");
4631
4723
  var useGetUsers = () => {
4632
- const { loading, error, data, refetch } = (0, import_client43.useQuery)(GET_USERS, {
4633
- fetchPolicy: "network-only"
4634
- });
4635
- const users = data?.users;
4724
+ const { loading, error, data, refetch } = (0, import_react20.useQuery)(
4725
+ GET_USERS,
4726
+ {
4727
+ fetchPolicy: "network-only"
4728
+ }
4729
+ );
4730
+ const users = data?.users || [];
4636
4731
  return { error, loading, refetch, users };
4637
4732
  };
4638
4733
  var useGetUser = (_id) => {
4639
- const { loading, error, data, refetch } = (0, import_client43.useQuery)(GET_USER, {
4640
- variables: { _id }
4641
- });
4734
+ const { loading, error, data, refetch } = (0, import_react20.useQuery)(
4735
+ GET_USER,
4736
+ {
4737
+ variables: { _id }
4738
+ }
4739
+ );
4642
4740
  const user = data?.user;
4643
4741
  return { error, loading, refetch, user };
4644
4742
  };
4645
4743
  var useGetUserEvents = () => {
4646
- const { loading, error, data, refetch } = (0, import_client43.useQuery)(GET_USER_EVENTS, {
4744
+ const { loading, error, data, refetch } = (0, import_react20.useQuery)(GET_USER_EVENTS, {
4647
4745
  fetchPolicy: "network-only"
4648
4746
  });
4649
- const userEvents = data?.userEvents;
4747
+ const userEvents = data?.userEvents || [];
4650
4748
  return { error, loading, refetch, userEvents };
4651
4749
  };
4652
4750
  var useGetUserVendors = () => {
4653
- const { loading, error, data, refetch } = (0, import_client43.useQuery)(GET_USER_VENDORS, {
4751
+ const { loading, error, data, refetch } = (0, import_react20.useQuery)(GET_USER_VENDORS, {
4654
4752
  fetchPolicy: "network-only"
4655
4753
  });
4656
- const userVendors = data?.userVendors;
4754
+ const userVendors = data?.userVendors || [];
4657
4755
  return { error, loading, refetch, userVendors };
4658
4756
  };
4659
4757
  var useGetUserActivities = () => {
4660
- const { loading, error, data, refetch } = (0, import_client43.useQuery)(GET_USER_ACTIVITIES, {
4758
+ const { loading, error, data, refetch } = (0, import_react20.useQuery)(GET_USER_ACTIVITIES, {
4661
4759
  fetchPolicy: "network-only"
4662
4760
  });
4663
4761
  const userActivities = {
4664
4762
  favourites: {
4665
- events: data?.userActivities.favourites.events,
4666
- vendors: data?.userActivities.favourites.vendors
4763
+ events: data?.userActivities.favourites.events || [],
4764
+ vendors: data?.userActivities.favourites.vendors || []
4667
4765
  },
4668
4766
  going: {
4669
- events: data?.userActivities.going.events
4767
+ events: data?.userActivities.going.events || []
4670
4768
  },
4671
4769
  interested: {
4672
- events: data?.userActivities.interested.events
4770
+ events: data?.userActivities.interested.events || []
4673
4771
  },
4674
4772
  present: {
4675
- events: data?.userActivities.present.events
4773
+ events: data?.userActivities.present.events || []
4676
4774
  }
4677
4775
  };
4678
4776
  return { error, loading, refetch, userActivities };
4679
4777
  };
4680
4778
 
4681
4779
  // src/graphql/hooks/ad/hooksMutation.ts
4682
- var import_client46 = require("@apollo/client");
4780
+ var import_react21 = require("@apollo/client/react");
4683
4781
 
4684
4782
  // src/graphql/mutations/ad.ts
4685
- var import_client45 = require("@apollo/client");
4783
+ var import_client25 = require("@apollo/client");
4686
4784
 
4687
4785
  // src/graphql/queries/ad.ts
4688
- var import_client44 = require("@apollo/client");
4689
- var AD_FIELDS_FRAGMENT = import_client44.gql`
4786
+ var import_client24 = require("@apollo/client");
4787
+ var AD_FIELDS_FRAGMENT = import_client24.gql`
4690
4788
  fragment AdFields on AdType {
4691
4789
  _id
4692
4790
  active
@@ -4714,7 +4812,7 @@ var AD_FIELDS_FRAGMENT = import_client44.gql`
4714
4812
  }
4715
4813
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
4716
4814
  `;
4717
- var GET_ADS = import_client44.gql`
4815
+ var GET_ADS = import_client24.gql`
4718
4816
  query getAds {
4719
4817
  ads {
4720
4818
  ...AdFields
@@ -4722,7 +4820,7 @@ var GET_ADS = import_client44.gql`
4722
4820
  }
4723
4821
  ${AD_FIELDS_FRAGMENT}
4724
4822
  `;
4725
- var GET_AD = import_client44.gql`
4823
+ var GET_AD = import_client24.gql`
4726
4824
  query getAd($_id: ID!) {
4727
4825
  ad(_id: $_id) {
4728
4826
  ...AdFields
@@ -4730,7 +4828,7 @@ var GET_AD = import_client44.gql`
4730
4828
  }
4731
4829
  ${AD_FIELDS_FRAGMENT}
4732
4830
  `;
4733
- var GET_ADS_BY_REGION = import_client44.gql`
4831
+ var GET_ADS_BY_REGION = import_client24.gql`
4734
4832
  query getAdsByRegion($region: String!, $status: AdStatusTypeEnum) {
4735
4833
  adsByRegion(region: $region, status: $status) {
4736
4834
  ...AdFields
@@ -4740,7 +4838,7 @@ var GET_ADS_BY_REGION = import_client44.gql`
4740
4838
  `;
4741
4839
 
4742
4840
  // src/graphql/mutations/ad.ts
4743
- var CREATE_AD_MUTATION = import_client45.gql`
4841
+ var CREATE_AD_MUTATION = import_client25.gql`
4744
4842
  mutation createAd($input: AdInputType!) {
4745
4843
  createAd(input: $input) {
4746
4844
  ...AdFields
@@ -4748,7 +4846,7 @@ var CREATE_AD_MUTATION = import_client45.gql`
4748
4846
  }
4749
4847
  ${AD_FIELDS_FRAGMENT}
4750
4848
  `;
4751
- var UPDATE_AD_MUTATION = import_client45.gql`
4849
+ var UPDATE_AD_MUTATION = import_client25.gql`
4752
4850
  mutation updateAd($_id: ID!, $input: AdInputType!) {
4753
4851
  updateAd(_id: $_id, input: $input) {
4754
4852
  ...AdFields
@@ -4756,7 +4854,7 @@ var UPDATE_AD_MUTATION = import_client45.gql`
4756
4854
  }
4757
4855
  ${AD_FIELDS_FRAGMENT}
4758
4856
  `;
4759
- var DELETE_AD_MUTATION = import_client45.gql`
4857
+ var DELETE_AD_MUTATION = import_client25.gql`
4760
4858
  mutation deleteAd($_id: ID!) {
4761
4859
  deleteAd(_id: $_id)
4762
4860
  }
@@ -4764,7 +4862,7 @@ var DELETE_AD_MUTATION = import_client45.gql`
4764
4862
 
4765
4863
  // src/graphql/hooks/ad/hooksMutation.ts
4766
4864
  var useCreateAd = () => {
4767
- const [createAd, { loading, error }] = (0, import_client46.useMutation)(CREATE_AD_MUTATION, {
4865
+ const [createAd, { loading, error }] = (0, import_react21.useMutation)(CREATE_AD_MUTATION, {
4768
4866
  awaitRefetchQueries: true,
4769
4867
  refetchQueries: [{ query: GET_ADS }]
4770
4868
  });
@@ -4775,7 +4873,7 @@ var useCreateAd = () => {
4775
4873
  };
4776
4874
  };
4777
4875
  var useUpdateAd = () => {
4778
- const [updateAd, { loading, error }] = (0, import_client46.useMutation)(UPDATE_AD_MUTATION, {
4876
+ const [updateAd, { loading, error }] = (0, import_react21.useMutation)(UPDATE_AD_MUTATION, {
4779
4877
  awaitRefetchQueries: true,
4780
4878
  refetchQueries: [{ query: GET_ADS }]
4781
4879
  });
@@ -4786,7 +4884,7 @@ var useUpdateAd = () => {
4786
4884
  };
4787
4885
  };
4788
4886
  var useDeleteAd = () => {
4789
- const [deleteAd, { loading, error }] = (0, import_client46.useMutation)(DELETE_AD_MUTATION, {
4887
+ const [deleteAd, { loading, error }] = (0, import_react21.useMutation)(DELETE_AD_MUTATION, {
4790
4888
  awaitRefetchQueries: true,
4791
4889
  refetchQueries: [{ query: GET_ADS }]
4792
4890
  });
@@ -4798,23 +4896,23 @@ var useDeleteAd = () => {
4798
4896
  };
4799
4897
 
4800
4898
  // src/graphql/hooks/ad/hooksQuery.ts
4801
- var import_client47 = require("@apollo/client");
4899
+ var import_react22 = require("@apollo/client/react");
4802
4900
  var useGetAds = () => {
4803
- const { data, loading, error, refetch } = (0, import_client47.useQuery)(
4901
+ const { data, loading, error, refetch } = (0, import_react22.useQuery)(
4804
4902
  GET_ADS,
4805
4903
  {
4806
4904
  fetchPolicy: "no-cache"
4807
4905
  }
4808
4906
  );
4809
4907
  return {
4810
- ads: data?.ads,
4908
+ ads: data?.ads || [],
4811
4909
  error,
4812
4910
  loading,
4813
4911
  refetch
4814
4912
  };
4815
4913
  };
4816
4914
  var useGetAd = (_id) => {
4817
- const { data, loading, error, refetch } = (0, import_client47.useQuery)(GET_AD, {
4915
+ const { data, loading, error, refetch } = (0, import_react22.useQuery)(GET_AD, {
4818
4916
  fetchPolicy: "no-cache",
4819
4917
  skip: !_id,
4820
4918
  variables: { _id }
@@ -4827,13 +4925,13 @@ var useGetAd = (_id) => {
4827
4925
  };
4828
4926
  };
4829
4927
  var useGetAdsByRegion = (region, status) => {
4830
- const { data, loading, error, refetch } = (0, import_client47.useQuery)(GET_ADS_BY_REGION, {
4928
+ const { data, loading, error, refetch } = (0, import_react22.useQuery)(GET_ADS_BY_REGION, {
4831
4929
  fetchPolicy: "no-cache",
4832
4930
  skip: !region,
4833
4931
  variables: { region, status }
4834
4932
  });
4835
4933
  return {
4836
- adsByRegion: data?.adsByRegion,
4934
+ adsByRegion: data?.adsByRegion || [],
4837
4935
  error,
4838
4936
  loading,
4839
4937
  refetch
@@ -4841,11 +4939,11 @@ var useGetAdsByRegion = (region, status) => {
4841
4939
  };
4842
4940
 
4843
4941
  // src/graphql/hooks/resourceActivities/hooksMutation.ts
4844
- var import_client49 = require("@apollo/client");
4942
+ var import_react23 = require("@apollo/client/react");
4845
4943
 
4846
4944
  // src/graphql/mutations/resourceActivities.ts
4847
- var import_client48 = require("@apollo/client");
4848
- var CREATE_RESOURCE_ACTIVITY_MUTATION = import_client48.gql`
4945
+ var import_client26 = require("@apollo/client");
4946
+ var CREATE_RESOURCE_ACTIVITY_MUTATION = import_client26.gql`
4849
4947
  mutation createResourceActivity($input: ResourceActivityInputType!) {
4850
4948
  createResourceActivity(input: $input)
4851
4949
  }
@@ -4853,18 +4951,18 @@ var CREATE_RESOURCE_ACTIVITY_MUTATION = import_client48.gql`
4853
4951
 
4854
4952
  // src/graphql/hooks/resourceActivities/hooksMutation.ts
4855
4953
  var useCreateResourceActivity = () => {
4856
- const [createResourceActivity, { loading, error }] = (0, import_client49.useMutation)(
4954
+ const [createResourceActivity, { loading, error }] = (0, import_react23.useMutation)(
4857
4955
  CREATE_RESOURCE_ACTIVITY_MUTATION
4858
4956
  );
4859
4957
  return { createResourceActivity, error, loading };
4860
4958
  };
4861
4959
 
4862
4960
  // src/graphql/hooks/resourceActivities/hooksQuery.ts
4863
- var import_client51 = require("@apollo/client");
4961
+ var import_react24 = require("@apollo/client/react");
4864
4962
 
4865
4963
  // src/graphql/queries/resourceActivities.ts
4866
- var import_client50 = require("@apollo/client");
4867
- var RESOURCE_ACTIVITIES_FIELDS_FRAGMENT = import_client50.gql`
4964
+ var import_client27 = require("@apollo/client");
4965
+ var RESOURCE_ACTIVITIES_FIELDS_FRAGMENT = import_client27.gql`
4868
4966
  fragment ResourceActivitiesFields on ResourceActivitiesType {
4869
4967
  resourceId
4870
4968
  resourceType
@@ -4883,7 +4981,7 @@ var RESOURCE_ACTIVITIES_FIELDS_FRAGMENT = import_client50.gql`
4883
4981
  }
4884
4982
  }
4885
4983
  `;
4886
- var GET_RESOURCE_ACTIVITIES = import_client50.gql`
4984
+ var GET_RESOURCE_ACTIVITIES = import_client27.gql`
4887
4985
  query getResourceActivities(
4888
4986
  $resourceType: ResourceTypeEnum!
4889
4987
  $resourceId: ID!
@@ -4897,7 +4995,7 @@ var GET_RESOURCE_ACTIVITIES = import_client50.gql`
4897
4995
 
4898
4996
  // src/graphql/hooks/resourceActivities/hooksQuery.ts
4899
4997
  var useGetResourceActivities = (resourceId, resourceType) => {
4900
- const { data, loading, error, refetch } = (0, import_client51.useQuery)(GET_RESOURCE_ACTIVITIES, {
4998
+ const { data, loading, error, refetch } = (0, import_react24.useQuery)(GET_RESOURCE_ACTIVITIES, {
4901
4999
  fetchPolicy: "network-only",
4902
5000
  variables: { resourceId, resourceType }
4903
5001
  });
@@ -4905,16 +5003,16 @@ var useGetResourceActivities = (resourceId, resourceType) => {
4905
5003
  error,
4906
5004
  loading,
4907
5005
  refetch,
4908
- resourceActivities: data?.resourceActivities
5006
+ resourceActivities: data?.resourceActivities || []
4909
5007
  };
4910
5008
  };
4911
5009
 
4912
5010
  // src/graphql/hooks/stripe/hooksMutation.ts
4913
- var import_client53 = require("@apollo/client");
5011
+ var import_react25 = require("@apollo/client/react");
4914
5012
 
4915
5013
  // src/graphql/mutations/stripe.ts
4916
- var import_client52 = require("@apollo/client");
4917
- var CREATE_CHECKOUT_SESSION_MUTATION = import_client52.gql`
5014
+ var import_client28 = require("@apollo/client");
5015
+ var CREATE_CHECKOUT_SESSION_MUTATION = import_client28.gql`
4918
5016
  mutation createCheckoutSession($planId: LicencesEnumType!) {
4919
5017
  createCheckoutSession(planId: $planId) {
4920
5018
  sessionId
@@ -4922,12 +5020,12 @@ var CREATE_CHECKOUT_SESSION_MUTATION = import_client52.gql`
4922
5020
  }
4923
5021
  }
4924
5022
  `;
4925
- var CANCEL_SUBSCRIPTION_MUTATION = import_client52.gql`
5023
+ var CANCEL_SUBSCRIPTION_MUTATION = import_client28.gql`
4926
5024
  mutation cancelSubscription {
4927
5025
  cancelSubscription
4928
5026
  }
4929
5027
  `;
4930
- var UPDATE_SUBSCRIPTION_PLAN_MUTATION = import_client52.gql`
5028
+ var UPDATE_SUBSCRIPTION_PLAN_MUTATION = import_client28.gql`
4931
5029
  mutation updateSubscriptionPlan($newPlanId: LicencesEnumType!) {
4932
5030
  updateSubscriptionPlan(newPlanId: $newPlanId) {
4933
5031
  subscriptionId
@@ -4940,30 +5038,30 @@ var UPDATE_SUBSCRIPTION_PLAN_MUTATION = import_client52.gql`
4940
5038
 
4941
5039
  // src/graphql/hooks/stripe/hooksMutation.ts
4942
5040
  var useCreateCheckoutSession = () => {
4943
- const [createCheckoutSession, { loading, error }] = (0, import_client53.useMutation)(
5041
+ const [createCheckoutSession, { loading, error }] = (0, import_react25.useMutation)(
4944
5042
  CREATE_CHECKOUT_SESSION_MUTATION
4945
5043
  );
4946
5044
  return { createCheckoutSession, error, loading };
4947
5045
  };
4948
5046
  var useCancelSubscription = () => {
4949
- const [cancelSubscription, { loading, error }] = (0, import_client53.useMutation)(
5047
+ const [cancelSubscription, { loading, error }] = (0, import_react25.useMutation)(
4950
5048
  CANCEL_SUBSCRIPTION_MUTATION
4951
5049
  );
4952
5050
  return { cancelSubscription, error, loading };
4953
5051
  };
4954
5052
  var useUpdateSubscriptionPlan = () => {
4955
- const [updateSubscriptionPlan, { loading, error }] = (0, import_client53.useMutation)(
5053
+ const [updateSubscriptionPlan, { loading, error }] = (0, import_react25.useMutation)(
4956
5054
  UPDATE_SUBSCRIPTION_PLAN_MUTATION
4957
5055
  );
4958
5056
  return { error, loading, updateSubscriptionPlan };
4959
5057
  };
4960
5058
 
4961
5059
  // src/graphql/hooks/stripe/hooksQuery.ts
4962
- var import_client55 = require("@apollo/client");
5060
+ var import_react26 = require("@apollo/client/react");
4963
5061
 
4964
5062
  // src/graphql/queries/stripe.ts
4965
- var import_client54 = require("@apollo/client");
4966
- var GET_SUBSCRIPTION_STATUS = import_client54.gql`
5063
+ var import_client29 = require("@apollo/client");
5064
+ var GET_SUBSCRIPTION_STATUS = import_client29.gql`
4967
5065
  query getSubscriptionStatus {
4968
5066
  getSubscriptionStatus {
4969
5067
  subscriptionId
@@ -4976,7 +5074,7 @@ var GET_SUBSCRIPTION_STATUS = import_client54.gql`
4976
5074
 
4977
5075
  // src/graphql/hooks/stripe/hooksQuery.ts
4978
5076
  var useGetSubscriptionStatus = () => {
4979
- const { data, loading, error, refetch } = (0, import_client55.useQuery)(GET_SUBSCRIPTION_STATUS);
5077
+ const { data, loading, error, refetch } = (0, import_react26.useQuery)(GET_SUBSCRIPTION_STATUS);
4980
5078
  return {
4981
5079
  data: data?.getSubscriptionStatus,
4982
5080
  error,
@@ -4986,11 +5084,11 @@ var useGetSubscriptionStatus = () => {
4986
5084
  };
4987
5085
 
4988
5086
  // src/graphql/hooks/partner/hooksMutation.ts
4989
- var import_client57 = require("@apollo/client");
5087
+ var import_react27 = require("@apollo/client/react");
4990
5088
 
4991
5089
  // src/graphql/mutations/partner.ts
4992
- var import_client56 = require("@apollo/client");
4993
- var CREATE_PARTNER_MUTATION = import_client56.gql`
5090
+ var import_client30 = require("@apollo/client");
5091
+ var CREATE_PARTNER_MUTATION = import_client30.gql`
4994
5092
  mutation createPartner($input: PartnerInputType!) {
4995
5093
  createPartner(input: $input) {
4996
5094
  ...PartnerFields
@@ -4998,7 +5096,7 @@ var CREATE_PARTNER_MUTATION = import_client56.gql`
4998
5096
  }
4999
5097
  ${PARTNER}
5000
5098
  `;
5001
- var UPDATE_PARTNER_MUTATION = import_client56.gql`
5099
+ var UPDATE_PARTNER_MUTATION = import_client30.gql`
5002
5100
  mutation updatePartner($_id: ID!, $input: PartnerInputType!) {
5003
5101
  updatePartner(_id: $_id, input: $input) {
5004
5102
  ...PartnerFields
@@ -5006,7 +5104,7 @@ var UPDATE_PARTNER_MUTATION = import_client56.gql`
5006
5104
  }
5007
5105
  ${PARTNER}
5008
5106
  `;
5009
- var DELETE_PARTNER_MUTATION = import_client56.gql`
5107
+ var DELETE_PARTNER_MUTATION = import_client30.gql`
5010
5108
  mutation deletePartner($_id: ID!) {
5011
5109
  deletePartner(_id: $_id)
5012
5110
  }
@@ -5014,7 +5112,7 @@ var DELETE_PARTNER_MUTATION = import_client56.gql`
5014
5112
 
5015
5113
  // src/graphql/hooks/partner/hooksMutation.ts
5016
5114
  var useCreatePartner = () => {
5017
- const [createPartner, { loading, error }] = (0, import_client57.useMutation)(
5115
+ const [createPartner, { loading, error }] = (0, import_react27.useMutation)(
5018
5116
  CREATE_PARTNER_MUTATION,
5019
5117
  {
5020
5118
  awaitRefetchQueries: true,
@@ -5024,7 +5122,7 @@ var useCreatePartner = () => {
5024
5122
  return { createPartner, error, loading };
5025
5123
  };
5026
5124
  var useUpdatePartner = () => {
5027
- const [updatePartner, { loading, error }] = (0, import_client57.useMutation)(
5125
+ const [updatePartner, { loading, error }] = (0, import_react27.useMutation)(
5028
5126
  UPDATE_PARTNER_MUTATION,
5029
5127
  {
5030
5128
  awaitRefetchQueries: true,
@@ -5034,7 +5132,7 @@ var useUpdatePartner = () => {
5034
5132
  return { error, loading, updatePartner };
5035
5133
  };
5036
5134
  var useDeletePartner = () => {
5037
- const [deletePartner, { loading, error }] = (0, import_client57.useMutation)(
5135
+ const [deletePartner, { loading, error }] = (0, import_react27.useMutation)(
5038
5136
  DELETE_PARTNER_MUTATION,
5039
5137
  {
5040
5138
  awaitRefetchQueries: true,
@@ -5045,12 +5143,12 @@ var useDeletePartner = () => {
5045
5143
  };
5046
5144
 
5047
5145
  // src/graphql/hooks/partner/hooksQuery.ts
5048
- var import_client58 = require("@apollo/client");
5146
+ var import_react28 = require("@apollo/client/react");
5049
5147
  var useGetPartners = () => {
5050
- const { loading, error, data, refetch } = (0, import_client58.useQuery)(GET_PARTNERS, {
5148
+ const { loading, error, data, refetch } = (0, import_react28.useQuery)(GET_PARTNERS, {
5051
5149
  fetchPolicy: "network-only"
5052
5150
  });
5053
- const partners = data?.partners;
5151
+ const partners = data?.partners || [];
5054
5152
  return {
5055
5153
  error,
5056
5154
  loading,
@@ -5059,30 +5157,33 @@ var useGetPartners = () => {
5059
5157
  };
5060
5158
  };
5061
5159
  var useGetPartner = (_id) => {
5062
- const { loading, error, data, refetch } = (0, import_client58.useQuery)(GET_PARTNER, {
5063
- fetchPolicy: "network-only",
5064
- skip: !_id,
5065
- variables: { _id }
5066
- });
5160
+ const { loading, error, data, refetch } = (0, import_react28.useQuery)(
5161
+ GET_PARTNER,
5162
+ {
5163
+ fetchPolicy: "network-only",
5164
+ skip: !_id,
5165
+ variables: { _id }
5166
+ }
5167
+ );
5067
5168
  const partner = data?.partner;
5068
5169
  return { error, loading, partner, refetch };
5069
5170
  };
5070
5171
  var useGetPartnersByRegion = (region) => {
5071
- const { loading, error, data, refetch } = (0, import_client58.useQuery)(GET_PARTNERS_BY_REGION, {
5172
+ const { loading, error, data, refetch } = (0, import_react28.useQuery)(GET_PARTNERS_BY_REGION, {
5072
5173
  fetchPolicy: "no-cache",
5073
5174
  skip: !region,
5074
5175
  variables: { region }
5075
5176
  });
5076
- const partnersByRegion = data?.partnersByRegion;
5177
+ const partnersByRegion = data?.partnersByRegion || [];
5077
5178
  return { error, loading, partnersByRegion, refetch };
5078
5179
  };
5079
5180
  var useSearchPartners = (search, region) => {
5080
- const { loading, error, data, refetch } = (0, import_client58.useQuery)(SEARCH_PARTNERS, {
5181
+ const { loading, error, data, refetch } = (0, import_react28.useQuery)(SEARCH_PARTNERS, {
5081
5182
  fetchPolicy: "network-only",
5082
5183
  skip: search.length < 3,
5083
5184
  variables: { region, search }
5084
5185
  });
5085
- const partnersSearch = data?.partnersSearch;
5186
+ const partnersSearch = data?.partnersSearch || [];
5086
5187
  return { error, loading, partnersSearch, refetch };
5087
5188
  };
5088
5189
 
@@ -5217,7 +5318,7 @@ var contactDetailsSchema = yup.object({
5217
5318
  (value) => !value || landlineRegex.test(value)
5218
5319
  // skip empty values
5219
5320
  )
5220
- }).nullable().optional().label("Contact Details");
5321
+ }).nullable().default(void 0);
5221
5322
  var endDateNotInPastTest = yup.string().test("not-in-past", "End date cannot be in the past", (value) => {
5222
5323
  const now = (0, import_dayjs2.default)();
5223
5324
  return value ? (0, import_dayjs2.default)(value, dateFormat, true).isSameOrAfter(now, "day") : false;
@@ -5334,15 +5435,19 @@ var globalResourceSchema = yup.object().shape({
5334
5435
  description: yup.string().label("Description").trim().min(3).required("Description is required"),
5335
5436
  name: yup.string().label("Name").trim().min(3).max(40).required("Name is required"),
5336
5437
  region: yup.string().label("Region").required("Region is required"),
5337
- socialMedia: yup.array().of(socialMediaSchema).nullable().optional(),
5438
+ socialMedia: yup.array().of(socialMediaSchema).nullable().default(null),
5338
5439
  associates: yup.array().of(
5339
5440
  yup.object().shape({
5340
5441
  email: emailRequiredSchema,
5341
5442
  resourceId: yup.string().label("Resource ID").required("Resource ID is required"),
5342
5443
  resourceType: yup.mixed().oneOf(Object.values(EnumResourceType)).label("Resource Type").required("Resource Type is required"),
5343
- licenceType: yup.mixed().oneOf(Object.values(EnumUserLicence)).label("Licence Type").required("Licence Type is required")
5444
+ licence: yup.object({
5445
+ expiryDate: yup.date().required("Expiry Date is required"),
5446
+ issuedDate: yup.date().required("Issued Date is required"),
5447
+ licenceType: yup.mixed().oneOf(Object.values(EnumUserLicence)).label("Licence Type").required("Licence Type is required")
5448
+ })
5344
5449
  })
5345
- ).nullable().optional()
5450
+ ).nullable().default(null)
5346
5451
  });
5347
5452
  var categorySchema = yup.array().of(
5348
5453
  yup.object().shape({
@@ -5436,8 +5541,7 @@ var vendorSchema = globalResourceSchema.shape({
5436
5541
  categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),
5437
5542
  foodTruck: yup3.boolean().label("Food Truck").required("Please specify if the vendor is a food truck"),
5438
5543
  multiLocation: yup3.boolean().required("Multi location is required"),
5439
- products: yup3.array().of(vendroMenuSchema).optional().nullable(),
5440
- specialties: yup3.array().of(vendroMenuSchema).optional().nullable(),
5544
+ products: yup3.array().of(vendroMenuSchema).nullable().default(null),
5441
5545
  vendorType: yup3.mixed().oneOf(Object.values(EnumVendorType)).required("Please select a Vendor type")
5442
5546
  });
5443
5547
  var vendorInfoSchema = yup3.object().shape({
@@ -5793,6 +5897,7 @@ function useVendorForm(data) {
5793
5897
  associates,
5794
5898
  availability,
5795
5899
  categories,
5900
+ contactDetails,
5796
5901
  cover,
5797
5902
  coverUpload,
5798
5903
  foodTruck,
@@ -5820,6 +5925,7 @@ function useVendorForm(data) {
5820
5925
  associates,
5821
5926
  availability,
5822
5927
  categories,
5928
+ contactDetails,
5823
5929
  cover,
5824
5930
  coverUpload,
5825
5931
  description,
@@ -5947,6 +6053,7 @@ function useEventForm(data) {
5947
6053
  _id,
5948
6054
  active,
5949
6055
  associates,
6056
+ contactDetails,
5950
6057
  cover,
5951
6058
  coverUpload,
5952
6059
  dateTime,
@@ -5974,6 +6081,7 @@ function useEventForm(data) {
5974
6081
  _id,
5975
6082
  active,
5976
6083
  associates,
6084
+ contactDetails,
5977
6085
  cover,
5978
6086
  coverUpload,
5979
6087
  dateTime,
@@ -6337,7 +6445,7 @@ function useResetPasswordForm() {
6337
6445
 
6338
6446
  // src/hooks/useTesterForm.ts
6339
6447
  var import_yup11 = require("@hookform/resolvers/yup");
6340
- var import_react = __toESM(require("react"));
6448
+ var import_react29 = __toESM(require("react"));
6341
6449
  var import_react_hook_form11 = require("react-hook-form");
6342
6450
  var defaultValues7 = {
6343
6451
  approved: false,
@@ -6363,7 +6471,7 @@ function useTesterForm(data) {
6363
6471
  defaultValues: defaultValues7,
6364
6472
  resolver: (0, import_yup11.yupResolver)(testerSchema)
6365
6473
  });
6366
- import_react.default.useEffect(() => {
6474
+ import_react29.default.useEffect(() => {
6367
6475
  if (data) {
6368
6476
  reset({
6369
6477
  approved: data.approved,
@@ -6414,7 +6522,7 @@ function useTesterForm(data) {
6414
6522
 
6415
6523
  // src/hooks/useContactUsForm.ts
6416
6524
  var import_yup12 = require("@hookform/resolvers/yup");
6417
- var import_react2 = __toESM(require("react"));
6525
+ var import_react30 = __toESM(require("react"));
6418
6526
  var import_react_hook_form12 = require("react-hook-form");
6419
6527
 
6420
6528
  // src/yupSchema/contactUs.ts
@@ -6446,7 +6554,7 @@ function useContactUsForm(data) {
6446
6554
  defaultValues: defaultValues8,
6447
6555
  resolver: (0, import_yup12.yupResolver)(contactUsSchema)
6448
6556
  });
6449
- import_react2.default.useEffect(() => {
6557
+ import_react30.default.useEffect(() => {
6450
6558
  if (data) {
6451
6559
  reset({
6452
6560
  email: data.email,
@@ -6477,7 +6585,7 @@ function useContactUsForm(data) {
6477
6585
 
6478
6586
  // src/hooks/useAdForm.ts
6479
6587
  var import_yup13 = require("@hookform/resolvers/yup");
6480
- var import_react3 = __toESM(require("react"));
6588
+ var import_react31 = __toESM(require("react"));
6481
6589
  var import_react_hook_form13 = require("react-hook-form");
6482
6590
  var defaultValues9 = {
6483
6591
  active: true,
@@ -6516,7 +6624,7 @@ function useAdForm(data) {
6516
6624
  defaultValues: defaultValues9,
6517
6625
  resolver: (0, import_yup13.yupResolver)(adSchema)
6518
6626
  });
6519
- import_react3.default.useEffect(() => {
6627
+ import_react31.default.useEffect(() => {
6520
6628
  if (data) {
6521
6629
  reset({
6522
6630
  active: data.active,
@@ -6621,6 +6729,7 @@ function usePartnerForm(data) {
6621
6729
  _id,
6622
6730
  active,
6623
6731
  associates,
6732
+ contactDetails,
6624
6733
  cover,
6625
6734
  coverUpload,
6626
6735
  description,
@@ -6644,6 +6753,7 @@ function usePartnerForm(data) {
6644
6753
  _id,
6645
6754
  active,
6646
6755
  associates,
6756
+ contactDetails,
6647
6757
  cover,
6648
6758
  coverUpload,
6649
6759
  description,