@timardex/cluemart-shared 4.0.1 → 4.0.2
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.
- package/dist/{ad-6bik9TAn.d.mts → ad-BZNpotSr.d.mts} +13 -1
- package/dist/{ad-C2p52oCB.d.ts → ad-ywfA4Mtj.d.ts} +13 -1
- package/dist/{chunk-W5SSH3G4.mjs → chunk-2DDCCME4.mjs} +1 -1
- package/dist/chunk-2DDCCME4.mjs.map +1 -0
- package/dist/{chunk-KY2FA6GK.mjs → chunk-35EIWOKC.mjs} +2 -2
- package/dist/{chunk-5SMXMNL2.mjs → chunk-3ETQ4BPX.mjs} +2 -2
- package/dist/{chunk-2P66EBGO.mjs → chunk-DDPU7U6H.mjs} +58 -1
- package/dist/chunk-DDPU7U6H.mjs.map +1 -0
- package/dist/formFields/index.mjs +3 -3
- package/dist/graphql/index.cjs +60 -0
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +19 -2
- package/dist/graphql/index.d.ts +19 -2
- package/dist/graphql/index.mjs +7 -1
- package/dist/hooks/index.cjs +26 -0
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.mjs +4 -4
- package/dist/index.cjs +60 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +30 -1
- package/dist/index.d.ts +30 -1
- package/dist/index.mjs +57 -0
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-2P66EBGO.mjs.map +0 -1
- package/dist/chunk-W5SSH3G4.mjs.map +0 -1
- /package/dist/{chunk-KY2FA6GK.mjs.map → chunk-35EIWOKC.mjs.map} +0 -0
- /package/dist/{chunk-5SMXMNL2.mjs.map → chunk-3ETQ4BPX.mjs.map} +0 -0
package/dist/graphql/index.cjs
CHANGED
|
@@ -44,6 +44,7 @@ __export(graphql_exports, {
|
|
|
44
44
|
GET_POSTS: () => GET_POSTS,
|
|
45
45
|
GET_POSTS_BY_TYPE: () => GET_POSTS_BY_TYPE,
|
|
46
46
|
GET_POST_BY_SLUG: () => GET_POST_BY_SLUG,
|
|
47
|
+
GET_RESOURCE_AD_METRICS: () => GET_RESOURCE_AD_METRICS,
|
|
47
48
|
GET_RESOURCE_CONNECTIONS: () => GET_RESOURCE_CONNECTIONS,
|
|
48
49
|
GET_USERS: () => GET_USERS,
|
|
49
50
|
GET_VENDOR: () => GET_VENDOR,
|
|
@@ -148,6 +149,8 @@ __export(graphql_exports, {
|
|
|
148
149
|
useGetRelationHistory: () => useGetRelationHistory,
|
|
149
150
|
useGetReportedChatUsers: () => useGetReportedChatUsers,
|
|
150
151
|
useGetResourceActivity: () => useGetResourceActivity,
|
|
152
|
+
useGetResourceAdMetrics: () => useGetResourceAdMetrics,
|
|
153
|
+
useGetResourceAds: () => useGetResourceAds,
|
|
151
154
|
useGetResourceConnections: () => useGetResourceConnections,
|
|
152
155
|
useGetSchool: () => useGetSchool,
|
|
153
156
|
useGetSchools: () => useGetSchools,
|
|
@@ -3750,6 +3753,14 @@ var GET_ADS_BY_REGION = import_client44.gql`
|
|
|
3750
3753
|
}
|
|
3751
3754
|
${AD_FIELDS_FRAGMENT}
|
|
3752
3755
|
`;
|
|
3756
|
+
var GET_RESOURCE_ADS = import_client44.gql`
|
|
3757
|
+
query getResourceAds($resourceId: ID!, $resourceType: ResourceTypeEnum!) {
|
|
3758
|
+
resourceAds(resourceId: $resourceId, resourceType: $resourceType) {
|
|
3759
|
+
...AdFields
|
|
3760
|
+
}
|
|
3761
|
+
}
|
|
3762
|
+
${AD_FIELDS_FRAGMENT}
|
|
3763
|
+
`;
|
|
3753
3764
|
|
|
3754
3765
|
// src/graphql/mutations/ad.ts
|
|
3755
3766
|
var CREATE_AD_MUTATION = import_client45.gql`
|
|
@@ -3865,6 +3876,24 @@ var GET_AD_METRIC_TOTALS = import_client46.gql`
|
|
|
3865
3876
|
}
|
|
3866
3877
|
}
|
|
3867
3878
|
`;
|
|
3879
|
+
var GET_RESOURCE_AD_METRICS = import_client46.gql`
|
|
3880
|
+
query getResourceAdMetrics(
|
|
3881
|
+
$resourceId: ID!
|
|
3882
|
+
$resourceType: ResourceTypeEnum!
|
|
3883
|
+
) {
|
|
3884
|
+
resourceAdMetrics(resourceId: $resourceId, resourceType: $resourceType) {
|
|
3885
|
+
buckets {
|
|
3886
|
+
clicks
|
|
3887
|
+
date
|
|
3888
|
+
impressions
|
|
3889
|
+
}
|
|
3890
|
+
totals {
|
|
3891
|
+
clicks
|
|
3892
|
+
impressions
|
|
3893
|
+
}
|
|
3894
|
+
}
|
|
3895
|
+
}
|
|
3896
|
+
`;
|
|
3868
3897
|
|
|
3869
3898
|
// src/graphql/mutations/adBooking.ts
|
|
3870
3899
|
var CREATE_AD_CHECKOUT_MUTATION = import_client47.gql`
|
|
@@ -4188,6 +4217,34 @@ var useGetAdMetricTotals = (filter, skip = false) => {
|
|
|
4188
4217
|
refetch
|
|
4189
4218
|
};
|
|
4190
4219
|
};
|
|
4220
|
+
var useGetResourceAdMetrics = (resourceId, resourceType) => {
|
|
4221
|
+
const skip = !resourceId || resourceId === "" || !resourceType;
|
|
4222
|
+
const { data, loading, error, refetch } = (0, import_client49.useQuery)(GET_RESOURCE_AD_METRICS, {
|
|
4223
|
+
fetchPolicy: "no-cache",
|
|
4224
|
+
skip,
|
|
4225
|
+
variables: skip ? void 0 : { resourceId, resourceType }
|
|
4226
|
+
});
|
|
4227
|
+
return {
|
|
4228
|
+
error,
|
|
4229
|
+
loading,
|
|
4230
|
+
refetch,
|
|
4231
|
+
resourceAdMetrics: data?.resourceAdMetrics ?? null
|
|
4232
|
+
};
|
|
4233
|
+
};
|
|
4234
|
+
var useGetResourceAds = (resourceId, resourceType) => {
|
|
4235
|
+
const skip = !resourceId || resourceId === "" || !resourceType;
|
|
4236
|
+
const { data, loading, error, refetch } = (0, import_client49.useQuery)(GET_RESOURCE_ADS, {
|
|
4237
|
+
fetchPolicy: "no-cache",
|
|
4238
|
+
skip,
|
|
4239
|
+
variables: skip ? void 0 : { resourceId, resourceType }
|
|
4240
|
+
});
|
|
4241
|
+
return {
|
|
4242
|
+
ads: data?.resourceAds ?? [],
|
|
4243
|
+
error,
|
|
4244
|
+
loading,
|
|
4245
|
+
refetch
|
|
4246
|
+
};
|
|
4247
|
+
};
|
|
4191
4248
|
|
|
4192
4249
|
// src/graphql/hooks/resourceActivities/hooksMutation.ts
|
|
4193
4250
|
var import_client51 = require("@apollo/client");
|
|
@@ -5953,6 +6010,7 @@ function usePaginatedList({
|
|
|
5953
6010
|
GET_POSTS,
|
|
5954
6011
|
GET_POSTS_BY_TYPE,
|
|
5955
6012
|
GET_POST_BY_SLUG,
|
|
6013
|
+
GET_RESOURCE_AD_METRICS,
|
|
5956
6014
|
GET_RESOURCE_CONNECTIONS,
|
|
5957
6015
|
GET_USERS,
|
|
5958
6016
|
GET_VENDOR,
|
|
@@ -6057,6 +6115,8 @@ function usePaginatedList({
|
|
|
6057
6115
|
useGetRelationHistory,
|
|
6058
6116
|
useGetReportedChatUsers,
|
|
6059
6117
|
useGetResourceActivity,
|
|
6118
|
+
useGetResourceAdMetrics,
|
|
6119
|
+
useGetResourceAds,
|
|
6060
6120
|
useGetResourceConnections,
|
|
6061
6121
|
useGetSchool,
|
|
6062
6122
|
useGetSchools,
|