@timardex/cluemart-shared 1.5.829 → 1.5.831
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ad-CZBOdoLr.d.mts → ad-Cu-M8Xzf.d.mts} +2 -2
- package/dist/{ad-CCm6QYXb.d.ts → ad-DfqgAPOk.d.ts} +2 -2
- package/dist/auth/index.cjs +107 -36
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.mts +28 -6
- package/dist/auth/index.d.ts +28 -6
- package/dist/auth/index.mjs +19 -13
- package/dist/auth/index.mjs.map +1 -1
- package/dist/{chunk-KMLUQVNM.mjs → chunk-43SLZVBF.mjs} +1 -1
- package/dist/chunk-43SLZVBF.mjs.map +1 -0
- package/dist/{chunk-MOB5R5BF.mjs → chunk-G3CMTXQV.mjs} +2 -3
- package/dist/chunk-G3CMTXQV.mjs.map +1 -0
- package/dist/{chunk-AQR53ECY.mjs → chunk-LN5LS2GJ.mjs} +3 -3
- package/dist/{chunk-Y62E7JLT.mjs → chunk-NU7IZZQY.mjs} +2 -2
- package/dist/{chunk-UOFI3LKZ.mjs → chunk-P4XULG5P.mjs} +1 -28
- package/dist/chunk-P4XULG5P.mjs.map +1 -0
- package/dist/{chunk-VNF22ITY.mjs → chunk-SWWVD4J5.mjs} +2 -2
- package/dist/{chunk-JL4MCXKK.mjs → chunk-VPANTTZI.mjs} +101 -2
- package/dist/chunk-VPANTTZI.mjs.map +1 -0
- package/dist/{chunk-VR3TDBJL.mjs → chunk-X3OLM35T.mjs} +1 -4
- package/dist/chunk-X3OLM35T.mjs.map +1 -0
- package/dist/{chunk-4NGXTQWT.mjs → chunk-YKJUZUAP.mjs} +4 -4
- package/dist/{contactUs-b5SfvqmJ.d.mts → contactUs-09e9ThN0.d.mts} +1 -1
- package/dist/{contactUs-Bwxzw-cB.d.ts → contactUs-DI70VJ9T.d.ts} +1 -1
- package/dist/enums/index.cjs +0 -3
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +0 -3
- package/dist/enums/index.d.ts +0 -3
- package/dist/enums/index.mjs +1 -1
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.d.mts +1 -1
- package/dist/formFields/index.d.ts +1 -1
- package/dist/formFields/index.mjs +5 -5
- package/dist/{global-wVC9VaCx.d.ts → global--iSLy2cE.d.ts} +2 -9
- package/dist/{global-959zf6qy.d.mts → global-BHwZPjT8.d.mts} +2 -9
- package/dist/graphql/index.cjs +0 -28
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +4 -4
- package/dist/graphql/index.d.ts +4 -4
- package/dist/graphql/index.mjs +3 -3
- package/dist/hooks/index.cjs +56 -61
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +4 -4
- package/dist/hooks/index.d.ts +4 -4
- package/dist/hooks/index.mjs +10 -31
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +106 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +25 -14
- package/dist/index.d.ts +25 -14
- package/dist/index.mjs +99 -31
- package/dist/index.mjs.map +1 -1
- package/dist/map/index.d.mts +1 -1
- package/dist/map/index.d.ts +1 -1
- package/dist/{resourceActivities-ZPT9JlfH.d.mts → resourceActivities-BDIjVrI4.d.mts} +1 -2
- package/dist/{resourceActivities-ChZcl5wJ.d.ts → resourceActivities-JNcJxpTh.d.ts} +1 -2
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.d.mts +1 -1
- package/dist/sharing/index.d.ts +1 -1
- package/dist/sharing/index.mjs +3 -3
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +6 -6
- package/dist/types/index.d.ts +6 -6
- package/dist/types/index.mjs +2 -2
- package/dist/{user-duZdr5Nn.d.mts → user-Bhkd3l06.d.mts} +1 -2
- package/dist/{user-IVhCYYTM.d.ts → user-C_kCo0Fm.d.ts} +1 -2
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.mjs +4 -4
- package/package.json +1 -1
- package/dist/chunk-JL4MCXKK.mjs.map +0 -1
- package/dist/chunk-KMLUQVNM.mjs.map +0 -1
- package/dist/chunk-MOB5R5BF.mjs.map +0 -1
- package/dist/chunk-UOFI3LKZ.mjs.map +0 -1
- package/dist/chunk-VR3TDBJL.mjs.map +0 -1
- /package/dist/{chunk-AQR53ECY.mjs.map → chunk-LN5LS2GJ.mjs.map} +0 -0
- /package/dist/{chunk-Y62E7JLT.mjs.map → chunk-NU7IZZQY.mjs.map} +0 -0
- /package/dist/{chunk-VNF22ITY.mjs.map → chunk-SWWVD4J5.mjs.map} +0 -0
- /package/dist/{chunk-4NGXTQWT.mjs.map → chunk-YKJUZUAP.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -110,9 +110,6 @@ declare enum EnumRelationResource {
|
|
|
110
110
|
VENDOR_APPLICATION_TO_EVENT = "vendor_application_to_event"
|
|
111
111
|
}
|
|
112
112
|
declare enum EnumNotificationResourceType {
|
|
113
|
-
ADDED_AS_ASSOCIATE_EVENT = "added_as_associate_event",
|
|
114
|
-
ADDED_AS_ASSOCIATE_PARTNER = "added_as_associate_partner",
|
|
115
|
-
ADDED_AS_ASSOCIATE_VENDOR = "added_as_associate_vendor",
|
|
116
113
|
APPROVED_AFFILIATE = "approved_affiliate",
|
|
117
114
|
AFFILIATE_REWARD_RECEIVED = "affiliate_reward_received",
|
|
118
115
|
APPROVED_EVENT = "approved_event",
|
|
@@ -329,7 +326,7 @@ interface EventType extends BaseResourceType {
|
|
|
329
326
|
sharePublic?: SocialShareResourceType | null;
|
|
330
327
|
shareRelation?: SocialShareResourceType | null;
|
|
331
328
|
}
|
|
332
|
-
type EventListItemType = Omit<EventType, "adIds" | "
|
|
329
|
+
type EventListItemType = Omit<EventType, "adIds" | "contactDetails" | "eventInfoId" | "nzbn" | "owner" | "posterUsage" | "promoCodes" | "provider" | "relatedPost" | "socialMedia" | "socialShare" | "tags" | "termsAgreement">;
|
|
333
330
|
type EventInfoType = Omit<EventInfoFormData, "_id"> & {
|
|
334
331
|
_id: string;
|
|
335
332
|
active?: boolean;
|
|
@@ -770,12 +767,6 @@ type UserLicenceType = {
|
|
|
770
767
|
licenceType: EnumUserLicence;
|
|
771
768
|
prevLicenceType?: EnumUserLicence | null;
|
|
772
769
|
};
|
|
773
|
-
type AssociateType = {
|
|
774
|
-
email: string;
|
|
775
|
-
resourceId: string;
|
|
776
|
-
resourceType: EnumResourceType;
|
|
777
|
-
licence: UserLicenceType;
|
|
778
|
-
};
|
|
779
770
|
type OwnerType = {
|
|
780
771
|
email: string;
|
|
781
772
|
userId: string;
|
|
@@ -783,7 +774,6 @@ type OwnerType = {
|
|
|
783
774
|
interface BaseResourceTypeFormData {
|
|
784
775
|
_id?: string;
|
|
785
776
|
active: boolean;
|
|
786
|
-
associates: AssociateType[] | null;
|
|
787
777
|
contactDetails: ResourceContactDetailsType | null;
|
|
788
778
|
cover: ResourceImageType;
|
|
789
779
|
coverUpload?: ResourceImageType | null;
|
|
@@ -953,6 +943,29 @@ interface AdminUpdateResourceType {
|
|
|
953
943
|
resourceType: EnumResourceType;
|
|
954
944
|
}
|
|
955
945
|
|
|
946
|
+
/** Roles allowed to sign into the admin web app (CUSTOMER-only is denied). */
|
|
947
|
+
declare const ADMIN_APP_ROLES: readonly [EnumUserRole.SUPER_ADMIN, EnumUserRole.ADMIN, EnumUserRole.EVENT, EnumUserRole.VENDOR, EnumUserRole.PARTNER, EnumUserRole.SCHOOL, EnumUserRole.AFFILIATE];
|
|
948
|
+
type AdminAppRole = (typeof ADMIN_APP_ROLES)[number];
|
|
949
|
+
type AdminDashboardContext = "staff" | "event" | "vendor" | "partner" | "school" | "affiliate";
|
|
950
|
+
type AdminDashboardContextInfo = {
|
|
951
|
+
context: AdminDashboardContext;
|
|
952
|
+
home: string;
|
|
953
|
+
label: string;
|
|
954
|
+
/** Path prefixes that belong to this context (including home). */
|
|
955
|
+
pathPrefixes: readonly string[];
|
|
956
|
+
roles: readonly EnumUserRole[];
|
|
957
|
+
};
|
|
958
|
+
/**
|
|
959
|
+
* Priority order for default home + role switcher.
|
|
960
|
+
* Staff first, then product roles.
|
|
961
|
+
*/
|
|
962
|
+
declare const ADMIN_DASHBOARD_CONTEXTS: readonly AdminDashboardContextInfo[];
|
|
963
|
+
declare function canAccessAdminApp(roles: EnumUserRole[] | null | undefined): boolean;
|
|
964
|
+
declare function getUsableAdminContexts(roles: EnumUserRole[] | null | undefined): AdminDashboardContextInfo[];
|
|
965
|
+
declare function getDefaultAdminHome(roles: EnumUserRole[] | null | undefined, preferredContext?: AdminDashboardContext | null): string;
|
|
966
|
+
declare function resolveAdminContextFromPath(pathname: string): AdminDashboardContext | null;
|
|
967
|
+
declare function canAccessAdminPath(roles: EnumUserRole[] | null | undefined, pathname: string): boolean;
|
|
968
|
+
|
|
956
969
|
/**
|
|
957
970
|
* Canonical permission IDs. Add new permissions here first, then map them in
|
|
958
971
|
* ROLE_PERMISSIONS. Prefer resource.action names (e.g. users.read).
|
|
@@ -1074,7 +1087,6 @@ type RedeemedReward = {
|
|
|
1074
1087
|
type UserType = Omit<UserFormData, "confirmPassword" | "avatarUpload" | "_id"> & {
|
|
1075
1088
|
_id: string;
|
|
1076
1089
|
affiliate?: string | null;
|
|
1077
|
-
associates?: AssociateType[] | null;
|
|
1078
1090
|
createdAt: Date;
|
|
1079
1091
|
deletedAt: Date | null;
|
|
1080
1092
|
events: string[] | null;
|
|
@@ -1155,7 +1167,6 @@ type RefreshTokenPayloadType = {
|
|
|
1155
1167
|
|
|
1156
1168
|
type ParticipantType = {
|
|
1157
1169
|
active: boolean;
|
|
1158
|
-
isAssociate?: boolean | null;
|
|
1159
1170
|
userAvatar: string | null;
|
|
1160
1171
|
userEmail: string;
|
|
1161
1172
|
userId: string;
|
|
@@ -3261,4 +3272,4 @@ declare function toUserFacingErrorMessage(error: string | null | undefined, fall
|
|
|
3261
3272
|
/** Extracts and sanitizes an unknown catch/Apollo error for toasts and alerts. */
|
|
3262
3273
|
declare function getErrorMessage(error: unknown, fallback?: string): string;
|
|
3263
3274
|
|
|
3264
|
-
export { AFFILIATE_PARTICIPANT_TYPE_LABELS, ANDROID_URL, type AdFormData, type AdFormState, type AdResource, type AdType, type AdminUpdateResourceType, type AffiliateBankAccountDetailsType, type AffiliateContactDetails, type AffiliateDetailsType, type AffiliateFormData, type AffiliateResourceType, type AffiliateRewardType, type AffiliateType, type AffiliateUserDefaultFields, type AppSettingsFormData, type AppSettingsType, type AssociateType, 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, type MarketingMaterialRequestInputType, 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 RedeemRewardResponse, type RedeemedReward, 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 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, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, cluiFiles, cluiIds, cluiImages, collectStallholderStartDates, collectVendorEventRelationDateTimes, companyContactFields, computeDailyClueState, contactUsFields, 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, getErrorMessage, getEventCalendarIsoDates, getEventDatesWithStallholders, getEventScheduleStatusLabel, getEventScheduleStatusPresentation, getEventScheduleStatusTone, getEventStallholderEmptyMessage, getPermissionsForRoles, getRegisteredVendorCategoryNames, getRegisteredVendorStartDates, getStallholderCategoryNames, getStallholderCategoryOptions, getUnregisteredVendorCategoryNames, getUnregisteredVendorStartDates, 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, resolveResourceImageActive, rewardNiceNames, seededShuffle, shareMessageFooterPlacementForType, shareSlugResourceId, shouldShowEventActionsWithWeather, socialMediaFields, sortDatesChronologically, splitShareDescriptionSections, stallTypeOptions, statusOptions, stripOverlaySubtitleSpecialChars, tagOptions, timeFormat, toCalendarIsoDate, toGraphqlQueryString, toNZTime, toShareSocialImageCacheVersion, toUserFacingErrorMessage, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, 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, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, 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 };
|
|
3275
|
+
export { ADMIN_APP_ROLES, ADMIN_DASHBOARD_CONTEXTS, AFFILIATE_PARTICIPANT_TYPE_LABELS, 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 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, type MarketingMaterialRequestInputType, 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 RedeemRewardResponse, type RedeemedReward, 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 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, 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, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, 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, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -110,9 +110,6 @@ declare enum EnumRelationResource {
|
|
|
110
110
|
VENDOR_APPLICATION_TO_EVENT = "vendor_application_to_event"
|
|
111
111
|
}
|
|
112
112
|
declare enum EnumNotificationResourceType {
|
|
113
|
-
ADDED_AS_ASSOCIATE_EVENT = "added_as_associate_event",
|
|
114
|
-
ADDED_AS_ASSOCIATE_PARTNER = "added_as_associate_partner",
|
|
115
|
-
ADDED_AS_ASSOCIATE_VENDOR = "added_as_associate_vendor",
|
|
116
113
|
APPROVED_AFFILIATE = "approved_affiliate",
|
|
117
114
|
AFFILIATE_REWARD_RECEIVED = "affiliate_reward_received",
|
|
118
115
|
APPROVED_EVENT = "approved_event",
|
|
@@ -329,7 +326,7 @@ interface EventType extends BaseResourceType {
|
|
|
329
326
|
sharePublic?: SocialShareResourceType | null;
|
|
330
327
|
shareRelation?: SocialShareResourceType | null;
|
|
331
328
|
}
|
|
332
|
-
type EventListItemType = Omit<EventType, "adIds" | "
|
|
329
|
+
type EventListItemType = Omit<EventType, "adIds" | "contactDetails" | "eventInfoId" | "nzbn" | "owner" | "posterUsage" | "promoCodes" | "provider" | "relatedPost" | "socialMedia" | "socialShare" | "tags" | "termsAgreement">;
|
|
333
330
|
type EventInfoType = Omit<EventInfoFormData, "_id"> & {
|
|
334
331
|
_id: string;
|
|
335
332
|
active?: boolean;
|
|
@@ -770,12 +767,6 @@ type UserLicenceType = {
|
|
|
770
767
|
licenceType: EnumUserLicence;
|
|
771
768
|
prevLicenceType?: EnumUserLicence | null;
|
|
772
769
|
};
|
|
773
|
-
type AssociateType = {
|
|
774
|
-
email: string;
|
|
775
|
-
resourceId: string;
|
|
776
|
-
resourceType: EnumResourceType;
|
|
777
|
-
licence: UserLicenceType;
|
|
778
|
-
};
|
|
779
770
|
type OwnerType = {
|
|
780
771
|
email: string;
|
|
781
772
|
userId: string;
|
|
@@ -783,7 +774,6 @@ type OwnerType = {
|
|
|
783
774
|
interface BaseResourceTypeFormData {
|
|
784
775
|
_id?: string;
|
|
785
776
|
active: boolean;
|
|
786
|
-
associates: AssociateType[] | null;
|
|
787
777
|
contactDetails: ResourceContactDetailsType | null;
|
|
788
778
|
cover: ResourceImageType;
|
|
789
779
|
coverUpload?: ResourceImageType | null;
|
|
@@ -953,6 +943,29 @@ interface AdminUpdateResourceType {
|
|
|
953
943
|
resourceType: EnumResourceType;
|
|
954
944
|
}
|
|
955
945
|
|
|
946
|
+
/** Roles allowed to sign into the admin web app (CUSTOMER-only is denied). */
|
|
947
|
+
declare const ADMIN_APP_ROLES: readonly [EnumUserRole.SUPER_ADMIN, EnumUserRole.ADMIN, EnumUserRole.EVENT, EnumUserRole.VENDOR, EnumUserRole.PARTNER, EnumUserRole.SCHOOL, EnumUserRole.AFFILIATE];
|
|
948
|
+
type AdminAppRole = (typeof ADMIN_APP_ROLES)[number];
|
|
949
|
+
type AdminDashboardContext = "staff" | "event" | "vendor" | "partner" | "school" | "affiliate";
|
|
950
|
+
type AdminDashboardContextInfo = {
|
|
951
|
+
context: AdminDashboardContext;
|
|
952
|
+
home: string;
|
|
953
|
+
label: string;
|
|
954
|
+
/** Path prefixes that belong to this context (including home). */
|
|
955
|
+
pathPrefixes: readonly string[];
|
|
956
|
+
roles: readonly EnumUserRole[];
|
|
957
|
+
};
|
|
958
|
+
/**
|
|
959
|
+
* Priority order for default home + role switcher.
|
|
960
|
+
* Staff first, then product roles.
|
|
961
|
+
*/
|
|
962
|
+
declare const ADMIN_DASHBOARD_CONTEXTS: readonly AdminDashboardContextInfo[];
|
|
963
|
+
declare function canAccessAdminApp(roles: EnumUserRole[] | null | undefined): boolean;
|
|
964
|
+
declare function getUsableAdminContexts(roles: EnumUserRole[] | null | undefined): AdminDashboardContextInfo[];
|
|
965
|
+
declare function getDefaultAdminHome(roles: EnumUserRole[] | null | undefined, preferredContext?: AdminDashboardContext | null): string;
|
|
966
|
+
declare function resolveAdminContextFromPath(pathname: string): AdminDashboardContext | null;
|
|
967
|
+
declare function canAccessAdminPath(roles: EnumUserRole[] | null | undefined, pathname: string): boolean;
|
|
968
|
+
|
|
956
969
|
/**
|
|
957
970
|
* Canonical permission IDs. Add new permissions here first, then map them in
|
|
958
971
|
* ROLE_PERMISSIONS. Prefer resource.action names (e.g. users.read).
|
|
@@ -1074,7 +1087,6 @@ type RedeemedReward = {
|
|
|
1074
1087
|
type UserType = Omit<UserFormData, "confirmPassword" | "avatarUpload" | "_id"> & {
|
|
1075
1088
|
_id: string;
|
|
1076
1089
|
affiliate?: string | null;
|
|
1077
|
-
associates?: AssociateType[] | null;
|
|
1078
1090
|
createdAt: Date;
|
|
1079
1091
|
deletedAt: Date | null;
|
|
1080
1092
|
events: string[] | null;
|
|
@@ -1155,7 +1167,6 @@ type RefreshTokenPayloadType = {
|
|
|
1155
1167
|
|
|
1156
1168
|
type ParticipantType = {
|
|
1157
1169
|
active: boolean;
|
|
1158
|
-
isAssociate?: boolean | null;
|
|
1159
1170
|
userAvatar: string | null;
|
|
1160
1171
|
userEmail: string;
|
|
1161
1172
|
userId: string;
|
|
@@ -3261,4 +3272,4 @@ declare function toUserFacingErrorMessage(error: string | null | undefined, fall
|
|
|
3261
3272
|
/** Extracts and sanitizes an unknown catch/Apollo error for toasts and alerts. */
|
|
3262
3273
|
declare function getErrorMessage(error: unknown, fallback?: string): string;
|
|
3263
3274
|
|
|
3264
|
-
export { AFFILIATE_PARTICIPANT_TYPE_LABELS, ANDROID_URL, type AdFormData, type AdFormState, type AdResource, type AdType, type AdminUpdateResourceType, type AffiliateBankAccountDetailsType, type AffiliateContactDetails, type AffiliateDetailsType, type AffiliateFormData, type AffiliateResourceType, type AffiliateRewardType, type AffiliateType, type AffiliateUserDefaultFields, type AppSettingsFormData, type AppSettingsType, type AssociateType, 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, type MarketingMaterialRequestInputType, 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 RedeemRewardResponse, type RedeemedReward, 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 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, capitalizeFirstLetter, categoryColors, cluemartSocialMedia, cluiFiles, cluiIds, cluiImages, collectStallholderStartDates, collectVendorEventRelationDateTimes, companyContactFields, computeDailyClueState, contactUsFields, 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, getErrorMessage, getEventCalendarIsoDates, getEventDatesWithStallholders, getEventScheduleStatusLabel, getEventScheduleStatusPresentation, getEventScheduleStatusTone, getEventStallholderEmptyMessage, getPermissionsForRoles, getRegisteredVendorCategoryNames, getRegisteredVendorStartDates, getStallholderCategoryNames, getStallholderCategoryOptions, getUnregisteredVendorCategoryNames, getUnregisteredVendorStartDates, 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, resolveResourceImageActive, rewardNiceNames, seededShuffle, shareMessageFooterPlacementForType, shareSlugResourceId, shouldShowEventActionsWithWeather, socialMediaFields, sortDatesChronologically, splitShareDescriptionSections, stallTypeOptions, statusOptions, stripOverlaySubtitleSpecialChars, tagOptions, timeFormat, toCalendarIsoDate, toGraphqlQueryString, toNZTime, toShareSocialImageCacheVersion, toUserFacingErrorMessage, truncateText, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, 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, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, 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 };
|
|
3275
|
+
export { ADMIN_APP_ROLES, ADMIN_DASHBOARD_CONTEXTS, AFFILIATE_PARTICIPANT_TYPE_LABELS, 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 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, type MarketingMaterialRequestInputType, 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 RedeemRewardResponse, type RedeemedReward, 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 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, 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, useAddParticipantToChat, useAddUserFavouriteResource, useAddUserGoingResource, useAddUserInterestResource, useAddUserPresentResource, useAdminPermanentlyDeleteResource, useAdminResendUserVerificationEmail, useAdminUpdateResourceType, 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, useGetRelation, useGetRelationByEventAndVendor, useGetReportedChatUsers, useGetResourceActivity, useGetResourceConnections, useGetSchool, useGetSchools, useGetSubscriptionPlans, useGetSubscriptionStatus, useGetUnregisteredVendor, useGetUnregisteredVendors, useGetUnregisteredVendorsByInviterId, useGetUser, useGetUserActivities, useGetUserChats, useGetUserEvents, useGetUserNotifications, useGetUserNotificationsSubscription, useGetUserPartners, useGetUserResources, useGetUserVendors, useGetUsers, useGetVendor, useGetVendorInfo, useGetVendorRelations, useGetVendors, useGetVendorsByRegion, useLeaveGame, useLogin, useLogout, useMarkAllNotificationsRead, useMarkChatMessagesSeen, useMarkNotificationRead, 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 };
|
package/dist/index.mjs
CHANGED
|
@@ -118,9 +118,6 @@ var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource2) => {
|
|
|
118
118
|
return EnumRelationResource2;
|
|
119
119
|
})(EnumRelationResource || {});
|
|
120
120
|
var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceType2) => {
|
|
121
|
-
EnumNotificationResourceType2["ADDED_AS_ASSOCIATE_EVENT"] = "added_as_associate_event";
|
|
122
|
-
EnumNotificationResourceType2["ADDED_AS_ASSOCIATE_PARTNER"] = "added_as_associate_partner";
|
|
123
|
-
EnumNotificationResourceType2["ADDED_AS_ASSOCIATE_VENDOR"] = "added_as_associate_vendor";
|
|
124
121
|
EnumNotificationResourceType2["APPROVED_AFFILIATE"] = "approved_affiliate";
|
|
125
122
|
EnumNotificationResourceType2["AFFILIATE_REWARD_RECEIVED"] = "affiliate_reward_received";
|
|
126
123
|
EnumNotificationResourceType2["APPROVED_EVENT"] = "approved_event";
|
|
@@ -3271,17 +3268,6 @@ var LICENCE_FIELDS_FRAGMENT = gql`
|
|
|
3271
3268
|
prevLicenceType
|
|
3272
3269
|
}
|
|
3273
3270
|
`;
|
|
3274
|
-
var ASSOCIATES_FIELDS_FRAGMENT = gql`
|
|
3275
|
-
fragment AssociatesFields on AssociateType {
|
|
3276
|
-
email
|
|
3277
|
-
resourceId
|
|
3278
|
-
resourceType
|
|
3279
|
-
licence {
|
|
3280
|
-
...LicenceFields
|
|
3281
|
-
}
|
|
3282
|
-
}
|
|
3283
|
-
${LICENCE_FIELDS_FRAGMENT}
|
|
3284
|
-
`;
|
|
3285
3271
|
var TERMS_AGREEMENT_FIELDS_FRAGMENT = gql`
|
|
3286
3272
|
fragment TermsAgreementFields on TermsAgreementType {
|
|
3287
3273
|
appBuildNumber
|
|
@@ -3372,9 +3358,6 @@ var USER_FIELDS_FRAGMENT = gql`
|
|
|
3372
3358
|
fragment UserFields on UserType {
|
|
3373
3359
|
_id
|
|
3374
3360
|
active
|
|
3375
|
-
associates {
|
|
3376
|
-
...AssociatesFields
|
|
3377
|
-
}
|
|
3378
3361
|
affiliate
|
|
3379
3362
|
avatar {
|
|
3380
3363
|
...ResourceImageFields
|
|
@@ -3414,7 +3397,6 @@ var USER_FIELDS_FRAGMENT = gql`
|
|
|
3414
3397
|
updatedAt
|
|
3415
3398
|
}
|
|
3416
3399
|
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
3417
|
-
${ASSOCIATES_FIELDS_FRAGMENT}
|
|
3418
3400
|
${TERMS_AGREEMENT_FIELDS_FRAGMENT}
|
|
3419
3401
|
${USER_ACTIVITY_FIELDS_FRAGMENT}
|
|
3420
3402
|
${LICENCE_FIELDS_FRAGMENT}
|
|
@@ -3562,9 +3544,6 @@ var EVENT = gql2`
|
|
|
3562
3544
|
fragment EventFields on EventType {
|
|
3563
3545
|
_id
|
|
3564
3546
|
active
|
|
3565
|
-
associates {
|
|
3566
|
-
...AssociatesFields
|
|
3567
|
-
}
|
|
3568
3547
|
adIds
|
|
3569
3548
|
approvedAt
|
|
3570
3549
|
cover {
|
|
@@ -3637,7 +3616,6 @@ var EVENT = gql2`
|
|
|
3637
3616
|
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
3638
3617
|
${SOCIAL_MEDIA_FIELDS_FRAGMENT}
|
|
3639
3618
|
${POSTER_USAGE_FIELDS_FRAGMENT}
|
|
3640
|
-
${ASSOCIATES_FIELDS_FRAGMENT}
|
|
3641
3619
|
${CONTACT_DETAILS_FIELDS_FRAGMENT}
|
|
3642
3620
|
${TERMS_AGREEMENT_FIELDS_FRAGMENT}
|
|
3643
3621
|
${RELATION_DATES_FRAGMENT}
|
|
@@ -3753,9 +3731,6 @@ var VENDOR = gql3`
|
|
|
3753
3731
|
fragment VendorFields on VendorType {
|
|
3754
3732
|
_id
|
|
3755
3733
|
active
|
|
3756
|
-
associates {
|
|
3757
|
-
...AssociatesFields
|
|
3758
|
-
}
|
|
3759
3734
|
adIds
|
|
3760
3735
|
approvedAt
|
|
3761
3736
|
availability {
|
|
@@ -3846,7 +3821,6 @@ var VENDOR = gql3`
|
|
|
3846
3821
|
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
3847
3822
|
${SOCIAL_MEDIA_FIELDS_FRAGMENT}
|
|
3848
3823
|
${POSTER_USAGE_FIELDS_FRAGMENT}
|
|
3849
|
-
${ASSOCIATES_FIELDS_FRAGMENT}
|
|
3850
3824
|
${VENDOR_PRODUCT_LIST_FIELDS_FRAGMENT}
|
|
3851
3825
|
${CONTACT_DETAILS_FIELDS_FRAGMENT}
|
|
3852
3826
|
${TERMS_AGREEMENT_FIELDS_FRAGMENT}
|
|
@@ -4002,9 +3976,6 @@ var PARTNER = gql4`
|
|
|
4002
3976
|
fragment PartnerFields on PartnerType {
|
|
4003
3977
|
_id
|
|
4004
3978
|
active
|
|
4005
|
-
associates {
|
|
4006
|
-
...AssociatesFields
|
|
4007
|
-
}
|
|
4008
3979
|
adIds
|
|
4009
3980
|
approvedAt
|
|
4010
3981
|
cover {
|
|
@@ -4055,7 +4026,6 @@ var PARTNER = gql4`
|
|
|
4055
4026
|
${TERMS_AGREEMENT_FIELDS_FRAGMENT}
|
|
4056
4027
|
${LOCATION_FIELDS_FRAGMENT}
|
|
4057
4028
|
${OWNER_FIELDS_FRAGMENT}
|
|
4058
|
-
${ASSOCIATES_FIELDS_FRAGMENT}
|
|
4059
4029
|
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
4060
4030
|
${POSTER_USAGE_FIELDS_FRAGMENT}
|
|
4061
4031
|
${SOCIAL_MEDIA_FIELDS_FRAGMENT}
|
|
@@ -4627,7 +4597,6 @@ var CHAT_MESSAGE_FIELDS_FRAGMENT = gql12`
|
|
|
4627
4597
|
var CHAT_PARTICIPANT = gql12`
|
|
4628
4598
|
fragment ChatParticipantFields on ChatParticipantType {
|
|
4629
4599
|
active
|
|
4630
|
-
isAssociate
|
|
4631
4600
|
userAvatar
|
|
4632
4601
|
userEmail
|
|
4633
4602
|
userId
|
|
@@ -8122,7 +8091,101 @@ function hasAnyRole(roles, checkRoles) {
|
|
|
8122
8091
|
const set = new Set(normalizeRoles(roles));
|
|
8123
8092
|
return checkRoles.some((r) => set.has(r));
|
|
8124
8093
|
}
|
|
8094
|
+
|
|
8095
|
+
// src/auth/permissions/adminAppAccess.ts
|
|
8096
|
+
var ADMIN_APP_ROLES = [
|
|
8097
|
+
"super_admin" /* SUPER_ADMIN */,
|
|
8098
|
+
"admin" /* ADMIN */,
|
|
8099
|
+
"event" /* EVENT */,
|
|
8100
|
+
"vendor" /* VENDOR */,
|
|
8101
|
+
"partner" /* PARTNER */,
|
|
8102
|
+
"school" /* SCHOOL */,
|
|
8103
|
+
"affiliate" /* AFFILIATE */
|
|
8104
|
+
];
|
|
8105
|
+
var ADMIN_DASHBOARD_CONTEXTS = [
|
|
8106
|
+
{
|
|
8107
|
+
context: "staff",
|
|
8108
|
+
home: "/dashboard",
|
|
8109
|
+
label: "Staff",
|
|
8110
|
+
pathPrefixes: ["/dashboard"],
|
|
8111
|
+
roles: ["super_admin" /* SUPER_ADMIN */, "admin" /* ADMIN */]
|
|
8112
|
+
},
|
|
8113
|
+
{
|
|
8114
|
+
context: "event",
|
|
8115
|
+
home: "/event/dashboard",
|
|
8116
|
+
label: "Events",
|
|
8117
|
+
pathPrefixes: ["/event"],
|
|
8118
|
+
roles: ["event" /* EVENT */]
|
|
8119
|
+
},
|
|
8120
|
+
{
|
|
8121
|
+
context: "vendor",
|
|
8122
|
+
home: "/vendor/dashboard",
|
|
8123
|
+
label: "Stallholders",
|
|
8124
|
+
pathPrefixes: ["/vendor"],
|
|
8125
|
+
roles: ["vendor" /* VENDOR */]
|
|
8126
|
+
},
|
|
8127
|
+
{
|
|
8128
|
+
context: "partner",
|
|
8129
|
+
home: "/partner/dashboard",
|
|
8130
|
+
label: "Partners",
|
|
8131
|
+
pathPrefixes: ["/partner"],
|
|
8132
|
+
roles: ["partner" /* PARTNER */]
|
|
8133
|
+
},
|
|
8134
|
+
{
|
|
8135
|
+
context: "school",
|
|
8136
|
+
home: "/school/dashboard",
|
|
8137
|
+
label: "Schools",
|
|
8138
|
+
pathPrefixes: ["/school"],
|
|
8139
|
+
roles: ["school" /* SCHOOL */]
|
|
8140
|
+
},
|
|
8141
|
+
{
|
|
8142
|
+
context: "affiliate",
|
|
8143
|
+
home: "/affiliate/dashboard",
|
|
8144
|
+
label: "Affiliate",
|
|
8145
|
+
pathPrefixes: ["/affiliate"],
|
|
8146
|
+
roles: ["affiliate" /* AFFILIATE */]
|
|
8147
|
+
}
|
|
8148
|
+
];
|
|
8149
|
+
function canAccessAdminApp(roles) {
|
|
8150
|
+
return hasAnyRole(roles, ADMIN_APP_ROLES);
|
|
8151
|
+
}
|
|
8152
|
+
function getUsableAdminContexts(roles) {
|
|
8153
|
+
return ADMIN_DASHBOARD_CONTEXTS.filter((ctx) => hasAnyRole(roles, ctx.roles));
|
|
8154
|
+
}
|
|
8155
|
+
function getDefaultAdminHome(roles, preferredContext) {
|
|
8156
|
+
const usable = getUsableAdminContexts(roles);
|
|
8157
|
+
if (usable.length === 0) {
|
|
8158
|
+
return "/login";
|
|
8159
|
+
}
|
|
8160
|
+
if (preferredContext) {
|
|
8161
|
+
const preferred = usable.find((ctx) => ctx.context === preferredContext);
|
|
8162
|
+
if (preferred) return preferred.home;
|
|
8163
|
+
}
|
|
8164
|
+
return usable[0].home;
|
|
8165
|
+
}
|
|
8166
|
+
function resolveAdminContextFromPath(pathname) {
|
|
8167
|
+
for (const ctx of ADMIN_DASHBOARD_CONTEXTS) {
|
|
8168
|
+
if (ctx.pathPrefixes.some(
|
|
8169
|
+
(prefix) => pathname === prefix || pathname.startsWith(`${prefix}/`)
|
|
8170
|
+
)) {
|
|
8171
|
+
return ctx.context;
|
|
8172
|
+
}
|
|
8173
|
+
}
|
|
8174
|
+
return null;
|
|
8175
|
+
}
|
|
8176
|
+
function canAccessAdminPath(roles, pathname) {
|
|
8177
|
+
if (!canAccessAdminApp(roles)) return false;
|
|
8178
|
+
const context = resolveAdminContextFromPath(pathname);
|
|
8179
|
+
if (!context) {
|
|
8180
|
+
return true;
|
|
8181
|
+
}
|
|
8182
|
+
const info = ADMIN_DASHBOARD_CONTEXTS.find((ctx) => ctx.context === context);
|
|
8183
|
+
if (!info) return false;
|
|
8184
|
+
return hasAnyRole(roles, info.roles);
|
|
8185
|
+
}
|
|
8125
8186
|
export {
|
|
8187
|
+
ADMIN_APP_ROLES,
|
|
8188
|
+
ADMIN_DASHBOARD_CONTEXTS,
|
|
8126
8189
|
AFFILIATE_PARTICIPANT_TYPE_LABELS,
|
|
8127
8190
|
ANDROID_URL,
|
|
8128
8191
|
CLUEMART_MAIN_DOMAIN_URL,
|
|
@@ -8250,6 +8313,8 @@ export {
|
|
|
8250
8313
|
buildShareOgDescriptionFromSections,
|
|
8251
8314
|
buildSharePagePath,
|
|
8252
8315
|
buildShareUrl,
|
|
8316
|
+
canAccessAdminApp,
|
|
8317
|
+
canAccessAdminPath,
|
|
8253
8318
|
capitalizeFirstLetter,
|
|
8254
8319
|
categoryColors,
|
|
8255
8320
|
cluemartSocialMedia,
|
|
@@ -8305,6 +8370,7 @@ export {
|
|
|
8305
8370
|
gameTypeToDisplayName,
|
|
8306
8371
|
getAllowedEventDateStatuses,
|
|
8307
8372
|
getCurrentAndFutureDates,
|
|
8373
|
+
getDefaultAdminHome,
|
|
8308
8374
|
getErrorMessage,
|
|
8309
8375
|
getEventCalendarIsoDates,
|
|
8310
8376
|
getEventDatesWithStallholders,
|
|
@@ -8319,6 +8385,7 @@ export {
|
|
|
8319
8385
|
getStallholderCategoryOptions,
|
|
8320
8386
|
getUnregisteredVendorCategoryNames,
|
|
8321
8387
|
getUnregisteredVendorStartDates,
|
|
8388
|
+
getUsableAdminContexts,
|
|
8322
8389
|
getVendorEventRelationDateOptions,
|
|
8323
8390
|
getVendorEventRelationStartDates,
|
|
8324
8391
|
getVendorEventsEmptyMessage,
|
|
@@ -8378,6 +8445,7 @@ export {
|
|
|
8378
8445
|
requestPasswordResetFields,
|
|
8379
8446
|
requirementsOptions,
|
|
8380
8447
|
resetPasswordFields,
|
|
8448
|
+
resolveAdminContextFromPath,
|
|
8381
8449
|
resolveResourceImageActive,
|
|
8382
8450
|
rewardNiceNames,
|
|
8383
8451
|
seededShuffle,
|