@timardex/cluemart-shared 2.2.29 → 2.2.40
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-C4L_-r-4.d.ts → ad-CdehhMyb.d.ts} +2 -2
- package/dist/{ad-XtBAH4rD.d.mts → ad-Drhn_Azy.d.mts} +2 -2
- package/dist/{affiliate-CxZHVZb2.d.ts → affiliate-Cd78p2Fz.d.mts} +3 -3
- package/dist/{affiliate-D-L_UtL8.d.mts → affiliate-CdIL0r2o.d.ts} +3 -3
- package/dist/auth/index.cjs +10 -1
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.mts +3 -3
- package/dist/auth/index.d.ts +3 -3
- package/dist/auth/index.mjs +2 -2
- package/dist/{chunk-IKRXLKJ3.mjs → chunk-5AAYX364.mjs} +1 -1
- package/dist/{chunk-IKRXLKJ3.mjs.map → chunk-5AAYX364.mjs.map} +1 -1
- package/dist/{chunk-NRNLARYC.mjs → chunk-BCMBTEGJ.mjs} +13 -4
- package/dist/chunk-BCMBTEGJ.mjs.map +1 -0
- package/dist/{chunk-LLP7OWX5.mjs → chunk-MKHXXZWF.mjs} +2 -2
- package/dist/{chunk-MQHX5BD6.mjs → chunk-NMJ2CR2F.mjs} +2 -2
- package/dist/{chunk-YFFCHTJS.mjs → chunk-T5ZOYS3L.mjs} +5 -23
- package/dist/{chunk-YFFCHTJS.mjs.map → chunk-T5ZOYS3L.mjs.map} +1 -1
- package/dist/{chunk-BR4XNXE7.mjs → chunk-TKSBCN3N.mjs} +11 -2
- package/dist/chunk-TKSBCN3N.mjs.map +1 -0
- package/dist/{chunk-J5N3IEGR.mjs → chunk-VL275KFW.mjs} +3 -3
- package/dist/{chunk-U3KUTQ43.mjs → chunk-XGGFB7HY.mjs} +11 -2
- package/dist/{chunk-U3KUTQ43.mjs.map → chunk-XGGFB7HY.mjs.map} +1 -1
- package/dist/{contactUs-CwHKoGEt.d.mts → contactUs-BJPQ5nKc.d.mts} +1 -1
- package/dist/{contactUs-CR-nghbk.d.ts → contactUs-ITiB1XV4.d.ts} +1 -1
- package/dist/enums/index.cjs +10 -0
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.mts +8 -1
- package/dist/enums/index.d.ts +8 -1
- package/dist/enums/index.mjs +3 -1
- package/dist/formFields/index.cjs +4 -4
- 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-B4mmQo6R.d.ts → global-DlC7W4p7.d.ts} +9 -0
- package/dist/{global-D1r5ZuQO.d.mts → global-XUBcgjNc.d.mts} +9 -0
- package/dist/graphql/index.cjs +10 -1
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +5 -5
- package/dist/graphql/index.d.ts +5 -5
- package/dist/graphql/index.mjs +3 -3
- package/dist/hooks/index.cjs +320 -285
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.mts +5 -5
- package/dist/hooks/index.d.ts +5 -5
- package/dist/hooks/index.mjs +314 -288
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +34 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +44 -22
- package/dist/index.d.ts +44 -22
- package/dist/index.mjs +32 -23
- 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/region/index.cjs.map +1 -1
- package/dist/region/index.d.mts +1 -1
- package/dist/region/index.d.ts +1 -1
- package/dist/region/index.mjs +1 -1
- package/dist/{resourceActivities-Uz9uavhK.d.ts → resourceActivities-C8eIfpKl.d.ts} +1 -1
- package/dist/{resourceActivities-DUReu_jD.d.mts → resourceActivities-Ci12UkJU.d.mts} +1 -1
- package/dist/sharing/index.cjs +4 -25
- package/dist/sharing/index.cjs.map +1 -1
- package/dist/sharing/index.d.mts +3 -22
- package/dist/sharing/index.d.ts +3 -22
- package/dist/sharing/index.mjs +3 -9
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +7 -7
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.mjs +2 -2
- package/dist/{user-BpR-FTW2.d.mts → user-BSFExFvl.d.ts} +18 -4
- package/dist/{user-IR0bHKFb.d.ts → user-D31zAVuz.d.mts} +18 -4
- package/dist/utils/index.cjs +14 -4
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.mts +15 -4
- package/dist/utils/index.d.ts +15 -4
- package/dist/utils/index.mjs +6 -4
- package/package.json +1 -1
- package/dist/chunk-BR4XNXE7.mjs.map +0 -1
- package/dist/chunk-NRNLARYC.mjs.map +0 -1
- /package/dist/{chunk-LLP7OWX5.mjs.map → chunk-MKHXXZWF.mjs.map} +0 -0
- /package/dist/{chunk-MQHX5BD6.mjs.map → chunk-NMJ2CR2F.mjs.map} +0 -0
- /package/dist/{chunk-J5N3IEGR.mjs.map → chunk-VL275KFW.mjs.map} +0 -0
package/dist/sharing/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as EventType, y as EventInfoFormData, i as VendorType, s as VendorInfoFormData, S as StallType, C as Category } from '../global-
|
|
1
|
+
import { E as EventType, y as EventInfoFormData, i as VendorType, s as VendorInfoFormData, S as StallType, C as Category } from '../global-DlC7W4p7.js';
|
|
2
2
|
import 'react-hook-form';
|
|
3
3
|
import '../enums/index.js';
|
|
4
4
|
|
|
@@ -113,7 +113,7 @@ declare const SHARE_PRICE_RANGE_PREFIX = "$ Price range:";
|
|
|
113
113
|
declare const SHARE_CLOCK_ICON = "\u23F0";
|
|
114
114
|
/** Prefix for the invitation application-deadline sentence (share text + OG section parsing). */
|
|
115
115
|
declare const SHARE_APPLICATION_DEADLINE_PREFIX = "\u23F0 Application deadline:";
|
|
116
|
-
/** First line
|
|
116
|
+
/** First line of `og:description` (and legacy share-message text). */
|
|
117
117
|
declare const SHARE_MORE_INFO_LINE = "Shared from ClueMart";
|
|
118
118
|
declare const DEFAULT_SHARE_OG_IMAGE = "https://cluemart.co.nz/assets/logo.webp";
|
|
119
119
|
declare const RESOURCE_SHARE_TYPES: readonly ["market", "stallholder", "partner", "affiliate", "school"];
|
|
@@ -140,31 +140,12 @@ declare function joinShareDescriptionSections(sections: ReadonlyArray<string | f
|
|
|
140
140
|
declare function appendShareMoreInfoLine(description: string): string;
|
|
141
141
|
|
|
142
142
|
declare function normalizeShareText(value: string | null | undefined): string;
|
|
143
|
-
/** Branding line placement — first so Facebook truncation does not drop it. */
|
|
144
|
-
type ShareMessageFooterPlacement = "before-body";
|
|
145
|
-
declare function shareMessageFooterPlacementForType(_shareType?: ShareResourceType): ShareMessageFooterPlacement;
|
|
146
|
-
/**
|
|
147
|
-
* Ordered sections for share-sheet / Facebook SDK quote text:
|
|
148
|
-
* {@link SHARE_MORE_INFO_LINE} → title → description (full body or post caption).
|
|
149
|
-
*/
|
|
150
|
-
declare function buildShareMessageSections(input: {
|
|
151
|
-
title?: string | null;
|
|
152
|
-
description?: string | null;
|
|
153
|
-
shareType?: ShareResourceType;
|
|
154
|
-
}): string[];
|
|
155
143
|
declare function splitShareDescriptionSections(value: string): string[];
|
|
156
144
|
/**
|
|
157
145
|
* Formats share descriptions for Open Graph / Twitter meta tags.
|
|
158
146
|
* Sections are joined with {@link OG_DESCRIPTION_LINE_BREAK} (` `).
|
|
159
147
|
*/
|
|
160
148
|
declare function normalizeShareOgDescription(value: string): string;
|
|
161
|
-
/**
|
|
162
|
-
* Quote text for Facebook ShareDialog on iOS (`ShareLinkContent.quote`).
|
|
163
|
-
*
|
|
164
|
-
* Title + blank lines + body sections. URL is omitted — `contentUrl` supplies
|
|
165
|
-
* the link card (OG on resource landing pages controls card title/image).
|
|
166
|
-
*/
|
|
167
|
-
declare function buildFacebookShareQuote(title: string, description: string, shareType?: ShareResourceType): string | undefined;
|
|
168
149
|
/**
|
|
169
150
|
* Open Graph / Twitter description from pre-built section strings.
|
|
170
151
|
* Prefer {@link joinShareOgDescriptionSections} when sections are already known.
|
|
@@ -193,4 +174,4 @@ declare function shareSlugResourceId(resource: ShareSlugResource | null | undefi
|
|
|
193
174
|
*/
|
|
194
175
|
declare function toShareSocialImageCacheVersion(updatedAt: Date | string | number | null | undefined): string | null;
|
|
195
176
|
|
|
196
|
-
export { DEFAULT_SHARE_OG_IMAGE, OG_DESCRIPTION_LINE_BREAK, POST_SHARE_RESOURCE_TYPES, PUBLIC_SHARE_PATH_TYPES, type PostShareResourceType, type PublicSharePathType, RELATION_OVERLAY_LAYOUT_VERSION, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, type RelationSharePathType, type RelationShareResourceType, type ResourceShareType, 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 ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type
|
|
177
|
+
export { DEFAULT_SHARE_OG_IMAGE, OG_DESCRIPTION_LINE_BREAK, POST_SHARE_RESOURCE_TYPES, PUBLIC_SHARE_PATH_TYPES, type PostShareResourceType, type PublicSharePathType, RELATION_OVERLAY_LAYOUT_VERSION, RELATION_SHARE_APPLICATION, RELATION_SHARE_INVITATION, RELATION_SHARE_RESOURCE_TYPES, RESOURCE_SHARE_TYPES, type RelationSharePathType, type RelationShareResourceType, type ResourceShareType, 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 ShareEventForInvitation, type ShareEventForPublic, type ShareEventInfoForInvitation, type ShareResourceType, type ShareSlugResource, type ShareType, type ShareVendorForApplication, type ShareVendorForPublic, type ShareVendorInfoForApplication, appendShareMoreInfoLine, buildApplicationShareDescription, buildInvitationShareDescription, buildPublicEventShareDescription, buildPublicVendorShareDescription, buildShareOgDescription, buildShareOgDescriptionFromSections, buildSharePagePath, buildShareUrl, formatCategoryLabel, formatShareApplicationCategoriesSection, formatShareApplicationComplianceSection, formatShareApplicationPriceRangeLine, formatShareApplicationStallSizeLine, formatShareInvitationApplicationDeadlineLine, formatShareInvitationMarketDatesSection, formatShareInvitationRequirementsSection, formatShareIsFoodTrueLine, formatShareMarketDate, formatShareRainOrShineLine, formatShareStallLine, formatShareTagsSection, formatStallCapacityLabel, isPostShareResourceType, isRelationShareResourceType, joinShareDescriptionSections, joinShareOgDescriptionSections, normalizeShareOgDescription, normalizeShareRouteId, normalizeShareText, shareSlugResourceId, splitShareDescriptionSections, stripOverlaySubtitleSpecialChars, toShareSocialImageCacheVersion };
|
package/dist/sharing/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
normalizeShareRouteId,
|
|
25
25
|
shareSlugResourceId,
|
|
26
26
|
toShareSocialImageCacheVersion
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-NMJ2CR2F.mjs";
|
|
28
28
|
import {
|
|
29
29
|
DEFAULT_SHARE_OG_IMAGE,
|
|
30
30
|
OG_DESCRIPTION_LINE_BREAK,
|
|
@@ -58,8 +58,6 @@ import {
|
|
|
58
58
|
SOCIAL_IMAGE_HEIGHT,
|
|
59
59
|
SOCIAL_IMAGE_WIDTH,
|
|
60
60
|
appendShareMoreInfoLine,
|
|
61
|
-
buildFacebookShareQuote,
|
|
62
|
-
buildShareMessageSections,
|
|
63
61
|
buildShareOgDescription,
|
|
64
62
|
buildShareOgDescriptionFromSections,
|
|
65
63
|
isPostShareResourceType,
|
|
@@ -68,11 +66,10 @@ import {
|
|
|
68
66
|
joinShareOgDescriptionSections,
|
|
69
67
|
normalizeShareOgDescription,
|
|
70
68
|
normalizeShareText,
|
|
71
|
-
shareMessageFooterPlacementForType,
|
|
72
69
|
splitShareDescriptionSections,
|
|
73
70
|
stripOverlaySubtitleSpecialChars
|
|
74
|
-
} from "../chunk-
|
|
75
|
-
import "../chunk-
|
|
71
|
+
} from "../chunk-T5ZOYS3L.mjs";
|
|
72
|
+
import "../chunk-XGGFB7HY.mjs";
|
|
76
73
|
export {
|
|
77
74
|
DEFAULT_SHARE_OG_IMAGE,
|
|
78
75
|
OG_DESCRIPTION_LINE_BREAK,
|
|
@@ -109,11 +106,9 @@ export {
|
|
|
109
106
|
SOCIAL_IMAGE_WIDTH,
|
|
110
107
|
appendShareMoreInfoLine,
|
|
111
108
|
buildApplicationShareDescription,
|
|
112
|
-
buildFacebookShareQuote,
|
|
113
109
|
buildInvitationShareDescription,
|
|
114
110
|
buildPublicEventShareDescription,
|
|
115
111
|
buildPublicVendorShareDescription,
|
|
116
|
-
buildShareMessageSections,
|
|
117
112
|
buildShareOgDescription,
|
|
118
113
|
buildShareOgDescriptionFromSections,
|
|
119
114
|
buildSharePagePath,
|
|
@@ -139,7 +134,6 @@ export {
|
|
|
139
134
|
normalizeShareOgDescription,
|
|
140
135
|
normalizeShareRouteId,
|
|
141
136
|
normalizeShareText,
|
|
142
|
-
shareMessageFooterPlacementForType,
|
|
143
137
|
shareSlugResourceId,
|
|
144
138
|
splitShareDescriptionSections,
|
|
145
139
|
stripOverlaySubtitleSpecialChars,
|
package/dist/types/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/index.ts","../../src/types/auth.ts","../../src/types/global.ts","../../src/types/ad.ts","../../src/types/resourceActivities.ts","../../src/types/post.ts","../../src/types/game/index.ts","../../src/types/game/dailyClue.ts","../../src/types/game/global.ts","../../src/types/subscription.ts","../../src/types/affiliate.ts","../../src/types/coupon/index.ts"],"sourcesContent":["export * from \"./admin\";\nexport * from \"./auth\";\nexport * from \"./chat\";\nexport * from \"./contactUs\";\nexport * from \"./global\";\nexport * from \"./event\";\nexport * from \"./notification\";\nexport * from \"./poster\";\nexport * from \"./relation\";\nexport * from \"./vendor\";\nexport * from \"./user\";\nexport * from \"./ad\";\nexport * from \"./resourceActivities\";\nexport * from \"./partner\";\nexport * from \"./post\";\nexport * from \"./pushToken\";\nexport * from \"./appSettings\";\nexport * from \"./billingCatalog\";\nexport * from \"./googleImportedMarket\";\nexport * from \"./game\";\nexport * from \"./game/dailyClue\";\nexport * from \"./game/global\";\nexport * from \"./game/puzzleGame\";\nexport * from \"./school\";\nexport * from \"./subscription\";\nexport * from \"./affiliate\";\nexport * from \"./coupon\";\n","import {\n CreateFormData,\n EnumOSPlatform,\n EnumResourceType,\n PromoCodeType,\n TermsAgreement,\n} from \"src\";\n\nimport { MutationResponse } from \"./global\";\nimport { SafeUserType, UserFormData } from \"./user\";\n\nexport enum EnumVerificationType {\n REGISTER = \"register\",\n RESET_PASSWORD = \"resetPassword\",\n}\n\nexport type LoginFormData = {\n email: string;\n isAdminPage?: boolean;\n password: string;\n platform?: EnumOSPlatform;\n};\n\nexport type CreateLoginFormData = CreateFormData<LoginFormData>;\n\nexport type RegisterFormData = Pick<\n UserFormData,\n | \"email\"\n | \"firstName\"\n | \"lastName\"\n | \"nickName\"\n | \"platform\"\n | \"preferredRegion\"\n | \"termsAgreement\"\n> & {\n interests: EnumResourceType[];\n password: string;\n promoCode?: PromoCodeType | null;\n};\n\nexport type CreateRegisterFormData = CreateFormData<RegisterFormData>;\n\nexport type RequestPasswordResetFormData = {\n email: string;\n};\n\nexport type CreateRequestPasswordResetFormData =\n CreateFormData<RequestPasswordResetFormData>;\n\nexport type ResetPasswordFormData = {\n confirmPassword: string;\n email: string;\n password: string;\n};\n\nexport type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;\n\nexport type ValidateVerificationTokenFormData = {\n email: string;\n verificationToken: string;\n verificationType?: EnumVerificationType;\n};\n\nexport type CreateValidateVerificationTokenFormData =\n CreateFormData<ValidateVerificationTokenFormData>;\n\nexport type AuthPayloadType = {\n refreshToken: string | null;\n token: string;\n user: SafeUserType;\n};\n\nexport type AuthMutationResponse = MutationResponse<AuthPayloadType>;\n\nexport type RefreshTokenPayloadType = {\n refreshToken: string;\n token: string;\n};\n\nexport type RefreshTokenMutationResponse =\n MutationResponse<RefreshTokenPayloadType>;\n\nexport type StartImpersonationPayloadType = {\n expiresAt: Date;\n refreshToken: string;\n sessionId: string;\n token: string;\n user: SafeUserType;\n};\n\nexport type StartImpersonationMutationResponse =\n MutationResponse<StartImpersonationPayloadType>;\n\nexport type RefreshImpersonationMutationResponse =\n MutationResponse<RefreshTokenPayloadType>;\n","import {\n Control,\n FieldValues,\n FormState,\n UseFormGetValues,\n UseFormHandleSubmit,\n UseFormReset,\n UseFormSetValue,\n UseFormWatch,\n} from \"react-hook-form\";\n\nimport {\n EnumEventDateStatus,\n EnumEventType,\n EnumPartnerType,\n EnumRegions,\n EnumResourceType,\n EnumSocialMedia,\n EnumUserLicence,\n EnumUserRole,\n} from \"../enums\";\n\nimport { EventListItemType } from \"./event\";\nimport { EnumPostType } from \"./post\";\nimport { VendorType } from \"./vendor\";\n\nexport const PROMO_CODE_PREFIX = \"CM-\";\n\nexport type PromoCodeType = `${typeof PROMO_CODE_PREFIX}${string}`;\n\nexport type Nullable<T> = {\n [K in keyof T]: T[K] | null | undefined;\n};\n\n/** Uniform mutation response envelope used across GraphQL mutations. */\nexport type MutationResponse<T> = {\n data: T | null;\n message: string | null;\n};\n\nexport type DeviceInfo = {\n appBuildNumber: string;\n appId: string;\n appVersion: string;\n brand: string;\n deviceName: string;\n installationId: string;\n manufacturer: string;\n modelName: string;\n osName: string;\n osVersion: string;\n timestamp: Date;\n};\n\nexport type TermsAgreement = DeviceInfo & {\n termVersion: string;\n};\n\nexport type ResourceContactDetailsType = {\n email?: string | null;\n landlinePhone?: string | null;\n mobilePhone?: string | null;\n};\n\nexport type ResourceImageType = {\n active: boolean;\n source: string;\n title: string;\n};\n\nexport type SocialMediaType = {\n name?: EnumSocialMedia;\n link?: string;\n};\n\nexport type UserLicenceType = {\n expiryDate: Date;\n issuedDate: Date;\n licenceType: EnumUserLicence;\n prevLicenceType?: EnumUserLicence | null;\n};\n\nexport type OwnerType = {\n email: string;\n userId: string;\n};\n\nexport interface BaseResourceTypeFormData {\n _id?: string;\n active: boolean;\n contactDetails: ResourceContactDetailsType | null;\n cover: ResourceImageType;\n coverUpload?: ResourceImageType | null;\n description: string;\n images?: ResourceImageType[] | null;\n imagesUpload?: ResourceImageType[] | null;\n logo?: ResourceImageType | null;\n logoUpload?: ResourceImageType | null;\n name: string;\n promoCodes?: PromoCodeType[] | null;\n region: string;\n socialMedia: SocialMediaType[] | null;\n termsAgreement?: TermsAgreement | null;\n}\n\nexport type PosterUsageType = {\n month: string;\n count: number;\n};\n\nexport type RelatedPostType = {\n postActive: boolean;\n postId: string;\n postSlug: string;\n postType: EnumPostType;\n};\n\nexport type SocialShareResourceType = {\n qrCode: ResourceImageType;\n socialImage: ResourceImageType;\n};\n\nexport type BaseResourceType = Omit<\n BaseResourceTypeFormData,\n \"_id\" | \"coverUpload\" | \"imagesUpload\" | \"logoUpload\"\n> & {\n _id: string;\n adIds?: string[] | null;\n approvedAt?: Date | null;\n createdAt: Date;\n deletedAt: Date | null;\n owner: OwnerType;\n posterUsage?: PosterUsageType | null;\n rating?: number | null;\n relatedPost?: RelatedPostType | null;\n reviewCount?: number | null;\n sharePublic?: SocialShareResourceType | null;\n slug: string;\n updatedAt: Date | null;\n};\n\nexport type LocationGeoType = {\n coordinates: number[]; // [longitude, latitude]\n type: \"Point\"; // Mongoose GeoJSON type\n};\n\nexport type LocationType = {\n city: string;\n country: string;\n fullAddress: string;\n geo: LocationGeoType;\n latitude: number;\n longitude: number;\n region: string;\n};\n\nexport type DateTimeType = {\n dateStatus: EnumEventDateStatus;\n endDate: string;\n endTime: string;\n startDate: string;\n startTime: string;\n};\n\nexport type DateTimeFormValue = {\n dateStatus: EnumEventDateStatus;\n endDate?: string;\n endTime?: string;\n startDate?: string;\n startTime?: string;\n};\n\nexport type Region = {\n latitude: number;\n latitudeDelta: number;\n longitude: number;\n longitudeDelta: number;\n};\n\nexport type ResourceDetails = {\n dateTime: DateTimeType[] | null;\n description: string | null;\n eventStatus?: EventStatusType | null;\n location: LocationType | null;\n resourceCover: ResourceImageType | null;\n resourceId: string;\n resourceLogo: ResourceImageType | null;\n resourceName: string;\n resourceType: EnumResourceType;\n};\n\nexport type GeocodeLocation = Pick<LocationType, \"latitude\" | \"longitude\">;\n\nexport type EventStatusType = {\n claimed: boolean;\n eventType: EnumEventType;\n googlePlaceId?: string | null;\n};\n\nexport interface FormField {\n disabled?: boolean;\n helperText?: string;\n isTextArea?: boolean;\n keyboardType?:\n | \"default\"\n | \"email-address\"\n | \"number-pad\"\n | \"url\"\n | \"decimal-pad\"\n | \"phone-pad\";\n name: string;\n placeholder: string;\n required?: boolean;\n secureTextEntry?: boolean;\n}\n\nexport interface FormDateField {\n dateMode: \"date\" | \"time\";\n helperText?: string;\n name: \"endDate\" | \"endTime\" | \"startDate\" | \"startTime\";\n placeholder: string;\n}\n\nexport interface SubcategoryItems {\n id: string;\n name: string;\n description?: string | null;\n}\n\nexport interface Subcategory {\n id: string;\n name: string;\n items?: SubcategoryItems[] | null;\n}\n\nexport type CategoryColorType = {\n primary: string;\n secondary: string;\n};\n\nexport interface Category {\n color?: CategoryColorType | null;\n description?: string | null;\n id: string;\n name: string;\n subcategories: Subcategory[];\n}\n\nexport type OptionItem = {\n value: string;\n label: string;\n};\n\nexport type ImageObjectType = {\n uri: string;\n type: string;\n name: string;\n};\n\nexport interface ResourceConnectionsType {\n events: EventListItemType[] | null;\n vendors: VendorType[] | null;\n}\n\nexport interface CreateFormData<T extends FieldValues> {\n control: Control<T, any>;\n fields: T;\n formState: FormState<T>;\n handleSubmit: UseFormHandleSubmit<T, any>;\n reset: UseFormReset<T>;\n setValue: UseFormSetValue<T>;\n watch: UseFormWatch<T>;\n getValues: UseFormGetValues<T>;\n}\n\n/** Offset-pagination input for plain list fields (events/vendors/partners/posts/users). */\nexport interface PaginationOptions {\n limit?: number;\n offset?: number;\n}\n\n/** Server-side filter input for the super-admin users list query. */\nexport interface UserListFilter {\n active?: boolean | null;\n hasLicences?: boolean | null;\n role?: EnumUserRole | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin partners list query. */\nexport interface PartnerListFilter {\n active?: boolean | null;\n partnerType?: EnumPartnerType | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin vendors list query. */\nexport interface VendorListFilter {\n active?: boolean | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin events list query. */\nexport interface EventListFilter {\n active?: boolean | null;\n claimed?: boolean | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin posts list query. */\nexport interface PostListFilter {\n active?: boolean | null;\n postType?: EnumPostType | null;\n search?: string | null;\n}\n\nexport interface UseGetResourcesByRegionOptions extends PaginationOptions {\n onlyClaimed?: boolean;\n skip?: boolean;\n}\n","import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData } from \"./global\";\n\nexport enum EnumAdShowOn {\n EVENTS_PAGE = \"Events_page\",\n FRONT_PAGE = \"Front_page\",\n MARKET_SEARCH = \"Market_search\",\n PARTNERS_PAGE = \"Partners_page\",\n VENDORS_PAGE = \"Vendors_page\",\n}\n\nexport enum EnumAdPlatform {\n MOBILE = \"mobile\",\n WEB = \"web\",\n}\n\nexport enum EnumAdStatus {\n ACTIVE = \"Active\",\n PAUSED = \"Paused\",\n EXPIRED = \"Expired\",\n}\n\nexport enum EnumAdType {\n SPONSORED = \"Sponsored\",\n FREE = \"Free\",\n}\n\nexport enum EnumAdStyle {\n BLOOM = \"Bloom\",\n RISE = \"Rise\",\n}\n\nexport enum EnumAdBookingSlotKind {\n PAID = \"paid\",\n RESERVED = \"reserved\",\n}\n\nexport enum EnumAdBookingState {\n HELD = \"held\",\n PENDING_APPROVAL = \"pending_approval\",\n APPROVED = \"approved\",\n FAILED = \"failed\",\n CANCELLED = \"cancelled\",\n REJECTED = \"rejected\",\n}\n\nexport enum EnumAdPaymentStatus {\n PENDING = \"pending\",\n PAID = \"paid\",\n FAILED = \"failed\",\n CANCELLED = \"cancelled\",\n}\n\nexport enum EnumAdEntitlementSource {\n PRO_PLUS = \"pro_plus\",\n ADMIN = \"admin\",\n ORGANIZER = \"organizer\",\n PARTNER = \"partner\",\n}\n\nexport enum EnumAdApprovalStatus {\n PENDING = \"pending\",\n APPROVED = \"approved\",\n REJECTED = \"rejected\",\n}\n\nexport type AdPlacement = EnumAdShowOn.FRONT_PAGE | EnumAdShowOn.MARKET_SEARCH;\n\nexport type AdDailyPriceKey = \"front_page_day\" | \"market_search_day\";\n\nexport type AdResource = {\n adDescription: string;\n adImage: string;\n adStyle: EnumAdStyle;\n adTitle: string;\n adType: EnumAdType;\n resourceId: string;\n resourceName: string;\n resourceRegion: string;\n resourceType: EnumResourceType;\n resourceSlug: string;\n};\n\nexport interface AdFormData {\n active: boolean;\n end: Date; // ISO date string\n resource: AdResource;\n showOn: EnumAdShowOn[];\n start?: Date; // ISO date string\n status: EnumAdStatus;\n targetRegion: string[];\n}\n\n// Form state matches the validation schema: all resource fields are present.\n// Use empty strings / explicit enum defaults in `defaultValues` for \"create\" flows.\nexport type AdFormState = AdFormData;\n\nexport type CreateAdFormData = CreateFormData<AdFormData>;\nexport type CreateAdFormState = CreateFormData<AdFormState>;\n\nexport interface AdType extends AdFormData {\n _id: string;\n adminManaged?: boolean;\n approvalStatus?: EnumAdApprovalStatus;\n bookingIds?: string[];\n bookingKind?: EnumAdBookingSlotKind;\n clicks?: number; // How many times the ad was clicked\n createdAt: Date;\n impressions?: number; // How often the ad was seen\n paymentStatus?: EnumAdPaymentStatus;\n start: Date; // ISO date string\n updatedAt: Date | null;\n}\n\nexport type AdBookingType = {\n _id: string;\n adId?: string | null;\n approvalStatus: EnumAdApprovalStatus;\n checkoutAttemptId?: string | null;\n currency?: string | null;\n dayKey: string;\n entitlementClaimKey?: string | null;\n entitlementSource?: EnumAdEntitlementSource | null;\n expiresAt?: Date | null;\n placement: AdPlacement;\n purchaseKey?: string | null;\n region: string;\n resource: AdResource;\n slotKind: EnumAdBookingSlotKind;\n slotNumber: number;\n state: EnumAdBookingState;\n stripeCheckoutSessionId?: string | null;\n stripePaymentIntentId?: string | null;\n unitAmount?: number | null;\n userId: string;\n};\n\nexport type AdDailyPriceType = {\n _id: string;\n active: boolean;\n currency: \"nzd\";\n key: AdDailyPriceKey;\n revision: number;\n unitAmount: number;\n};\n\nexport type AdSettingsType = {\n _id: \"default\";\n approvalRequired: boolean;\n minAppearancesPerHour: number;\n paidSlotsPerPlacement: number;\n reservedSlotsPerPlacement: number;\n rotationSeconds: number;\n};\n","import {\n EnumEventDateStatus,\n EnumOSPlatform,\n EnumResourceType,\n} from \"src/enums\";\n\nimport { LocationGeoType } from \"./global\";\n\nexport enum EnumActivity {\n FAVORITE = \"FAVORITE\",\n GOING = \"GOING\",\n INTERESTED = \"INTERESTED\",\n PRESENT = \"PRESENT\",\n VIEW = \"VIEW\",\n}\n\nexport type ResourceActivityEntry = {\n activityType: EnumActivity;\n location: LocationGeoType | null;\n dateStatus?: EnumEventDateStatus | null;\n startDate?: string | null;\n startTime?: string | null;\n timestamp: Date;\n userAgent: EnumOSPlatform;\n userId?: string | null;\n};\n\nexport type ResourceActivityType = {\n _id: string;\n resourceType: EnumResourceType;\n resourceId: string;\n activity: ResourceActivityEntry[];\n};\n\nexport type ResourceActivityInputType = {\n resourceId: string;\n resourceType: EnumResourceType;\n activity: Omit<ResourceActivityEntry, \"timestamp\" | \"userId\">;\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport { BaseGameType } from \"./game\";\nimport {\n CreateFormData,\n ResourceImageType,\n SocialShareResourceType,\n} from \"./global\";\n\nexport enum EnumPostType {\n CLUE_BITES = \"clue_bites\",\n //CLUE_GUIDES_FOR_ORGANISERS = \"clue_guides_for_organisers\",\n //CLUE_GUIDES_FOR_VENDORS = \"clue_guides_for_vendors\",\n MARKET_FACES = \"market_faces\",\n PLAY_AND_WIN = \"play_and_win\",\n}\n\nexport enum EnumPostContentType {\n GAME = \"game\",\n IMAGE = \"image\",\n LIST = \"list\",\n TEXTAREA = \"textarea\",\n VIDEO = \"video\",\n}\n\nexport type PostFileInput = {\n source: File;\n title?: string;\n};\n\nexport type PostContentTextarea = {\n textarea: {\n title?: string;\n data: string;\n };\n};\n\nexport type PostContentImage = {\n images: ResourceImageType[] | null;\n imagesUpload?: PostFileInput[] | null;\n};\n\nexport type PostContentVideo = {\n video: {\n source: string;\n title?: string;\n };\n};\n\nexport type PostContentList = {\n list: {\n title?: string;\n items: {\n text: string;\n }[];\n };\n};\n\nexport type PostContentGame = {\n game: BaseGameType;\n};\n\nexport type PostContentData =\n | PostContentGame\n | PostContentTextarea\n | PostContentImage\n | PostContentVideo\n | PostContentList;\n\nexport type PostContentFormData = {\n contentData?: PostContentData | null;\n contentOrder?: number | null;\n contentType?: EnumPostContentType | null;\n};\n\nexport type PostResource = {\n resourceSlug: string;\n resourceId: string;\n resourceType: EnumResourceType;\n resourceRegion: string;\n};\n\nexport interface PostFormData {\n active: boolean;\n caption: string;\n content: PostContentFormData[];\n cover?: ResourceImageType | null;\n coverUpload?: PostFileInput | null;\n postType: EnumPostType;\n resource?: PostResource | null;\n tags?: string[] | null;\n title: string;\n notifyUsers?: boolean | null;\n}\n\nexport type CreatePostFormData = CreateFormData<PostFormData>;\n\nexport type PostContentType = Omit<PostContentFormData, \"contentData\"> & {\n contentData: Omit<PostContentData, \"imagesUpload\">;\n};\n\nexport type PostType = Omit<\n PostFormData,\n \"content\" | \"coverUpload\" | \"resource\"\n> & {\n _id: string;\n approvedAt?: Date | null;\n content: PostContentType[];\n createdAt: Date;\n deletedAt: Date | null;\n resource?: PostResource | null;\n slug: string;\n sharePublic?: SocialShareResourceType | null;\n updatedAt: Date | null;\n};\n","import { OwnerType } from \"../global\";\n\nimport { DailyClueBaseGame, DailyClueGameData } from \"./dailyClue\";\nimport { EnumGameType, GameDate } from \"./global\";\nimport { PuzzleBaseGame, PuzzleGameData } from \"./puzzleGame\";\n\nexport type BaseGameMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueBaseGame;\n [EnumGameType.MINI_QUIZ]: PuzzleBaseGame;\n [EnumGameType.ODD_ONE_OUT]: PuzzleBaseGame;\n};\n\nexport type BaseGameType = {\n gameType: EnumGameType;\n gameTypeId: string;\n gameTitle: string;\n} & {\n [K in keyof BaseGameMap]?: BaseGameMap[K] | null;\n};\n\nexport enum EnumGameStatus {\n GAME_COMPLETED = \"GAME_COMPLETED\",\n GAME_IN_PROGRESS = \"GAME_IN_PROGRESS\",\n GAME_LEFT = \"GAME_LEFT\",\n GAME_STARTED = \"GAME_STARTED\",\n}\n\nexport type GameHistory = Pick<\n BaseGameType,\n \"gameTitle\" | \"gameType\" | \"gameTypeId\"\n> & {\n createdAt: Date;\n gameDate: GameDate;\n gameStatus: EnumGameStatus;\n /** Per-event delta. Not persisted for overallGamePoints (computed at read time). */\n pointsEarned: number;\n /** Running total for this game instance; computed at read time, not stored in Mongo. */\n overallGamePoints?: number;\n};\n\ntype GameDataMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueGameData;\n [EnumGameType.MINI_QUIZ]: PuzzleGameData;\n [EnumGameType.ODD_ONE_OUT]: PuzzleGameData;\n};\ntype GameDataType = {\n [K in keyof GameDataMap]?: GameDataMap[K] | null;\n};\n\nexport type GameType = Pick<\n BaseGameType,\n \"gameTitle\" | \"gameType\" | \"gameTypeId\"\n> & {\n _id: string;\n active: boolean;\n createdAt: Date;\n gameData: GameDataType;\n gameHistory: GameHistory[] | null;\n updatedAt: Date | null;\n};\n\nexport type GameDocType = {\n _id: string;\n active: boolean;\n createdAt: Date;\n deletedAt: Date | null;\n games: GameType[] | null;\n owner: OwnerType;\n points: number;\n updatedAt: Date | null;\n};\n\nexport type GameLeaderboard = {\n gameHistory: GameHistory[] | null;\n nickName: string;\n overallPoints: number;\n userId: string;\n};\n","import { GameDate, GlobalGameData } from \"./global\";\n\nconst OBJECT_ID_PATH_SEGMENT = \"[a-f0-9]{24}\";\nconst OBJECT_ID_PATH_SEGMENT_END = `${OBJECT_ID_PATH_SEGMENT}$`;\n\nexport const gameScreenIdentifierList = [\n {\n clue: \"Where conversations happen without speaking.\",\n id: \"chat\",\n match: \"/chat\",\n },\n {\n clue: \"Where you can find your loyalties.\",\n id: \"coupons\",\n match: \"/profile/account/coupons\",\n },\n {\n clue: \"A single moment worth showing up for.\",\n id: \"single-event\",\n match: new RegExp(`^/events/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"What’s happening around you, right now.\",\n id: \"events-near-me\",\n match: \"/events/events-near-me\",\n },\n {\n clue: \"Where events appear as pins on a map.\",\n id: \"events-map\",\n match: \"/events/events-map\",\n },\n {\n clue: \"A collection of events worth attending.\",\n id: \"events\",\n match: \"/events\",\n },\n {\n clue: \"What’s happening in a wider area — not just nearby.\",\n id: \"events-region\",\n match: /^\\/events\\/region\\/[^/]+$/,\n },\n {\n clue: \"Where fun becomes a challenge.\",\n id: \"games\",\n match: \"/profile/account/games\",\n },\n {\n clue: \"Your starting point for everything.\",\n id: \"home\",\n match: \"/home\",\n },\n {\n clue: \"Where the app whispers what you shouldn’t miss.\",\n id: \"notifications\",\n match: \"/notifications\",\n },\n {\n clue: \"An organisation or creator supporting the community.\",\n id: \"single-partner\",\n match: new RegExp(`^/partners/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"Organisations and creators supporting the community.\",\n id: \"partners\",\n match: \"/partners\",\n },\n {\n clue: \"Where your actions turn into a timeline.\",\n id: \"activities\",\n match: \"/profile/account/favourites\",\n },\n {\n clue: \"The place to redefine who you are.\",\n id: \"edit-profile\",\n match: \"/profile/account\",\n },\n {\n clue: \"Your identity, on display.\",\n id: \"profile\",\n match: \"/profile\",\n },\n {\n clue: \"Where you can redeem your rewards.\",\n id: \"rewards\",\n match: \"/profile/account/rewards\",\n },\n {\n clue: \"A single published post in full view.\",\n id: \"single-visitor-post\",\n match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"One stallholder offering something valuable.\",\n id: \"single-vendor\",\n match: new RegExp(`^/vendors/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"Where every stallholder waits under the right category.\",\n id: \"vendors\",\n match: \"/vendors\",\n },\n {\n clue: \"Where you browse articles and posts from around the platform.\",\n id: \"visitors\",\n match: \"/visitors\",\n },\n {\n clue: \"Where you fine-tune your experience.\",\n id: \"options\",\n match: \"/options\",\n },\n] as const;\n\nexport type GamePlacement = (typeof gameScreenIdentifierList)[number][\"id\"];\nexport type GamePlacementClue =\n (typeof gameScreenIdentifierList)[number][\"clue\"];\n\nexport type DailyClueBaseGame = {\n gameDate: GameDate;\n gameSolution: string;\n};\n\nexport type DailyClueGameData = GlobalGameData & {\n gameFields: DailyClueBaseGame;\n lastFoundDate: Date | null;\n letterInfo: {\n // Multiset of found letters: one entry per collected occurrence, so a\n // duplicate letter (e.g. two \"E\"s in \"EXPLORE\") appears twice once both\n // are found. Consumers must count occurrences, not use `includes`.\n collected: string[] | null;\n solutionShuffled: string[]; // The letters of the solution, but shuffled, e.g. [\"L\", \"C\", \"U\"]\n todaysClue: GamePlacementClue | null; // The clue for user to find the letter, e.g. related to {todaysPlacement}\n todaysLetter: string | null; // The letter the user has to find today, e.g. \"C\"\n todaysPlacement: GamePlacement | null; // The screen where the user has to find the clue, e.g. \"HomeScreen\"\n };\n};\n","export enum EnumGameType {\n DAILY_CLUE = \"dailyClue\",\n MINI_QUIZ = \"miniQuiz\",\n ODD_ONE_OUT = \"oddOneOut\",\n}\n\nexport type GameDate = {\n startDate: Date;\n endDate: Date;\n};\n\nexport const gameTypeToDisplayName: Record<EnumGameType, string> = {\n [EnumGameType.DAILY_CLUE]: \"Daily Clue\",\n [EnumGameType.MINI_QUIZ]: \"Mini Quiz\",\n [EnumGameType.ODD_ONE_OUT]: \"Odd One Out\",\n};\n\nexport type GlobalGameData = {\n points: number;\n // User has found the clue 3 days in a row, this is incrementing if the user finds the clue and decrements if user misses a day\n streak: number;\n};\n","import { EnumUserLicence } from \"../enums\";\n\n/** Tier keys in descending priority (highest first) for licence resolution. */\nexport const TIERS_BY_PRIORITY = [\"pro_plus\", \"pro\", \"standard\"] as const;\n\n/** Canonical subscription tier keys — matches Stripe/server tier identifiers. */\nexport type Tier = (typeof TIERS_BY_PRIORITY)[number];\n\n/** User-facing tier labels (decoupled from the Tier discriminant). */\nexport const TIER_DISPLAY_LABELS: Record<Tier, string> = {\n pro: \"Pro\",\n // eslint-disable-next-line camelcase\n pro_plus: \"Pro+ Ads\",\n standard: \"Standard\",\n};\n\n/** Maps licence enums to their canonical tier key. */\nexport const TIER_FROM_LICENCE: Record<EnumUserLicence, Tier> = {\n [EnumUserLicence.PRO_EVENT]: \"pro\",\n [EnumUserLicence.PRO_PLUS_EVENT]: \"pro_plus\",\n [EnumUserLicence.PRO_PLUS_VENDOR]: \"pro_plus\",\n [EnumUserLicence.PRO_VENDOR]: \"pro\",\n [EnumUserLicence.STANDARD_EVENT]: \"standard\",\n [EnumUserLicence.STANDARD_PARTNER]: \"standard\",\n [EnumUserLicence.STANDARD_VENDOR]: \"standard\",\n [EnumUserLicence.STANDARD_AFFILIATE]: \"standard\",\n [EnumUserLicence.STANDARD_SCHOOL]: \"standard\",\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport {\n CreateFormData,\n LocationType,\n OwnerType,\n PromoCodeType,\n SocialMediaType,\n} from \"./global\";\nimport { UserFormData } from \"./user\";\n\nexport enum EnumAffiliateParticipantType {\n INDIVIDUAL = \"INDIVIDUAL\",\n SOLE_TRADER = \"SOLE_TRADER\",\n COMPANY = \"COMPANY\",\n}\n\nexport type AffiliateContactDetails = {\n mobilePhone: string;\n};\n\nexport type AffiliateBankAccountDetailsType = {\n accountHolderName: string;\n accountNumber: string;\n};\n\nexport type AffiliateUserDefaultFields = Pick<\n UserFormData,\n \"email\" | \"firstName\" | \"lastName\" | \"termsAgreement\"\n>;\n\nexport type AffiliateDetailsType = AffiliateUserDefaultFields & {\n bankAccountDetails: AffiliateBankAccountDetailsType;\n contactDetails: AffiliateContactDetails;\n irdNumber: string;\n location: LocationType;\n participantType: EnumAffiliateParticipantType;\n socialMedia: SocialMediaType[] | null;\n};\n\nexport enum EnumAffiliateRewardType {\n ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS = \"ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS\",\n ACTIVE_VENDOR_BONUS_REWARD = \"ACTIVE_VENDOR_BONUS_REWARD\",\n ACTIVE_VENDOR_PRO_SUBSCRIPTION = \"ACTIVE_VENDOR_PRO_SUBSCRIPTION\",\n ACTIVE_VENDOR_STANDARD_SUBSCRIPTION = \"ACTIVE_VENDOR_STANDARD_SUBSCRIPTION\",\n NEW_EVENT_REGISTRATION = \"NEW_EVENT_REGISTRATION\",\n NEW_VENDOR_REGISTRATION = \"NEW_VENDOR_REGISTRATION\",\n}\n\nexport type AffiliateRewardType = {\n createdAt: Date;\n redeemedAt: Date | null;\n rewardDescription: string;\n rewardType: EnumAffiliateRewardType;\n rewardValue: number;\n};\n\nexport type AffiliateResourceType = {\n resourceActive: boolean;\n resourceDeletedAt: Date | null;\n resourceId: string;\n resourceName: string;\n resourceOwner: OwnerType;\n resourceType: EnumResourceType;\n rewards: AffiliateRewardType[];\n};\n\nexport type RedeemHistoryType = {\n paidAt?: Date | null;\n redeemedAt: Date;\n rewardValue: number;\n};\n\nexport interface AffiliateType {\n _id: string;\n active: boolean;\n approvedAt?: Date | null;\n affiliateBonusRewards?: AffiliateRewardType[] | null;\n affiliateCode: PromoCodeType | null;\n affiliateDetails: AffiliateDetailsType | null;\n affiliateResources: AffiliateResourceType[];\n createdAt: Date;\n deletedAt: Date | null;\n overallPoints: number;\n owner: OwnerType;\n redeemHistory?: RedeemHistoryType[] | null;\n updatedAt: Date | null;\n}\n\nexport type AffiliateFormData = Omit<\n AffiliateDetailsType,\n \"email\" | \"firstName\" | \"lastName\"\n>;\n\nexport type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;\n","import { EnumResourceType } from \"../../enums\";\nimport { CreateFormData, OwnerType, ResourceImageType } from \"../global\";\nimport { VendorProductList } from \"../vendor\";\n\nexport type ProductCoupon = {\n couponDocumentId: string;\n couponId: string;\n};\n\nexport enum EnumCouponQualificationType {\n PURCHASE = \"PURCHASE\",\n MARKET_VISIT = \"MARKET_VISIT\",\n MARKET_PASSPORT = \"MARKET_PASSPORT\",\n}\n\nexport type CouponPurchaseOption = {\n buy: number;\n get: number;\n maxRewardCount: number;\n type: EnumCouponQualificationType.PURCHASE;\n unit: string;\n};\n\nexport type CouponMarketVisitOption = {\n type: EnumCouponQualificationType.MARKET_VISIT;\n visits: number;\n};\n\nexport type CouponMarketPassportOption = {\n type: EnumCouponQualificationType.MARKET_PASSPORT;\n visits: number;\n};\n\nexport type CouponOption =\n CouponPurchaseOption | CouponMarketVisitOption | CouponMarketPassportOption;\n\nexport type CouponVendorProduct = {\n couponId: string;\n productId: string;\n vendorId: string;\n\n // Required only for MARKET_PASSPORT: which Vendor coupon contributes\n // progress when scanned.\n vendorCouponId?: string | null;\n};\n\nexport type CouponDefaultsFormData = {\n couponDescription: string;\n couponOption: CouponOption | null;\n couponVendorProducts?: CouponVendorProduct[];\n endDate: Date;\n resourceId: string;\n resourceType: EnumResourceType;\n startDate: Date;\n};\n\nexport type CreateCouponFormData = CreateFormData<CouponDefaultsFormData>;\n\nexport type CouponParticipantUserType = {\n couponCollectedCount: number;\n couponRedeemedAt: Date | null;\n couponRedeemedCount: number;\n couponCycleRedeemed: boolean;\n createdAt: Date;\n updatedAt: Date | null;\n userId: string;\n // Not persisted; resolved on read by `attachCouponDataProducts` from\n // `UserModel` via the participant's `userId`.\n nickName?: string | null;\n};\n\nexport type CouponCodeType = {\n code: string;\n qrCode: ResourceImageType;\n shareableQrCode: ResourceImageType;\n};\n\nexport type CouponDataProductsType = {\n active: boolean | null;\n couponId: string;\n productsList: VendorProductList[];\n vendorId: string;\n vendorLogo: ResourceImageType | null;\n vendorName: string;\n};\n\nexport type CouponDataType = CouponDefaultsFormData & {\n _id: string;\n active: boolean;\n couponCode: CouponCodeType | null;\n createdAt: Date;\n deletedAt: Date | null;\n participantUsers: CouponParticipantUserType[] | null;\n // products are not saved in the database, but are returned by the backend for convenience\n products?: CouponDataProductsType[] | null;\n updatedAt: Date | null;\n};\n\nexport interface CouponType {\n _id: string;\n active: boolean;\n couponData: CouponDataType[] | null;\n createdAt: Date;\n deletedAt: Date | null;\n owner: OwnerType;\n updatedAt: Date | null;\n}\n\nexport enum EnumCouponListType {\n ACTIVE = \"active\",\n OWNED = \"owned\",\n SCANNED = \"scanned\",\n}\n\nexport type CouponTypeList = {\n active: {\n data: CouponType[] | null;\n listName: EnumCouponListType.ACTIVE;\n };\n owned: {\n data: CouponType[] | null;\n listName: EnumCouponListType.OWNED;\n };\n scanned: {\n data: CouponType[] | null;\n listName: EnumCouponListType.SCANNED;\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACWO,IAAK,uBAAL,kBAAKA,0BAAL;AACL,EAAAA,sBAAA,cAAW;AACX,EAAAA,sBAAA,oBAAiB;AAFP,SAAAA;AAAA,GAAA;;;ACeL,IAAM,oBAAoB;;;ACtB1B,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,mBAAgB;AAChB,EAAAA,cAAA,mBAAgB;AAChB,EAAAA,cAAA,kBAAe;AALL,SAAAA;AAAA,GAAA;AAQL,IAAK,iBAAL,kBAAKC,oBAAL;AACL,EAAAA,gBAAA,YAAS;AACT,EAAAA,gBAAA,SAAM;AAFI,SAAAA;AAAA,GAAA;AAKL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,YAAS;AACT,EAAAA,cAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;AAML,IAAK,aAAL,kBAAKC,gBAAL;AACL,EAAAA,YAAA,eAAY;AACZ,EAAAA,YAAA,UAAO;AAFG,SAAAA;AAAA,GAAA;AAKL,IAAK,cAAL,kBAAKC,iBAAL;AACL,EAAAA,aAAA,WAAQ;AACR,EAAAA,aAAA,UAAO;AAFG,SA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GAAG;AAAA,EAC7B,sCAA+B,GAAG;AAAA,EAClC,wCAAgC,GAAG;AAAA,EACnC,8BAA2B,GAAG;AAAA,EAC9B,sCAA+B,GAAG;AAAA,EAClC,0CAAiC,GAAG;AAAA,EACpC,wCAAgC,GAAG;AAAA,EACnC,8CAAmC,GAAG;AAAA,EACtC,wCAAgC,GAAG;AACrC;;;AChBO,IAAK,+BAAL,kBAAKC,kCAAL;AACL,EAAAA,8BAAA,gBAAa;AACb,EAAAA,8BAAA,iBAAc;AACd,EAAAA,8BAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;AA6BL,IAAK,0BAAL,kBAAKC,6BAAL;AACL,EAAAA,yBAAA,4CAAyC;AACzC,EAAAA,yBAAA,gCAA6B;AAC7B,EAAAA,yBAAA,oCAAiC;AACjC,EAAAA,yBAAA,yCAAsC;AACtC,EAAAA,yBAAA,4BAAyB;AACzB,EAAAA,yBAAA,6BAA0B;AANhB,SAAAA;AAAA,GAAA;;;AC/BL,IAAK,8BAAL,kBAAKC,iCAAL;AACL,EAAAA,6BAAA,cAAW;AACX,EAAAA,6BAAA,kBAAe;AACf,EAAAA,6BAAA,qBAAkB;AAHR,SAAAA;AAAA,GAAA;AAmGL,IAAK,qBAAL,kBAAKC,wBAAL;AACL,EAAAA,oBAAA,YAAS;AACT,EAAAA,oBAAA,WAAQ;AACR,EAAAA,oBAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;","names":["EnumVerificationType","EnumAdShowOn","EnumAdPlatform","EnumAdStatus","EnumAdType","EnumAdStyle","EnumAdBookingSlotKind","EnumAdBookingState","EnumAdPaymentStatus","EnumAdEntitlementSource","EnumAdApprovalStatus","EnumActivity","EnumPostType","EnumPostContentType","EnumGameStatus","EnumGameType","EnumAffiliateParticipantType","EnumAffiliateRewardType","EnumCouponQualificationType","EnumCouponListType"]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts","../../src/types/auth.ts","../../src/types/global.ts","../../src/types/ad.ts","../../src/types/resourceActivities.ts","../../src/types/post.ts","../../src/types/game/index.ts","../../src/types/game/dailyClue.ts","../../src/types/game/global.ts","../../src/types/subscription.ts","../../src/types/affiliate.ts","../../src/types/coupon/index.ts"],"sourcesContent":["export * from \"./admin\";\nexport * from \"./auth\";\nexport * from \"./chat\";\nexport * from \"./contactUs\";\nexport * from \"./global\";\nexport * from \"./event\";\nexport * from \"./notification\";\nexport * from \"./poster\";\nexport * from \"./relation\";\nexport * from \"./vendor\";\nexport * from \"./user\";\nexport * from \"./ad\";\nexport * from \"./resourceActivities\";\nexport * from \"./partner\";\nexport * from \"./post\";\nexport * from \"./pushToken\";\nexport * from \"./appSettings\";\nexport * from \"./billingCatalog\";\nexport * from \"./googleImportedMarket\";\nexport * from \"./game\";\nexport * from \"./game/dailyClue\";\nexport * from \"./game/global\";\nexport * from \"./game/puzzleGame\";\nexport * from \"./school\";\nexport * from \"./subscription\";\nexport * from \"./affiliate\";\nexport * from \"./coupon\";\n","import {\n CreateFormData,\n EnumOSPlatform,\n EnumResourceType,\n PromoCodeType,\n TermsAgreement,\n} from \"src\";\n\nimport { MutationResponse } from \"./global\";\nimport { SafeUserType, UserFormData } from \"./user\";\n\nexport enum EnumVerificationType {\n REGISTER = \"register\",\n RESET_PASSWORD = \"resetPassword\",\n}\n\nexport type LoginFormData = {\n email: string;\n isAdminPage?: boolean;\n password: string;\n platform?: EnumOSPlatform;\n};\n\nexport type CreateLoginFormData = CreateFormData<LoginFormData>;\n\nexport type RegisterFormData = Pick<\n UserFormData,\n | \"email\"\n | \"firstName\"\n | \"lastName\"\n | \"nickName\"\n | \"platform\"\n | \"preferredRegion\"\n | \"termsAgreement\"\n> & {\n interests: EnumResourceType[];\n password: string;\n promoCode?: PromoCodeType | null;\n};\n\nexport type CreateRegisterFormData = CreateFormData<RegisterFormData>;\n\nexport type RequestPasswordResetFormData = {\n email: string;\n};\n\nexport type CreateRequestPasswordResetFormData =\n CreateFormData<RequestPasswordResetFormData>;\n\nexport type ResetPasswordFormData = {\n confirmPassword: string;\n email: string;\n password: string;\n};\n\nexport type CreateResetPasswordFormData = CreateFormData<ResetPasswordFormData>;\n\nexport type ValidateVerificationTokenFormData = {\n email: string;\n verificationToken: string;\n verificationType?: EnumVerificationType;\n};\n\nexport type CreateValidateVerificationTokenFormData =\n CreateFormData<ValidateVerificationTokenFormData>;\n\nexport type AuthPayloadType = {\n refreshToken: string | null;\n token: string;\n user: SafeUserType;\n};\n\nexport type AuthMutationResponse = MutationResponse<AuthPayloadType>;\n\nexport type RefreshTokenPayloadType = {\n refreshToken: string;\n token: string;\n};\n\nexport type RefreshTokenMutationResponse =\n MutationResponse<RefreshTokenPayloadType>;\n\nexport type StartImpersonationPayloadType = {\n expiresAt: Date;\n refreshToken: string;\n sessionId: string;\n token: string;\n user: SafeUserType;\n};\n\nexport type StartImpersonationMutationResponse =\n MutationResponse<StartImpersonationPayloadType>;\n\nexport type RefreshImpersonationMutationResponse =\n MutationResponse<RefreshTokenPayloadType>;\n","import {\n Control,\n FieldValues,\n FormState,\n UseFormGetValues,\n UseFormHandleSubmit,\n UseFormReset,\n UseFormSetValue,\n UseFormWatch,\n} from \"react-hook-form\";\n\nimport {\n EnumEventDateStatus,\n EnumEventType,\n EnumPartnerType,\n EnumRegions,\n EnumResourceType,\n EnumSocialMedia,\n EnumUserLicence,\n EnumUserRole,\n} from \"../enums\";\n\nimport { EventListItemType } from \"./event\";\nimport { EnumPostType } from \"./post\";\nimport { VendorType } from \"./vendor\";\n\nexport const PROMO_CODE_PREFIX = \"CM-\";\n\nexport type PromoCodeType = `${typeof PROMO_CODE_PREFIX}${string}`;\n\nexport type Nullable<T> = {\n [K in keyof T]: T[K] | null | undefined;\n};\n\n/** Uniform mutation response envelope used across GraphQL mutations. */\nexport type MutationResponse<T> = {\n data: T | null;\n message: string | null;\n};\n\nexport type DeviceInfo = {\n appBuildNumber: string;\n appId: string;\n appVersion: string;\n brand: string;\n deviceName: string;\n installationId: string;\n manufacturer: string;\n modelName: string;\n osName: string;\n osVersion: string;\n timestamp: Date;\n};\n\nexport type TermsAgreement = DeviceInfo & {\n termVersion: string;\n};\n\nexport type ResourceContactDetailsType = {\n email?: string | null;\n landlinePhone?: string | null;\n mobilePhone?: string | null;\n};\n\nexport type ResourceImageType = {\n active: boolean;\n source: string;\n title: string;\n};\n\nexport type SocialMediaType = {\n name?: EnumSocialMedia;\n link?: string;\n};\n\nexport type UserLicenceType = {\n expiryDate: Date;\n issuedDate: Date;\n licenceType: EnumUserLicence;\n prevLicenceType?: EnumUserLicence | null;\n};\n\nexport type OwnerType = {\n email: string;\n userId: string;\n};\n\nexport interface BaseResourceTypeFormData {\n _id?: string;\n active: boolean;\n contactDetails: ResourceContactDetailsType | null;\n cover: ResourceImageType;\n coverUpload?: ResourceImageType | null;\n description: string;\n images?: ResourceImageType[] | null;\n imagesUpload?: ResourceImageType[] | null;\n logo?: ResourceImageType | null;\n logoUpload?: ResourceImageType | null;\n name: string;\n promoCodes?: PromoCodeType[] | null;\n region: string;\n socialMedia: SocialMediaType[] | null;\n termsAgreement?: TermsAgreement | null;\n}\n\nexport type PosterUsageType = {\n month: string;\n count: number;\n};\n\nexport type RelatedPostType = {\n postActive: boolean;\n postId: string;\n postSlug: string;\n postType: EnumPostType;\n};\n\nexport type SocialShareResourceType = {\n qrCode: ResourceImageType;\n socialImage: ResourceImageType;\n};\n\nexport type BaseResourceType = Omit<\n BaseResourceTypeFormData,\n \"_id\" | \"coverUpload\" | \"imagesUpload\" | \"logoUpload\"\n> & {\n _id: string;\n adIds?: string[] | null;\n approvedAt?: Date | null;\n createdAt: Date;\n deletedAt: Date | null;\n owner: OwnerType;\n posterUsage?: PosterUsageType | null;\n rating?: number | null;\n relatedPost?: RelatedPostType | null;\n reviewCount?: number | null;\n sharePublic?: SocialShareResourceType | null;\n slug: string;\n updatedAt: Date | null;\n};\n\nexport type LocationGeoType = {\n coordinates: number[]; // [longitude, latitude]\n type: \"Point\"; // Mongoose GeoJSON type\n};\n\nexport type LocationType = {\n city: string;\n country: string;\n fullAddress: string;\n geo: LocationGeoType;\n latitude: number;\n longitude: number;\n region: string;\n};\n\nexport type DateTimeType = {\n dateStatus: EnumEventDateStatus;\n endDate: string;\n endTime: string;\n startDate: string;\n startTime: string;\n};\n\nexport type DateTimeFormValue = {\n dateStatus: EnumEventDateStatus;\n endDate?: string;\n endTime?: string;\n startDate?: string;\n startTime?: string;\n};\n\nexport type Region = {\n latitude: number;\n latitudeDelta: number;\n longitude: number;\n longitudeDelta: number;\n};\n\nexport type ResourceDetails = {\n dateTime: DateTimeType[] | null;\n description: string | null;\n eventStatus?: EventStatusType | null;\n location: LocationType | null;\n resourceCover: ResourceImageType | null;\n resourceId: string;\n resourceLogo: ResourceImageType | null;\n resourceName: string;\n resourceType: EnumResourceType;\n};\n\nexport type GeocodeLocation = Pick<LocationType, \"latitude\" | \"longitude\">;\n\nexport type EventStatusType = {\n claimed: boolean;\n eventType: EnumEventType;\n googlePlaceId?: string | null;\n};\n\nexport interface FormField {\n disabled?: boolean;\n helperText?: string;\n isTextArea?: boolean;\n keyboardType?:\n | \"default\"\n | \"email-address\"\n | \"number-pad\"\n | \"url\"\n | \"decimal-pad\"\n | \"phone-pad\";\n name: string;\n placeholder: string;\n required?: boolean;\n secureTextEntry?: boolean;\n}\n\nexport interface FormDateField {\n dateMode: \"date\" | \"time\";\n helperText?: string;\n name: \"endDate\" | \"endTime\" | \"startDate\" | \"startTime\";\n placeholder: string;\n}\n\nexport interface SubcategoryItems {\n id: string;\n name: string;\n description?: string | null;\n}\n\nexport interface Subcategory {\n id: string;\n name: string;\n items?: SubcategoryItems[] | null;\n}\n\nexport type CategoryColorType = {\n primary: string;\n secondary: string;\n};\n\nexport interface Category {\n color?: CategoryColorType | null;\n description?: string | null;\n id: string;\n name: string;\n subcategories: Subcategory[];\n}\n\nexport type OptionItem = {\n value: string;\n label: string;\n};\n\nexport type ImageObjectType = {\n uri: string;\n type: string;\n name: string;\n};\n\nexport interface ResourceConnectionsType {\n events: EventListItemType[] | null;\n vendors: VendorType[] | null;\n}\n\nexport interface CreateFormData<T extends FieldValues> {\n control: Control<T, any>;\n fields: T;\n formState: FormState<T>;\n handleSubmit: UseFormHandleSubmit<T, any>;\n reset: UseFormReset<T>;\n setValue: UseFormSetValue<T>;\n watch: UseFormWatch<T>;\n getValues: UseFormGetValues<T>;\n}\n\n/** Offset-pagination input for plain list fields (events/vendors/partners/posts/users). */\nexport interface PaginationOptions {\n limit?: number;\n offset?: number;\n}\n\n/** Server-side filter input for the super-admin users list query. */\nexport interface UserListFilter {\n active?: boolean | null;\n hasLicences?: boolean | null;\n role?: EnumUserRole | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin partners list query. */\nexport interface PartnerListFilter {\n active?: boolean | null;\n partnerType?: EnumPartnerType | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin vendors list query. */\nexport interface VendorListFilter {\n active?: boolean | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin events list query. */\nexport interface EventListFilter {\n active?: boolean | null;\n claimed?: boolean | null;\n region?: EnumRegions | null;\n search?: string | null;\n}\n\n/** Server-side filter input for the admin posts list query. */\nexport interface PostListFilter {\n active?: boolean | null;\n postType?: EnumPostType | null;\n search?: string | null;\n}\n\nexport interface UseGetResourcesByRegionOptions extends PaginationOptions {\n onlyClaimed?: boolean;\n skip?: boolean;\n}\n","import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData } from \"./global\";\n\nexport enum EnumAdShowOn {\n EVENTS_PAGE = \"Events_page\",\n FRONT_PAGE = \"Front_page\",\n MARKET_SEARCH = \"Market_search\",\n PARTNERS_PAGE = \"Partners_page\",\n VENDORS_PAGE = \"Vendors_page\",\n}\n\nexport enum EnumAdPlatform {\n MOBILE = \"mobile\",\n WEB = \"web\",\n}\n\nexport enum EnumAdStatus {\n ACTIVE = \"Active\",\n PAUSED = \"Paused\",\n EXPIRED = \"Expired\",\n}\n\nexport enum EnumAdType {\n SPONSORED = \"Sponsored\",\n FREE = \"Free\",\n}\n\nexport enum EnumAdStyle {\n BLOOM = \"Bloom\",\n RISE = \"Rise\",\n}\n\nexport enum EnumAdBookingSlotKind {\n PAID = \"paid\",\n RESERVED = \"reserved\",\n}\n\nexport enum EnumAdBookingState {\n HELD = \"held\",\n PENDING_APPROVAL = \"pending_approval\",\n APPROVED = \"approved\",\n FAILED = \"failed\",\n CANCELLED = \"cancelled\",\n REJECTED = \"rejected\",\n}\n\nexport enum EnumAdPaymentStatus {\n PENDING = \"pending\",\n PAID = \"paid\",\n FAILED = \"failed\",\n CANCELLED = \"cancelled\",\n}\n\nexport enum EnumAdEntitlementSource {\n PRO_PLUS = \"pro_plus\",\n ADMIN = \"admin\",\n ORGANIZER = \"organizer\",\n PARTNER = \"partner\",\n}\n\nexport enum EnumAdApprovalStatus {\n PENDING = \"pending\",\n APPROVED = \"approved\",\n REJECTED = \"rejected\",\n}\n\nexport type AdPlacement = EnumAdShowOn.FRONT_PAGE | EnumAdShowOn.MARKET_SEARCH;\n\nexport type AdDailyPriceKey = \"front_page_day\" | \"market_search_day\";\n\nexport type AdResource = {\n adDescription: string;\n adImage: string;\n adStyle: EnumAdStyle;\n adTitle: string;\n adType: EnumAdType;\n resourceId: string;\n resourceName: string;\n resourceRegion: string;\n resourceType: EnumResourceType;\n resourceSlug: string;\n};\n\nexport interface AdFormData {\n active: boolean;\n end: Date; // ISO date string\n resource: AdResource;\n showOn: EnumAdShowOn[];\n start?: Date; // ISO date string\n status: EnumAdStatus;\n targetRegion: string[];\n}\n\n// Form state matches the validation schema: all resource fields are present.\n// Use empty strings / explicit enum defaults in `defaultValues` for \"create\" flows.\nexport type AdFormState = AdFormData;\n\nexport type CreateAdFormData = CreateFormData<AdFormData>;\nexport type CreateAdFormState = CreateFormData<AdFormState>;\n\nexport interface AdType extends AdFormData {\n _id: string;\n adminManaged?: boolean;\n approvalStatus?: EnumAdApprovalStatus;\n bookingIds?: string[];\n bookingKind?: EnumAdBookingSlotKind;\n clicks?: number; // How many times the ad was clicked\n createdAt: Date;\n impressions?: number; // How often the ad was seen\n paymentStatus?: EnumAdPaymentStatus;\n start: Date; // ISO date string\n updatedAt: Date | null;\n}\n\nexport type AdBookingType = {\n _id: string;\n adId?: string | null;\n approvalStatus: EnumAdApprovalStatus;\n checkoutAttemptId?: string | null;\n currency?: string | null;\n dayKey: string;\n entitlementClaimKey?: string | null;\n entitlementSource?: EnumAdEntitlementSource | null;\n expiresAt?: Date | null;\n placement: AdPlacement;\n purchaseKey?: string | null;\n region: string;\n resource: AdResource;\n slotKind: EnumAdBookingSlotKind;\n slotNumber: number;\n state: EnumAdBookingState;\n stripeCheckoutSessionId?: string | null;\n stripePaymentIntentId?: string | null;\n unitAmount?: number | null;\n userId: string;\n};\n\nexport type AdDailyPriceType = {\n _id: string;\n active: boolean;\n currency: \"nzd\";\n key: AdDailyPriceKey;\n revision: number;\n unitAmount: number;\n};\n\nexport type AdSettingsType = {\n _id: \"default\";\n approvalRequired: boolean;\n minAppearancesPerHour: number;\n paidSlotsPerPlacement: number;\n reservedSlotsPerPlacement: number;\n rotationSeconds: number;\n};\n","import {\n EnumEventDateStatus,\n EnumOSPlatform,\n EnumResourceType,\n} from \"src/enums\";\n\nimport { LocationGeoType } from \"./global\";\n\nexport enum EnumActivity {\n FAVORITE = \"FAVORITE\",\n GOING = \"GOING\",\n INTERESTED = \"INTERESTED\",\n PRESENT = \"PRESENT\",\n VIEW = \"VIEW\",\n}\n\nexport type ResourceActivityEntry = {\n activityType: EnumActivity;\n location: LocationGeoType | null;\n dateStatus?: EnumEventDateStatus | null;\n startDate?: string | null;\n startTime?: string | null;\n timestamp: Date;\n userAgent: EnumOSPlatform;\n userId?: string | null;\n};\n\nexport type ResourceActivityType = {\n _id: string;\n resourceType: EnumResourceType;\n resourceId: string;\n activity: ResourceActivityEntry[];\n};\n\nexport type ResourceActivityInputType = {\n resourceId: string;\n resourceType: EnumResourceType;\n activity: Omit<ResourceActivityEntry, \"timestamp\" | \"userId\">;\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport { BaseGameType } from \"./game\";\nimport {\n CreateFormData,\n ResourceImageType,\n SocialShareResourceType,\n} from \"./global\";\n\nexport enum EnumPostType {\n CLUE_BITES = \"clue_bites\",\n //CLUE_GUIDES_FOR_ORGANISERS = \"clue_guides_for_organisers\",\n //CLUE_GUIDES_FOR_VENDORS = \"clue_guides_for_vendors\",\n MARKET_FACES = \"market_faces\",\n PLAY_AND_WIN = \"play_and_win\",\n}\n\nexport enum EnumPostContentType {\n GAME = \"game\",\n IMAGE = \"image\",\n LIST = \"list\",\n TEXTAREA = \"textarea\",\n VIDEO = \"video\",\n}\n\nexport type PostFileInput = {\n source: File;\n title?: string;\n};\n\nexport type PostContentTextarea = {\n textarea: {\n title?: string;\n data: string;\n };\n};\n\nexport type PostContentImage = {\n images: ResourceImageType[] | null;\n imagesUpload?: PostFileInput[] | null;\n};\n\nexport type PostContentVideo = {\n video: {\n source: string;\n title?: string;\n };\n};\n\nexport type PostContentList = {\n list: {\n title?: string;\n items: {\n text: string;\n }[];\n };\n};\n\nexport type PostContentGame = {\n game: BaseGameType;\n};\n\nexport type PostContentData =\n | PostContentGame\n | PostContentTextarea\n | PostContentImage\n | PostContentVideo\n | PostContentList;\n\nexport type PostContentFormData = {\n contentData?: PostContentData | null;\n contentOrder?: number | null;\n contentType?: EnumPostContentType | null;\n};\n\nexport type PostResource = {\n resourceSlug: string;\n resourceId: string;\n resourceType: EnumResourceType;\n resourceRegion: string;\n};\n\nexport interface PostFormData {\n active: boolean;\n caption: string;\n content: PostContentFormData[];\n cover?: ResourceImageType | null;\n coverUpload?: PostFileInput | null;\n postType: EnumPostType;\n resource?: PostResource | null;\n tags?: string[] | null;\n title: string;\n notifyUsers?: boolean | null;\n}\n\nexport type CreatePostFormData = CreateFormData<PostFormData>;\n\nexport type PostContentType = Omit<PostContentFormData, \"contentData\"> & {\n contentData: Omit<PostContentData, \"imagesUpload\">;\n};\n\nexport type PostType = Omit<\n PostFormData,\n \"content\" | \"coverUpload\" | \"resource\"\n> & {\n _id: string;\n approvedAt?: Date | null;\n content: PostContentType[];\n createdAt: Date;\n deletedAt: Date | null;\n resource?: PostResource | null;\n slug: string;\n sharePublic?: SocialShareResourceType | null;\n updatedAt: Date | null;\n};\n","import { OwnerType } from \"../global\";\n\nimport { DailyClueBaseGame, DailyClueGameData } from \"./dailyClue\";\nimport { EnumGameType, GameDate } from \"./global\";\nimport { PuzzleBaseGame, PuzzleGameData } from \"./puzzleGame\";\n\nexport type BaseGameMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueBaseGame;\n [EnumGameType.MINI_QUIZ]: PuzzleBaseGame;\n [EnumGameType.ODD_ONE_OUT]: PuzzleBaseGame;\n};\n\nexport type BaseGameType = {\n gameType: EnumGameType;\n gameTypeId: string;\n gameTitle: string;\n} & {\n [K in keyof BaseGameMap]?: BaseGameMap[K] | null;\n};\n\nexport enum EnumGameStatus {\n GAME_COMPLETED = \"GAME_COMPLETED\",\n GAME_IN_PROGRESS = \"GAME_IN_PROGRESS\",\n GAME_LEFT = \"GAME_LEFT\",\n GAME_STARTED = \"GAME_STARTED\",\n}\n\nexport type GameHistory = Pick<\n BaseGameType,\n \"gameTitle\" | \"gameType\" | \"gameTypeId\"\n> & {\n createdAt: Date;\n gameDate: GameDate;\n gameStatus: EnumGameStatus;\n /** Per-event delta. Not persisted for overallGamePoints (computed at read time). */\n pointsEarned: number;\n /** Running total for this game instance; computed at read time, not stored in Mongo. */\n overallGamePoints?: number;\n};\n\ntype GameDataMap = {\n [EnumGameType.DAILY_CLUE]: DailyClueGameData;\n [EnumGameType.MINI_QUIZ]: PuzzleGameData;\n [EnumGameType.ODD_ONE_OUT]: PuzzleGameData;\n};\ntype GameDataType = {\n [K in keyof GameDataMap]?: GameDataMap[K] | null;\n};\n\nexport type GameType = Pick<\n BaseGameType,\n \"gameTitle\" | \"gameType\" | \"gameTypeId\"\n> & {\n _id: string;\n active: boolean;\n createdAt: Date;\n gameData: GameDataType;\n gameHistory: GameHistory[] | null;\n /**\n * Set by the resolver that completed this row.\n * - `false`: completed but the points award has not been confirmed yet, so a\n * retry may still need to credit it.\n * - `true`: points confirmed credited.\n * - absent: row completed before this marker existed, so its award was already\n * granted through the legacy path and must never be credited again.\n */\n pointsCredited?: boolean | null;\n updatedAt: Date | null;\n};\n\nexport type GameDocType = {\n _id: string;\n active: boolean;\n createdAt: Date;\n deletedAt: Date | null;\n games: GameType[] | null;\n owner: OwnerType;\n points: number;\n updatedAt: Date | null;\n};\n\nexport type GameLeaderboard = {\n gameHistory: GameHistory[] | null;\n nickName: string;\n overallPoints: number;\n userId: string;\n};\n","import { GameDate, GlobalGameData } from \"./global\";\n\nconst OBJECT_ID_PATH_SEGMENT = \"[a-f0-9]{24}\";\nconst OBJECT_ID_PATH_SEGMENT_END = `${OBJECT_ID_PATH_SEGMENT}$`;\n\nexport const gameScreenIdentifierList = [\n {\n clue: \"Where conversations happen without speaking.\",\n id: \"chat\",\n match: \"/chat\",\n },\n {\n clue: \"Where you can find your loyalties.\",\n id: \"coupons\",\n match: \"/profile/account/coupons\",\n },\n {\n clue: \"A single moment worth showing up for.\",\n id: \"single-event\",\n match: new RegExp(`^/events/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"What’s happening around you, right now.\",\n id: \"events-near-me\",\n match: \"/events/events-near-me\",\n },\n {\n clue: \"Where events appear as pins on a map.\",\n id: \"events-map\",\n match: \"/events/events-map\",\n },\n {\n clue: \"A collection of events worth attending.\",\n id: \"events\",\n match: \"/events\",\n },\n {\n clue: \"What’s happening in a wider area — not just nearby.\",\n id: \"events-region\",\n match: /^\\/events\\/region\\/[^/]+$/,\n },\n {\n clue: \"Where fun becomes a challenge.\",\n id: \"games\",\n match: \"/profile/account/games\",\n },\n {\n clue: \"Your starting point for everything.\",\n id: \"home\",\n match: \"/home\",\n },\n {\n clue: \"Where the app whispers what you shouldn’t miss.\",\n id: \"notifications\",\n match: \"/notifications\",\n },\n {\n clue: \"An organisation or creator supporting the community.\",\n id: \"single-partner\",\n match: new RegExp(`^/partners/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"Organisations and creators supporting the community.\",\n id: \"partners\",\n match: \"/partners\",\n },\n {\n clue: \"Where your actions turn into a timeline.\",\n id: \"activities\",\n match: \"/profile/account/favourites\",\n },\n {\n clue: \"The place to redefine who you are.\",\n id: \"edit-profile\",\n match: \"/profile/account\",\n },\n {\n clue: \"Your identity, on display.\",\n id: \"profile\",\n match: \"/profile\",\n },\n {\n clue: \"Where you can redeem your rewards.\",\n id: \"rewards\",\n match: \"/profile/account/rewards\",\n },\n {\n clue: \"A single published post in full view.\",\n id: \"single-visitor-post\",\n match: new RegExp(`^/visitors/post/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"One stallholder offering something valuable.\",\n id: \"single-vendor\",\n match: new RegExp(`^/vendors/${OBJECT_ID_PATH_SEGMENT_END}`),\n },\n {\n clue: \"Where every stallholder waits under the right category.\",\n id: \"vendors\",\n match: \"/vendors\",\n },\n {\n clue: \"Where you browse articles and posts from around the platform.\",\n id: \"visitors\",\n match: \"/visitors\",\n },\n {\n clue: \"Where you fine-tune your experience.\",\n id: \"options\",\n match: \"/options\",\n },\n] as const;\n\nexport type GamePlacement = (typeof gameScreenIdentifierList)[number][\"id\"];\nexport type GamePlacementClue =\n (typeof gameScreenIdentifierList)[number][\"clue\"];\n\nexport type DailyClueBaseGame = {\n gameDate: GameDate;\n gameSolution: string;\n};\n\nexport type DailyClueGameData = GlobalGameData & {\n gameFields: DailyClueBaseGame;\n lastFoundDate: Date | null;\n letterInfo: {\n // Multiset of found letters: one entry per collected occurrence, so a\n // duplicate letter (e.g. two \"E\"s in \"EXPLORE\") appears twice once both\n // are found. Consumers must count occurrences, not use `includes`.\n collected: string[] | null;\n solutionShuffled: string[]; // The letters of the solution, but shuffled, e.g. [\"L\", \"C\", \"U\"]\n todaysClue: GamePlacementClue | null; // The clue for user to find the letter, e.g. related to {todaysPlacement}\n todaysLetter: string | null; // The letter the user has to find today, e.g. \"C\"\n todaysPlacement: GamePlacement | null; // The screen where the user has to find the clue, e.g. \"HomeScreen\"\n };\n};\n","export enum EnumGameType {\n DAILY_CLUE = \"dailyClue\",\n MINI_QUIZ = \"miniQuiz\",\n ODD_ONE_OUT = \"oddOneOut\",\n}\n\nexport type GameDate = {\n startDate: Date;\n endDate: Date;\n};\n\nexport const gameTypeToDisplayName: Record<EnumGameType, string> = {\n [EnumGameType.DAILY_CLUE]: \"Daily Clue\",\n [EnumGameType.MINI_QUIZ]: \"Mini Quiz\",\n [EnumGameType.ODD_ONE_OUT]: \"Odd One Out\",\n};\n\nexport type GlobalGameData = {\n points: number;\n // User has found the clue 3 days in a row, this is incrementing if the user finds the clue and decrements if user misses a day\n streak: number;\n};\n","import { EnumUserLicence } from \"../enums\";\n\n/** Tier keys in descending priority (highest first) for licence resolution. */\nexport const TIERS_BY_PRIORITY = [\"pro_plus\", \"pro\", \"standard\"] as const;\n\n/** Canonical subscription tier keys — matches Stripe/server tier identifiers. */\nexport type Tier = (typeof TIERS_BY_PRIORITY)[number];\n\n/** User-facing tier labels (decoupled from the Tier discriminant). */\nexport const TIER_DISPLAY_LABELS: Record<Tier, string> = {\n pro: \"Pro\",\n // eslint-disable-next-line camelcase\n pro_plus: \"Pro+ Ads\",\n standard: \"Standard\",\n};\n\n/** Maps licence enums to their canonical tier key. */\nexport const TIER_FROM_LICENCE: Record<EnumUserLicence, Tier> = {\n [EnumUserLicence.PRO_EVENT]: \"pro\",\n [EnumUserLicence.PRO_PLUS_EVENT]: \"pro_plus\",\n [EnumUserLicence.PRO_PLUS_VENDOR]: \"pro_plus\",\n [EnumUserLicence.PRO_VENDOR]: \"pro\",\n [EnumUserLicence.STANDARD_EVENT]: \"standard\",\n [EnumUserLicence.STANDARD_PARTNER]: \"standard\",\n [EnumUserLicence.STANDARD_VENDOR]: \"standard\",\n [EnumUserLicence.STANDARD_AFFILIATE]: \"standard\",\n [EnumUserLicence.STANDARD_SCHOOL]: \"standard\",\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport {\n CreateFormData,\n LocationType,\n OwnerType,\n PromoCodeType,\n SocialMediaType,\n} from \"./global\";\nimport { UserFormData } from \"./user\";\n\nexport enum EnumAffiliateParticipantType {\n INDIVIDUAL = \"INDIVIDUAL\",\n SOLE_TRADER = \"SOLE_TRADER\",\n COMPANY = \"COMPANY\",\n}\n\nexport type AffiliateContactDetails = {\n mobilePhone: string;\n};\n\nexport type AffiliateBankAccountDetailsType = {\n accountHolderName: string;\n accountNumber: string;\n};\n\nexport type AffiliateUserDefaultFields = Pick<\n UserFormData,\n \"email\" | \"firstName\" | \"lastName\" | \"termsAgreement\"\n>;\n\nexport type AffiliateDetailsType = AffiliateUserDefaultFields & {\n bankAccountDetails: AffiliateBankAccountDetailsType;\n contactDetails: AffiliateContactDetails;\n irdNumber: string;\n location: LocationType;\n participantType: EnumAffiliateParticipantType;\n socialMedia: SocialMediaType[] | null;\n};\n\nexport enum EnumAffiliateRewardType {\n ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS = \"ACTIVE_EVENT_WITH_VENDOR_REGISTRATIONS\",\n ACTIVE_VENDOR_BONUS_REWARD = \"ACTIVE_VENDOR_BONUS_REWARD\",\n ACTIVE_VENDOR_PRO_SUBSCRIPTION = \"ACTIVE_VENDOR_PRO_SUBSCRIPTION\",\n ACTIVE_VENDOR_STANDARD_SUBSCRIPTION = \"ACTIVE_VENDOR_STANDARD_SUBSCRIPTION\",\n NEW_EVENT_REGISTRATION = \"NEW_EVENT_REGISTRATION\",\n NEW_VENDOR_REGISTRATION = \"NEW_VENDOR_REGISTRATION\",\n}\n\nexport type AffiliateRewardType = {\n createdAt: Date;\n redeemedAt: Date | null;\n rewardDescription: string;\n rewardType: EnumAffiliateRewardType;\n rewardValue: number;\n};\n\nexport type AffiliateResourceType = {\n resourceActive: boolean;\n resourceDeletedAt: Date | null;\n resourceId: string;\n resourceName: string;\n resourceOwner: OwnerType;\n resourceType: EnumResourceType;\n rewards: AffiliateRewardType[];\n};\n\nexport type RedeemHistoryType = {\n paidAt?: Date | null;\n redeemedAt: Date;\n rewardValue: number;\n};\n\nexport interface AffiliateType {\n _id: string;\n active: boolean;\n approvedAt?: Date | null;\n affiliateBonusRewards?: AffiliateRewardType[] | null;\n affiliateCode: PromoCodeType | null;\n affiliateDetails: AffiliateDetailsType | null;\n affiliateResources: AffiliateResourceType[];\n createdAt: Date;\n deletedAt: Date | null;\n overallPoints: number;\n owner: OwnerType;\n redeemHistory?: RedeemHistoryType[] | null;\n updatedAt: Date | null;\n}\n\nexport type AffiliateFormData = Omit<\n AffiliateDetailsType,\n \"email\" | \"firstName\" | \"lastName\"\n>;\n\nexport type CreateAffiliateFormData = CreateFormData<AffiliateFormData>;\n","import { EnumResourceType } from \"../../enums\";\nimport { CreateFormData, OwnerType, ResourceImageType } from \"../global\";\nimport { VendorProductList } from \"../vendor\";\n\nexport type ProductCoupon = {\n couponDocumentId: string;\n couponId: string;\n};\n\nexport enum EnumCouponQualificationType {\n PURCHASE = \"PURCHASE\",\n MARKET_VISIT = \"MARKET_VISIT\",\n MARKET_PASSPORT = \"MARKET_PASSPORT\",\n}\n\nexport type CouponPurchaseOption = {\n buy: number;\n get: number;\n maxRewardCount: number;\n type: EnumCouponQualificationType.PURCHASE;\n unit: string;\n};\n\nexport type CouponMarketVisitOption = {\n type: EnumCouponQualificationType.MARKET_VISIT;\n visits: number;\n};\n\nexport type CouponMarketPassportOption = {\n type: EnumCouponQualificationType.MARKET_PASSPORT;\n visits: number;\n};\n\nexport type CouponOption =\n CouponPurchaseOption | CouponMarketVisitOption | CouponMarketPassportOption;\n\nexport type CouponVendorProduct = {\n couponId: string;\n productId: string;\n vendorId: string;\n\n // Required only for MARKET_PASSPORT: which Vendor coupon contributes\n // progress when scanned.\n vendorCouponId?: string | null;\n};\n\nexport type CouponDefaultsFormData = {\n couponDescription: string;\n couponOption: CouponOption | null;\n couponVendorProducts?: CouponVendorProduct[];\n endDate: Date;\n resourceId: string;\n resourceType: EnumResourceType;\n startDate: Date;\n};\n\nexport type CreateCouponFormData = CreateFormData<CouponDefaultsFormData>;\n\nexport type CouponParticipantUserType = {\n couponCollectedCount: number;\n couponRedeemedAt: Date | null;\n couponRedeemedCount: number;\n couponCycleRedeemed: boolean;\n createdAt: Date;\n updatedAt: Date | null;\n userId: string;\n // Not persisted; resolved on read by `attachCouponDataProducts` from\n // `UserModel` via the participant's `userId`.\n nickName?: string | null;\n};\n\nexport type CouponCodeType = {\n code: string;\n qrCode: ResourceImageType;\n shareableQrCode: ResourceImageType;\n};\n\nexport type CouponDataProductsType = {\n active: boolean | null;\n couponId: string;\n productsList: VendorProductList[];\n vendorId: string;\n vendorLogo: ResourceImageType | null;\n vendorName: string;\n};\n\nexport type CouponDataType = CouponDefaultsFormData & {\n _id: string;\n active: boolean;\n couponCode: CouponCodeType | null;\n createdAt: Date;\n deletedAt: Date | null;\n participantUsers: CouponParticipantUserType[] | null;\n // products are not saved in the database, but are returned by the backend for convenience\n products?: CouponDataProductsType[] | null;\n updatedAt: Date | null;\n};\n\nexport interface CouponType {\n _id: string;\n active: boolean;\n couponData: CouponDataType[] | null;\n createdAt: Date;\n deletedAt: Date | null;\n owner: OwnerType;\n updatedAt: Date | null;\n}\n\nexport enum EnumCouponListType {\n ACTIVE = \"active\",\n OWNED = \"owned\",\n SCANNED = \"scanned\",\n}\n\nexport type CouponTypeList = {\n active: {\n data: CouponType[] | null;\n listName: EnumCouponListType.ACTIVE;\n };\n owned: {\n data: CouponType[] | null;\n listName: EnumCouponListType.OWNED;\n };\n scanned: {\n data: CouponType[] | null;\n listName: EnumCouponListType.SCANNED;\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AL;AACL,EAAAA,yBAAA,4CAAyC;AACzC,EAAAA,yBAAA,gCAA6B;AAC7B,EAAAA,yBAAA,oCAAiC;AACjC,EAAAA,yBAAA,yCAAsC;AACtC,EAAAA,yBAAA,4BAAyB;AACzB,EAAAA,yBAAA,6BAA0B;AANhB,SAAAA;AAAA,GAAA;;;AC/BL,IAAK,8BAAL,kBAAKC,iCAAL;AACL,EAAAA,6BAAA,cAAW;AACX,EAAAA,6BAAA,kBAAe;AACf,EAAAA,6BAAA,qBAAkB;AAHR,SAAAA;AAAA,GAAA;AAmGL,IAAK,qBAAL,kBAAKC,wBAAL;AACL,EAAAA,oBAAA,YAAS;AACT,EAAAA,oBAAA,WAAQ;AACR,EAAAA,oBAAA,aAAU;AAHA,SAAAA;AAAA,GAAA;","names":["EnumVerificationType","EnumAdShowOn","EnumAdPlatform","EnumAdStatus","EnumAdType","EnumAdStyle","EnumAdBookingSlotKind","EnumAdBookingState","EnumAdPaymentStatus","EnumAdEntitlementSource","EnumAdApprovalStatus","EnumActivity","EnumPostType","EnumPostContentType","EnumGameStatus","EnumGameType","EnumAffiliateParticipantType","EnumAffiliateRewardType","EnumCouponQualificationType","EnumCouponListType"]}
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { A as AdminUpdateResourceType, c as ChatMessageInput, d as ChatMessageReaction, e as ChatMessageReplyPreview, f as ChatMessageSeen, g as ChatMessageType, C as ChatType, h as CreateBulkNotificationInput, E as EnumActivity, a as NotificationCount, i as NotificationDataType, N as NotificationType, P as ParticipantType, R as ReportChatUser, j as ResourceActivityEntry, k as ResourceActivityInputType, b as ResourceActivityType } from '../resourceActivities-
|
|
2
|
-
export { s as AdBookingType, t as AdDailyPriceKey, u as AdDailyPriceType, l as AdFormData, v as AdFormState, w as AdPlacement, x as AdResource, y as AdSettingsFormData, z as AdSettingsType, b as AdType, o as AppSettingsFormData, d as AppSettingsType, A as AuthMutationResponse, B as AuthPayloadType, D as CreateAdFormData, m as CreateAdFormState, p as CreateAppSettingsFormData, C as CreateLoginFormData, n as CreatePartnerFormData, g as CreateRegisterFormData, h as CreateRequestPasswordResetFormData, j as CreateResetPasswordFormData, r as CreateSchoolFormData, i as CreateValidateVerificationTokenFormData, F as EnumAdApprovalStatus, G as EnumAdBookingSlotKind, H as EnumAdBookingState, I as EnumAdEntitlementSource, J as EnumAdPaymentStatus, E as EnumAdPlatform, c as EnumAdShowOn, K as EnumAdStatus, L as EnumAdStyle, M as EnumAdType, N as EnumVerificationType, O as LoginFormData, Q as MarketingMaterialRequestInputType, k as PartnerFormData, P as PartnerType, T as PosterInputType, R as RefreshImpersonationMutationResponse, a as RefreshTokenMutationResponse, U as RefreshTokenPayloadType, V as RegisterFormData, W as RequestPasswordResetFormData, X as ResetPasswordFormData, Y as SchoolCampaignType, q as SchoolFormData, Z as SchoolRegisteredUserType, f as SchoolReturnType, e as SchoolType, S as StartImpersonationMutationResponse, _ as StartImpersonationPayloadType, $ as ValidateVerificationTokenFormData } from '../ad-
|
|
3
|
-
export { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-
|
|
4
|
-
import { d as EventListItemType } from '../global-
|
|
5
|
-
export { K as BaseGameMap, N as BaseGameType, Q as BaseResourceType, B as BaseResourceTypeFormData, C as Category, c as CategoryColorType, T as CouponCodeType, W as CouponDataProductsType, X as CouponDataType, H as CouponDefaultsFormData, Y as CouponMarketPassportOption, Z as CouponMarketVisitOption, _ as CouponOption, $ as CouponParticipantUserType, a0 as CouponPurchaseOption, o as CouponType, p as CouponTypeList, a1 as CouponVendorProduct, I as CreateCouponFormData, x as CreateEventFormData, z as CreateEventInfoFormData, a2 as CreateFormData, D as CreatePostFormData, v as CreateUnregisteredVendorFormData, r as CreateVendorFormData, t as CreateVendorInfoFormData, a3 as DailyClueBaseGame, a4 as DailyClueGameData, a5 as DateTimeFormValue, a6 as DateTimeType, a7 as DateTimeWithPriceFormValue, a8 as DateTimeWithPriceType, a9 as DeviceInfo, aa as EnumCouponListType, ab as EnumCouponQualificationType, ac as EnumGameStatus, ad as EnumGameType, ae as EnumPostContentType, af as EnumPostType, w as EventFormData, y as EventInfoFormData, e as EventInfoType, ag as EventListFilter, ah as EventStatusType, E as EventType, a as FormDateField, F as FormField, ai as GameDate, G as GameDocType, aj as GameHistory, n as GameLeaderboard, ak as GamePlacement, al as GamePlacementClue, am as GameType, an as GeocodeLocation, ao as GlobalGameData, ap as ImageObjectType, aq as LocationGeoType, L as LocationType, M as MutationResponse, k as MyPendingVendorClaim, ar as Nullable, O as OptionItem, as as OwnerType, at as PROMO_CODE_PREFIX, au as PaginationOptions, av as PartnerListFilter, aw as PaymentInfoType, ax as PostContentData, ay as PostContentFormData, az as PostContentGame, aA as PostContentImage, aB as PostContentList, aC as PostContentTextarea, aD as PostContentType, aE as PostContentVideo, aF as PostFileInput, A as PostFormData, aG as PostListFilter, aH as PostResource, m as PostType, P as PosterUsageType, aI as ProductCoupon, aJ as PromoCodeType, aK as PuzzleAnswer, aL as PuzzleAnsweredQuestion, aM as PuzzleBaseGame, aN as PuzzleGameData, aO as PuzzleQuestion, R as RefundPolicy, J as Region, aP as RelatedPostType, aQ as RelationDate, aR as RelationInputType, f as RelationType, b as Requirement, g as ResourceConnectionsType, aS as ResourceContactDetailsType, aT as ResourceDetails, aU as ResourceImageType, aV as ResourceRelationField, aW as SocialMediaType, aX as SocialShareResourceType, S as StallType, aY as Subcategory, aZ as SubcategoryItems, a_ as TermsAgreement, u as UnregisteredVendorFormData, a$ as UnregisteredVendorInvitationType, h as UnregisteredVendorType, U as UseGetResourcesByRegionOptions, l as UserLicenceType, b0 as UserListFilter, b1 as VendorAttributes, b2 as VendorAvailability, b3 as VendorCalendarData, V as VendorClaimTokenValidation, b4 as VendorDowngradeSnapshot, q as VendorFormData, s as VendorInfoFormData, j as VendorInfoType, b5 as VendorListFilter, b6 as VendorProductList, i as VendorType, b7 as gameScreenIdentifierList, b8 as gameTypeToDisplayName } from '../global-
|
|
6
|
-
export { C as CreateUserFormData, f as RedeemRewardInput, R as RedeemRewardMutationResponse, g as RedeemRewardResponse, h as RedeemedReward, b as ResourceByUser, S as SafeUserType, i as StripeSubscription, j as SubscriptionPlanData, d as SubscriptionPlansResponse, k as SubscriptionPricingData, c as SubscriptionStatusData, l as UserActivity, m as UserActivityEvent, e as UserFormData, n as UserType, U as UsersByPromoCode } from '../user-
|
|
1
|
+
export { A as AdminUpdateResourceType, c as ChatMessageInput, d as ChatMessageReaction, e as ChatMessageReplyPreview, f as ChatMessageSeen, g as ChatMessageType, C as ChatType, h as CreateBulkNotificationInput, E as EnumActivity, a as NotificationCount, i as NotificationDataType, N as NotificationType, P as ParticipantType, R as ReportChatUser, j as ResourceActivityEntry, k as ResourceActivityInputType, b as ResourceActivityType } from '../resourceActivities-Ci12UkJU.mjs';
|
|
2
|
+
export { s as AdBookingType, t as AdDailyPriceKey, u as AdDailyPriceType, l as AdFormData, v as AdFormState, w as AdPlacement, x as AdResource, y as AdSettingsFormData, z as AdSettingsType, b as AdType, o as AppSettingsFormData, d as AppSettingsType, A as AuthMutationResponse, B as AuthPayloadType, D as CreateAdFormData, m as CreateAdFormState, p as CreateAppSettingsFormData, C as CreateLoginFormData, n as CreatePartnerFormData, g as CreateRegisterFormData, h as CreateRequestPasswordResetFormData, j as CreateResetPasswordFormData, r as CreateSchoolFormData, i as CreateValidateVerificationTokenFormData, F as EnumAdApprovalStatus, G as EnumAdBookingSlotKind, H as EnumAdBookingState, I as EnumAdEntitlementSource, J as EnumAdPaymentStatus, E as EnumAdPlatform, c as EnumAdShowOn, K as EnumAdStatus, L as EnumAdStyle, M as EnumAdType, N as EnumVerificationType, O as LoginFormData, Q as MarketingMaterialRequestInputType, k as PartnerFormData, P as PartnerType, T as PosterInputType, R as RefreshImpersonationMutationResponse, a as RefreshTokenMutationResponse, U as RefreshTokenPayloadType, V as RegisterFormData, W as RequestPasswordResetFormData, X as ResetPasswordFormData, Y as SchoolCampaignType, q as SchoolFormData, Z as SchoolRegisteredUserType, f as SchoolReturnType, e as SchoolType, S as StartImpersonationMutationResponse, _ as StartImpersonationPayloadType, $ as ValidateVerificationTokenFormData } from '../ad-Drhn_Azy.mjs';
|
|
3
|
+
export { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-BJPQ5nKc.mjs';
|
|
4
|
+
import { d as EventListItemType } from '../global-XUBcgjNc.mjs';
|
|
5
|
+
export { K as BaseGameMap, N as BaseGameType, Q as BaseResourceType, B as BaseResourceTypeFormData, C as Category, c as CategoryColorType, T as CouponCodeType, W as CouponDataProductsType, X as CouponDataType, H as CouponDefaultsFormData, Y as CouponMarketPassportOption, Z as CouponMarketVisitOption, _ as CouponOption, $ as CouponParticipantUserType, a0 as CouponPurchaseOption, o as CouponType, p as CouponTypeList, a1 as CouponVendorProduct, I as CreateCouponFormData, x as CreateEventFormData, z as CreateEventInfoFormData, a2 as CreateFormData, D as CreatePostFormData, v as CreateUnregisteredVendorFormData, r as CreateVendorFormData, t as CreateVendorInfoFormData, a3 as DailyClueBaseGame, a4 as DailyClueGameData, a5 as DateTimeFormValue, a6 as DateTimeType, a7 as DateTimeWithPriceFormValue, a8 as DateTimeWithPriceType, a9 as DeviceInfo, aa as EnumCouponListType, ab as EnumCouponQualificationType, ac as EnumGameStatus, ad as EnumGameType, ae as EnumPostContentType, af as EnumPostType, w as EventFormData, y as EventInfoFormData, e as EventInfoType, ag as EventListFilter, ah as EventStatusType, E as EventType, a as FormDateField, F as FormField, ai as GameDate, G as GameDocType, aj as GameHistory, n as GameLeaderboard, ak as GamePlacement, al as GamePlacementClue, am as GameType, an as GeocodeLocation, ao as GlobalGameData, ap as ImageObjectType, aq as LocationGeoType, L as LocationType, M as MutationResponse, k as MyPendingVendorClaim, ar as Nullable, O as OptionItem, as as OwnerType, at as PROMO_CODE_PREFIX, au as PaginationOptions, av as PartnerListFilter, aw as PaymentInfoType, ax as PostContentData, ay as PostContentFormData, az as PostContentGame, aA as PostContentImage, aB as PostContentList, aC as PostContentTextarea, aD as PostContentType, aE as PostContentVideo, aF as PostFileInput, A as PostFormData, aG as PostListFilter, aH as PostResource, m as PostType, P as PosterUsageType, aI as ProductCoupon, aJ as PromoCodeType, aK as PuzzleAnswer, aL as PuzzleAnsweredQuestion, aM as PuzzleBaseGame, aN as PuzzleGameData, aO as PuzzleQuestion, R as RefundPolicy, J as Region, aP as RelatedPostType, aQ as RelationDate, aR as RelationInputType, f as RelationType, b as Requirement, g as ResourceConnectionsType, aS as ResourceContactDetailsType, aT as ResourceDetails, aU as ResourceImageType, aV as ResourceRelationField, aW as SocialMediaType, aX as SocialShareResourceType, S as StallType, aY as Subcategory, aZ as SubcategoryItems, a_ as TermsAgreement, u as UnregisteredVendorFormData, a$ as UnregisteredVendorInvitationType, h as UnregisteredVendorType, U as UseGetResourcesByRegionOptions, l as UserLicenceType, b0 as UserListFilter, b1 as VendorAttributes, b2 as VendorAvailability, b3 as VendorCalendarData, V as VendorClaimTokenValidation, b4 as VendorDowngradeSnapshot, q as VendorFormData, s as VendorInfoFormData, j as VendorInfoType, b5 as VendorListFilter, b6 as VendorProductList, i as VendorType, b7 as gameScreenIdentifierList, b8 as gameTypeToDisplayName } from '../global-XUBcgjNc.mjs';
|
|
6
|
+
export { C as CreateUserFormData, f as RedeemRewardInput, R as RedeemRewardMutationResponse, g as RedeemRewardResponse, h as RedeemedReward, b as ResourceByUser, S as SafeUserType, i as StripeSubscription, j as SubscriptionPlanData, d as SubscriptionPlansResponse, k as SubscriptionPricingData, c as SubscriptionStatusData, l as UserActivity, m as UserActivityEvent, e as UserFormData, n as UserOverallPointsEntry, o as UserType, U as UsersByPromoCode } from '../user-D31zAVuz.mjs';
|
|
7
7
|
import { EnumOSPlatform } from '../enums/index.mjs';
|
|
8
8
|
export { a as BillingCatalogDefinition, B as BillingCatalogEntryType, b as BillingCatalogInitialEntry, c as BillingCatalogKey, d as BillingCatalogPriceHistoryEntry, P as PaidVendorBillingPeriod, e as PaidVendorLicence, S as SyncBillingCatalogPriceInput, U as UpdateBillingCatalogPriceInput } from '../billingCatalog-DDAU9BWV.mjs';
|
|
9
9
|
export { a as TIERS_BY_PRIORITY, b as TIER_DISPLAY_LABELS, c as TIER_FROM_LICENCE, T as Tier } from '../subscription-bmAdrnfi.mjs';
|
|
10
|
-
export { b as AffiliateBankAccountDetailsType, c as AffiliateContactDetails, d as AffiliateDetailsType, a as AffiliateFormData, e as AffiliateResourceType, f as AffiliateRewardType, A as AffiliateType, g as AffiliateUserDefaultFields, C as CreateAffiliateFormData, E as EnumAffiliateParticipantType, h as EnumAffiliateRewardType, R as RedeemHistoryType } from '../affiliate-
|
|
10
|
+
export { b as AffiliateBankAccountDetailsType, c as AffiliateContactDetails, d as AffiliateDetailsType, a as AffiliateFormData, e as AffiliateResourceType, f as AffiliateRewardType, A as AffiliateType, g as AffiliateUserDefaultFields, C as CreateAffiliateFormData, E as EnumAffiliateParticipantType, h as EnumAffiliateRewardType, R as RedeemHistoryType } from '../affiliate-Cd78p2Fz.mjs';
|
|
11
11
|
import '../images/index.mjs';
|
|
12
12
|
import 'react-hook-form';
|
|
13
13
|
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { A as AdminUpdateResourceType, c as ChatMessageInput, d as ChatMessageReaction, e as ChatMessageReplyPreview, f as ChatMessageSeen, g as ChatMessageType, C as ChatType, h as CreateBulkNotificationInput, E as EnumActivity, a as NotificationCount, i as NotificationDataType, N as NotificationType, P as ParticipantType, R as ReportChatUser, j as ResourceActivityEntry, k as ResourceActivityInputType, b as ResourceActivityType } from '../resourceActivities-
|
|
2
|
-
export { s as AdBookingType, t as AdDailyPriceKey, u as AdDailyPriceType, l as AdFormData, v as AdFormState, w as AdPlacement, x as AdResource, y as AdSettingsFormData, z as AdSettingsType, b as AdType, o as AppSettingsFormData, d as AppSettingsType, A as AuthMutationResponse, B as AuthPayloadType, D as CreateAdFormData, m as CreateAdFormState, p as CreateAppSettingsFormData, C as CreateLoginFormData, n as CreatePartnerFormData, g as CreateRegisterFormData, h as CreateRequestPasswordResetFormData, j as CreateResetPasswordFormData, r as CreateSchoolFormData, i as CreateValidateVerificationTokenFormData, F as EnumAdApprovalStatus, G as EnumAdBookingSlotKind, H as EnumAdBookingState, I as EnumAdEntitlementSource, J as EnumAdPaymentStatus, E as EnumAdPlatform, c as EnumAdShowOn, K as EnumAdStatus, L as EnumAdStyle, M as EnumAdType, N as EnumVerificationType, O as LoginFormData, Q as MarketingMaterialRequestInputType, k as PartnerFormData, P as PartnerType, T as PosterInputType, R as RefreshImpersonationMutationResponse, a as RefreshTokenMutationResponse, U as RefreshTokenPayloadType, V as RegisterFormData, W as RequestPasswordResetFormData, X as ResetPasswordFormData, Y as SchoolCampaignType, q as SchoolFormData, Z as SchoolRegisteredUserType, f as SchoolReturnType, e as SchoolType, S as StartImpersonationMutationResponse, _ as StartImpersonationPayloadType, $ as ValidateVerificationTokenFormData } from '../ad-
|
|
3
|
-
export { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-
|
|
4
|
-
import { d as EventListItemType } from '../global-
|
|
5
|
-
export { K as BaseGameMap, N as BaseGameType, Q as BaseResourceType, B as BaseResourceTypeFormData, C as Category, c as CategoryColorType, T as CouponCodeType, W as CouponDataProductsType, X as CouponDataType, H as CouponDefaultsFormData, Y as CouponMarketPassportOption, Z as CouponMarketVisitOption, _ as CouponOption, $ as CouponParticipantUserType, a0 as CouponPurchaseOption, o as CouponType, p as CouponTypeList, a1 as CouponVendorProduct, I as CreateCouponFormData, x as CreateEventFormData, z as CreateEventInfoFormData, a2 as CreateFormData, D as CreatePostFormData, v as CreateUnregisteredVendorFormData, r as CreateVendorFormData, t as CreateVendorInfoFormData, a3 as DailyClueBaseGame, a4 as DailyClueGameData, a5 as DateTimeFormValue, a6 as DateTimeType, a7 as DateTimeWithPriceFormValue, a8 as DateTimeWithPriceType, a9 as DeviceInfo, aa as EnumCouponListType, ab as EnumCouponQualificationType, ac as EnumGameStatus, ad as EnumGameType, ae as EnumPostContentType, af as EnumPostType, w as EventFormData, y as EventInfoFormData, e as EventInfoType, ag as EventListFilter, ah as EventStatusType, E as EventType, a as FormDateField, F as FormField, ai as GameDate, G as GameDocType, aj as GameHistory, n as GameLeaderboard, ak as GamePlacement, al as GamePlacementClue, am as GameType, an as GeocodeLocation, ao as GlobalGameData, ap as ImageObjectType, aq as LocationGeoType, L as LocationType, M as MutationResponse, k as MyPendingVendorClaim, ar as Nullable, O as OptionItem, as as OwnerType, at as PROMO_CODE_PREFIX, au as PaginationOptions, av as PartnerListFilter, aw as PaymentInfoType, ax as PostContentData, ay as PostContentFormData, az as PostContentGame, aA as PostContentImage, aB as PostContentList, aC as PostContentTextarea, aD as PostContentType, aE as PostContentVideo, aF as PostFileInput, A as PostFormData, aG as PostListFilter, aH as PostResource, m as PostType, P as PosterUsageType, aI as ProductCoupon, aJ as PromoCodeType, aK as PuzzleAnswer, aL as PuzzleAnsweredQuestion, aM as PuzzleBaseGame, aN as PuzzleGameData, aO as PuzzleQuestion, R as RefundPolicy, J as Region, aP as RelatedPostType, aQ as RelationDate, aR as RelationInputType, f as RelationType, b as Requirement, g as ResourceConnectionsType, aS as ResourceContactDetailsType, aT as ResourceDetails, aU as ResourceImageType, aV as ResourceRelationField, aW as SocialMediaType, aX as SocialShareResourceType, S as StallType, aY as Subcategory, aZ as SubcategoryItems, a_ as TermsAgreement, u as UnregisteredVendorFormData, a$ as UnregisteredVendorInvitationType, h as UnregisteredVendorType, U as UseGetResourcesByRegionOptions, l as UserLicenceType, b0 as UserListFilter, b1 as VendorAttributes, b2 as VendorAvailability, b3 as VendorCalendarData, V as VendorClaimTokenValidation, b4 as VendorDowngradeSnapshot, q as VendorFormData, s as VendorInfoFormData, j as VendorInfoType, b5 as VendorListFilter, b6 as VendorProductList, i as VendorType, b7 as gameScreenIdentifierList, b8 as gameTypeToDisplayName } from '../global-
|
|
6
|
-
export { C as CreateUserFormData, f as RedeemRewardInput, R as RedeemRewardMutationResponse, g as RedeemRewardResponse, h as RedeemedReward, b as ResourceByUser, S as SafeUserType, i as StripeSubscription, j as SubscriptionPlanData, d as SubscriptionPlansResponse, k as SubscriptionPricingData, c as SubscriptionStatusData, l as UserActivity, m as UserActivityEvent, e as UserFormData, n as UserType, U as UsersByPromoCode } from '../user-
|
|
1
|
+
export { A as AdminUpdateResourceType, c as ChatMessageInput, d as ChatMessageReaction, e as ChatMessageReplyPreview, f as ChatMessageSeen, g as ChatMessageType, C as ChatType, h as CreateBulkNotificationInput, E as EnumActivity, a as NotificationCount, i as NotificationDataType, N as NotificationType, P as ParticipantType, R as ReportChatUser, j as ResourceActivityEntry, k as ResourceActivityInputType, b as ResourceActivityType } from '../resourceActivities-C8eIfpKl.js';
|
|
2
|
+
export { s as AdBookingType, t as AdDailyPriceKey, u as AdDailyPriceType, l as AdFormData, v as AdFormState, w as AdPlacement, x as AdResource, y as AdSettingsFormData, z as AdSettingsType, b as AdType, o as AppSettingsFormData, d as AppSettingsType, A as AuthMutationResponse, B as AuthPayloadType, D as CreateAdFormData, m as CreateAdFormState, p as CreateAppSettingsFormData, C as CreateLoginFormData, n as CreatePartnerFormData, g as CreateRegisterFormData, h as CreateRequestPasswordResetFormData, j as CreateResetPasswordFormData, r as CreateSchoolFormData, i as CreateValidateVerificationTokenFormData, F as EnumAdApprovalStatus, G as EnumAdBookingSlotKind, H as EnumAdBookingState, I as EnumAdEntitlementSource, J as EnumAdPaymentStatus, E as EnumAdPlatform, c as EnumAdShowOn, K as EnumAdStatus, L as EnumAdStyle, M as EnumAdType, N as EnumVerificationType, O as LoginFormData, Q as MarketingMaterialRequestInputType, k as PartnerFormData, P as PartnerType, T as PosterInputType, R as RefreshImpersonationMutationResponse, a as RefreshTokenMutationResponse, U as RefreshTokenPayloadType, V as RegisterFormData, W as RequestPasswordResetFormData, X as ResetPasswordFormData, Y as SchoolCampaignType, q as SchoolFormData, Z as SchoolRegisteredUserType, f as SchoolReturnType, e as SchoolType, S as StartImpersonationMutationResponse, _ as StartImpersonationPayloadType, $ as ValidateVerificationTokenFormData } from '../ad-CdehhMyb.js';
|
|
3
|
+
export { C as ContactUsFormData, a as CreateContactUsFormData } from '../contactUs-ITiB1XV4.js';
|
|
4
|
+
import { d as EventListItemType } from '../global-DlC7W4p7.js';
|
|
5
|
+
export { K as BaseGameMap, N as BaseGameType, Q as BaseResourceType, B as BaseResourceTypeFormData, C as Category, c as CategoryColorType, T as CouponCodeType, W as CouponDataProductsType, X as CouponDataType, H as CouponDefaultsFormData, Y as CouponMarketPassportOption, Z as CouponMarketVisitOption, _ as CouponOption, $ as CouponParticipantUserType, a0 as CouponPurchaseOption, o as CouponType, p as CouponTypeList, a1 as CouponVendorProduct, I as CreateCouponFormData, x as CreateEventFormData, z as CreateEventInfoFormData, a2 as CreateFormData, D as CreatePostFormData, v as CreateUnregisteredVendorFormData, r as CreateVendorFormData, t as CreateVendorInfoFormData, a3 as DailyClueBaseGame, a4 as DailyClueGameData, a5 as DateTimeFormValue, a6 as DateTimeType, a7 as DateTimeWithPriceFormValue, a8 as DateTimeWithPriceType, a9 as DeviceInfo, aa as EnumCouponListType, ab as EnumCouponQualificationType, ac as EnumGameStatus, ad as EnumGameType, ae as EnumPostContentType, af as EnumPostType, w as EventFormData, y as EventInfoFormData, e as EventInfoType, ag as EventListFilter, ah as EventStatusType, E as EventType, a as FormDateField, F as FormField, ai as GameDate, G as GameDocType, aj as GameHistory, n as GameLeaderboard, ak as GamePlacement, al as GamePlacementClue, am as GameType, an as GeocodeLocation, ao as GlobalGameData, ap as ImageObjectType, aq as LocationGeoType, L as LocationType, M as MutationResponse, k as MyPendingVendorClaim, ar as Nullable, O as OptionItem, as as OwnerType, at as PROMO_CODE_PREFIX, au as PaginationOptions, av as PartnerListFilter, aw as PaymentInfoType, ax as PostContentData, ay as PostContentFormData, az as PostContentGame, aA as PostContentImage, aB as PostContentList, aC as PostContentTextarea, aD as PostContentType, aE as PostContentVideo, aF as PostFileInput, A as PostFormData, aG as PostListFilter, aH as PostResource, m as PostType, P as PosterUsageType, aI as ProductCoupon, aJ as PromoCodeType, aK as PuzzleAnswer, aL as PuzzleAnsweredQuestion, aM as PuzzleBaseGame, aN as PuzzleGameData, aO as PuzzleQuestion, R as RefundPolicy, J as Region, aP as RelatedPostType, aQ as RelationDate, aR as RelationInputType, f as RelationType, b as Requirement, g as ResourceConnectionsType, aS as ResourceContactDetailsType, aT as ResourceDetails, aU as ResourceImageType, aV as ResourceRelationField, aW as SocialMediaType, aX as SocialShareResourceType, S as StallType, aY as Subcategory, aZ as SubcategoryItems, a_ as TermsAgreement, u as UnregisteredVendorFormData, a$ as UnregisteredVendorInvitationType, h as UnregisteredVendorType, U as UseGetResourcesByRegionOptions, l as UserLicenceType, b0 as UserListFilter, b1 as VendorAttributes, b2 as VendorAvailability, b3 as VendorCalendarData, V as VendorClaimTokenValidation, b4 as VendorDowngradeSnapshot, q as VendorFormData, s as VendorInfoFormData, j as VendorInfoType, b5 as VendorListFilter, b6 as VendorProductList, i as VendorType, b7 as gameScreenIdentifierList, b8 as gameTypeToDisplayName } from '../global-DlC7W4p7.js';
|
|
6
|
+
export { C as CreateUserFormData, f as RedeemRewardInput, R as RedeemRewardMutationResponse, g as RedeemRewardResponse, h as RedeemedReward, b as ResourceByUser, S as SafeUserType, i as StripeSubscription, j as SubscriptionPlanData, d as SubscriptionPlansResponse, k as SubscriptionPricingData, c as SubscriptionStatusData, l as UserActivity, m as UserActivityEvent, e as UserFormData, n as UserOverallPointsEntry, o as UserType, U as UsersByPromoCode } from '../user-BSFExFvl.js';
|
|
7
7
|
import { EnumOSPlatform } from '../enums/index.js';
|
|
8
8
|
export { a as BillingCatalogDefinition, B as BillingCatalogEntryType, b as BillingCatalogInitialEntry, c as BillingCatalogKey, d as BillingCatalogPriceHistoryEntry, P as PaidVendorBillingPeriod, e as PaidVendorLicence, S as SyncBillingCatalogPriceInput, U as UpdateBillingCatalogPriceInput } from '../billingCatalog-oWAfZX95.js';
|
|
9
9
|
export { a as TIERS_BY_PRIORITY, b as TIER_DISPLAY_LABELS, c as TIER_FROM_LICENCE, T as Tier } from '../subscription-BU8GvH2K.js';
|
|
10
|
-
export { b as AffiliateBankAccountDetailsType, c as AffiliateContactDetails, d as AffiliateDetailsType, a as AffiliateFormData, e as AffiliateResourceType, f as AffiliateRewardType, A as AffiliateType, g as AffiliateUserDefaultFields, C as CreateAffiliateFormData, E as EnumAffiliateParticipantType, h as EnumAffiliateRewardType, R as RedeemHistoryType } from '../affiliate-
|
|
10
|
+
export { b as AffiliateBankAccountDetailsType, c as AffiliateContactDetails, d as AffiliateDetailsType, a as AffiliateFormData, e as AffiliateResourceType, f as AffiliateRewardType, A as AffiliateType, g as AffiliateUserDefaultFields, C as CreateAffiliateFormData, E as EnumAffiliateParticipantType, h as EnumAffiliateRewardType, R as RedeemHistoryType } from '../affiliate-CdIL0r2o.js';
|
|
11
11
|
import '../images/index.js';
|
|
12
12
|
import 'react-hook-form';
|
|
13
13
|
|
package/dist/types/index.mjs
CHANGED
|
@@ -22,13 +22,13 @@ import {
|
|
|
22
22
|
PROMO_CODE_PREFIX,
|
|
23
23
|
gameScreenIdentifierList,
|
|
24
24
|
gameTypeToDisplayName
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-5AAYX364.mjs";
|
|
26
26
|
import {
|
|
27
27
|
TIERS_BY_PRIORITY,
|
|
28
28
|
TIER_DISPLAY_LABELS,
|
|
29
29
|
TIER_FROM_LICENCE
|
|
30
30
|
} from "../chunk-DQ7ZHIXW.mjs";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-XGGFB7HY.mjs";
|
|
32
32
|
export {
|
|
33
33
|
EnumActivity,
|
|
34
34
|
EnumAdApprovalStatus,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EnumOSPlatform, EnumResourceType, EnumReward, EnumUserRole, EnumBillingPeriod, EnumUserLicence, EnumSubscriptionStatus, EnumNotificationResourceType } from './enums/index.
|
|
2
|
-
import { aU as ResourceImageType, L as LocationType, a_ as TermsAgreement, l as UserLicenceType, aJ as PromoCodeType, a6 as DateTimeType, M as MutationResponse, a2 as CreateFormData } from './global-
|
|
1
|
+
import { EnumOSPlatform, EnumResourceType, EnumPointType, EnumReward, EnumUserRole, EnumBillingPeriod, EnumUserLicence, EnumSubscriptionStatus, EnumNotificationResourceType } from './enums/index.js';
|
|
2
|
+
import { aU as ResourceImageType, L as LocationType, a_ as TermsAgreement, l as UserLicenceType, aJ as PromoCodeType, a6 as DateTimeType, M as MutationResponse, a2 as CreateFormData } from './global-DlC7W4p7.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Canonical permission IDs. Add new permissions here first, then map them in
|
|
@@ -118,6 +118,17 @@ type RedeemedReward = {
|
|
|
118
118
|
pointsUsed: number;
|
|
119
119
|
redeemedAt: Date;
|
|
120
120
|
};
|
|
121
|
+
type UserOverallPointsEntry = {
|
|
122
|
+
createdAt: Date;
|
|
123
|
+
pointType: EnumPointType;
|
|
124
|
+
points: number;
|
|
125
|
+
/**
|
|
126
|
+
* Idempotency key for the award (e.g. the game row `_id`). Crediting is
|
|
127
|
+
* deduped on this value, so a retried award cannot credit the same source
|
|
128
|
+
* twice. Absent on `INITIAL` entries created by the legacy migration.
|
|
129
|
+
*/
|
|
130
|
+
sourceId?: string | null;
|
|
131
|
+
};
|
|
121
132
|
type UserType = Omit<UserFormData, "confirmPassword" | "avatarUpload" | "_id"> & {
|
|
122
133
|
_id: string;
|
|
123
134
|
affiliate?: string | null;
|
|
@@ -128,7 +139,8 @@ type UserType = Omit<UserFormData, "confirmPassword" | "avatarUpload" | "_id"> &
|
|
|
128
139
|
game: string | null;
|
|
129
140
|
interests?: EnumResourceType[] | null;
|
|
130
141
|
licences: UserLicenceType[] | null;
|
|
131
|
-
|
|
142
|
+
/** Append-only ledger: one entry per awarded batch, never replaced. */
|
|
143
|
+
overallPoints: UserOverallPointsEntry[] | null;
|
|
132
144
|
partner: string | null;
|
|
133
145
|
/** Computed from roles via ROLE_PERMISSIONS — not stored in Mongo. */
|
|
134
146
|
permissions: Permission[];
|
|
@@ -138,6 +150,8 @@ type UserType = Omit<UserFormData, "confirmPassword" | "avatarUpload" | "_id"> &
|
|
|
138
150
|
roles: EnumUserRole[];
|
|
139
151
|
school: string | null;
|
|
140
152
|
stripe?: StripeSubscription;
|
|
153
|
+
/** Computed by the API: sum of every `overallPoints` entry — not stored in Mongo. */
|
|
154
|
+
totalOverallPoints: number;
|
|
141
155
|
updatedAt: Date | null;
|
|
142
156
|
userActivity: UserActivity | null;
|
|
143
157
|
vendor: string | null;
|
|
@@ -160,4 +174,4 @@ type UsersByPromoCode = {
|
|
|
160
174
|
userId: string;
|
|
161
175
|
};
|
|
162
176
|
|
|
163
|
-
export { type CreateUserFormData as C, type Permission as P, type RedeemRewardMutationResponse as R, type SafeUserType as S, type UsersByPromoCode as U, WILDCARD_PERMISSION as W, PERMISSIONS as a, type ResourceByUser as b, type SubscriptionStatusData as c, type SubscriptionPlansResponse as d, type UserFormData as e, type RedeemRewardInput as f, type RedeemRewardResponse as g, type RedeemedReward as h, type StripeSubscription as i, type SubscriptionPlanData as j, type SubscriptionPricingData as k, type UserActivity as l, type UserActivityEvent as m, type
|
|
177
|
+
export { type CreateUserFormData as C, type Permission as P, type RedeemRewardMutationResponse as R, type SafeUserType as S, type UsersByPromoCode as U, WILDCARD_PERMISSION as W, PERMISSIONS as a, type ResourceByUser as b, type SubscriptionStatusData as c, type SubscriptionPlansResponse as d, type UserFormData as e, type RedeemRewardInput as f, type RedeemRewardResponse as g, type RedeemedReward as h, type StripeSubscription as i, type SubscriptionPlanData as j, type SubscriptionPricingData as k, type UserActivity as l, type UserActivityEvent as m, type UserOverallPointsEntry as n, type UserType as o };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EnumOSPlatform, EnumResourceType, EnumReward, EnumUserRole, EnumBillingPeriod, EnumUserLicence, EnumSubscriptionStatus, EnumNotificationResourceType } from './enums/index.
|
|
2
|
-
import { aU as ResourceImageType, L as LocationType, a_ as TermsAgreement, l as UserLicenceType, aJ as PromoCodeType, a6 as DateTimeType, M as MutationResponse, a2 as CreateFormData } from './global-
|
|
1
|
+
import { EnumOSPlatform, EnumResourceType, EnumPointType, EnumReward, EnumUserRole, EnumBillingPeriod, EnumUserLicence, EnumSubscriptionStatus, EnumNotificationResourceType } from './enums/index.mjs';
|
|
2
|
+
import { aU as ResourceImageType, L as LocationType, a_ as TermsAgreement, l as UserLicenceType, aJ as PromoCodeType, a6 as DateTimeType, M as MutationResponse, a2 as CreateFormData } from './global-XUBcgjNc.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Canonical permission IDs. Add new permissions here first, then map them in
|
|
@@ -118,6 +118,17 @@ type RedeemedReward = {
|
|
|
118
118
|
pointsUsed: number;
|
|
119
119
|
redeemedAt: Date;
|
|
120
120
|
};
|
|
121
|
+
type UserOverallPointsEntry = {
|
|
122
|
+
createdAt: Date;
|
|
123
|
+
pointType: EnumPointType;
|
|
124
|
+
points: number;
|
|
125
|
+
/**
|
|
126
|
+
* Idempotency key for the award (e.g. the game row `_id`). Crediting is
|
|
127
|
+
* deduped on this value, so a retried award cannot credit the same source
|
|
128
|
+
* twice. Absent on `INITIAL` entries created by the legacy migration.
|
|
129
|
+
*/
|
|
130
|
+
sourceId?: string | null;
|
|
131
|
+
};
|
|
121
132
|
type UserType = Omit<UserFormData, "confirmPassword" | "avatarUpload" | "_id"> & {
|
|
122
133
|
_id: string;
|
|
123
134
|
affiliate?: string | null;
|
|
@@ -128,7 +139,8 @@ type UserType = Omit<UserFormData, "confirmPassword" | "avatarUpload" | "_id"> &
|
|
|
128
139
|
game: string | null;
|
|
129
140
|
interests?: EnumResourceType[] | null;
|
|
130
141
|
licences: UserLicenceType[] | null;
|
|
131
|
-
|
|
142
|
+
/** Append-only ledger: one entry per awarded batch, never replaced. */
|
|
143
|
+
overallPoints: UserOverallPointsEntry[] | null;
|
|
132
144
|
partner: string | null;
|
|
133
145
|
/** Computed from roles via ROLE_PERMISSIONS — not stored in Mongo. */
|
|
134
146
|
permissions: Permission[];
|
|
@@ -138,6 +150,8 @@ type UserType = Omit<UserFormData, "confirmPassword" | "avatarUpload" | "_id"> &
|
|
|
138
150
|
roles: EnumUserRole[];
|
|
139
151
|
school: string | null;
|
|
140
152
|
stripe?: StripeSubscription;
|
|
153
|
+
/** Computed by the API: sum of every `overallPoints` entry — not stored in Mongo. */
|
|
154
|
+
totalOverallPoints: number;
|
|
141
155
|
updatedAt: Date | null;
|
|
142
156
|
userActivity: UserActivity | null;
|
|
143
157
|
vendor: string | null;
|
|
@@ -160,4 +174,4 @@ type UsersByPromoCode = {
|
|
|
160
174
|
userId: string;
|
|
161
175
|
};
|
|
162
176
|
|
|
163
|
-
export { type CreateUserFormData as C, type Permission as P, type RedeemRewardMutationResponse as R, type SafeUserType as S, type UsersByPromoCode as U, WILDCARD_PERMISSION as W, PERMISSIONS as a, type ResourceByUser as b, type SubscriptionStatusData as c, type SubscriptionPlansResponse as d, type UserFormData as e, type RedeemRewardInput as f, type RedeemRewardResponse as g, type RedeemedReward as h, type StripeSubscription as i, type SubscriptionPlanData as j, type SubscriptionPricingData as k, type UserActivity as l, type UserActivityEvent as m, type
|
|
177
|
+
export { type CreateUserFormData as C, type Permission as P, type RedeemRewardMutationResponse as R, type SafeUserType as S, type UsersByPromoCode as U, WILDCARD_PERMISSION as W, PERMISSIONS as a, type ResourceByUser as b, type SubscriptionStatusData as c, type SubscriptionPlansResponse as d, type UserFormData as e, type RedeemRewardInput as f, type RedeemRewardResponse as g, type RedeemedReward as h, type StripeSubscription as i, type SubscriptionPlanData as j, type SubscriptionPricingData as k, type UserActivity as l, type UserActivityEvent as m, type UserOverallPointsEntry as n, type UserType as o };
|
package/dist/utils/index.cjs
CHANGED
|
@@ -139,6 +139,7 @@ __export(utils_exports, {
|
|
|
139
139
|
shouldShowEventActionsWithWeather: () => shouldShowEventActionsWithWeather,
|
|
140
140
|
sortDatesChronologically: () => sortDatesChronologically,
|
|
141
141
|
statusOptions: () => statusOptions,
|
|
142
|
+
sumUserOverallPoints: () => sumUserOverallPoints,
|
|
142
143
|
timeFormat: () => timeFormat,
|
|
143
144
|
toCalendarIsoDate: () => toCalendarIsoDate,
|
|
144
145
|
toNZTime: () => toNZTime,
|
|
@@ -728,14 +729,14 @@ var DEFAULT_SHARE_OG_IMAGE = `${SHARE_SITE_URL}/assets/logo.webp`;
|
|
|
728
729
|
var SHARE_RESOURCE_LABEL = {
|
|
729
730
|
[RELATION_SHARE_APPLICATION]: "Application",
|
|
730
731
|
[RELATION_SHARE_INVITATION]: "Invitation",
|
|
732
|
+
affiliate: "Affiliate",
|
|
731
733
|
clue_bites: "Clue Bites",
|
|
732
734
|
market_faces: "Market Faces",
|
|
733
|
-
play_and_win: "Play & Win",
|
|
734
735
|
market: "Market",
|
|
735
736
|
partner: "Partner",
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
737
|
+
play_and_win: "Play & Win",
|
|
738
|
+
school: "School",
|
|
739
|
+
stallholder: "Stallholder"
|
|
739
740
|
};
|
|
740
741
|
|
|
741
742
|
// src/sharing/normalizeShareDescription.ts
|
|
@@ -901,6 +902,14 @@ function isResourceImageActive(image) {
|
|
|
901
902
|
var SCHOOL_MIN_STUDENT_COUNT = 300;
|
|
902
903
|
var SCHOOL_MAX_STUDENT_COUNT = 0;
|
|
903
904
|
|
|
905
|
+
// src/utils/userPoints.ts
|
|
906
|
+
function sumUserOverallPoints(points) {
|
|
907
|
+
return (points ?? []).reduce(
|
|
908
|
+
(total, entry) => total + (entry?.points ?? 0),
|
|
909
|
+
0
|
|
910
|
+
);
|
|
911
|
+
}
|
|
912
|
+
|
|
904
913
|
// src/calendar/eventCalendar.ts
|
|
905
914
|
var import_dayjs3 = __toESM(require("dayjs"));
|
|
906
915
|
function toCalendarIsoDate(startDate) {
|
|
@@ -2623,6 +2632,7 @@ function getErrorMessage(error, fallback = DEFAULT_USER_FACING_ERROR) {
|
|
|
2623
2632
|
shouldShowEventActionsWithWeather,
|
|
2624
2633
|
sortDatesChronologically,
|
|
2625
2634
|
statusOptions,
|
|
2635
|
+
sumUserOverallPoints,
|
|
2626
2636
|
timeFormat,
|
|
2627
2637
|
toCalendarIsoDate,
|
|
2628
2638
|
toNZTime,
|