@timardex/cluemart-shared 2.0.7 → 2.0.8

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 (48) hide show
  1. package/dist/{ad-Cq1luH63.d.mts → ad-BFOGqBel.d.mts} +77 -2
  2. package/dist/{ad-C7_aLSAO.d.ts → ad-DEIR7iSl.d.ts} +77 -2
  3. package/dist/{affiliate-DKe3AD5n.d.mts → affiliate-BQ62c6SE.d.mts} +1 -1
  4. package/dist/{affiliate-zbXziTPJ.d.ts → affiliate-D7kf9GSr.d.ts} +1 -1
  5. package/dist/auth/index.cjs +3 -0
  6. package/dist/auth/index.cjs.map +1 -1
  7. package/dist/auth/index.d.mts +2 -2
  8. package/dist/auth/index.d.ts +2 -2
  9. package/dist/auth/index.mjs +1 -1
  10. package/dist/{chunk-5KOHAP3V.mjs → chunk-5VWHW2EM.mjs} +268 -91
  11. package/dist/chunk-5VWHW2EM.mjs.map +1 -0
  12. package/dist/{chunk-LMFBXRR7.mjs → chunk-ACCOACCV.mjs} +2 -2
  13. package/dist/{chunk-OUWKLNHZ.mjs → chunk-JOA6W4SP.mjs} +4 -1
  14. package/dist/chunk-JOA6W4SP.mjs.map +1 -0
  15. package/dist/{chunk-UUIAJ2D6.mjs → chunk-L45XTF3X.mjs} +41 -1
  16. package/dist/chunk-L45XTF3X.mjs.map +1 -0
  17. package/dist/formFields/index.mjs +2 -2
  18. package/dist/graphql/index.cjs +357 -164
  19. package/dist/graphql/index.cjs.map +1 -1
  20. package/dist/graphql/index.d.mts +19 -4
  21. package/dist/graphql/index.d.ts +19 -4
  22. package/dist/graphql/index.mjs +28 -2
  23. package/dist/hooks/index.cjs +278 -110
  24. package/dist/hooks/index.cjs.map +1 -1
  25. package/dist/hooks/index.d.mts +3 -3
  26. package/dist/hooks/index.d.ts +3 -3
  27. package/dist/hooks/index.mjs +4 -4
  28. package/dist/index.cjs +402 -164
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.mts +97 -1
  31. package/dist/index.d.ts +97 -1
  32. package/dist/index.mjs +309 -89
  33. package/dist/index.mjs.map +1 -1
  34. package/dist/types/index.cjs +45 -0
  35. package/dist/types/index.cjs.map +1 -1
  36. package/dist/types/index.d.mts +3 -3
  37. package/dist/types/index.d.ts +3 -3
  38. package/dist/types/index.mjs +11 -1
  39. package/dist/{user-NPmlt_Zx.d.mts → user-CqrqqKv2.d.mts} +6 -0
  40. package/dist/{user-B6YLX1c5.d.ts → user-zrMQ2GDX.d.ts} +6 -0
  41. package/dist/utils/index.d.mts +2 -2
  42. package/dist/utils/index.d.ts +2 -2
  43. package/dist/utils/index.mjs +2 -2
  44. package/package.json +1 -1
  45. package/dist/chunk-5KOHAP3V.mjs.map +0 -1
  46. package/dist/chunk-OUWKLNHZ.mjs.map +0 -1
  47. package/dist/chunk-UUIAJ2D6.mjs.map +0 -1
  48. /package/dist/{chunk-LMFBXRR7.mjs.map → chunk-ACCOACCV.mjs.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { EnumPartnerType, EnumResourceType, EnumOSPlatform } from './enums/index.mjs';
2
2
  import { N as BaseResourceType, L as LocationType, B as BaseResourceTypeFormData, a1 as CreateFormData, aM as ResourceContactDetailsType, aO as ResourceImageType, aP as SocialMediaType, aT as TermsAgreement, ao as OwnerType, aD as PromoCodeType, M as MutationResponse } from './global-BGqjRZ1G.mjs';
3
3
  import { PosterAssetId } from './images/index.mjs';
4
- import { S as SafeUserType, e as UserFormData } from './user-NPmlt_Zx.mjs';
4
+ import { S as SafeUserType, e as UserFormData } from './user-CqrqqKv2.mjs';
5
5
 
6
6
  interface PartnerFormData extends BaseResourceTypeFormData {
7
7
  location: LocationType;
@@ -123,6 +123,7 @@ type RefreshTokenMutationResponse = MutationResponse<RefreshTokenPayloadType>;
123
123
  declare enum EnumAdShowOn {
124
124
  EVENTS_PAGE = "Events_page",
125
125
  FRONT_PAGE = "Front_page",
126
+ MARKET_SEARCH = "Market_search",
126
127
  PARTNERS_PAGE = "Partners_page",
127
128
  VENDORS_PAGE = "Vendors_page"
128
129
  }
@@ -139,6 +140,37 @@ declare enum EnumAdStyle {
139
140
  BLOOM = "Bloom",
140
141
  RISE = "Rise"
141
142
  }
143
+ declare enum EnumAdBookingSlotKind {
144
+ PAID = "paid",
145
+ RESERVED = "reserved"
146
+ }
147
+ declare enum EnumAdBookingState {
148
+ HELD = "held",
149
+ PENDING_APPROVAL = "pending_approval",
150
+ APPROVED = "approved",
151
+ FAILED = "failed",
152
+ CANCELLED = "cancelled",
153
+ REJECTED = "rejected"
154
+ }
155
+ declare enum EnumAdPaymentStatus {
156
+ PENDING = "pending",
157
+ PAID = "paid",
158
+ FAILED = "failed",
159
+ CANCELLED = "cancelled"
160
+ }
161
+ declare enum EnumAdEntitlementSource {
162
+ PRO_PLUS = "pro_plus",
163
+ ADMIN = "admin",
164
+ ORGANIZER = "organizer",
165
+ PARTNER = "partner"
166
+ }
167
+ declare enum EnumAdApprovalStatus {
168
+ PENDING = "pending",
169
+ APPROVED = "approved",
170
+ REJECTED = "rejected"
171
+ }
172
+ type AdPlacement = EnumAdShowOn.FRONT_PAGE | EnumAdShowOn.MARKET_SEARCH;
173
+ type AdDailyPriceKey = "front_page_day" | "market_search_day";
142
174
  type AdResource = {
143
175
  adDescription: string;
144
176
  adImage: string;
@@ -165,11 +197,54 @@ type CreateAdFormData = CreateFormData<AdFormData>;
165
197
  type CreateAdFormState = CreateFormData<AdFormState>;
166
198
  interface AdType extends AdFormData {
167
199
  _id: string;
200
+ adminManaged?: boolean;
201
+ approvalStatus?: EnumAdApprovalStatus;
202
+ bookingIds?: string[];
203
+ bookingKind?: EnumAdBookingSlotKind;
168
204
  clicks?: number;
169
205
  createdAt: Date;
170
206
  impressions?: number;
207
+ paymentStatus?: EnumAdPaymentStatus;
171
208
  start: Date;
172
209
  updatedAt: Date | null;
173
210
  }
211
+ type AdBookingType = {
212
+ _id: string;
213
+ adId?: string | null;
214
+ approvalStatus: EnumAdApprovalStatus;
215
+ checkoutAttemptId?: string | null;
216
+ currency?: string | null;
217
+ dayKey: string;
218
+ entitlementClaimKey?: string | null;
219
+ entitlementSource?: EnumAdEntitlementSource | null;
220
+ expiresAt?: Date | null;
221
+ placement: AdPlacement;
222
+ purchaseKey?: string | null;
223
+ region: string;
224
+ resource: AdResource;
225
+ slotKind: EnumAdBookingSlotKind;
226
+ slotNumber: number;
227
+ state: EnumAdBookingState;
228
+ stripeCheckoutSessionId?: string | null;
229
+ stripePaymentIntentId?: string | null;
230
+ unitAmount?: number | null;
231
+ userId: string;
232
+ };
233
+ type AdDailyPriceType = {
234
+ _id: string;
235
+ active: boolean;
236
+ currency: "nzd";
237
+ key: AdDailyPriceKey;
238
+ revision: number;
239
+ unitAmount: number;
240
+ };
241
+ type AdSettingsType = {
242
+ _id: "default";
243
+ approvalRequired: boolean;
244
+ minAppearancesPerHour: number;
245
+ paidSlotsPerPlacement: number;
246
+ reservedSlotsPerPlacement: number;
247
+ rotationSeconds: number;
248
+ };
174
249
 
175
- export { type AuthMutationResponse as A, type RequestPasswordResetFormData as B, type CreateLoginFormData as C, type ResetPasswordFormData as D, EnumAdStatus as E, type SchoolCampaignType as F, type SchoolRegisteredUserType as G, type LoginFormData as L, type MarketingMaterialRequestInputType as M, type PartnerType as P, type RefreshTokenMutationResponse as R, type SchoolType as S, type ValidateVerificationTokenFormData as V, type AdType as a, type AppSettingsType as b, type SchoolReturnType as c, type CreateRegisterFormData as d, type CreateRequestPasswordResetFormData as e, type CreateValidateVerificationTokenFormData as f, type CreateResetPasswordFormData as g, type PartnerFormData as h, type AdFormData as i, type CreateAdFormState as j, type CreatePartnerFormData as k, type AppSettingsFormData as l, type CreateAppSettingsFormData as m, type SchoolFormData as n, type CreateSchoolFormData as o, type AdFormState as p, type AdResource as q, type AuthPayloadType as r, type CreateAdFormData as s, EnumAdShowOn as t, EnumAdStyle as u, EnumAdType as v, EnumVerificationType as w, type PosterInputType as x, type RefreshTokenPayloadType as y, type RegisterFormData as z };
250
+ export { type AuthMutationResponse as A, EnumAdBookingState as B, type CreateLoginFormData as C, EnumAdEntitlementSource as D, EnumAdStatus as E, EnumAdPaymentStatus as F, EnumAdShowOn as G, EnumAdStyle as H, EnumAdType as I, EnumVerificationType as J, type PosterInputType as K, type LoginFormData as L, type MarketingMaterialRequestInputType as M, type RefreshTokenPayloadType as N, type RegisterFormData as O, type PartnerType as P, type RequestPasswordResetFormData as Q, type RefreshTokenMutationResponse as R, type SchoolType as S, type ResetPasswordFormData as T, type SchoolCampaignType as U, type SchoolRegisteredUserType as V, type ValidateVerificationTokenFormData as W, type AdType as a, type AppSettingsType as b, type SchoolReturnType as c, type CreateRegisterFormData as d, type CreateRequestPasswordResetFormData as e, type CreateValidateVerificationTokenFormData as f, type CreateResetPasswordFormData as g, type PartnerFormData as h, type AdFormData as i, type CreateAdFormState as j, type CreatePartnerFormData as k, type AppSettingsFormData as l, type CreateAppSettingsFormData as m, type SchoolFormData as n, type CreateSchoolFormData as o, type AdBookingType as p, type AdDailyPriceKey as q, type AdDailyPriceType as r, type AdFormState as s, type AdPlacement as t, type AdResource as u, type AdSettingsType as v, type AuthPayloadType as w, type CreateAdFormData as x, EnumAdApprovalStatus as y, EnumAdBookingSlotKind as z };
@@ -1,7 +1,7 @@
1
1
  import { EnumPartnerType, EnumResourceType, EnumOSPlatform } from './enums/index.js';
2
2
  import { N as BaseResourceType, L as LocationType, B as BaseResourceTypeFormData, a1 as CreateFormData, aM as ResourceContactDetailsType, aO as ResourceImageType, aP as SocialMediaType, aT as TermsAgreement, ao as OwnerType, aD as PromoCodeType, M as MutationResponse } from './global-ABvdHwPj.js';
3
3
  import { PosterAssetId } from './images/index.js';
4
- import { S as SafeUserType, e as UserFormData } from './user-B6YLX1c5.js';
4
+ import { S as SafeUserType, e as UserFormData } from './user-zrMQ2GDX.js';
5
5
 
6
6
  interface PartnerFormData extends BaseResourceTypeFormData {
7
7
  location: LocationType;
@@ -123,6 +123,7 @@ type RefreshTokenMutationResponse = MutationResponse<RefreshTokenPayloadType>;
123
123
  declare enum EnumAdShowOn {
124
124
  EVENTS_PAGE = "Events_page",
125
125
  FRONT_PAGE = "Front_page",
126
+ MARKET_SEARCH = "Market_search",
126
127
  PARTNERS_PAGE = "Partners_page",
127
128
  VENDORS_PAGE = "Vendors_page"
128
129
  }
@@ -139,6 +140,37 @@ declare enum EnumAdStyle {
139
140
  BLOOM = "Bloom",
140
141
  RISE = "Rise"
141
142
  }
143
+ declare enum EnumAdBookingSlotKind {
144
+ PAID = "paid",
145
+ RESERVED = "reserved"
146
+ }
147
+ declare enum EnumAdBookingState {
148
+ HELD = "held",
149
+ PENDING_APPROVAL = "pending_approval",
150
+ APPROVED = "approved",
151
+ FAILED = "failed",
152
+ CANCELLED = "cancelled",
153
+ REJECTED = "rejected"
154
+ }
155
+ declare enum EnumAdPaymentStatus {
156
+ PENDING = "pending",
157
+ PAID = "paid",
158
+ FAILED = "failed",
159
+ CANCELLED = "cancelled"
160
+ }
161
+ declare enum EnumAdEntitlementSource {
162
+ PRO_PLUS = "pro_plus",
163
+ ADMIN = "admin",
164
+ ORGANIZER = "organizer",
165
+ PARTNER = "partner"
166
+ }
167
+ declare enum EnumAdApprovalStatus {
168
+ PENDING = "pending",
169
+ APPROVED = "approved",
170
+ REJECTED = "rejected"
171
+ }
172
+ type AdPlacement = EnumAdShowOn.FRONT_PAGE | EnumAdShowOn.MARKET_SEARCH;
173
+ type AdDailyPriceKey = "front_page_day" | "market_search_day";
142
174
  type AdResource = {
143
175
  adDescription: string;
144
176
  adImage: string;
@@ -165,11 +197,54 @@ type CreateAdFormData = CreateFormData<AdFormData>;
165
197
  type CreateAdFormState = CreateFormData<AdFormState>;
166
198
  interface AdType extends AdFormData {
167
199
  _id: string;
200
+ adminManaged?: boolean;
201
+ approvalStatus?: EnumAdApprovalStatus;
202
+ bookingIds?: string[];
203
+ bookingKind?: EnumAdBookingSlotKind;
168
204
  clicks?: number;
169
205
  createdAt: Date;
170
206
  impressions?: number;
207
+ paymentStatus?: EnumAdPaymentStatus;
171
208
  start: Date;
172
209
  updatedAt: Date | null;
173
210
  }
211
+ type AdBookingType = {
212
+ _id: string;
213
+ adId?: string | null;
214
+ approvalStatus: EnumAdApprovalStatus;
215
+ checkoutAttemptId?: string | null;
216
+ currency?: string | null;
217
+ dayKey: string;
218
+ entitlementClaimKey?: string | null;
219
+ entitlementSource?: EnumAdEntitlementSource | null;
220
+ expiresAt?: Date | null;
221
+ placement: AdPlacement;
222
+ purchaseKey?: string | null;
223
+ region: string;
224
+ resource: AdResource;
225
+ slotKind: EnumAdBookingSlotKind;
226
+ slotNumber: number;
227
+ state: EnumAdBookingState;
228
+ stripeCheckoutSessionId?: string | null;
229
+ stripePaymentIntentId?: string | null;
230
+ unitAmount?: number | null;
231
+ userId: string;
232
+ };
233
+ type AdDailyPriceType = {
234
+ _id: string;
235
+ active: boolean;
236
+ currency: "nzd";
237
+ key: AdDailyPriceKey;
238
+ revision: number;
239
+ unitAmount: number;
240
+ };
241
+ type AdSettingsType = {
242
+ _id: "default";
243
+ approvalRequired: boolean;
244
+ minAppearancesPerHour: number;
245
+ paidSlotsPerPlacement: number;
246
+ reservedSlotsPerPlacement: number;
247
+ rotationSeconds: number;
248
+ };
174
249
 
175
- export { type AuthMutationResponse as A, type RequestPasswordResetFormData as B, type CreateLoginFormData as C, type ResetPasswordFormData as D, EnumAdStatus as E, type SchoolCampaignType as F, type SchoolRegisteredUserType as G, type LoginFormData as L, type MarketingMaterialRequestInputType as M, type PartnerType as P, type RefreshTokenMutationResponse as R, type SchoolType as S, type ValidateVerificationTokenFormData as V, type AdType as a, type AppSettingsType as b, type SchoolReturnType as c, type CreateRegisterFormData as d, type CreateRequestPasswordResetFormData as e, type CreateValidateVerificationTokenFormData as f, type CreateResetPasswordFormData as g, type PartnerFormData as h, type AdFormData as i, type CreateAdFormState as j, type CreatePartnerFormData as k, type AppSettingsFormData as l, type CreateAppSettingsFormData as m, type SchoolFormData as n, type CreateSchoolFormData as o, type AdFormState as p, type AdResource as q, type AuthPayloadType as r, type CreateAdFormData as s, EnumAdShowOn as t, EnumAdStyle as u, EnumAdType as v, EnumVerificationType as w, type PosterInputType as x, type RefreshTokenPayloadType as y, type RegisterFormData as z };
250
+ export { type AuthMutationResponse as A, EnumAdBookingState as B, type CreateLoginFormData as C, EnumAdEntitlementSource as D, EnumAdStatus as E, EnumAdPaymentStatus as F, EnumAdShowOn as G, EnumAdStyle as H, EnumAdType as I, EnumVerificationType as J, type PosterInputType as K, type LoginFormData as L, type MarketingMaterialRequestInputType as M, type RefreshTokenPayloadType as N, type RegisterFormData as O, type PartnerType as P, type RequestPasswordResetFormData as Q, type RefreshTokenMutationResponse as R, type SchoolType as S, type ResetPasswordFormData as T, type SchoolCampaignType as U, type SchoolRegisteredUserType as V, type ValidateVerificationTokenFormData as W, type AdType as a, type AppSettingsType as b, type SchoolReturnType as c, type CreateRegisterFormData as d, type CreateRequestPasswordResetFormData as e, type CreateValidateVerificationTokenFormData as f, type CreateResetPasswordFormData as g, type PartnerFormData as h, type AdFormData as i, type CreateAdFormState as j, type CreatePartnerFormData as k, type AppSettingsFormData as l, type CreateAppSettingsFormData as m, type SchoolFormData as n, type CreateSchoolFormData as o, type AdBookingType as p, type AdDailyPriceKey as q, type AdDailyPriceType as r, type AdFormState as s, type AdPlacement as t, type AdResource as u, type AdSettingsType as v, type AuthPayloadType as w, type CreateAdFormData as x, EnumAdApprovalStatus as y, EnumAdBookingSlotKind as z };
@@ -1,6 +1,6 @@
1
1
  import { EnumResourceType } from './enums/index.mjs';
2
2
  import { aD as PromoCodeType, L as LocationType, aP as SocialMediaType, ao as OwnerType, a1 as CreateFormData } from './global-BGqjRZ1G.mjs';
3
- import { e as UserFormData } from './user-NPmlt_Zx.mjs';
3
+ import { e as UserFormData } from './user-CqrqqKv2.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
2
  import { aD as PromoCodeType, L as LocationType, aP as SocialMediaType, ao as OwnerType, a1 as CreateFormData } from './global-ABvdHwPj.js';
3
- import { e as UserFormData } from './user-B6YLX1c5.js';
3
+ import { e as UserFormData } from './user-zrMQ2GDX.js';
4
4
 
5
5
  declare enum EnumAffiliateParticipantType {
6
6
  INDIVIDUAL = "INDIVIDUAL",
@@ -576,6 +576,8 @@ var STRIPE_FIELDS_FRAGMENT = import_client.gql`
576
576
  currentPlan
577
577
  startDate
578
578
  endDate
579
+ paymentFailedAt
580
+ paymentGracePeriodEndsAt
579
581
  pendingPlan
580
582
  pendingBillingPeriod
581
583
  pendingChangeEffectiveAt
@@ -1516,6 +1518,7 @@ var GET_USER_RESOURCES = import_client7.gql`
1516
1518
  _id
1517
1519
  logo
1518
1520
  name
1521
+ region
1519
1522
  resourceType
1520
1523
  }
1521
1524
  }