@timardex/cluemart-shared 2.3.0 → 2.3.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/{ad-CdehhMyb.d.ts → ad-6lcjOj3X.d.ts} +2 -2
  2. package/dist/{ad-Drhn_Azy.d.mts → ad-8hhGHx6J.d.mts} +2 -2
  3. package/dist/{affiliate-Cd78p2Fz.d.mts → affiliate-DJhVZJ2h.d.mts} +2 -2
  4. package/dist/{affiliate-CdIL0r2o.d.ts → affiliate-DuDoOxK_.d.ts} +2 -2
  5. package/dist/auth/index.d.mts +3 -3
  6. package/dist/auth/index.d.ts +3 -3
  7. package/dist/{chunk-YTRRTC2S.mjs → chunk-ZZXSAQM6.mjs} +67 -10
  8. package/dist/chunk-ZZXSAQM6.mjs.map +1 -0
  9. package/dist/{contactUs-ITiB1XV4.d.ts → contactUs-6b5g9DV-.d.ts} +1 -1
  10. package/dist/{contactUs-BJPQ5nKc.d.mts → contactUs-BDJutwcx.d.mts} +1 -1
  11. package/dist/formFields/index.d.mts +1 -1
  12. package/dist/formFields/index.d.ts +1 -1
  13. package/dist/{global-XUBcgjNc.d.mts → global-EGbrTMk6.d.mts} +5 -1
  14. package/dist/{global-DlC7W4p7.d.ts → global-LtQJ2t6c.d.ts} +5 -1
  15. package/dist/graphql/index.cjs +68 -9
  16. package/dist/graphql/index.cjs.map +1 -1
  17. package/dist/graphql/index.d.mts +31 -9
  18. package/dist/graphql/index.d.ts +31 -9
  19. package/dist/graphql/index.mjs +5 -1
  20. package/dist/hooks/index.cjs +40 -2
  21. package/dist/hooks/index.cjs.map +1 -1
  22. package/dist/hooks/index.d.mts +5 -5
  23. package/dist/hooks/index.d.ts +5 -5
  24. package/dist/hooks/index.mjs +1 -1
  25. package/dist/index.cjs +68 -9
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.mts +30 -4
  28. package/dist/index.d.ts +30 -4
  29. package/dist/index.mjs +66 -9
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/map/index.d.mts +1 -1
  32. package/dist/map/index.d.ts +1 -1
  33. package/dist/region/index.d.mts +1 -1
  34. package/dist/region/index.d.ts +1 -1
  35. package/dist/{resourceActivities-Ci12UkJU.d.mts → resourceActivities-BytCHUvO.d.mts} +1 -1
  36. package/dist/{resourceActivities-C8eIfpKl.d.ts → resourceActivities-DlUEbCkT.d.ts} +1 -1
  37. package/dist/sharing/index.d.mts +1 -1
  38. package/dist/sharing/index.d.ts +1 -1
  39. package/dist/types/index.d.mts +7 -7
  40. package/dist/types/index.d.ts +7 -7
  41. package/dist/{user-BSFExFvl.d.ts → user-GnrqZmZP.d.ts} +1 -1
  42. package/dist/{user-D31zAVuz.d.mts → user-Znc91Cw5.d.mts} +1 -1
  43. package/dist/utils/index.d.mts +3 -3
  44. package/dist/utils/index.d.ts +3 -3
  45. package/package.json +1 -1
  46. package/dist/chunk-YTRRTC2S.mjs.map +0 -1
@@ -134,6 +134,8 @@ __export(graphql_exports, {
134
134
  useGetPrivateChats: () => useGetPrivateChats,
135
135
  useGetRelation: () => useGetRelation,
136
136
  useGetRelationByEventAndVendor: () => useGetRelationByEventAndVendor,
137
+ useGetRelationHistories: () => useGetRelationHistories,
138
+ useGetRelationHistory: () => useGetRelationHistory,
137
139
  useGetReportedChatUsers: () => useGetReportedChatUsers,
138
140
  useGetResourceActivity: () => useGetResourceActivity,
139
141
  useGetResourceConnections: () => useGetResourceConnections,
@@ -1612,14 +1614,52 @@ var RELATION_FIELDS_FRAGMENT = import_client11.gql`
1612
1614
  }
1613
1615
  ${RELATION_DATES_FRAGMENT}
1614
1616
  `;
1617
+ var RELATION_HISTORY_FIELDS_FRAGMENT = import_client11.gql`
1618
+ fragment RelationHistoryFields on RelationHistoryType {
1619
+ _id
1620
+ active
1621
+ chatId
1622
+ createdAt
1623
+ eventId
1624
+ eventName
1625
+ lastUpdateBy
1626
+ relationDates {
1627
+ ...RelationDates
1628
+ }
1629
+ relationType
1630
+ updatedAt
1631
+ vendorId
1632
+ vendorName
1633
+ }
1634
+ ${RELATION_DATES_FRAGMENT}
1635
+ `;
1615
1636
  var GET_RELATION = import_client11.gql`
1616
- query getRelation($_id: ID!, $futureOnly: Boolean = false) {
1617
- relation(_id: $_id, futureOnly: $futureOnly) {
1637
+ query getRelation($_id: ID!) {
1638
+ relation(_id: $_id) {
1618
1639
  ...RelationFields
1619
1640
  }
1620
1641
  }
1621
1642
  ${RELATION_FIELDS_FRAGMENT}
1622
1643
  `;
1644
+ var GET_RELATION_HISTORY = import_client11.gql`
1645
+ query getRelationHistory($_id: ID!) {
1646
+ relationHistory(_id: $_id) {
1647
+ ...RelationHistoryFields
1648
+ }
1649
+ }
1650
+ ${RELATION_HISTORY_FIELDS_FRAGMENT}
1651
+ `;
1652
+ var GET_RELATION_HISTORIES = import_client11.gql`
1653
+ query getRelationHistories(
1654
+ $resourceId: ID!
1655
+ $resourceType: ResourceTypeEnum!
1656
+ ) {
1657
+ relationHistories(resourceId: $resourceId, resourceType: $resourceType) {
1658
+ ...RelationHistoryFields
1659
+ }
1660
+ }
1661
+ ${RELATION_HISTORY_FIELDS_FRAGMENT}
1662
+ `;
1623
1663
  var GET_RELATION_BY_EVENT_AND_VENDOR = import_client11.gql`
1624
1664
  query getRelationByEventAndVendor($eventId: ID!, $vendorId: ID!) {
1625
1665
  relationByEventAndVendor(eventId: $eventId, vendorId: $vendorId) {
@@ -2989,20 +3029,37 @@ var useDeleteRelation = () => {
2989
3029
 
2990
3030
  // src/graphql/hooks/relation/hooksQuery.ts
2991
3031
  var import_client38 = require("@apollo/client");
2992
- var useGetRelation = (_id, options) => {
3032
+ var useGetRelation = (_id) => {
2993
3033
  const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_RELATION, {
2994
- // `relation(futureOnly)` is a projection-specific view of RelationType.
2995
- // If this writes into the normalized RelationType cache, a full-history
2996
- // read (e.g. the statistics screen's `futureOnly: false`) and this one can
2997
- // overwrite each other's `relationDates` for the same entity id. Keep it
2998
- // uncached.
3034
+ // `relation` returns only upcoming dates, which is a projection of
3035
+ // RelationType rather than the stored document. Keep it out of the
3036
+ // normalized cache so it cannot overwrite `relationDates` of the same
3037
+ // entity id for other readers.
2999
3038
  fetchPolicy: "no-cache",
3000
3039
  skip: !_id,
3001
- variables: _id ? { _id, futureOnly: options?.futureOnly ?? false } : void 0
3040
+ variables: _id ? { _id } : void 0
3002
3041
  });
3003
3042
  const relation = data?.relation;
3004
3043
  return { error, loading, refetch, relation };
3005
3044
  };
3045
+ var useGetRelationHistory = (_id) => {
3046
+ const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_RELATION_HISTORY, {
3047
+ fetchPolicy: "no-cache",
3048
+ skip: !_id,
3049
+ variables: _id ? { _id } : void 0
3050
+ });
3051
+ const relationHistory = data?.relationHistory;
3052
+ return { error, loading, refetch, relationHistory };
3053
+ };
3054
+ var useGetRelationHistories = (resourceId, resourceType) => {
3055
+ const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_RELATION_HISTORIES, {
3056
+ fetchPolicy: "no-cache",
3057
+ skip: !resourceId || !resourceType,
3058
+ variables: { resourceId, resourceType }
3059
+ });
3060
+ const relationHistories = data?.relationHistories || [];
3061
+ return { error, loading, refetch, relationHistories };
3062
+ };
3006
3063
  var useGetRelationByEventAndVendor = (eventId, vendorId) => {
3007
3064
  const { loading, error, data, refetch } = (0, import_client38.useQuery)(GET_RELATION_BY_EVENT_AND_VENDOR, {
3008
3065
  fetchPolicy: "network-only",
@@ -5775,6 +5832,8 @@ function usePaginatedList({
5775
5832
  useGetPrivateChats,
5776
5833
  useGetRelation,
5777
5834
  useGetRelationByEventAndVendor,
5835
+ useGetRelationHistories,
5836
+ useGetRelationHistory,
5778
5837
  useGetReportedChatUsers,
5779
5838
  useGetResourceActivity,
5780
5839
  useGetResourceConnections,