@timardex/cluemart-shared 1.7.23 → 1.7.25

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 (39) hide show
  1. package/dist/auth/index.mjs +1 -1
  2. package/dist/{chunk-LZQG3BQM.mjs → chunk-336EZBSA.mjs} +159 -6
  3. package/dist/chunk-336EZBSA.mjs.map +1 -0
  4. package/dist/{chunk-BEN24YAH.mjs → chunk-4G4OFSBZ.mjs} +2 -2
  5. package/dist/{chunk-ILILH7E2.mjs → chunk-7TL4ZSUO.mjs} +1 -1
  6. package/dist/{chunk-3VDFBRRK.mjs → chunk-WPBHYGXW.mjs} +2 -1
  7. package/dist/{affiliate-BM1h7pwc.d.ts → coupon-BtoIqOSL.d.ts} +46 -2
  8. package/dist/{affiliate-C1EG9HbN.d.mts → coupon-VfAWe5gV.d.mts} +46 -2
  9. package/dist/formFields/index.mjs +2 -2
  10. package/dist/graphql/index.cjs +158 -1
  11. package/dist/graphql/index.cjs.map +1 -1
  12. package/dist/graphql/index.d.mts +48 -3
  13. package/dist/graphql/index.d.ts +48 -3
  14. package/dist/graphql/index.mjs +12 -2
  15. package/dist/hooks/index.cjs +117 -0
  16. package/dist/hooks/index.cjs.map +1 -1
  17. package/dist/hooks/index.d.mts +1 -2
  18. package/dist/hooks/index.d.ts +1 -2
  19. package/dist/hooks/index.mjs +4 -4
  20. package/dist/index.cjs +158 -1
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.mts +91 -37
  23. package/dist/index.d.ts +91 -37
  24. package/dist/index.mjs +153 -1
  25. package/dist/index.mjs.map +1 -1
  26. package/dist/types/index.cjs.map +1 -1
  27. package/dist/types/index.d.mts +1 -1
  28. package/dist/types/index.d.ts +1 -1
  29. package/dist/types/index.mjs +1 -1
  30. package/dist/utils/index.d.mts +1 -2
  31. package/dist/utils/index.d.ts +1 -2
  32. package/dist/utils/index.mjs +2 -2
  33. package/package.json +1 -1
  34. package/dist/chunk-LZQG3BQM.mjs.map +0 -1
  35. package/dist/coupon-BSiDzp4T.d.mts +0 -39
  36. package/dist/coupon-IFOTRBJR.d.ts +0 -39
  37. /package/dist/{chunk-BEN24YAH.mjs.map → chunk-4G4OFSBZ.mjs.map} +0 -0
  38. /package/dist/{chunk-ILILH7E2.mjs.map → chunk-7TL4ZSUO.mjs.map} +0 -0
  39. /package/dist/{chunk-3VDFBRRK.mjs.map → chunk-WPBHYGXW.mjs.map} +0 -0
package/dist/index.d.mts CHANGED
@@ -1598,6 +1598,50 @@ interface AffiliateType {
1598
1598
  type AffiliateFormData = Omit<AffiliateDetailsType, "email" | "firstName" | "lastName">;
1599
1599
  type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;
1600
1600
 
1601
+ type CouponTypeOption = {
1602
+ buy: number;
1603
+ get: number;
1604
+ unit: string;
1605
+ };
1606
+ type ProductCouponFormData = {
1607
+ couponDescription: string;
1608
+ couponOption: CouponTypeOption;
1609
+ endDate: Date;
1610
+ participantProductId: string;
1611
+ startDate: Date;
1612
+ };
1613
+ type CreateProductCouponFormData = CreateFormData<ProductCouponFormData>;
1614
+ type CouponParticipantUserType = {
1615
+ couponCount: number;
1616
+ couponRedeemedAt: Date | null;
1617
+ createdAt: Date;
1618
+ updatedAt: Date | null;
1619
+ userId: string;
1620
+ };
1621
+ type CouponCodeType = {
1622
+ code: string;
1623
+ qrCode: ResourceImageType;
1624
+ };
1625
+ type ProductCouponType = Omit<ProductCouponFormData, "participantProductId"> & {
1626
+ _id: string;
1627
+ active: boolean;
1628
+ couponCode: CouponCodeType;
1629
+ createdAt: Date;
1630
+ participantProduct: VendorProductList;
1631
+ participantUsers: CouponParticipantUserType[] | null;
1632
+ updatedAt: Date | null;
1633
+ };
1634
+ type CouponTypeOptionWithType = Omit<ProductCouponType, "_id" | "participantUsers">;
1635
+ type CreateCouponTypeOptionParams = Pick<ProductCouponType, "couponCode" | "couponDescription" | "couponOption" | "createdAt" | "endDate" | "participantProduct" | "startDate">;
1636
+ interface CouponType {
1637
+ _id: string;
1638
+ active: boolean;
1639
+ createdAt: Date;
1640
+ deletedAt: Date | null;
1641
+ productCoupons: ProductCouponType[];
1642
+ updatedAt: Date | null;
1643
+ }
1644
+
1601
1645
  declare const vendorElectricity: {
1602
1646
  details: FormField;
1603
1647
  isRequired: FormField;
@@ -2323,7 +2367,7 @@ declare const useGetVendor: (_id: string) => {
2323
2367
  refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
2324
2368
  vendor: VendorType;
2325
2369
  }>>;
2326
- vendor: VendorType | undefined;
2370
+ vendor: VendorType | null;
2327
2371
  };
2328
2372
  declare const useGetVendorsByRegion: (region: string, options?: UseGetResourcesByRegionOptions) => {
2329
2373
  error: _apollo_client.ApolloError | undefined;
@@ -3112,6 +3156,51 @@ declare const useAssignAffiliateBonusReward: () => {
3112
3156
  loading: boolean;
3113
3157
  };
3114
3158
 
3159
+ declare const useCreateCoupon: () => {
3160
+ createCoupon: (options?: _apollo_client.MutationFunctionOptions<{
3161
+ createCoupon: MutationResponse<CouponType>;
3162
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
3163
+ createCoupon: MutationResponse<CouponType>;
3164
+ }>>;
3165
+ error: _apollo_client.ApolloError | undefined;
3166
+ loading: boolean;
3167
+ };
3168
+ declare const useUpdateCoupon: () => {
3169
+ error: _apollo_client.ApolloError | undefined;
3170
+ loading: boolean;
3171
+ updateCoupon: (options?: _apollo_client.MutationFunctionOptions<{
3172
+ updateCoupon: MutationResponse<CouponType>;
3173
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
3174
+ updateCoupon: MutationResponse<CouponType>;
3175
+ }>>;
3176
+ };
3177
+ declare const useDeleteCoupon: () => {
3178
+ deleteCoupon: (options?: _apollo_client.MutationFunctionOptions<{
3179
+ deleteCoupon: MutationResponse<boolean>;
3180
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
3181
+ deleteCoupon: MutationResponse<boolean>;
3182
+ }>>;
3183
+ error: _apollo_client.ApolloError | undefined;
3184
+ loading: boolean;
3185
+ };
3186
+
3187
+ declare const useGetCoupons: () => {
3188
+ coupons: CouponType[];
3189
+ error: _apollo_client.ApolloError | undefined;
3190
+ loading: boolean;
3191
+ refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
3192
+ coupons: CouponType[];
3193
+ }>>;
3194
+ };
3195
+ declare const useGetCoupon: (_id: string) => {
3196
+ coupon: CouponType | null;
3197
+ error: _apollo_client.ApolloError | undefined;
3198
+ loading: boolean;
3199
+ refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
3200
+ coupon: CouponType | null;
3201
+ }>>;
3202
+ };
3203
+
3115
3204
  /** Minimal event fields for public (market) share copy — matches in-app preview. */
3116
3205
  type ShareEventForPublic = {
3117
3206
  description?: string | null;
@@ -3590,41 +3679,6 @@ declare function toUserFacingErrorMessage(error: string | null | undefined, fall
3590
3679
  /** Extracts and sanitizes an unknown catch/Apollo error for toasts and alerts. */
3591
3680
  declare function getErrorMessage(error: unknown, fallback?: string): string;
3592
3681
 
3593
- type CouponTypeOption = {
3594
- buy: number;
3595
- get: number;
3596
- unit: string;
3597
- };
3598
- type ProductCouponFormData = {
3599
- couponDescription: string;
3600
- couponOption: CouponTypeOption;
3601
- endDate: Date;
3602
- participantProductId: string;
3603
- startDate: Date;
3604
- };
3605
- type CouponParticipantUserType = {
3606
- couponCount: number;
3607
- couponRedeemedAt: Date | null;
3608
- createdAt: Date;
3609
- updatedAt: Date | null;
3610
- userId: string;
3611
- };
3612
- type CouponCodeType = {
3613
- code: string;
3614
- qrCode: ResourceImageType;
3615
- };
3616
- type ProductCouponType = Omit<ProductCouponFormData, "participantProductId"> & {
3617
- _id: string;
3618
- active: boolean;
3619
- couponCode: CouponCodeType;
3620
- createdAt: Date;
3621
- participantProduct: VendorProductList;
3622
- participantUsers: CouponParticipantUserType[] | null;
3623
- updatedAt: Date | null;
3624
- };
3625
- type CouponTypeOptionWithType = Omit<ProductCouponType, "_id" | "participantUsers">;
3626
- type CreateCouponTypeOptionParams = Pick<ProductCouponType, "couponCode" | "couponDescription" | "couponOption" | "createdAt" | "endDate" | "participantProduct" | "startDate">;
3627
-
3628
3682
  declare function createCouponTypeOption({ couponCode, couponDescription, couponOption, createdAt, endDate, participantProduct, startDate, }: CreateCouponTypeOptionParams): CouponTypeOptionWithType;
3629
3683
 
3630
- export { ACTIVATE_VENDOR_CLAIM_MUTATION, ADMIN_APP_ROLES, ADMIN_DASHBOARD_CONTEXTS, AFFILIATE_PARTICIPANT_TYPE_LABELS, AFFILIATE_REWARDS, ANDROID_URL, type AdFormData, type AdFormState, type AdResource, type AdType, type AdminAppRole, type AdminDashboardContext, type AdminDashboardContextInfo, type AdminUpdateResourceType, type AffiliateBankAccountDetailsType, type AffiliateContactDetails, type AffiliateDetailsType, type AffiliateFormData, type AffiliateResourceType, type AffiliateRewardType, type AffiliateType, type AffiliateUserDefaultFields, type AppSettingsFormData, type AppSettingsType, type AuthMutationResponse, type AuthPayloadType, type BadgeBasename, type BadgeId, type BaseGameMap, type BaseGameType, type BaseResourceType, type BaseResourceTypeFormData, CLUEMART_MAIN_DOMAIN_URL, CM_AFFILIATE_PROMO_CODE, CM_SCHOOL_PROMO_CODE, type CalendarSheetContentData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type CluiImageBasename, type CluiImageId, type ContactUsFormData, type CreateAdFormData, type CreateAdFormState, type CreateAffiliateFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateSchoolFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, DEFAULT_RESOURCES_RETURN_LIMIT, DEFAULT_RESOURCES_RETURN_OFFSET, DEFAULT_SHARE_OG_IMAGE, DEFAULT_USER_FACING_ERROR, type DailyClueBaseGame, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EVENT_DATE_STATUS_PERIOD_MAP, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumAffiliateParticipantType, EnumAffiliateRewardType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumReward, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventScheduleStatusPresentation, type EventScheduleStatusTone, type EventStatusType, type EventType, type FormDateField, type FormField, GET_EVENT, GET_EVENT_BY_SLUG, GET_EVENT_INFO, GET_PARTNER, GET_PARTNER_BY_SLUG, GET_POST, GET_POST_BY_SLUG, GET_RESOURCE_CONNECTIONS, GET_VENDOR, GET_VENDOR_BY_SLUG, GET_VENDOR_INFO, type GameDate, type GameDocType, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GlobalGameData, type GoogleAddressComponent, type GoogleImportedMarket, IMAGE_EXTENSION, IOS_URL, type IconBasename, type IconId, type ImageObjectType, ImageTypeEnum, KNOWN_EVENT_SCHEDULE_STATUSES, type LocationGeoType, type LocationType, type LoginFormData, type LogoBasename, type LogoId, MY_PENDING_VENDOR_CLAIM, type MarketingMaterialRequestInputType, type MutationResponse, type MyPendingVendorClaim, NETWORK_USER_FACING_ERROR, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, OG_DESCRIPTION_LINE_BREAK, type OptionItem, type OtherImagesBasename, type OtherImagesId, type OwnerType, PERMISSIONS, POST_SHARE_RESOURCE_TYPES, PROMO_CODE_PREFIX, PUBLIC_SHARE_PATH_TYPES, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type Permission, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostResource, type PostShareResourceType, type PostType, PostTypeLabels, type PosterAssetId, type PosterImageBasename, type PosterInputType, type PosterUsageType, type PromoCodeType, type PublicSharePathType, type PushTokenType, type PuzzleAnswer, type PuzzleAnsweredQuestion, type PuzzleBaseGame, type PuzzleGameData, type PuzzleQuestion, RELATION_OVERLAY_LAYOUT_VERSION, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, ROLE_PERMISSIONS, type RedeemHistoryType, type RedeemRewardInput, type RedeemRewardMutationResponse, type RedeemRewardResponse, type RedeemedReward, type RefreshTokenMutationResponse, type RefreshTokenPayloadType, type RefundPolicy, type Region, type RegisterFormData, type RelatedPostType, type RelationDate, type RelationInputType, type RelationSharePathType, type RelationShareResourceType, type RelationType$1 as RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, type ResourceShareType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, SCHOOL_MAX_STUDENT_COUNT, SCHOOL_MIN_STUDENT_COUNT, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, SOCIAL_IMAGE_HEIGHT, SOCIAL_IMAGE_WIDTH, type SafeUserType, type SchoolCampaignType, type SchoolFormData, type SchoolRegisteredUserType, type SchoolReturnType, type SchoolType, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareSlugResource, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, type SocialMediaType, type SocialShareResourceType, type StallType, type StallholderFilterOption, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, TIERS_BY_PRIORITY, TIER_DISPLAY_LABELS, TIER_FROM_LICENCE, type TermsAgreement, type Tier, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetResourcesByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorClaimTokenValidation, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, WILDCARD_PERMISSION, appendShareMoreInfoLine, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, badgeFiles, badgeIds, badges, bankAccountDetailsFields, buildApplicationShareDescription, buildCalendarSheetContentData, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, canAccessAdminApp, canAccessAdminPath, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, cluiFiles, cluiIds, cluiImages, collectStallholderStartDates, collectVendorEventRelationDateTimes, companyContactFields, computeDailyClueState, contactUsFields, createAffiliateReward, createCouponTypeOption, darkColors, dateFormat, emailField, eventBasicInfoFields, eventEndDateFields, eventHasSelectedDate, eventInfo, eventInfoPaymentInfo, eventMatchesDateStatusPeriod, eventStartDateFields, eventStartDatesSet, filterEventsByDateStatusPeriod, filterRegisteredVendorsByEventDatesOnly, filterRegisteredVendorsForEvent, filterUnregisteredVendorsByEventDatesOnly, filterUnregisteredVendorsForEvent, filterVendorEventsBySelectedDate, findEventDateTimeByIsoDate, fonts, foodFlavourOptions, formatCategoryLabel, formatDate, formatIrdNumber, formatNZBankAccount, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, formatTimestamp, fromCalendarIsoDate, futureTimePeriods, gameScreenIdentifierList, gameTypeToDisplayName, getAllowedEventDateStatuses, getCurrentAndFutureDates, getDefaultAdminHome, getErrorMessage, getEventCalendarIsoDates, getEventDatesWithStallholders, getEventScheduleStatusLabel, getEventScheduleStatusPresentation, getEventScheduleStatusTone, getEventStallholderEmptyMessage, getPermissionsForRoles, getRegisteredVendorCategoryNames, getRegisteredVendorStartDates, getStallholderCategoryNames, getStallholderCategoryOptions, getUnregisteredVendorCategoryNames, getUnregisteredVendorStartDates, getUsableAdminContexts, getVendorEventRelationDateOptions, getVendorEventRelationStartDates, getVendorEventsEmptyMessage, hasAllPermissions, hasAnyPermission, hasAnyRole, hasMatchingEventDate, hasPermission, hasRole, iconFiles, iconIds, icons, isFutureDatesBeforeThreshold, isInternalErrorMessage, isIsoDateString, isPostShareResourceType, isRelationShareResourceType, isResourceImageActive, isTransientNetworkError, isValidIrdNumber, joinShareDescriptionSections, joinShareOgDescriptionSections, licenseNiceNames, lightColors, loginFields, logoFiles, logoIds, logos, mapArrayToOptions, matchesCategory, matchesSelectedDate, normalizeIrdNumber, normalizeResourceImage, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, normalizeUrl, nzStartOfDay, otherImages, otherImagesFiles, otherImagesIds, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, permissionListIncludes, posterFiles, posterIds, posters, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, relationHasSelectedDate, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, resolveAdminContextFromPath, resolveResourceImageActive, rewardNiceNames, seededShuffle, shareMessageFooterPlacementForType, shareSlugResourceId, shouldShowEventActionsWithWeather, socialMediaFields, sortDatesChronologically, splitShareDescriptionSections, stallTypeOptions, statusOptions, stripOverlaySubtitleSpecialChars, tagOptions, timeFormat, toCalendarIsoDate, toGraphqlQueryString, toNZTime, toShareSocialImageCacheVersion, toUserFacingErrorMessage, truncateText, useActivateVendorClaim, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAssignAffiliateBonusReward, useAssignAffiliateResourceReward, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAffiliate, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAffiliate, useGetAffiliates, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetPrivateChats, useGetRelation, useGetRelationByEventAndVendor, useGetRelationChats, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useMyPendingVendorClaim, useRedeemAffiliateReward, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAffiliateDetails, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
3684
+ export { ACTIVATE_VENDOR_CLAIM_MUTATION, ADMIN_APP_ROLES, ADMIN_DASHBOARD_CONTEXTS, AFFILIATE_PARTICIPANT_TYPE_LABELS, AFFILIATE_REWARDS, ANDROID_URL, type AdFormData, type AdFormState, type AdResource, type AdType, type AdminAppRole, type AdminDashboardContext, type AdminDashboardContextInfo, type AdminUpdateResourceType, type AffiliateBankAccountDetailsType, type AffiliateContactDetails, type AffiliateDetailsType, type AffiliateFormData, type AffiliateResourceType, type AffiliateRewardType, type AffiliateType, type AffiliateUserDefaultFields, type AppSettingsFormData, type AppSettingsType, type AuthMutationResponse, type AuthPayloadType, type BadgeBasename, type BadgeId, type BaseGameMap, type BaseGameType, type BaseResourceType, type BaseResourceTypeFormData, CLUEMART_MAIN_DOMAIN_URL, CM_AFFILIATE_PROMO_CODE, CM_SCHOOL_PROMO_CODE, type CalendarSheetContentData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type CluiImageBasename, type CluiImageId, type ContactUsFormData, type CouponCodeType, type CouponParticipantUserType, type CouponType, type CouponTypeOption, type CouponTypeOptionWithType, type CreateAdFormData, type CreateAdFormState, type CreateAffiliateFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateCouponTypeOptionParams, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateProductCouponFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateSchoolFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, DEFAULT_RESOURCES_RETURN_LIMIT, DEFAULT_RESOURCES_RETURN_OFFSET, DEFAULT_SHARE_OG_IMAGE, DEFAULT_USER_FACING_ERROR, type DailyClueBaseGame, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EVENT_DATE_STATUS_PERIOD_MAP, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumAffiliateParticipantType, EnumAffiliateRewardType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumReward, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventScheduleStatusPresentation, type EventScheduleStatusTone, type EventStatusType, type EventType, type FormDateField, type FormField, GET_EVENT, GET_EVENT_BY_SLUG, GET_EVENT_INFO, GET_PARTNER, GET_PARTNER_BY_SLUG, GET_POST, GET_POST_BY_SLUG, GET_RESOURCE_CONNECTIONS, GET_VENDOR, GET_VENDOR_BY_SLUG, GET_VENDOR_INFO, type GameDate, type GameDocType, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GlobalGameData, type GoogleAddressComponent, type GoogleImportedMarket, IMAGE_EXTENSION, IOS_URL, type IconBasename, type IconId, type ImageObjectType, ImageTypeEnum, KNOWN_EVENT_SCHEDULE_STATUSES, type LocationGeoType, type LocationType, type LoginFormData, type LogoBasename, type LogoId, MY_PENDING_VENDOR_CLAIM, type MarketingMaterialRequestInputType, type MutationResponse, type MyPendingVendorClaim, NETWORK_USER_FACING_ERROR, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, OG_DESCRIPTION_LINE_BREAK, type OptionItem, type OtherImagesBasename, type OtherImagesId, type OwnerType, PERMISSIONS, POST_SHARE_RESOURCE_TYPES, PROMO_CODE_PREFIX, PUBLIC_SHARE_PATH_TYPES, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type Permission, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostResource, type PostShareResourceType, type PostType, PostTypeLabels, type PosterAssetId, type PosterImageBasename, type PosterInputType, type PosterUsageType, type ProductCouponFormData, type ProductCouponType, type PromoCodeType, type PublicSharePathType, type PushTokenType, type PuzzleAnswer, type PuzzleAnsweredQuestion, type PuzzleBaseGame, type PuzzleGameData, type PuzzleQuestion, RELATION_OVERLAY_LAYOUT_VERSION, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, ROLE_PERMISSIONS, type RedeemHistoryType, type RedeemRewardInput, type RedeemRewardMutationResponse, type RedeemRewardResponse, type RedeemedReward, type RefreshTokenMutationResponse, type RefreshTokenPayloadType, type RefundPolicy, type Region, type RegisterFormData, type RelatedPostType, type RelationDate, type RelationInputType, type RelationSharePathType, type RelationShareResourceType, type RelationType$1 as RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, type ResourceShareType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, SCHOOL_MAX_STUDENT_COUNT, SCHOOL_MIN_STUDENT_COUNT, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, SOCIAL_IMAGE_HEIGHT, SOCIAL_IMAGE_WIDTH, type SafeUserType, type SchoolCampaignType, type SchoolFormData, type SchoolRegisteredUserType, type SchoolReturnType, type SchoolType, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareSlugResource, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, type SocialMediaType, type SocialShareResourceType, type StallType, type StallholderFilterOption, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, TIERS_BY_PRIORITY, TIER_DISPLAY_LABELS, TIER_FROM_LICENCE, type TermsAgreement, type Tier, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetResourcesByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorClaimTokenValidation, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, WILDCARD_PERMISSION, appendShareMoreInfoLine, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, badgeFiles, badgeIds, badges, bankAccountDetailsFields, buildApplicationShareDescription, buildCalendarSheetContentData, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, canAccessAdminApp, canAccessAdminPath, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, cluiFiles, cluiIds, cluiImages, collectStallholderStartDates, collectVendorEventRelationDateTimes, companyContactFields, computeDailyClueState, contactUsFields, createAffiliateReward, createCouponTypeOption, darkColors, dateFormat, emailField, eventBasicInfoFields, eventEndDateFields, eventHasSelectedDate, eventInfo, eventInfoPaymentInfo, eventMatchesDateStatusPeriod, eventStartDateFields, eventStartDatesSet, filterEventsByDateStatusPeriod, filterRegisteredVendorsByEventDatesOnly, filterRegisteredVendorsForEvent, filterUnregisteredVendorsByEventDatesOnly, filterUnregisteredVendorsForEvent, filterVendorEventsBySelectedDate, findEventDateTimeByIsoDate, fonts, foodFlavourOptions, formatCategoryLabel, formatDate, formatIrdNumber, formatNZBankAccount, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, formatTimestamp, fromCalendarIsoDate, futureTimePeriods, gameScreenIdentifierList, gameTypeToDisplayName, getAllowedEventDateStatuses, getCurrentAndFutureDates, getDefaultAdminHome, getErrorMessage, getEventCalendarIsoDates, getEventDatesWithStallholders, getEventScheduleStatusLabel, getEventScheduleStatusPresentation, getEventScheduleStatusTone, getEventStallholderEmptyMessage, getPermissionsForRoles, getRegisteredVendorCategoryNames, getRegisteredVendorStartDates, getStallholderCategoryNames, getStallholderCategoryOptions, getUnregisteredVendorCategoryNames, getUnregisteredVendorStartDates, getUsableAdminContexts, getVendorEventRelationDateOptions, getVendorEventRelationStartDates, getVendorEventsEmptyMessage, hasAllPermissions, hasAnyPermission, hasAnyRole, hasMatchingEventDate, hasPermission, hasRole, iconFiles, iconIds, icons, isFutureDatesBeforeThreshold, isInternalErrorMessage, isIsoDateString, isPostShareResourceType, isRelationShareResourceType, isResourceImageActive, isTransientNetworkError, isValidIrdNumber, joinShareDescriptionSections, joinShareOgDescriptionSections, licenseNiceNames, lightColors, loginFields, logoFiles, logoIds, logos, mapArrayToOptions, matchesCategory, matchesSelectedDate, normalizeIrdNumber, normalizeResourceImage, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, normalizeUrl, nzStartOfDay, otherImages, otherImagesFiles, otherImagesIds, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, permissionListIncludes, posterFiles, posterIds, posters, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, relationHasSelectedDate, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, resolveAdminContextFromPath, resolveResourceImageActive, rewardNiceNames, seededShuffle, shareMessageFooterPlacementForType, shareSlugResourceId, shouldShowEventActionsWithWeather, socialMediaFields, sortDatesChronologically, splitShareDescriptionSections, stallTypeOptions, statusOptions, stripOverlaySubtitleSpecialChars, tagOptions, timeFormat, toCalendarIsoDate, toGraphqlQueryString, toNZTime, toShareSocialImageCacheVersion, toUserFacingErrorMessage, truncateText, useActivateVendorClaim, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAssignAffiliateBonusReward, useAssignAffiliateResourceReward, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCoupon, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAffiliate, useDeleteAllNotifications, useDeleteChat, useDeleteCoupon, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAffiliate, useGetAffiliates, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetCoupon, useGetCoupons, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetPrivateChats, useGetRelation, useGetRelationByEventAndVendor, useGetRelationChats, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useMyPendingVendorClaim, useRedeemAffiliateReward, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAffiliateDetails, useUpdateAppSettings, useUpdateCoupon, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
package/dist/index.d.ts CHANGED
@@ -1598,6 +1598,50 @@ interface AffiliateType {
1598
1598
  type AffiliateFormData = Omit<AffiliateDetailsType, "email" | "firstName" | "lastName">;
1599
1599
  type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;
1600
1600
 
1601
+ type CouponTypeOption = {
1602
+ buy: number;
1603
+ get: number;
1604
+ unit: string;
1605
+ };
1606
+ type ProductCouponFormData = {
1607
+ couponDescription: string;
1608
+ couponOption: CouponTypeOption;
1609
+ endDate: Date;
1610
+ participantProductId: string;
1611
+ startDate: Date;
1612
+ };
1613
+ type CreateProductCouponFormData = CreateFormData<ProductCouponFormData>;
1614
+ type CouponParticipantUserType = {
1615
+ couponCount: number;
1616
+ couponRedeemedAt: Date | null;
1617
+ createdAt: Date;
1618
+ updatedAt: Date | null;
1619
+ userId: string;
1620
+ };
1621
+ type CouponCodeType = {
1622
+ code: string;
1623
+ qrCode: ResourceImageType;
1624
+ };
1625
+ type ProductCouponType = Omit<ProductCouponFormData, "participantProductId"> & {
1626
+ _id: string;
1627
+ active: boolean;
1628
+ couponCode: CouponCodeType;
1629
+ createdAt: Date;
1630
+ participantProduct: VendorProductList;
1631
+ participantUsers: CouponParticipantUserType[] | null;
1632
+ updatedAt: Date | null;
1633
+ };
1634
+ type CouponTypeOptionWithType = Omit<ProductCouponType, "_id" | "participantUsers">;
1635
+ type CreateCouponTypeOptionParams = Pick<ProductCouponType, "couponCode" | "couponDescription" | "couponOption" | "createdAt" | "endDate" | "participantProduct" | "startDate">;
1636
+ interface CouponType {
1637
+ _id: string;
1638
+ active: boolean;
1639
+ createdAt: Date;
1640
+ deletedAt: Date | null;
1641
+ productCoupons: ProductCouponType[];
1642
+ updatedAt: Date | null;
1643
+ }
1644
+
1601
1645
  declare const vendorElectricity: {
1602
1646
  details: FormField;
1603
1647
  isRequired: FormField;
@@ -2323,7 +2367,7 @@ declare const useGetVendor: (_id: string) => {
2323
2367
  refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
2324
2368
  vendor: VendorType;
2325
2369
  }>>;
2326
- vendor: VendorType | undefined;
2370
+ vendor: VendorType | null;
2327
2371
  };
2328
2372
  declare const useGetVendorsByRegion: (region: string, options?: UseGetResourcesByRegionOptions) => {
2329
2373
  error: _apollo_client.ApolloError | undefined;
@@ -3112,6 +3156,51 @@ declare const useAssignAffiliateBonusReward: () => {
3112
3156
  loading: boolean;
3113
3157
  };
3114
3158
 
3159
+ declare const useCreateCoupon: () => {
3160
+ createCoupon: (options?: _apollo_client.MutationFunctionOptions<{
3161
+ createCoupon: MutationResponse<CouponType>;
3162
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
3163
+ createCoupon: MutationResponse<CouponType>;
3164
+ }>>;
3165
+ error: _apollo_client.ApolloError | undefined;
3166
+ loading: boolean;
3167
+ };
3168
+ declare const useUpdateCoupon: () => {
3169
+ error: _apollo_client.ApolloError | undefined;
3170
+ loading: boolean;
3171
+ updateCoupon: (options?: _apollo_client.MutationFunctionOptions<{
3172
+ updateCoupon: MutationResponse<CouponType>;
3173
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
3174
+ updateCoupon: MutationResponse<CouponType>;
3175
+ }>>;
3176
+ };
3177
+ declare const useDeleteCoupon: () => {
3178
+ deleteCoupon: (options?: _apollo_client.MutationFunctionOptions<{
3179
+ deleteCoupon: MutationResponse<boolean>;
3180
+ }, _apollo_client.OperationVariables, _apollo_client.DefaultContext, _apollo_client.ApolloCache<any>> | undefined) => Promise<_apollo_client.FetchResult<{
3181
+ deleteCoupon: MutationResponse<boolean>;
3182
+ }>>;
3183
+ error: _apollo_client.ApolloError | undefined;
3184
+ loading: boolean;
3185
+ };
3186
+
3187
+ declare const useGetCoupons: () => {
3188
+ coupons: CouponType[];
3189
+ error: _apollo_client.ApolloError | undefined;
3190
+ loading: boolean;
3191
+ refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
3192
+ coupons: CouponType[];
3193
+ }>>;
3194
+ };
3195
+ declare const useGetCoupon: (_id: string) => {
3196
+ coupon: CouponType | null;
3197
+ error: _apollo_client.ApolloError | undefined;
3198
+ loading: boolean;
3199
+ refetch: (variables?: Partial<_apollo_client.OperationVariables> | undefined) => Promise<_apollo_client.ApolloQueryResult<{
3200
+ coupon: CouponType | null;
3201
+ }>>;
3202
+ };
3203
+
3115
3204
  /** Minimal event fields for public (market) share copy — matches in-app preview. */
3116
3205
  type ShareEventForPublic = {
3117
3206
  description?: string | null;
@@ -3590,41 +3679,6 @@ declare function toUserFacingErrorMessage(error: string | null | undefined, fall
3590
3679
  /** Extracts and sanitizes an unknown catch/Apollo error for toasts and alerts. */
3591
3680
  declare function getErrorMessage(error: unknown, fallback?: string): string;
3592
3681
 
3593
- type CouponTypeOption = {
3594
- buy: number;
3595
- get: number;
3596
- unit: string;
3597
- };
3598
- type ProductCouponFormData = {
3599
- couponDescription: string;
3600
- couponOption: CouponTypeOption;
3601
- endDate: Date;
3602
- participantProductId: string;
3603
- startDate: Date;
3604
- };
3605
- type CouponParticipantUserType = {
3606
- couponCount: number;
3607
- couponRedeemedAt: Date | null;
3608
- createdAt: Date;
3609
- updatedAt: Date | null;
3610
- userId: string;
3611
- };
3612
- type CouponCodeType = {
3613
- code: string;
3614
- qrCode: ResourceImageType;
3615
- };
3616
- type ProductCouponType = Omit<ProductCouponFormData, "participantProductId"> & {
3617
- _id: string;
3618
- active: boolean;
3619
- couponCode: CouponCodeType;
3620
- createdAt: Date;
3621
- participantProduct: VendorProductList;
3622
- participantUsers: CouponParticipantUserType[] | null;
3623
- updatedAt: Date | null;
3624
- };
3625
- type CouponTypeOptionWithType = Omit<ProductCouponType, "_id" | "participantUsers">;
3626
- type CreateCouponTypeOptionParams = Pick<ProductCouponType, "couponCode" | "couponDescription" | "couponOption" | "createdAt" | "endDate" | "participantProduct" | "startDate">;
3627
-
3628
3682
  declare function createCouponTypeOption({ couponCode, couponDescription, couponOption, createdAt, endDate, participantProduct, startDate, }: CreateCouponTypeOptionParams): CouponTypeOptionWithType;
3629
3683
 
3630
- export { ACTIVATE_VENDOR_CLAIM_MUTATION, ADMIN_APP_ROLES, ADMIN_DASHBOARD_CONTEXTS, AFFILIATE_PARTICIPANT_TYPE_LABELS, AFFILIATE_REWARDS, ANDROID_URL, type AdFormData, type AdFormState, type AdResource, type AdType, type AdminAppRole, type AdminDashboardContext, type AdminDashboardContextInfo, type AdminUpdateResourceType, type AffiliateBankAccountDetailsType, type AffiliateContactDetails, type AffiliateDetailsType, type AffiliateFormData, type AffiliateResourceType, type AffiliateRewardType, type AffiliateType, type AffiliateUserDefaultFields, type AppSettingsFormData, type AppSettingsType, type AuthMutationResponse, type AuthPayloadType, type BadgeBasename, type BadgeId, type BaseGameMap, type BaseGameType, type BaseResourceType, type BaseResourceTypeFormData, CLUEMART_MAIN_DOMAIN_URL, CM_AFFILIATE_PROMO_CODE, CM_SCHOOL_PROMO_CODE, type CalendarSheetContentData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type CluiImageBasename, type CluiImageId, type ContactUsFormData, type CreateAdFormData, type CreateAdFormState, type CreateAffiliateFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateSchoolFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, DEFAULT_RESOURCES_RETURN_LIMIT, DEFAULT_RESOURCES_RETURN_OFFSET, DEFAULT_SHARE_OG_IMAGE, DEFAULT_USER_FACING_ERROR, type DailyClueBaseGame, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EVENT_DATE_STATUS_PERIOD_MAP, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumAffiliateParticipantType, EnumAffiliateRewardType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumReward, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventScheduleStatusPresentation, type EventScheduleStatusTone, type EventStatusType, type EventType, type FormDateField, type FormField, GET_EVENT, GET_EVENT_BY_SLUG, GET_EVENT_INFO, GET_PARTNER, GET_PARTNER_BY_SLUG, GET_POST, GET_POST_BY_SLUG, GET_RESOURCE_CONNECTIONS, GET_VENDOR, GET_VENDOR_BY_SLUG, GET_VENDOR_INFO, type GameDate, type GameDocType, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GlobalGameData, type GoogleAddressComponent, type GoogleImportedMarket, IMAGE_EXTENSION, IOS_URL, type IconBasename, type IconId, type ImageObjectType, ImageTypeEnum, KNOWN_EVENT_SCHEDULE_STATUSES, type LocationGeoType, type LocationType, type LoginFormData, type LogoBasename, type LogoId, MY_PENDING_VENDOR_CLAIM, type MarketingMaterialRequestInputType, type MutationResponse, type MyPendingVendorClaim, NETWORK_USER_FACING_ERROR, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, OG_DESCRIPTION_LINE_BREAK, type OptionItem, type OtherImagesBasename, type OtherImagesId, type OwnerType, PERMISSIONS, POST_SHARE_RESOURCE_TYPES, PROMO_CODE_PREFIX, PUBLIC_SHARE_PATH_TYPES, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type Permission, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostResource, type PostShareResourceType, type PostType, PostTypeLabels, type PosterAssetId, type PosterImageBasename, type PosterInputType, type PosterUsageType, type PromoCodeType, type PublicSharePathType, type PushTokenType, type PuzzleAnswer, type PuzzleAnsweredQuestion, type PuzzleBaseGame, type PuzzleGameData, type PuzzleQuestion, RELATION_OVERLAY_LAYOUT_VERSION, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, ROLE_PERMISSIONS, type RedeemHistoryType, type RedeemRewardInput, type RedeemRewardMutationResponse, type RedeemRewardResponse, type RedeemedReward, type RefreshTokenMutationResponse, type RefreshTokenPayloadType, type RefundPolicy, type Region, type RegisterFormData, type RelatedPostType, type RelationDate, type RelationInputType, type RelationSharePathType, type RelationShareResourceType, type RelationType$1 as RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, type ResourceShareType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, SCHOOL_MAX_STUDENT_COUNT, SCHOOL_MIN_STUDENT_COUNT, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, SOCIAL_IMAGE_HEIGHT, SOCIAL_IMAGE_WIDTH, type SafeUserType, type SchoolCampaignType, type SchoolFormData, type SchoolRegisteredUserType, type SchoolReturnType, type SchoolType, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareSlugResource, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, type SocialMediaType, type SocialShareResourceType, type StallType, type StallholderFilterOption, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, TIERS_BY_PRIORITY, TIER_DISPLAY_LABELS, TIER_FROM_LICENCE, type TermsAgreement, type Tier, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetResourcesByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorClaimTokenValidation, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, WILDCARD_PERMISSION, appendShareMoreInfoLine, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, badgeFiles, badgeIds, badges, bankAccountDetailsFields, buildApplicationShareDescription, buildCalendarSheetContentData, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, canAccessAdminApp, canAccessAdminPath, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, cluiFiles, cluiIds, cluiImages, collectStallholderStartDates, collectVendorEventRelationDateTimes, companyContactFields, computeDailyClueState, contactUsFields, createAffiliateReward, createCouponTypeOption, darkColors, dateFormat, emailField, eventBasicInfoFields, eventEndDateFields, eventHasSelectedDate, eventInfo, eventInfoPaymentInfo, eventMatchesDateStatusPeriod, eventStartDateFields, eventStartDatesSet, filterEventsByDateStatusPeriod, filterRegisteredVendorsByEventDatesOnly, filterRegisteredVendorsForEvent, filterUnregisteredVendorsByEventDatesOnly, filterUnregisteredVendorsForEvent, filterVendorEventsBySelectedDate, findEventDateTimeByIsoDate, fonts, foodFlavourOptions, formatCategoryLabel, formatDate, formatIrdNumber, formatNZBankAccount, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, formatTimestamp, fromCalendarIsoDate, futureTimePeriods, gameScreenIdentifierList, gameTypeToDisplayName, getAllowedEventDateStatuses, getCurrentAndFutureDates, getDefaultAdminHome, getErrorMessage, getEventCalendarIsoDates, getEventDatesWithStallholders, getEventScheduleStatusLabel, getEventScheduleStatusPresentation, getEventScheduleStatusTone, getEventStallholderEmptyMessage, getPermissionsForRoles, getRegisteredVendorCategoryNames, getRegisteredVendorStartDates, getStallholderCategoryNames, getStallholderCategoryOptions, getUnregisteredVendorCategoryNames, getUnregisteredVendorStartDates, getUsableAdminContexts, getVendorEventRelationDateOptions, getVendorEventRelationStartDates, getVendorEventsEmptyMessage, hasAllPermissions, hasAnyPermission, hasAnyRole, hasMatchingEventDate, hasPermission, hasRole, iconFiles, iconIds, icons, isFutureDatesBeforeThreshold, isInternalErrorMessage, isIsoDateString, isPostShareResourceType, isRelationShareResourceType, isResourceImageActive, isTransientNetworkError, isValidIrdNumber, joinShareDescriptionSections, joinShareOgDescriptionSections, licenseNiceNames, lightColors, loginFields, logoFiles, logoIds, logos, mapArrayToOptions, matchesCategory, matchesSelectedDate, normalizeIrdNumber, normalizeResourceImage, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, normalizeUrl, nzStartOfDay, otherImages, otherImagesFiles, otherImagesIds, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, permissionListIncludes, posterFiles, posterIds, posters, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, relationHasSelectedDate, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, resolveAdminContextFromPath, resolveResourceImageActive, rewardNiceNames, seededShuffle, shareMessageFooterPlacementForType, shareSlugResourceId, shouldShowEventActionsWithWeather, socialMediaFields, sortDatesChronologically, splitShareDescriptionSections, stallTypeOptions, statusOptions, stripOverlaySubtitleSpecialChars, tagOptions, timeFormat, toCalendarIsoDate, toGraphqlQueryString, toNZTime, toShareSocialImageCacheVersion, toUserFacingErrorMessage, truncateText, useActivateVendorClaim, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAssignAffiliateBonusReward, useAssignAffiliateResourceReward, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAffiliate, useDeleteAllNotifications, useDeleteChat, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAffiliate, useGetAffiliates, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetPrivateChats, useGetRelation, useGetRelationByEventAndVendor, useGetRelationChats, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useMyPendingVendorClaim, useRedeemAffiliateReward, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAffiliateDetails, useUpdateAppSettings, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
3684
+ export { ACTIVATE_VENDOR_CLAIM_MUTATION, ADMIN_APP_ROLES, ADMIN_DASHBOARD_CONTEXTS, AFFILIATE_PARTICIPANT_TYPE_LABELS, AFFILIATE_REWARDS, ANDROID_URL, type AdFormData, type AdFormState, type AdResource, type AdType, type AdminAppRole, type AdminDashboardContext, type AdminDashboardContextInfo, type AdminUpdateResourceType, type AffiliateBankAccountDetailsType, type AffiliateContactDetails, type AffiliateDetailsType, type AffiliateFormData, type AffiliateResourceType, type AffiliateRewardType, type AffiliateType, type AffiliateUserDefaultFields, type AppSettingsFormData, type AppSettingsType, type AuthMutationResponse, type AuthPayloadType, type BadgeBasename, type BadgeId, type BaseGameMap, type BaseGameType, type BaseResourceType, type BaseResourceTypeFormData, CLUEMART_MAIN_DOMAIN_URL, CM_AFFILIATE_PROMO_CODE, CM_SCHOOL_PROMO_CODE, type CalendarSheetContentData, type Category, type ChatMessageInput, type ChatMessageReaction, type ChatMessageReplyPreview, type ChatMessageSeen, type ChatMessageType, type ChatType, type CluiImageBasename, type CluiImageId, type ContactUsFormData, type CouponCodeType, type CouponParticipantUserType, type CouponType, type CouponTypeOption, type CouponTypeOptionWithType, type CreateAdFormData, type CreateAdFormState, type CreateAffiliateFormData, type CreateAppSettingsFormData, type CreateBulkNotificationInput, type CreateContactUsFormData, type CreateCouponTypeOptionParams, type CreateEventFormData, type CreateEventInfoFormData, type CreateFormData, type CreateLoginFormData, type CreatePartnerFormData, type CreatePostFormData, type CreateProductCouponFormData, type CreateRegisterFormData, type CreateRequestPasswordResetFormData, type CreateResetPasswordFormData, type CreateSchoolFormData, type CreateUnregisteredVendorFormData, type CreateUserFormData, type CreateValidateVerificationTokenFormData, type CreateVendorFormData, type CreateVendorInfoFormData, DEFAULT_RESOURCES_RETURN_LIMIT, DEFAULT_RESOURCES_RETURN_OFFSET, DEFAULT_SHARE_OG_IMAGE, DEFAULT_USER_FACING_ERROR, type DailyClueBaseGame, type DailyClueGameData, type DateTimeType, type DateTimeWithPriceType, type DeviceInfo, EVENT_DATE_STATUS_PERIOD_MAP, EnumActivity, EnumAdShowOn, EnumAdStatus, EnumAdStyle, EnumAdType, EnumAffiliateParticipantType, EnumAffiliateRewardType, EnumBillingPeriod, EnumChatReportReason, EnumChatType, EnumEventDateStatus, EnumEventType, EnumFoodFlavor, EnumFoodType, EnumGameStatus, EnumGameType, EnumInviteStatus, EnumNotificationResourceType, EnumNotificationType, EnumOSPlatform, EnumPartnerType, EnumPaymentMethod, EnumPostContentType, EnumPostType, EnumRegions, EnumRelationResource, EnumResourceType, EnumReward, EnumSocialMedia, EnumSubscriptionStatus, EnumUserLicence, EnumUserRole, EnumVendorType, EnumVerificationType, type EventFormData, type EventInfoFormData, type EventInfoType, type EventListItemType, type EventScheduleStatusPresentation, type EventScheduleStatusTone, type EventStatusType, type EventType, type FormDateField, type FormField, GET_EVENT, GET_EVENT_BY_SLUG, GET_EVENT_INFO, GET_PARTNER, GET_PARTNER_BY_SLUG, GET_POST, GET_POST_BY_SLUG, GET_RESOURCE_CONNECTIONS, GET_VENDOR, GET_VENDOR_BY_SLUG, GET_VENDOR_INFO, type GameDate, type GameDocType, type GameHistory, type GameLeaderboard, type GamePlacement, type GamePlacementClue, type GameType, type GeocodeLocation, type GlobalGameData, type GoogleAddressComponent, type GoogleImportedMarket, IMAGE_EXTENSION, IOS_URL, type IconBasename, type IconId, type ImageObjectType, ImageTypeEnum, KNOWN_EVENT_SCHEDULE_STATUSES, type LocationGeoType, type LocationType, type LoginFormData, type LogoBasename, type LogoId, MY_PENDING_VENDOR_CLAIM, type MarketingMaterialRequestInputType, type MutationResponse, type MyPendingVendorClaim, NETWORK_USER_FACING_ERROR, type NotificationCount, type NotificationDataType, type NotificationType, type Nullable, OG_DESCRIPTION_LINE_BREAK, type OptionItem, type OtherImagesBasename, type OtherImagesId, type OwnerType, PERMISSIONS, POST_SHARE_RESOURCE_TYPES, PROMO_CODE_PREFIX, PUBLIC_SHARE_PATH_TYPES, type ParticipantType, type PartnerFormData, type PartnerType, type PaymentInfoType, type Permission, type PostContentData, type PostContentFormData, type PostContentGame, type PostContentImage, type PostContentList, type PostContentTextarea, type PostContentType, type PostContentVideo, type PostFileInput, type PostFormData, type PostResource, type PostShareResourceType, type PostType, PostTypeLabels, type PosterAssetId, type PosterImageBasename, type PosterInputType, type PosterUsageType, type ProductCouponFormData, type ProductCouponType, type PromoCodeType, type PublicSharePathType, type PushTokenType, type PuzzleAnswer, type PuzzleAnsweredQuestion, type PuzzleBaseGame, type PuzzleGameData, type PuzzleQuestion, RELATION_OVERLAY_LAYOUT_VERSION, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, ROLE_PERMISSIONS, type RedeemHistoryType, type RedeemRewardInput, type RedeemRewardMutationResponse, type RedeemRewardResponse, type RedeemedReward, type RefreshTokenMutationResponse, type RefreshTokenPayloadType, type RefundPolicy, type Region, type RegisterFormData, type RelatedPostType, type RelationDate, type RelationInputType, type RelationSharePathType, type RelationShareResourceType, type RelationType$1 as RelationType, type ReportChatUser, type RequestPasswordResetFormData, type Requirement, type ResetPasswordFormData, type ResourceActivityEntry, type ResourceActivityInputType, type ResourceActivityType, type ResourceByUser, type ResourceConnectionsType, type ResourceContactDetailsType, type ResourceDetails, type ResourceImageType, type ResourceShareType, SAVED_EMAIL_KEY, SAVED_PASSWORD_KEY, SAVED_REFRESH_TOKEN_KEY, SAVED_TOKEN_KEY, SCHOOL_MAX_STUDENT_COUNT, SCHOOL_MIN_STUDENT_COUNT, SHARE_APPLICATION_DEADLINE_PREFIX, SHARE_CALENDAR_ICON, SHARE_CATEGORIES_SECTION_HEADING, SHARE_CATEGORY_ICON, SHARE_CHECKMARK_ICON, SHARE_CLOCK_ICON, SHARE_COMPLIANCE_PREFIX, SHARE_DESCRIPTION_SECTION_BREAK, SHARE_DOLLAR_ICON, SHARE_FOOD_TRUCK_LINE, SHARE_INFO_ICON, SHARE_MARKET_DATES_SECTION_HEADING, SHARE_MORE_INFO_LINE, SHARE_PRICE_RANGE_PREFIX, SHARE_RAIN_OR_SHINE_LINE, SHARE_REQUIREMENTS_SECTION_HEADING, SHARE_RESOURCE_LABEL, SHARE_RULER_ICON, SHARE_SITE_URL, SHARE_STALL_SIZE_PREFIX, SHARE_TAGS_SECTION_HEADING, SHARE_TYPE_PATH_REGEX, SOCIAL_IMAGE_HEIGHT, SOCIAL_IMAGE_WIDTH, type SafeUserType, type SchoolCampaignType, type SchoolFormData, type SchoolRegisteredUserType, type SchoolReturnType, type SchoolType, type ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareMessageFooterPlacement, type ShareResourceType, type ShareSlugResource, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, type SocialMediaType, type SocialShareResourceType, type StallType, type StallholderFilterOption, type StripeSubscription, type Subcategory, type SubcategoryItems, type SubscriptionPlanData, type SubscriptionPlansResponse, type SubscriptionPricingData, type SubscriptionStatusData, TIERS_BY_PRIORITY, TIER_DISPLAY_LABELS, TIER_FROM_LICENCE, type TermsAgreement, type Tier, USER_STORAGE_KEY, type UnregisteredVendorFormData, type UnregisteredVendorInvitationType, type UnregisteredVendorType, type UseGetResourcesByRegionOptions, type UserActivity, type UserActivityEvent, type UserFormData, type UserLicenceType, type UserType, type ValidateVerificationTokenFormData, type VendorAttributes, type VendorCalendarData, type VendorClaimTokenValidation, type VendorFormData, type VendorInfoFormData, type VendorInfoType, type VendorProductList, type VendorType, WILDCARD_PERMISSION, appendShareMoreInfoLine, availableCategories, availableRegionOptions, availableRegionTypes, availableTagTypes, badgeFiles, badgeIds, badges, bankAccountDetailsFields, buildApplicationShareDescription, buildCalendarSheetContentData, buildFacebookShareQuote, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareMessageSections, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, canAccessAdminApp, canAccessAdminPath, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, cluiFiles, cluiIds, cluiImages, collectStallholderStartDates, collectVendorEventRelationDateTimes, companyContactFields, computeDailyClueState, contactUsFields, createAffiliateReward, createCouponTypeOption, darkColors, dateFormat, emailField, eventBasicInfoFields, eventEndDateFields, eventHasSelectedDate, eventInfo, eventInfoPaymentInfo, eventMatchesDateStatusPeriod, eventStartDateFields, eventStartDatesSet, filterEventsByDateStatusPeriod, filterRegisteredVendorsByEventDatesOnly, filterRegisteredVendorsForEvent, filterUnregisteredVendorsByEventDatesOnly, filterUnregisteredVendorsForEvent, filterVendorEventsBySelectedDate, findEventDateTimeByIsoDate, fonts, foodFlavourOptions, formatCategoryLabel, formatDate, formatIrdNumber, formatNZBankAccount, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, formatTimestamp, fromCalendarIsoDate, futureTimePeriods, gameScreenIdentifierList, gameTypeToDisplayName, getAllowedEventDateStatuses, getCurrentAndFutureDates, getDefaultAdminHome, getErrorMessage, getEventCalendarIsoDates, getEventDatesWithStallholders, getEventScheduleStatusLabel, getEventScheduleStatusPresentation, getEventScheduleStatusTone, getEventStallholderEmptyMessage, getPermissionsForRoles, getRegisteredVendorCategoryNames, getRegisteredVendorStartDates, getStallholderCategoryNames, getStallholderCategoryOptions, getUnregisteredVendorCategoryNames, getUnregisteredVendorStartDates, getUsableAdminContexts, getVendorEventRelationDateOptions, getVendorEventRelationStartDates, getVendorEventsEmptyMessage, hasAllPermissions, hasAnyPermission, hasAnyRole, hasMatchingEventDate, hasPermission, hasRole, iconFiles, iconIds, icons, isFutureDatesBeforeThreshold, isInternalErrorMessage, isIsoDateString, isPostShareResourceType, isRelationShareResourceType, isResourceImageActive, isTransientNetworkError, isValidIrdNumber, joinShareDescriptionSections, joinShareOgDescriptionSections, licenseNiceNames, lightColors, loginFields, logoFiles, logoIds, logos, mapArrayToOptions, matchesCategory, matchesSelectedDate, normalizeIrdNumber, normalizeResourceImage, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, normalizeUrl, nzStartOfDay, otherImages, otherImagesFiles, otherImagesIds, packagingOptions, partnerBasicInfoFields, paymentMethodOptions, permissionListIncludes, posterFiles, posterIds, posters, priceUnits, producedIngOptions, productLabelGroups, profileFields, refundPolicyOptions, registerFields, relationHasSelectedDate, removeTypename, requestPasswordResetFields, requirementsOptions, resetPasswordFields, resolveAdminContextFromPath, resolveResourceImageActive, rewardNiceNames, seededShuffle, shareMessageFooterPlacementForType, shareSlugResourceId, shouldShowEventActionsWithWeather, socialMediaFields, sortDatesChronologically, splitShareDescriptionSections, stallTypeOptions, statusOptions, stripOverlaySubtitleSpecialChars, tagOptions, timeFormat, toCalendarIsoDate, toGraphqlQueryString, toNZTime, toShareSocialImageCacheVersion, toUserFacingErrorMessage, truncateText, useActivateVendorClaim, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, useAssignAffiliateBonusReward, useAssignAffiliateResourceReward, useCancelSubscription, useContactUs, useCrawlGoogleMarkets, useCreateAd, useCreateBulkNotifications, useCreateCheckoutSession, useCreateCoupon, useCreateCustomerPortal, useCreateEvent, useCreateEventInfo, useCreatePartner, useCreatePost, useCreatePoster, useCreatePrivateChat, useCreatePushToken, useCreateRelation, useCreateResourceActivity, useCreateSchool, useCreateUnregisteredVendor, useCreateUser, useCreateVendor, useCreateVendorInfo, useDeleteAd, useDeleteAffiliate, useDeleteAllNotifications, useDeleteChat, useDeleteCoupon, useDeleteEvent, useDeleteNotification, useDeletePartner, useDeletePost, useDeleteRelation, useDeleteSchool, useDeleteUnregisteredVendor, useDeleteUser, useDeleteVendor, useGetAd, useGetAds, useGetAdsByRegion, useGetAffiliate, useGetAffiliates, useGetAppSettings, useGetChat, useGetChatSubscription, useGetChatsByRegion, useGetCoupon, useGetCoupons, useGetEvent, useGetEventByPlaceId, useGetEventInfo, useGetEventRelations, useGetEvents, useGetEventsByRegion, useGetEventsNearMe, useGetGame, useGetGameLeaderboard, useGetGames, useGetNotificationCount, useGetNotificationCountSubscription, useGetPartner, useGetPartners, useGetPartnersByRegion, useGetPost, useGetPosts, useGetPostsByType, useGetPrivateChats, useGetRelation, useGetRelationByEventAndVendor, useGetRelationChats, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, useMyPendingVendorClaim, useRedeemAffiliateReward, useRedeemReward, useRefreshToken, useRegister, useRemoveParticipantFromChat, useRemoveUserFavouriteResource, useRemoveUserGoingResource, useRemoveUserInterestResource, useRemoveUserPresentResource, useReportChatUser, useRequestMarketingMaterial, useRequestPasswordReset, useResetPassword, useSearchEvents, useSearchPartners, useSearchVendors, useSelectPackage, useSelectStandardPackage, useSendChatMessage, useStartGame, useToggleChatMessageLike, useUnlinkUnregisteredVendorByInviterId, useUpdateAd, useUpdateAffiliateDetails, useUpdateAppSettings, useUpdateCoupon, useUpdateDailyClueGame, useUpdateEvent, useUpdateEventInfo, useUpdateGoogleImportedMarkets, useUpdatePartner, useUpdatePost, useUpdatePuzzleGame, useUpdateRelation, useUpdateSchool, useUpdateSubscriptionPlan, useUpdateUnregisteredVendor, useUpdateUser, useUpdateVendor, useUpdateVendorInfo, useValidateVerificationToken, validateVerificationTokenFields, vendorAvailability, vendorBasicInfoFields, vendorCompliance, vendorElectricity, vendorEndDateFields, vendorFoodFlavour, vendorFullAddress, vendorGazebo, vendorLocationDescription, vendorMenuFields, vendorPackaging, vendorPriceRange, vendorProducedIn, vendorStallSize, vendorStartDateFields, vendorTable };
package/dist/index.mjs CHANGED
@@ -6076,7 +6076,7 @@ var useGetVendor = (_id) => {
6076
6076
  variables: { _id }
6077
6077
  }
6078
6078
  );
6079
- const vendor = data?.vendor;
6079
+ const vendor = data?.vendor || null;
6080
6080
  return { error, loading, refetch, vendor };
6081
6081
  };
6082
6082
  var useGetVendorsByRegion = (region, options) => {
@@ -7938,6 +7938,153 @@ var useAssignAffiliateBonusReward = () => {
7938
7938
  return { assignAffiliateBonusReward, error, loading };
7939
7939
  };
7940
7940
 
7941
+ // src/graphql/hooks/coupon/hooksMutation.ts
7942
+ import { useMutation as useMutation21 } from "@apollo/client";
7943
+
7944
+ // src/graphql/mutations/coupon.ts
7945
+ import { gql as gql43 } from "@apollo/client";
7946
+
7947
+ // src/graphql/queries/coupon.ts
7948
+ import { gql as gql42 } from "@apollo/client";
7949
+ var COUPON_CODE_FIELDS_FRAGMENT = gql42`
7950
+ fragment CouponCodeFields on CouponCodeType {
7951
+ code
7952
+ qrCode {
7953
+ ...ResourceImageFields
7954
+ }
7955
+ }
7956
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
7957
+ `;
7958
+ var COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = gql42`
7959
+ fragment CouponParticipantUserFields on CouponParticipantUserType {
7960
+ couponCount
7961
+ couponRedeemedAt
7962
+ createdAt
7963
+ updatedAt
7964
+ userId
7965
+ }
7966
+ `;
7967
+ var PRODUCT_COUPON_FIELDS_FRAGMENT = gql42`
7968
+ fragment ProductCouponFields on ProductCouponType {
7969
+ _id
7970
+ active
7971
+ couponCode {
7972
+ ...CouponCodeFields
7973
+ }
7974
+ couponDescription
7975
+ couponOption
7976
+ createdAt
7977
+ endDate
7978
+ participantProduct {
7979
+ ...VendorProductListFields
7980
+ }
7981
+ participantUsers {
7982
+ ...CouponParticipantUserFields
7983
+ }
7984
+ startDate
7985
+ updatedAt
7986
+ }
7987
+ ${COUPON_CODE_FIELDS_FRAGMENT}
7988
+ ${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
7989
+ ${VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT}
7990
+ `;
7991
+ var COUPON = gql42`
7992
+ fragment CouponFields on CouponType {
7993
+ _id
7994
+ active
7995
+ productCoupons {
7996
+ ...ProductCouponFields
7997
+ }
7998
+ createdAt
7999
+ deletedAt
8000
+ updatedAt
8001
+ }
8002
+ ${PRODUCT_COUPON_FIELDS_FRAGMENT}
8003
+ ${COUPON_CODE_FIELDS_FRAGMENT}
8004
+ ${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
8005
+ `;
8006
+ var GET_COUPONS = gql42`
8007
+ query getCoupons {
8008
+ coupons {
8009
+ ...CouponFields
8010
+ }
8011
+ }
8012
+ ${COUPON}
8013
+ `;
8014
+ var GET_COUPON = gql42`
8015
+ query getCoupon($_id: ID!) {
8016
+ coupon(_id: $_id) {
8017
+ ...CouponFields
8018
+ }
8019
+ }
8020
+ ${COUPON}
8021
+ `;
8022
+
8023
+ // src/graphql/mutations/coupon.ts
8024
+ var CREATE_COUPON_MUTATION = gql43`
8025
+ mutation createCoupon($input: CouponInputType!) {
8026
+ createCoupon(input: $input) {
8027
+ data {
8028
+ ...CouponFields
8029
+ }
8030
+ message
8031
+ }
8032
+ }
8033
+ ${COUPON}
8034
+ `;
8035
+ var UPDATE_COUPON_MUTATION = gql43`
8036
+ mutation updateCoupon($_id: ID!, $input: CouponInputType!) {
8037
+ updateCoupon(_id: $_id, input: $input) {
8038
+ data {
8039
+ ...CouponFields
8040
+ }
8041
+ message
8042
+ }
8043
+ }
8044
+ ${COUPON}
8045
+ `;
8046
+ var DELETE_COUPON_MUTATION = gql43`
8047
+ mutation deleteCoupon($_id: ID!) {
8048
+ deleteCoupon(_id: $_id) {
8049
+ data
8050
+ message
8051
+ }
8052
+ }
8053
+ `;
8054
+
8055
+ // src/graphql/hooks/coupon/hooksMutation.ts
8056
+ var useCreateCoupon = () => {
8057
+ const [createCoupon, { loading, error }] = useMutation21(CREATE_COUPON_MUTATION);
8058
+ return { createCoupon, error, loading };
8059
+ };
8060
+ var useUpdateCoupon = () => {
8061
+ const [updateCoupon, { loading, error }] = useMutation21(UPDATE_COUPON_MUTATION);
8062
+ return { error, loading, updateCoupon };
8063
+ };
8064
+ var useDeleteCoupon = () => {
8065
+ const [deleteCoupon, { loading, error }] = useMutation21(DELETE_COUPON_MUTATION);
8066
+ return { deleteCoupon, error, loading };
8067
+ };
8068
+
8069
+ // src/graphql/hooks/coupon/hooksQuery.ts
8070
+ import { useQuery as useQuery16 } from "@apollo/client";
8071
+ var useGetCoupons = () => {
8072
+ const { loading, error, data, refetch } = useQuery16(GET_COUPONS, {
8073
+ fetchPolicy: "network-only"
8074
+ });
8075
+ const coupons = data?.coupons || [];
8076
+ return { coupons, error, loading, refetch };
8077
+ };
8078
+ var useGetCoupon = (_id) => {
8079
+ const { loading, error, data, refetch } = useQuery16(GET_COUPON, {
8080
+ fetchPolicy: "network-only",
8081
+ skip: !_id || _id === "",
8082
+ variables: { _id }
8083
+ });
8084
+ const coupon = data?.coupon || null;
8085
+ return { coupon, error, loading, refetch };
8086
+ };
8087
+
7941
8088
  // src/images/index.ts
7942
8089
  var PKG = "@timardex/cluemart-shared";
7943
8090
  var IMAGE_EXTENSION = ".webp";
@@ -8796,6 +8943,7 @@ export {
8796
8943
  useCreateAd,
8797
8944
  useCreateBulkNotifications,
8798
8945
  useCreateCheckoutSession,
8946
+ useCreateCoupon,
8799
8947
  useCreateCustomerPortal,
8800
8948
  useCreateEvent,
8801
8949
  useCreateEventInfo,
@@ -8815,6 +8963,7 @@ export {
8815
8963
  useDeleteAffiliate,
8816
8964
  useDeleteAllNotifications,
8817
8965
  useDeleteChat,
8966
+ useDeleteCoupon,
8818
8967
  useDeleteEvent,
8819
8968
  useDeleteNotification,
8820
8969
  useDeletePartner,
@@ -8833,6 +8982,8 @@ export {
8833
8982
  useGetChat,
8834
8983
  useGetChatSubscription,
8835
8984
  useGetChatsByRegion,
8985
+ useGetCoupon,
8986
+ useGetCoupons,
8836
8987
  useGetEvent,
8837
8988
  useGetEventByPlaceId,
8838
8989
  useGetEventInfo,
@@ -8911,6 +9062,7 @@ export {
8911
9062
  useUpdateAd,
8912
9063
  useUpdateAffiliateDetails,
8913
9064
  useUpdateAppSettings,
9065
+ useUpdateCoupon,
8914
9066
  useUpdateDailyClueGame,
8915
9067
  useUpdateEvent,
8916
9068
  useUpdateEventInfo,