@timardex/cluemart-shared 2.3.10 → 2.4.0

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 (69) hide show
  1. package/dist/{ad-Drhn_Azy.d.mts → ad-BSyVGv8q.d.mts} +18 -25
  2. package/dist/{ad-CdehhMyb.d.ts → ad-DRI2CIzV.d.ts} +18 -25
  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-UWMZ6VLV.mjs → chunk-2RHUGVV3.mjs} +137 -126
  8. package/dist/chunk-2RHUGVV3.mjs.map +1 -0
  9. package/dist/{chunk-HKTBJOB7.mjs → chunk-J72IMZ6E.mjs} +13 -1
  10. package/dist/chunk-J72IMZ6E.mjs.map +1 -0
  11. package/dist/{chunk-PBW5K54C.mjs → chunk-LEAXY4DI.mjs} +2 -2
  12. package/dist/{chunk-KMS64DE2.mjs → chunk-LHKJJ7SO.mjs} +2 -2
  13. package/dist/{chunk-5AAYX364.mjs → chunk-WWAHS5R2.mjs} +1 -10
  14. package/dist/chunk-WWAHS5R2.mjs.map +1 -0
  15. package/dist/{chunk-DV3K3JDE.mjs → chunk-ZECVZFK3.mjs} +7 -6
  16. package/dist/chunk-ZECVZFK3.mjs.map +1 -0
  17. package/dist/{contactUs-ITiB1XV4.d.ts → contactUs-6b5g9DV-.d.ts} +1 -1
  18. package/dist/{contactUs-BJPQ5nKc.d.mts → contactUs-BDJutwcx.d.mts} +1 -1
  19. package/dist/formFields/index.cjs.map +1 -1
  20. package/dist/formFields/index.d.mts +1 -1
  21. package/dist/formFields/index.d.ts +1 -1
  22. package/dist/formFields/index.mjs +4 -4
  23. package/dist/{global-XUBcgjNc.d.mts → global-EGbrTMk6.d.mts} +5 -1
  24. package/dist/{global-DlC7W4p7.d.ts → global-LtQJ2t6c.d.ts} +5 -1
  25. package/dist/graphql/index.cjs +145 -133
  26. package/dist/graphql/index.cjs.map +1 -1
  27. package/dist/graphql/index.d.mts +29 -12
  28. package/dist/graphql/index.d.ts +29 -12
  29. package/dist/graphql/index.mjs +7 -5
  30. package/dist/hooks/index.cjs +48 -55
  31. package/dist/hooks/index.cjs.map +1 -1
  32. package/dist/hooks/index.d.mts +5 -5
  33. package/dist/hooks/index.d.ts +5 -5
  34. package/dist/hooks/index.mjs +6 -6
  35. package/dist/index.cjs +164 -146
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.mts +58 -29
  38. package/dist/index.d.ts +58 -29
  39. package/dist/index.mjs +145 -131
  40. package/dist/index.mjs.map +1 -1
  41. package/dist/map/index.d.mts +1 -1
  42. package/dist/map/index.d.ts +1 -1
  43. package/dist/region/index.d.mts +1 -1
  44. package/dist/region/index.d.ts +1 -1
  45. package/dist/{resourceActivities-Ci12UkJU.d.mts → resourceActivities-BytCHUvO.d.mts} +1 -1
  46. package/dist/{resourceActivities-C8eIfpKl.d.ts → resourceActivities-DlUEbCkT.d.ts} +1 -1
  47. package/dist/sharing/index.cjs.map +1 -1
  48. package/dist/sharing/index.d.mts +1 -1
  49. package/dist/sharing/index.d.ts +1 -1
  50. package/dist/sharing/index.mjs +2 -2
  51. package/dist/types/index.cjs +0 -10
  52. package/dist/types/index.cjs.map +1 -1
  53. package/dist/types/index.d.mts +7 -7
  54. package/dist/types/index.d.ts +7 -7
  55. package/dist/types/index.mjs +1 -3
  56. package/dist/{user-BSFExFvl.d.ts → user-GnrqZmZP.d.ts} +1 -1
  57. package/dist/{user-D31zAVuz.d.mts → user-Znc91Cw5.d.mts} +1 -1
  58. package/dist/utils/index.cjs +19 -3
  59. package/dist/utils/index.cjs.map +1 -1
  60. package/dist/utils/index.d.mts +19 -4
  61. package/dist/utils/index.d.ts +19 -4
  62. package/dist/utils/index.mjs +11 -3
  63. package/package.json +1 -1
  64. package/dist/chunk-5AAYX364.mjs.map +0 -1
  65. package/dist/chunk-DV3K3JDE.mjs.map +0 -1
  66. package/dist/chunk-HKTBJOB7.mjs.map +0 -1
  67. package/dist/chunk-UWMZ6VLV.mjs.map +0 -1
  68. /package/dist/{chunk-PBW5K54C.mjs.map → chunk-LEAXY4DI.mjs.map} +0 -0
  69. /package/dist/{chunk-KMS64DE2.mjs.map → chunk-LHKJJ7SO.mjs.map} +0 -0
@@ -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;
@@ -137,7 +137,6 @@ type RefreshImpersonationMutationResponse = MutationResponse<RefreshTokenPayload
137
137
  declare enum EnumAdShowOn {
138
138
  EVENTS_PAGE = "Events_page",
139
139
  FRONT_PAGE = "Front_page",
140
- MARKET_SEARCH = "Market_search",
141
140
  PARTNERS_PAGE = "Partners_page",
142
141
  VENDORS_PAGE = "Vendors_page"
143
142
  }
@@ -176,19 +175,11 @@ declare enum EnumAdPaymentStatus {
176
175
  FAILED = "failed",
177
176
  CANCELLED = "cancelled"
178
177
  }
179
- declare enum EnumAdEntitlementSource {
180
- PRO_PLUS = "pro_plus",
181
- ADMIN = "admin",
182
- ORGANIZER = "organizer",
183
- PARTNER = "partner"
184
- }
185
178
  declare enum EnumAdApprovalStatus {
186
179
  PENDING = "pending",
187
180
  APPROVED = "approved",
188
181
  REJECTED = "rejected"
189
182
  }
190
- type AdPlacement = EnumAdShowOn.FRONT_PAGE | EnumAdShowOn.MARKET_SEARCH;
191
- type AdDailyPriceKey = "front_page_day" | "market_search_day";
192
183
  type AdResource = {
193
184
  adDescription: string;
194
185
  adImage: string;
@@ -215,13 +206,10 @@ type CreateAdFormData = CreateFormData<AdFormData>;
215
206
  type CreateAdFormState = CreateFormData<AdFormState>;
216
207
  interface AdType extends AdFormData {
217
208
  _id: string;
218
- adminManaged?: boolean;
219
209
  approvalStatus?: EnumAdApprovalStatus;
220
210
  bookingIds?: string[];
221
211
  bookingKind?: EnumAdBookingSlotKind;
222
- clicks?: number;
223
212
  createdAt: Date;
224
- impressions?: number;
225
213
  paymentStatus?: EnumAdPaymentStatus;
226
214
  start: Date;
227
215
  updatedAt: Date | null;
@@ -232,15 +220,13 @@ type AdBookingType = {
232
220
  approvalStatus: EnumAdApprovalStatus;
233
221
  checkoutAttemptId?: string | null;
234
222
  currency?: string | null;
235
- dayKey: string;
236
- entitlementClaimKey?: string | null;
237
- entitlementSource?: EnumAdEntitlementSource | null;
223
+ dayKey: Date;
238
224
  expiresAt?: Date | null;
239
- placement: AdPlacement;
225
+ placement: EnumAdShowOn;
240
226
  purchaseKey?: string | null;
241
227
  region: string;
242
228
  resource: AdResource;
243
- slotKind: EnumAdBookingSlotKind;
229
+ slotKind: EnumAdBookingSlotKind.PAID;
244
230
  slotNumber: number;
245
231
  state: EnumAdBookingState;
246
232
  stripeCheckoutSessionId?: string | null;
@@ -252,17 +238,24 @@ type AdDailyPriceType = {
252
238
  _id: string;
253
239
  active: boolean;
254
240
  currency: "nzd";
255
- key: AdDailyPriceKey;
241
+ key: EnumAdShowOn;
256
242
  revision: number;
257
243
  unitAmount: number;
258
244
  };
259
245
  type AdSettingsType = {
260
246
  _id: "default";
261
247
  approvalRequired: boolean;
262
- minAppearancesPerHour: number;
263
- paidSlotsPerPlacement: number;
264
- reservedSlotsPerPlacement: number;
265
- rotationSeconds: number;
266
248
  };
249
+ interface AdMetricsType {
250
+ _id: string;
251
+ adId: string;
252
+ clicks: number;
253
+ createdAt: Date;
254
+ date: Date;
255
+ impressions: number;
256
+ placement: EnumAdShowOn;
257
+ platform: EnumAdPlatform;
258
+ updatedAt: Date | null;
259
+ }
267
260
 
268
- export { type ValidateVerificationTokenFormData as $, type AuthMutationResponse as A, type AuthPayloadType as B, type CreateLoginFormData as C, type CreateAdFormData as D, EnumAdPlatform as E, EnumAdApprovalStatus as F, EnumAdBookingSlotKind as G, EnumAdBookingState as H, EnumAdEntitlementSource as I, EnumAdPaymentStatus as J, EnumAdStatus as K, EnumAdStyle as L, EnumAdType as M, EnumVerificationType as N, type LoginFormData as O, type PartnerType as P, type MarketingMaterialRequestInputType as Q, type RefreshImpersonationMutationResponse as R, type StartImpersonationMutationResponse as S, type PosterInputType as T, type RefreshTokenPayloadType as U, type RegisterFormData as V, type RequestPasswordResetFormData as W, type ResetPasswordFormData as X, type SchoolCampaignType as Y, type SchoolRegisteredUserType as Z, type StartImpersonationPayloadType as _, type RefreshTokenMutationResponse as a, type AdType as b, EnumAdShowOn as c, type AppSettingsType as d, type SchoolType as e, type SchoolReturnType as f, type CreateRegisterFormData as g, type CreateRequestPasswordResetFormData as h, type CreateValidateVerificationTokenFormData as i, type CreateResetPasswordFormData as j, type PartnerFormData as k, type AdFormData as l, type CreateAdFormState as m, type CreatePartnerFormData as n, type AppSettingsFormData as o, type CreateAppSettingsFormData as p, type SchoolFormData as q, type CreateSchoolFormData as r, type AdBookingType as s, type AdDailyPriceKey as t, type AdDailyPriceType as u, type AdFormState as v, type AdPlacement as w, type AdResource as x, type AdSettingsFormData as y, type AdSettingsType as z };
261
+ export { type AuthMutationResponse as A, type CreateAdFormData as B, type CreateLoginFormData as C, EnumAdApprovalStatus as D, EnumAdPlatform as E, EnumAdBookingSlotKind as F, EnumAdBookingState as G, EnumAdPaymentStatus as H, EnumAdStatus as I, EnumAdStyle as J, EnumAdType as K, EnumVerificationType as L, type LoginFormData as M, type MarketingMaterialRequestInputType as N, type PosterInputType as O, type PartnerType as P, type RefreshTokenPayloadType as Q, type RefreshImpersonationMutationResponse as R, type StartImpersonationMutationResponse as S, type RegisterFormData as T, type RequestPasswordResetFormData as U, type ResetPasswordFormData as V, type SchoolCampaignType as W, type SchoolRegisteredUserType as X, type StartImpersonationPayloadType as Y, type ValidateVerificationTokenFormData as Z, type RefreshTokenMutationResponse as a, type AdType as b, EnumAdShowOn as c, type AppSettingsType as d, type SchoolType as e, type SchoolReturnType as f, type CreateRegisterFormData as g, type CreateRequestPasswordResetFormData as h, type CreateValidateVerificationTokenFormData as i, type CreateResetPasswordFormData as j, type PartnerFormData as k, type AdFormData as l, type CreateAdFormState as m, type CreatePartnerFormData as n, type AppSettingsFormData as o, type CreateAppSettingsFormData as p, type SchoolFormData as q, type CreateSchoolFormData as r, type AdBookingType as s, type AdDailyPriceType as t, type AdFormState as u, type AdMetricsType as v, type AdResource as w, type AdSettingsFormData as x, type AdSettingsType as y, type AuthPayloadType as z };
@@ -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;
@@ -137,7 +137,6 @@ type RefreshImpersonationMutationResponse = MutationResponse<RefreshTokenPayload
137
137
  declare enum EnumAdShowOn {
138
138
  EVENTS_PAGE = "Events_page",
139
139
  FRONT_PAGE = "Front_page",
140
- MARKET_SEARCH = "Market_search",
141
140
  PARTNERS_PAGE = "Partners_page",
142
141
  VENDORS_PAGE = "Vendors_page"
143
142
  }
@@ -176,19 +175,11 @@ declare enum EnumAdPaymentStatus {
176
175
  FAILED = "failed",
177
176
  CANCELLED = "cancelled"
178
177
  }
179
- declare enum EnumAdEntitlementSource {
180
- PRO_PLUS = "pro_plus",
181
- ADMIN = "admin",
182
- ORGANIZER = "organizer",
183
- PARTNER = "partner"
184
- }
185
178
  declare enum EnumAdApprovalStatus {
186
179
  PENDING = "pending",
187
180
  APPROVED = "approved",
188
181
  REJECTED = "rejected"
189
182
  }
190
- type AdPlacement = EnumAdShowOn.FRONT_PAGE | EnumAdShowOn.MARKET_SEARCH;
191
- type AdDailyPriceKey = "front_page_day" | "market_search_day";
192
183
  type AdResource = {
193
184
  adDescription: string;
194
185
  adImage: string;
@@ -215,13 +206,10 @@ type CreateAdFormData = CreateFormData<AdFormData>;
215
206
  type CreateAdFormState = CreateFormData<AdFormState>;
216
207
  interface AdType extends AdFormData {
217
208
  _id: string;
218
- adminManaged?: boolean;
219
209
  approvalStatus?: EnumAdApprovalStatus;
220
210
  bookingIds?: string[];
221
211
  bookingKind?: EnumAdBookingSlotKind;
222
- clicks?: number;
223
212
  createdAt: Date;
224
- impressions?: number;
225
213
  paymentStatus?: EnumAdPaymentStatus;
226
214
  start: Date;
227
215
  updatedAt: Date | null;
@@ -232,15 +220,13 @@ type AdBookingType = {
232
220
  approvalStatus: EnumAdApprovalStatus;
233
221
  checkoutAttemptId?: string | null;
234
222
  currency?: string | null;
235
- dayKey: string;
236
- entitlementClaimKey?: string | null;
237
- entitlementSource?: EnumAdEntitlementSource | null;
223
+ dayKey: Date;
238
224
  expiresAt?: Date | null;
239
- placement: AdPlacement;
225
+ placement: EnumAdShowOn;
240
226
  purchaseKey?: string | null;
241
227
  region: string;
242
228
  resource: AdResource;
243
- slotKind: EnumAdBookingSlotKind;
229
+ slotKind: EnumAdBookingSlotKind.PAID;
244
230
  slotNumber: number;
245
231
  state: EnumAdBookingState;
246
232
  stripeCheckoutSessionId?: string | null;
@@ -252,17 +238,24 @@ type AdDailyPriceType = {
252
238
  _id: string;
253
239
  active: boolean;
254
240
  currency: "nzd";
255
- key: AdDailyPriceKey;
241
+ key: EnumAdShowOn;
256
242
  revision: number;
257
243
  unitAmount: number;
258
244
  };
259
245
  type AdSettingsType = {
260
246
  _id: "default";
261
247
  approvalRequired: boolean;
262
- minAppearancesPerHour: number;
263
- paidSlotsPerPlacement: number;
264
- reservedSlotsPerPlacement: number;
265
- rotationSeconds: number;
266
248
  };
249
+ interface AdMetricsType {
250
+ _id: string;
251
+ adId: string;
252
+ clicks: number;
253
+ createdAt: Date;
254
+ date: Date;
255
+ impressions: number;
256
+ placement: EnumAdShowOn;
257
+ platform: EnumAdPlatform;
258
+ updatedAt: Date | null;
259
+ }
267
260
 
268
- export { type ValidateVerificationTokenFormData as $, type AuthMutationResponse as A, type AuthPayloadType as B, type CreateLoginFormData as C, type CreateAdFormData as D, EnumAdPlatform as E, EnumAdApprovalStatus as F, EnumAdBookingSlotKind as G, EnumAdBookingState as H, EnumAdEntitlementSource as I, EnumAdPaymentStatus as J, EnumAdStatus as K, EnumAdStyle as L, EnumAdType as M, EnumVerificationType as N, type LoginFormData as O, type PartnerType as P, type MarketingMaterialRequestInputType as Q, type RefreshImpersonationMutationResponse as R, type StartImpersonationMutationResponse as S, type PosterInputType as T, type RefreshTokenPayloadType as U, type RegisterFormData as V, type RequestPasswordResetFormData as W, type ResetPasswordFormData as X, type SchoolCampaignType as Y, type SchoolRegisteredUserType as Z, type StartImpersonationPayloadType as _, type RefreshTokenMutationResponse as a, type AdType as b, EnumAdShowOn as c, type AppSettingsType as d, type SchoolType as e, type SchoolReturnType as f, type CreateRegisterFormData as g, type CreateRequestPasswordResetFormData as h, type CreateValidateVerificationTokenFormData as i, type CreateResetPasswordFormData as j, type PartnerFormData as k, type AdFormData as l, type CreateAdFormState as m, type CreatePartnerFormData as n, type AppSettingsFormData as o, type CreateAppSettingsFormData as p, type SchoolFormData as q, type CreateSchoolFormData as r, type AdBookingType as s, type AdDailyPriceKey as t, type AdDailyPriceType as u, type AdFormState as v, type AdPlacement as w, type AdResource as x, type AdSettingsFormData as y, type AdSettingsType as z };
261
+ export { type AuthMutationResponse as A, type CreateAdFormData as B, type CreateLoginFormData as C, EnumAdApprovalStatus as D, EnumAdPlatform as E, EnumAdBookingSlotKind as F, EnumAdBookingState as G, EnumAdPaymentStatus as H, EnumAdStatus as I, EnumAdStyle as J, EnumAdType as K, EnumVerificationType as L, type LoginFormData as M, type MarketingMaterialRequestInputType as N, type PosterInputType as O, type PartnerType as P, type RefreshTokenPayloadType as Q, type RefreshImpersonationMutationResponse as R, type StartImpersonationMutationResponse as S, type RegisterFormData as T, type RequestPasswordResetFormData as U, type ResetPasswordFormData as V, type SchoolCampaignType as W, type SchoolRegisteredUserType as X, type StartImpersonationPayloadType as Y, type ValidateVerificationTokenFormData as Z, type RefreshTokenMutationResponse as a, type AdType as b, EnumAdShowOn as c, type AppSettingsType as d, type SchoolType as e, type SchoolReturnType as f, type CreateRegisterFormData as g, type CreateRequestPasswordResetFormData as h, type CreateValidateVerificationTokenFormData as i, type CreateResetPasswordFormData as j, type PartnerFormData as k, type AdFormData as l, type CreateAdFormState as m, type CreatePartnerFormData as n, type AppSettingsFormData as o, type CreateAppSettingsFormData as p, type SchoolFormData as q, type CreateSchoolFormData as r, type AdBookingType as s, type AdDailyPriceType as t, type AdFormState as u, type AdMetricsType as v, type AdResource as w, type AdSettingsFormData as x, type AdSettingsType as y, type AuthPayloadType as z };
@@ -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,6 +409,25 @@ 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
432
  query getRelation($_id: ID!) {
414
433
  relation(_id: $_id) {
@@ -420,10 +439,10 @@ var GET_RELATION = gql6`
420
439
  var GET_RELATION_HISTORY = gql6`
421
440
  query getRelationHistory($_id: ID!) {
422
441
  relationHistory(_id: $_id) {
423
- ...RelationFields
442
+ ...RelationHistoryFields
424
443
  }
425
444
  }
426
- ${RELATION_FIELDS_FRAGMENT}
445
+ ${RELATION_HISTORY_FIELDS_FRAGMENT}
427
446
  `;
428
447
  var GET_RELATION_HISTORIES = gql6`
429
448
  query getRelationHistories(
@@ -431,10 +450,10 @@ var GET_RELATION_HISTORIES = gql6`
431
450
  $resourceType: ResourceTypeEnum!
432
451
  ) {
433
452
  relationHistories(resourceId: $resourceId, resourceType: $resourceType) {
434
- ...RelationFields
453
+ ...RelationHistoryFields
435
454
  }
436
455
  }
437
- ${RELATION_FIELDS_FRAGMENT}
456
+ ${RELATION_HISTORY_FIELDS_FRAGMENT}
438
457
  `;
439
458
  var GET_RELATION_BY_EVENT_AND_VENDOR = gql6`
440
459
  query getRelationByEventAndVendor($eventId: ID!, $vendorId: ID!) {
@@ -2191,10 +2210,8 @@ var AD_FIELDS_FRAGMENT = gql20`
2191
2210
  fragment AdFields on AdType {
2192
2211
  _id
2193
2212
  active
2194
- clicks
2195
2213
  createdAt
2196
2214
  end
2197
- impressions
2198
2215
  resource {
2199
2216
  adDescription
2200
2217
  adImage
@@ -2275,83 +2292,8 @@ var DELETE_AD_MUTATION = gql21`
2275
2292
  }
2276
2293
  `;
2277
2294
 
2278
- // src/graphql/hooks/ad/hooksMutation.ts
2279
- var useCreateAd = () => {
2280
- const [createAd, { loading, error }] = useMutation11(CREATE_AD_MUTATION, {
2281
- awaitRefetchQueries: true,
2282
- refetchQueries: [{ query: GET_ADS }]
2283
- });
2284
- return {
2285
- createAd,
2286
- error,
2287
- loading
2288
- };
2289
- };
2290
- var useUpdateAd = () => {
2291
- const [updateAd, { loading, error }] = useMutation11(UPDATE_AD_MUTATION, {
2292
- awaitRefetchQueries: true,
2293
- refetchQueries: [{ query: GET_ADS }]
2294
- });
2295
- return {
2296
- error,
2297
- loading,
2298
- updateAd
2299
- };
2300
- };
2301
- var useDeleteAd = () => {
2302
- const [deleteAd, { loading, error }] = useMutation11(DELETE_AD_MUTATION, {
2303
- awaitRefetchQueries: true,
2304
- refetchQueries: [{ query: GET_ADS }]
2305
- });
2306
- return {
2307
- deleteAd,
2308
- error,
2309
- loading
2310
- };
2311
- };
2312
-
2313
- // src/graphql/hooks/ad/hooksQuery.ts
2314
- import { useQuery as useQuery6 } from "@apollo/client";
2315
- var useGetAds = () => {
2316
- const { data, loading, error, refetch } = useQuery6(
2317
- GET_ADS,
2318
- {
2319
- fetchPolicy: "no-cache"
2320
- }
2321
- );
2322
- return {
2323
- ads: data?.ads || [],
2324
- error,
2325
- loading,
2326
- refetch
2327
- };
2328
- };
2329
- var useGetAd = (_id) => {
2330
- const { data, loading, error, refetch } = useQuery6(GET_AD, {
2331
- fetchPolicy: "no-cache",
2332
- skip: !_id || _id === "",
2333
- variables: { _id }
2334
- });
2335
- return {
2336
- ad: data?.ad,
2337
- error,
2338
- loading,
2339
- refetch
2340
- };
2341
- };
2342
- var useGetAdsByRegion = (region, platform, showOn) => {
2343
- const { data, loading, error, refetch } = useQuery6(GET_ADS_BY_REGION, {
2344
- fetchPolicy: "no-cache",
2345
- skip: !region || region === "",
2346
- variables: { platform, region, showOn }
2347
- });
2348
- return {
2349
- adsByRegion: data?.adsByRegion || [],
2350
- error,
2351
- loading,
2352
- refetch
2353
- };
2354
- };
2295
+ // src/graphql/mutations/adBooking.ts
2296
+ import { gql as gql23 } from "@apollo/client";
2355
2297
 
2356
2298
  // src/graphql/queries/adBooking.ts
2357
2299
  import { gql as gql22 } from "@apollo/client";
@@ -2381,20 +2323,6 @@ var AD_BOOKING_FIELDS_FRAGMENT = gql22`
2381
2323
  unitAmount
2382
2324
  }
2383
2325
  `;
2384
- var GET_AD_DAY_AVAILABILITY = gql22`
2385
- query getAdDayAvailability(
2386
- $region: String!
2387
- $dayKey: String!
2388
- $placement: AdShowOnEnum!
2389
- ) {
2390
- adDayAvailability(region: $region, dayKey: $dayKey, placement: $placement) {
2391
- currency
2392
- paidAvailable
2393
- reservedAvailable
2394
- unitAmount
2395
- }
2396
- }
2397
- `;
2398
2326
  var GET_MY_AD_BOOKINGS = gql22`
2399
2327
  query getMyAdBookings {
2400
2328
  myAdBookings {
@@ -2434,16 +2362,11 @@ var GET_AD_SETTINGS = gql22`
2434
2362
  query getAdSettings {
2435
2363
  adSettings {
2436
2364
  approvalRequired
2437
- minAppearancesPerHour
2438
- paidSlotsPerPlacement
2439
- reservedSlotsPerPlacement
2440
- rotationSeconds
2441
2365
  }
2442
2366
  }
2443
2367
  `;
2444
2368
 
2445
2369
  // src/graphql/mutations/adBooking.ts
2446
- import { gql as gql23 } from "@apollo/client";
2447
2370
  var CREATE_AD_CHECKOUT_MUTATION = gql23`
2448
2371
  mutation createAdCheckout($input: CreateAdCheckoutInputGraphQLType!) {
2449
2372
  createAdCheckout(input: $input) {
@@ -2456,17 +2379,6 @@ var CREATE_AD_CHECKOUT_MUTATION = gql23`
2456
2379
  }
2457
2380
  }
2458
2381
  `;
2459
- var CLAIM_RESERVED_AD_DAY_MUTATION = gql23`
2460
- mutation claimReservedAdDay($input: ClaimReservedAdDayInputType!) {
2461
- claimReservedAdDay(input: $input) {
2462
- data {
2463
- ...AdBookingFields
2464
- }
2465
- message
2466
- }
2467
- }
2468
- ${AD_BOOKING_FIELDS_FRAGMENT}
2469
- `;
2470
2382
  var APPROVE_AD_BOOKING_MUTATION = gql23`
2471
2383
  mutation approveAdBooking($bookingId: ID!, $approved: Boolean!) {
2472
2384
  approveAdBooking(bookingId: $bookingId, approved: $approved) {
@@ -2497,10 +2409,6 @@ var UPDATE_AD_SETTINGS_MUTATION = gql23`
2497
2409
  updateAdSettings(input: $input) {
2498
2410
  data {
2499
2411
  approvalRequired
2500
- minAppearancesPerHour
2501
- paidSlotsPerPlacement
2502
- reservedSlotsPerPlacement
2503
- rotationSeconds
2504
2412
  }
2505
2413
  message
2506
2414
  }
@@ -2514,6 +2422,108 @@ var RECORD_AD_IMPRESSION_MUTATION = gql23`
2514
2422
  }
2515
2423
  }
2516
2424
  `;
2425
+ var RECORD_AD_CLICK_MUTATION = gql23`
2426
+ mutation recordAdClick($input: RecordAdClickInputGraphQLType!) {
2427
+ recordAdClick(input: $input) {
2428
+ data
2429
+ message
2430
+ }
2431
+ }
2432
+ `;
2433
+
2434
+ // src/graphql/hooks/ad/hooksMutation.ts
2435
+ var useCreateAd = () => {
2436
+ const [createAd, { loading, error }] = useMutation11(CREATE_AD_MUTATION, {
2437
+ awaitRefetchQueries: true,
2438
+ refetchQueries: [{ query: GET_ADS }]
2439
+ });
2440
+ return {
2441
+ createAd,
2442
+ error,
2443
+ loading
2444
+ };
2445
+ };
2446
+ var useUpdateAd = () => {
2447
+ const [updateAd, { loading, error }] = useMutation11(UPDATE_AD_MUTATION, {
2448
+ awaitRefetchQueries: true,
2449
+ refetchQueries: [{ query: GET_ADS }]
2450
+ });
2451
+ return {
2452
+ error,
2453
+ loading,
2454
+ updateAd
2455
+ };
2456
+ };
2457
+ var useDeleteAd = () => {
2458
+ const [deleteAd, { loading, error }] = useMutation11(DELETE_AD_MUTATION, {
2459
+ awaitRefetchQueries: true,
2460
+ refetchQueries: [{ query: GET_ADS }]
2461
+ });
2462
+ return {
2463
+ deleteAd,
2464
+ error,
2465
+ loading
2466
+ };
2467
+ };
2468
+ var useRecordAdImpression = () => {
2469
+ const [recordAdImpression, { loading, error }] = useMutation11(RECORD_AD_IMPRESSION_MUTATION);
2470
+ return {
2471
+ error,
2472
+ loading,
2473
+ recordAdImpression
2474
+ };
2475
+ };
2476
+ var useRecordAdClick = () => {
2477
+ const [recordAdClick, { loading, error }] = useMutation11(RECORD_AD_CLICK_MUTATION);
2478
+ return {
2479
+ error,
2480
+ loading,
2481
+ recordAdClick
2482
+ };
2483
+ };
2484
+
2485
+ // src/graphql/hooks/ad/hooksQuery.ts
2486
+ import { useQuery as useQuery6 } from "@apollo/client";
2487
+ var useGetAds = () => {
2488
+ const { data, loading, error, refetch } = useQuery6(
2489
+ GET_ADS,
2490
+ {
2491
+ fetchPolicy: "no-cache"
2492
+ }
2493
+ );
2494
+ return {
2495
+ ads: data?.ads || [],
2496
+ error,
2497
+ loading,
2498
+ refetch
2499
+ };
2500
+ };
2501
+ var useGetAd = (_id) => {
2502
+ const { data, loading, error, refetch } = useQuery6(GET_AD, {
2503
+ fetchPolicy: "no-cache",
2504
+ skip: !_id || _id === "",
2505
+ variables: { _id }
2506
+ });
2507
+ return {
2508
+ ad: data?.ad,
2509
+ error,
2510
+ loading,
2511
+ refetch
2512
+ };
2513
+ };
2514
+ var useGetAdsByRegion = (region, platform, showOn) => {
2515
+ const { data, loading, error, refetch } = useQuery6(GET_ADS_BY_REGION, {
2516
+ fetchPolicy: "no-cache",
2517
+ skip: !region || region === "",
2518
+ variables: { platform, region, showOn }
2519
+ });
2520
+ return {
2521
+ adsByRegion: data?.adsByRegion || [],
2522
+ error,
2523
+ loading,
2524
+ refetch
2525
+ };
2526
+ };
2517
2527
 
2518
2528
  // src/graphql/hooks/resourceActivities/hooksMutation.ts
2519
2529
  import { useMutation as useMutation12 } from "@apollo/client";
@@ -4314,25 +4324,26 @@ export {
4314
4324
  useAddUserPresentResource,
4315
4325
  useRemoveUserPresentResource,
4316
4326
  useSelectStandardPackage,
4317
- useCreateAd,
4318
- useUpdateAd,
4319
- useDeleteAd,
4320
- useGetAds,
4321
- useGetAd,
4322
- useGetAdsByRegion,
4323
4327
  AD_BOOKING_FIELDS_FRAGMENT,
4324
- GET_AD_DAY_AVAILABILITY,
4325
4328
  GET_MY_AD_BOOKINGS,
4326
4329
  GET_AD_BOOKING,
4327
4330
  GET_PENDING_AD_BOOKINGS,
4328
4331
  GET_AD_DAILY_PRICES,
4329
4332
  GET_AD_SETTINGS,
4330
4333
  CREATE_AD_CHECKOUT_MUTATION,
4331
- CLAIM_RESERVED_AD_DAY_MUTATION,
4332
4334
  APPROVE_AD_BOOKING_MUTATION,
4333
4335
  UPDATE_AD_DAILY_PRICE_MUTATION,
4334
4336
  UPDATE_AD_SETTINGS_MUTATION,
4335
4337
  RECORD_AD_IMPRESSION_MUTATION,
4338
+ RECORD_AD_CLICK_MUTATION,
4339
+ useCreateAd,
4340
+ useUpdateAd,
4341
+ useDeleteAd,
4342
+ useRecordAdImpression,
4343
+ useRecordAdClick,
4344
+ useGetAds,
4345
+ useGetAd,
4346
+ useGetAdsByRegion,
4336
4347
  useCreateResourceActivity,
4337
4348
  useGetResourceActivity,
4338
4349
  useCreateCheckoutSession,
@@ -4388,4 +4399,4 @@ export {
4388
4399
  useGetCoupon,
4389
4400
  usePaginatedList
4390
4401
  };
4391
- //# sourceMappingURL=chunk-UWMZ6VLV.mjs.map
4402
+ //# sourceMappingURL=chunk-2RHUGVV3.mjs.map