@timardex/cluemart-shared 1.3.11 → 1.3.13

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.
@@ -73,6 +73,7 @@ __export(graphql_exports, {
73
73
  useGetPartnersByRegion: () => useGetPartnersByRegion,
74
74
  useGetPost: () => useGetPost,
75
75
  useGetPosts: () => useGetPosts,
76
+ useGetPostsByType: () => useGetPostsByType,
76
77
  useGetRelation: () => useGetRelation,
77
78
  useGetRelationByEventAndVendor: () => useGetRelationByEventAndVendor,
78
79
  useGetResourceActivities: () => useGetResourceActivities,
@@ -3090,6 +3091,14 @@ var GET_POST = import_client59.gql`
3090
3091
  }
3091
3092
  ${POST_FIELDS_FRAGMENT}
3092
3093
  `;
3094
+ var GET_POSTS_BY_TYPE = import_client59.gql`
3095
+ query getPostsByType($postType: PostTypeEnum!) {
3096
+ postsByType(postType: $postType) {
3097
+ ...PostFields
3098
+ }
3099
+ }
3100
+ ${POST_FIELDS_FRAGMENT}
3101
+ `;
3093
3102
 
3094
3103
  // src/graphql/mutations/post.ts
3095
3104
  var CREATE_POST_MUTATION = import_client60.gql`
@@ -3150,6 +3159,13 @@ var useGetPost = (postId) => {
3150
3159
  });
3151
3160
  return { error, loading, post: data?.post || null, refetch };
3152
3161
  };
3162
+ var useGetPostsByType = (postType) => {
3163
+ const { data, loading, error, refetch } = (0, import_client62.useQuery)(GET_POSTS_BY_TYPE, {
3164
+ skip: !postType,
3165
+ variables: { postType }
3166
+ });
3167
+ return { error, loading, postsByType: data?.postsByType || [], refetch };
3168
+ };
3153
3169
  // Annotate the CommonJS export names for ESM import in node:
3154
3170
  0 && (module.exports = {
3155
3171
  useAddParticipantToChat,
@@ -3205,6 +3221,7 @@ var useGetPost = (postId) => {
3205
3221
  useGetPartnersByRegion,
3206
3222
  useGetPost,
3207
3223
  useGetPosts,
3224
+ useGetPostsByType,
3208
3225
  useGetRelation,
3209
3226
  useGetRelationByEventAndVendor,
3210
3227
  useGetResourceActivities,