@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
@@ -1,7 +1,7 @@
1
1
  import { EnumPartnerType, EnumResourceType, EnumOSPlatform } from './enums/index.js';
2
- import { Q as BaseResourceType, L as LocationType, B as BaseResourceTypeFormData, a2 as CreateFormData, aS as ResourceContactDetailsType, aU as ResourceImageType, aW as SocialMediaType, a_ as TermsAgreement, as as OwnerType, aJ as PromoCodeType, M as MutationResponse } from './global-DlC7W4p7.js';
2
+ import { T as BaseResourceType, L as LocationType, B as BaseResourceTypeFormData, a3 as CreateFormData, aT as ResourceContactDetailsType, aV as ResourceImageType, aX as SocialMediaType, a$ as TermsAgreement, at as OwnerType, aK as PromoCodeType, M as MutationResponse } from './global-LtQJ2t6c.js';
3
3
  import { PosterAssetId } from './images/index.js';
4
- import { S as SafeUserType, e as UserFormData } from './user-BSFExFvl.js';
4
+ import { S as SafeUserType, e as UserFormData } from './user-GnrqZmZP.js';
5
5
 
6
6
  interface PartnerFormData extends BaseResourceTypeFormData {
7
7
  location: LocationType;
@@ -1,7 +1,7 @@
1
1
  import { EnumPartnerType, EnumResourceType, EnumOSPlatform } from './enums/index.mjs';
2
- import { Q as BaseResourceType, L as LocationType, B as BaseResourceTypeFormData, a2 as CreateFormData, aS as ResourceContactDetailsType, aU as ResourceImageType, aW as SocialMediaType, a_ as TermsAgreement, as as OwnerType, aJ as PromoCodeType, M as MutationResponse } from './global-XUBcgjNc.mjs';
2
+ import { T as BaseResourceType, L as LocationType, B as BaseResourceTypeFormData, a3 as CreateFormData, aT as ResourceContactDetailsType, aV as ResourceImageType, aX as SocialMediaType, a$ as TermsAgreement, at as OwnerType, aK as PromoCodeType, M as MutationResponse } from './global-EGbrTMk6.mjs';
3
3
  import { PosterAssetId } from './images/index.mjs';
4
- import { S as SafeUserType, e as UserFormData } from './user-D31zAVuz.mjs';
4
+ import { S as SafeUserType, e as UserFormData } from './user-Znc91Cw5.mjs';
5
5
 
6
6
  interface PartnerFormData extends BaseResourceTypeFormData {
7
7
  location: LocationType;
@@ -1,6 +1,6 @@
1
1
  import { EnumResourceType } from './enums/index.mjs';
2
- import { aJ as PromoCodeType, L as LocationType, aW as SocialMediaType, as as OwnerType, a2 as CreateFormData } from './global-XUBcgjNc.mjs';
3
- import { e as UserFormData } from './user-D31zAVuz.mjs';
2
+ import { aK as PromoCodeType, L as LocationType, aX as SocialMediaType, at as OwnerType, a3 as CreateFormData } from './global-EGbrTMk6.mjs';
3
+ import { e as UserFormData } from './user-Znc91Cw5.mjs';
4
4
 
5
5
  declare enum EnumAffiliateParticipantType {
6
6
  INDIVIDUAL = "INDIVIDUAL",
@@ -1,6 +1,6 @@
1
1
  import { EnumResourceType } from './enums/index.js';
2
- import { aJ as PromoCodeType, L as LocationType, aW as SocialMediaType, as as OwnerType, a2 as CreateFormData } from './global-DlC7W4p7.js';
3
- import { e as UserFormData } from './user-BSFExFvl.js';
2
+ import { aK as PromoCodeType, L as LocationType, aX as SocialMediaType, at as OwnerType, a3 as CreateFormData } from './global-LtQJ2t6c.js';
3
+ import { e as UserFormData } from './user-GnrqZmZP.js';
4
4
 
5
5
  declare enum EnumAffiliateParticipantType {
6
6
  INDIVIDUAL = "INDIVIDUAL",
@@ -1,7 +1,7 @@
1
1
  import { EnumUserRole, EnumResourceType, EnumUserLicence } from '../enums/index.mjs';
2
- import { O as OptionItem } from '../global-XUBcgjNc.mjs';
3
- import { P as Permission, S as SafeUserType } from '../user-D31zAVuz.mjs';
4
- export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-D31zAVuz.mjs';
2
+ import { O as OptionItem } from '../global-EGbrTMk6.mjs';
3
+ import { P as Permission, S as SafeUserType } from '../user-Znc91Cw5.mjs';
4
+ export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-Znc91Cw5.mjs';
5
5
  import { T as Tier } from '../subscription-bmAdrnfi.mjs';
6
6
  import React, { ReactNode } from 'react';
7
7
  import 'react-hook-form';
@@ -1,7 +1,7 @@
1
1
  import { EnumUserRole, EnumResourceType, EnumUserLicence } from '../enums/index.js';
2
- import { O as OptionItem } from '../global-DlC7W4p7.js';
3
- import { P as Permission, S as SafeUserType } from '../user-BSFExFvl.js';
4
- export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-BSFExFvl.js';
2
+ import { O as OptionItem } from '../global-LtQJ2t6c.js';
3
+ import { P as Permission, S as SafeUserType } from '../user-GnrqZmZP.js';
4
+ export { a as PERMISSIONS, W as WILDCARD_PERMISSION } from '../user-GnrqZmZP.js';
5
5
  import { T as Tier } from '../subscription-BU8GvH2K.js';
6
6
  import React, { ReactNode } from 'react';
7
7
  import 'react-hook-form';
@@ -409,14 +409,52 @@ var RELATION_FIELDS_FRAGMENT = gql6`
409
409
  }
410
410
  ${RELATION_DATES_FRAGMENT}
411
411
  `;
412
+ var RELATION_HISTORY_FIELDS_FRAGMENT = gql6`
413
+ fragment RelationHistoryFields on RelationHistoryType {
414
+ _id
415
+ active
416
+ chatId
417
+ createdAt
418
+ eventId
419
+ eventName
420
+ lastUpdateBy
421
+ relationDates {
422
+ ...RelationDates
423
+ }
424
+ relationType
425
+ updatedAt
426
+ vendorId
427
+ vendorName
428
+ }
429
+ ${RELATION_DATES_FRAGMENT}
430
+ `;
412
431
  var GET_RELATION = gql6`
413
- query getRelation($_id: ID!, $futureOnly: Boolean = false) {
414
- relation(_id: $_id, futureOnly: $futureOnly) {
432
+ query getRelation($_id: ID!) {
433
+ relation(_id: $_id) {
415
434
  ...RelationFields
416
435
  }
417
436
  }
418
437
  ${RELATION_FIELDS_FRAGMENT}
419
438
  `;
439
+ var GET_RELATION_HISTORY = gql6`
440
+ query getRelationHistory($_id: ID!) {
441
+ relationHistory(_id: $_id) {
442
+ ...RelationHistoryFields
443
+ }
444
+ }
445
+ ${RELATION_HISTORY_FIELDS_FRAGMENT}
446
+ `;
447
+ var GET_RELATION_HISTORIES = gql6`
448
+ query getRelationHistories(
449
+ $resourceId: ID!
450
+ $resourceType: ResourceTypeEnum!
451
+ ) {
452
+ relationHistories(resourceId: $resourceId, resourceType: $resourceType) {
453
+ ...RelationHistoryFields
454
+ }
455
+ }
456
+ ${RELATION_HISTORY_FIELDS_FRAGMENT}
457
+ `;
420
458
  var GET_RELATION_BY_EVENT_AND_VENDOR = gql6`
421
459
  query getRelationByEventAndVendor($eventId: ID!, $vendorId: ID!) {
422
460
  relationByEventAndVendor(eventId: $eventId, vendorId: $vendorId) {
@@ -1627,20 +1665,37 @@ var useDeleteRelation = () => {
1627
1665
 
1628
1666
  // src/graphql/hooks/relation/hooksQuery.ts
1629
1667
  import { useQuery as useQuery4 } from "@apollo/client";
1630
- var useGetRelation = (_id, options) => {
1668
+ var useGetRelation = (_id) => {
1631
1669
  const { loading, error, data, refetch } = useQuery4(GET_RELATION, {
1632
- // `relation(futureOnly)` is a projection-specific view of RelationType.
1633
- // If this writes into the normalized RelationType cache, a full-history
1634
- // read (e.g. the statistics screen's `futureOnly: false`) and this one can
1635
- // overwrite each other's `relationDates` for the same entity id. Keep it
1636
- // uncached.
1670
+ // `relation` returns only upcoming dates, which is a projection of
1671
+ // RelationType rather than the stored document. Keep it out of the
1672
+ // normalized cache so it cannot overwrite `relationDates` of the same
1673
+ // entity id for other readers.
1637
1674
  fetchPolicy: "no-cache",
1638
1675
  skip: !_id,
1639
- variables: _id ? { _id, futureOnly: options?.futureOnly ?? false } : void 0
1676
+ variables: _id ? { _id } : void 0
1640
1677
  });
1641
1678
  const relation = data?.relation;
1642
1679
  return { error, loading, refetch, relation };
1643
1680
  };
1681
+ var useGetRelationHistory = (_id) => {
1682
+ const { loading, error, data, refetch } = useQuery4(GET_RELATION_HISTORY, {
1683
+ fetchPolicy: "no-cache",
1684
+ skip: !_id,
1685
+ variables: _id ? { _id } : void 0
1686
+ });
1687
+ const relationHistory = data?.relationHistory;
1688
+ return { error, loading, refetch, relationHistory };
1689
+ };
1690
+ var useGetRelationHistories = (resourceId, resourceType) => {
1691
+ const { loading, error, data, refetch } = useQuery4(GET_RELATION_HISTORIES, {
1692
+ fetchPolicy: "no-cache",
1693
+ skip: !resourceId || !resourceType,
1694
+ variables: { resourceId, resourceType }
1695
+ });
1696
+ const relationHistories = data?.relationHistories || [];
1697
+ return { error, loading, refetch, relationHistories };
1698
+ };
1644
1699
  var useGetRelationByEventAndVendor = (eventId, vendorId) => {
1645
1700
  const { loading, error, data, refetch } = useQuery4(GET_RELATION_BY_EVENT_AND_VENDOR, {
1646
1701
  fetchPolicy: "network-only",
@@ -4241,6 +4296,8 @@ export {
4241
4296
  useUpdateRelation,
4242
4297
  useDeleteRelation,
4243
4298
  useGetRelation,
4299
+ useGetRelationHistory,
4300
+ useGetRelationHistories,
4244
4301
  useGetRelationByEventAndVendor,
4245
4302
  useGetEventRelations,
4246
4303
  useGetVendorRelations,
@@ -4350,4 +4407,4 @@ export {
4350
4407
  useGetCoupon,
4351
4408
  usePaginatedList
4352
4409
  };
4353
- //# sourceMappingURL=chunk-YTRRTC2S.mjs.map
4410
+ //# sourceMappingURL=chunk-ZZXSAQM6.mjs.map