@timardex/cluemart-shared 1.5.537 → 1.5.539

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/{auth-B5tprOIL.d.ts → auth-BiybdWuP.d.ts} +2 -2
  2. package/dist/{auth-DtPfNKc4.d.mts → auth-Bxz2zKuN.d.mts} +2 -2
  3. package/dist/{chunk-TL6OY4BM.mjs → chunk-HYU4YHHL.mjs} +5 -1
  4. package/dist/chunk-HYU4YHHL.mjs.map +1 -0
  5. package/dist/formFields/index.d.mts +1 -1
  6. package/dist/formFields/index.d.ts +1 -1
  7. package/dist/{game-CC5mxG64.d.mts → game-CKJKoqrR.d.mts} +1 -1
  8. package/dist/{game-DhiKOr9_.d.ts → game-DAQTH29H.d.ts} +1 -1
  9. package/dist/{global-B0WdAD-8.d.ts → global-CDqmjLH1.d.ts} +4 -2
  10. package/dist/{global-MMBYi34A.d.mts → global-ClbRuePq.d.mts} +4 -2
  11. package/dist/graphql/index.d.mts +4 -4
  12. package/dist/graphql/index.d.ts +4 -4
  13. package/dist/hooks/index.cjs +3 -2
  14. package/dist/hooks/index.cjs.map +1 -1
  15. package/dist/hooks/index.d.mts +4 -4
  16. package/dist/hooks/index.d.ts +4 -4
  17. package/dist/hooks/index.mjs +4 -3
  18. package/dist/hooks/index.mjs.map +1 -1
  19. package/dist/index.cjs +8 -2
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.mts +6 -4
  22. package/dist/index.d.ts +6 -4
  23. package/dist/index.mjs +7 -2
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/{post-CISTnZDs.d.ts → post-CKcK3MWE.d.ts} +3 -3
  26. package/dist/{post-Dpg2AwRf.d.mts → post-DveQ1mlc.d.mts} +3 -3
  27. package/dist/{resourceActivities-CqrscA5x.d.mts → resourceActivities-B8dshdq5.d.mts} +1 -1
  28. package/dist/{resourceActivities-2FaGRW-i.d.ts → resourceActivities-BXsZrzFC.d.ts} +1 -1
  29. package/dist/types/index.cjs +5 -0
  30. package/dist/types/index.cjs.map +1 -1
  31. package/dist/types/index.d.mts +6 -6
  32. package/dist/types/index.d.ts +6 -6
  33. package/dist/types/index.mjs +4 -2
  34. package/dist/utils/index.d.mts +2 -2
  35. package/dist/utils/index.d.ts +2 -2
  36. package/package.json +1 -1
  37. package/dist/chunk-TL6OY4BM.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { s as CreateFormData, Y as TermsAgreement } from './global-B0WdAD-8.js';
1
+ import { s as CreateFormData, J as PromoCodeType, _ as TermsAgreement } from './global-CDqmjLH1.js';
2
2
  import { EnumOSPlatform } from './enums/index.js';
3
3
 
4
4
  type ContactUsFormData = {
@@ -27,7 +27,7 @@ type RegisterFormData = {
27
27
  password: string;
28
28
  platform?: EnumOSPlatform;
29
29
  preferredRegion: string;
30
- promoCode?: string | null;
30
+ promoCode?: PromoCodeType | null;
31
31
  termsAgreement?: TermsAgreement | null;
32
32
  };
33
33
  type CreateRegisterFormData = CreateFormData<RegisterFormData>;
@@ -1,4 +1,4 @@
1
- import { s as CreateFormData, Y as TermsAgreement } from './global-MMBYi34A.mjs';
1
+ import { s as CreateFormData, J as PromoCodeType, _ as TermsAgreement } from './global-ClbRuePq.mjs';
2
2
  import { EnumOSPlatform } from './enums/index.mjs';
3
3
 
4
4
  type ContactUsFormData = {
@@ -27,7 +27,7 @@ type RegisterFormData = {
27
27
  password: string;
28
28
  platform?: EnumOSPlatform;
29
29
  preferredRegion: string;
30
- promoCode?: string | null;
30
+ promoCode?: PromoCodeType | null;
31
31
  termsAgreement?: TermsAgreement | null;
32
32
  };
33
33
  type CreateRegisterFormData = CreateFormData<RegisterFormData>;
@@ -5,6 +5,9 @@ var EnumVerificationType = /* @__PURE__ */ ((EnumVerificationType2) => {
5
5
  return EnumVerificationType2;
6
6
  })(EnumVerificationType || {});
7
7
 
8
+ // src/types/global.ts
9
+ var PROMO_CODE_PREFIX = "CM-";
10
+
8
11
  // src/types/ad.ts
9
12
  var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
10
13
  EnumAdShowOn2["EVENTS_PAGE"] = "Events_page";
@@ -62,8 +65,9 @@ export {
62
65
  EnumAdType,
63
66
  EnumAdStyle,
64
67
  EnumVerificationType,
68
+ PROMO_CODE_PREFIX,
65
69
  EnumActivity,
66
70
  EnumPostType,
67
71
  EnumPostContentType
68
72
  };
69
- //# sourceMappingURL=chunk-TL6OY4BM.mjs.map
73
+ //# sourceMappingURL=chunk-HYU4YHHL.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types/auth.ts","../src/types/global.ts","../src/types/ad.ts","../src/types/resourceActivities.ts","../src/types/post.ts"],"sourcesContent":["import {\n CreateFormData,\n EnumOSPlatform,\n PromoCodeType,\n TermsAgreement,\n} from \"src\";\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 = {\n email: string;\n firstName: string;\n lastName: string;\n password: string;\n platform?: EnumOSPlatform;\n preferredRegion: string;\n promoCode?: PromoCodeType | null;\n termsAgreement?: TermsAgreement | 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","import {\n Control,\n FieldValues,\n FormState,\n UseFormHandleSubmit,\n UseFormReset,\n UseFormSetValue,\n UseFormWatch,\n} from \"react-hook-form\";\n\nimport {\n EnumEventDateStatus,\n EnumEventType,\n EnumResourceType,\n EnumSocialMedia,\n EnumUserLicence,\n} from \"../enums\";\n\nimport { EventListItemType } from \"./event\";\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\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: string;\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 | null;\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 AssociateType = {\n email: string;\n resourceId: string;\n resourceType: EnumResourceType;\n licence: UserLicenceType;\n};\n\nexport type OwnerType = {\n email: string;\n userId: string;\n};\n\nexport interface BaseResourceTypeFormData {\n _id?: string;\n active: boolean;\n associates: AssociateType[] | null;\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 owner?: OwnerType | null;\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 BaseResourceType = Omit<\n BaseResourceTypeFormData,\n \"_id\" | \"coverUpload\" | \"imagesUpload\" | \"logoUpload\"\n> & {\n _id: string;\n adIds?: string[] | null;\n createdAt: Date;\n deletedAt: Date | null;\n posterUsage?: PosterUsageType | null;\n rating?: number | null;\n reviewCount?: number | null;\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 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 interface Category {\n color?: string | 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}\n","import { EnumResourceType } from \"src/enums\";\n\nimport { CreateFormData, SocialMediaType } from \"./global\";\n\nexport enum EnumAdShowOn {\n EVENTS_PAGE = \"Events_page\",\n FRONT_PAGE = \"Front_page\",\n PARTNERS_PAGE = \"Partners_page\",\n VENDORS_PAGE = \"Vendors_page\",\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 type AdResource = {\n adDescription: string | null;\n adImage: string | null;\n adStyle: EnumAdStyle | null;\n adTitle: string | null;\n adType: EnumAdType | null;\n resourceId: string | null;\n resourceName: string | null;\n resourceRegion: string | null;\n resourceType: EnumResourceType | null;\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\nexport type CreateAdFormData = CreateFormData<AdFormData>;\n\nexport interface AdType extends AdFormData {\n _id: string;\n clicks?: number; // How many times the ad was clicked\n createdAt: Date;\n impressions?: number; // How often the ad was seen\n start: Date; // ISO date string\n updatedAt: Date | null;\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\">;\n};\n","import { EnumResourceType } from \"src/enums\";\n\nimport { BaseGame } from \"./game\";\nimport { CreateFormData, ResourceImageType } from \"./global\";\n\nexport enum EnumPostType {\n DAILY_MEETS = \"daily_meets\",\n DAILY_TIPS = \"daily_tips\",\n DAILY_GAMES = \"daily_games\",\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: BaseGame;\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 interface PostFormData {\n active: boolean;\n caption: string;\n content: PostContentFormData[];\n cover?: ResourceImageType | null;\n coverUpload?: PostFileInput | null;\n postType: EnumPostType;\n resource?: {\n resourceId: string;\n resourceType: EnumResourceType;\n } | null;\n tags?: string[] | null;\n title: string;\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<PostFormData, \"content\" | \"coverUpload\"> & {\n _id: string;\n content: PostContentType[];\n createdAt: Date;\n deletedAt: Date | null;\n updatedAt: Date | null;\n};\n"],"mappings":";AAOO,IAAK,uBAAL,kBAAKA,0BAAL;AACL,EAAAA,sBAAA,cAAW;AACX,EAAAA,sBAAA,oBAAiB;AAFP,SAAAA;AAAA,GAAA;;;ACcL,IAAM,oBAAoB;;;ACjB1B,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,mBAAgB;AAChB,EAAAA,cAAA,kBAAe;AAJL,SAAAA;AAAA,GAAA;AAOL,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,SAAAA;AAAA,GAAA;;;ACdL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,cAAW;AACX,EAAAA,cAAA,WAAQ;AACR,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,aAAU;AACV,EAAAA,cAAA,UAAO;AALG,SAAAA;AAAA,GAAA;;;ACHL,IAAK,eAAL,kBAAKC,kBAAL;AACL,EAAAA,cAAA,iBAAc;AACd,EAAAA,cAAA,gBAAa;AACb,EAAAA,cAAA,iBAAc;AAHJ,SAAAA;AAAA,GAAA;AAML,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,UAAO;AACP,EAAAA,qBAAA,WAAQ;AACR,EAAAA,qBAAA,UAAO;AACP,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,WAAQ;AALE,SAAAA;AAAA,GAAA;","names":["EnumVerificationType","EnumAdShowOn","EnumAdStatus","EnumAdType","EnumAdStyle","EnumActivity","EnumPostType","EnumPostContentType"]}
@@ -1,4 +1,4 @@
1
- import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-MMBYi34A.mjs';
1
+ import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-ClbRuePq.mjs';
2
2
  import 'react-hook-form';
3
3
  import '../enums/index.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-B0WdAD-8.js';
1
+ import { O as OptionItem, F as FormField, a as FormDateField, R as RefundPolicy, b as Requirement, S as StallType, C as Category } from '../global-CDqmjLH1.js';
2
2
  import 'react-hook-form';
3
3
  import '../enums/index.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { y as OwnerType } from './global-MMBYi34A.mjs';
1
+ import { y as OwnerType } from './global-ClbRuePq.mjs';
2
2
 
3
3
  declare const gameScreenIdentifierList: readonly [{
4
4
  readonly clue: "Where your actions turn into a timeline.";
@@ -1,4 +1,4 @@
1
- import { y as OwnerType } from './global-B0WdAD-8.js';
1
+ import { y as OwnerType } from './global-CDqmjLH1.js';
2
2
 
3
3
  declare const gameScreenIdentifierList: readonly [{
4
4
  readonly clue: "Where your actions turn into a timeline.";
@@ -200,6 +200,8 @@ type UnregisteredVendorType = UnregisteredVendorFormData & {
200
200
  updatedAt: Date | null;
201
201
  };
202
202
 
203
+ declare const PROMO_CODE_PREFIX = "CM-";
204
+ type PromoCodeType = `${typeof PROMO_CODE_PREFIX}${string}`;
203
205
  type Nullable<T> = {
204
206
  [K in keyof T]: T[K] | null | undefined;
205
207
  };
@@ -263,7 +265,7 @@ interface BaseResourceTypeFormData {
263
265
  logoUpload?: ResourceImageType | null;
264
266
  name: string;
265
267
  owner?: OwnerType | null;
266
- promoCodes?: string[] | null;
268
+ promoCodes?: PromoCodeType[] | null;
267
269
  region: string;
268
270
  socialMedia: SocialMediaType[] | null;
269
271
  termsAgreement?: TermsAgreement | null;
@@ -381,4 +383,4 @@ interface CreateFormData<T extends FieldValues> {
381
383
  watch: UseFormWatch<T>;
382
384
  }
383
385
 
384
- export type { VendorCalendarData as $, AssociateType as A, BaseResourceTypeFormData as B, Category as C, DateTimeType as D, EventType as E, FormField as F, GeocodeLocation as G, Region as H, ImageObjectType as I, RelationDate as J, ResourceContactDetailsType as K, LocationType as L, ResourceDetails as M, Nullable as N, OptionItem as O, PaymentInfoType as P, ResourceImageType as Q, RefundPolicy as R, StallType as S, SocialMediaType as T, UnregisteredVendorType as U, VendorType as V, Subcategory as W, SubcategoryItems as X, TermsAgreement as Y, UnregisteredVendorInvitationType as Z, VendorAttributes as _, FormDateField as a, VendorProductList as a0, Requirement as b, EventListItemType as c, EventInfoType as d, RelationType as e, ResourceConnectionsType as f, VendorInfoType as g, UserLicenceType as h, VendorFormData as i, CreateVendorFormData as j, VendorInfoFormData as k, CreateVendorInfoFormData as l, EventFormData as m, CreateEventFormData as n, EventInfoFormData as o, CreateEventInfoFormData as p, UnregisteredVendorFormData as q, BaseResourceType as r, CreateFormData as s, CreateUnregisteredVendorFormData as t, DateTimeWithPriceType as u, DeviceInfo as v, EventStatusType as w, LocationGeoType as x, OwnerType as y, PosterUsageType as z };
386
+ export { type UnregisteredVendorInvitationType as $, type AssociateType as A, type BaseResourceTypeFormData as B, type Category as C, type DateTimeType as D, type EventType as E, type FormField as F, type GeocodeLocation as G, type PosterUsageType as H, type ImageObjectType as I, type PromoCodeType as J, type Region as K, type LocationType as L, type RelationDate as M, type Nullable as N, type OptionItem as O, PROMO_CODE_PREFIX as P, type ResourceContactDetailsType as Q, type RefundPolicy as R, type StallType as S, type ResourceDetails as T, type UnregisteredVendorType as U, type VendorType as V, type ResourceImageType as W, type SocialMediaType as X, type Subcategory as Y, type SubcategoryItems as Z, type TermsAgreement as _, type FormDateField as a, type VendorAttributes as a0, type VendorCalendarData as a1, type VendorProductList as a2, type Requirement as b, type EventListItemType as c, type EventInfoType as d, type RelationType as e, type ResourceConnectionsType as f, type VendorInfoType as g, type UserLicenceType as h, type VendorFormData as i, type CreateVendorFormData as j, type VendorInfoFormData as k, type CreateVendorInfoFormData as l, type EventFormData as m, type CreateEventFormData as n, type EventInfoFormData as o, type CreateEventInfoFormData as p, type UnregisteredVendorFormData as q, type BaseResourceType as r, type CreateFormData as s, type CreateUnregisteredVendorFormData as t, type DateTimeWithPriceType as u, type DeviceInfo as v, type EventStatusType as w, type LocationGeoType as x, type OwnerType as y, type PaymentInfoType as z };
@@ -200,6 +200,8 @@ type UnregisteredVendorType = UnregisteredVendorFormData & {
200
200
  updatedAt: Date | null;
201
201
  };
202
202
 
203
+ declare const PROMO_CODE_PREFIX = "CM-";
204
+ type PromoCodeType = `${typeof PROMO_CODE_PREFIX}${string}`;
203
205
  type Nullable<T> = {
204
206
  [K in keyof T]: T[K] | null | undefined;
205
207
  };
@@ -263,7 +265,7 @@ interface BaseResourceTypeFormData {
263
265
  logoUpload?: ResourceImageType | null;
264
266
  name: string;
265
267
  owner?: OwnerType | null;
266
- promoCodes?: string[] | null;
268
+ promoCodes?: PromoCodeType[] | null;
267
269
  region: string;
268
270
  socialMedia: SocialMediaType[] | null;
269
271
  termsAgreement?: TermsAgreement | null;
@@ -381,4 +383,4 @@ interface CreateFormData<T extends FieldValues> {
381
383
  watch: UseFormWatch<T>;
382
384
  }
383
385
 
384
- export type { VendorCalendarData as $, AssociateType as A, BaseResourceTypeFormData as B, Category as C, DateTimeType as D, EventType as E, FormField as F, GeocodeLocation as G, Region as H, ImageObjectType as I, RelationDate as J, ResourceContactDetailsType as K, LocationType as L, ResourceDetails as M, Nullable as N, OptionItem as O, PaymentInfoType as P, ResourceImageType as Q, RefundPolicy as R, StallType as S, SocialMediaType as T, UnregisteredVendorType as U, VendorType as V, Subcategory as W, SubcategoryItems as X, TermsAgreement as Y, UnregisteredVendorInvitationType as Z, VendorAttributes as _, FormDateField as a, VendorProductList as a0, Requirement as b, EventListItemType as c, EventInfoType as d, RelationType as e, ResourceConnectionsType as f, VendorInfoType as g, UserLicenceType as h, VendorFormData as i, CreateVendorFormData as j, VendorInfoFormData as k, CreateVendorInfoFormData as l, EventFormData as m, CreateEventFormData as n, EventInfoFormData as o, CreateEventInfoFormData as p, UnregisteredVendorFormData as q, BaseResourceType as r, CreateFormData as s, CreateUnregisteredVendorFormData as t, DateTimeWithPriceType as u, DeviceInfo as v, EventStatusType as w, LocationGeoType as x, OwnerType as y, PosterUsageType as z };
386
+ export { type UnregisteredVendorInvitationType as $, type AssociateType as A, type BaseResourceTypeFormData as B, type Category as C, type DateTimeType as D, type EventType as E, type FormField as F, type GeocodeLocation as G, type PosterUsageType as H, type ImageObjectType as I, type PromoCodeType as J, type Region as K, type LocationType as L, type RelationDate as M, type Nullable as N, type OptionItem as O, PROMO_CODE_PREFIX as P, type ResourceContactDetailsType as Q, type RefundPolicy as R, type StallType as S, type ResourceDetails as T, type UnregisteredVendorType as U, type VendorType as V, type ResourceImageType as W, type SocialMediaType as X, type Subcategory as Y, type SubcategoryItems as Z, type TermsAgreement as _, type FormDateField as a, type VendorAttributes as a0, type VendorCalendarData as a1, type VendorProductList as a2, type Requirement as b, type EventListItemType as c, type EventInfoType as d, type RelationType as e, type ResourceConnectionsType as f, type VendorInfoType as g, type UserLicenceType as h, type VendorFormData as i, type CreateVendorFormData as j, type VendorInfoFormData as k, type CreateVendorInfoFormData as l, type EventFormData as m, type CreateEventFormData as n, type EventInfoFormData as o, type CreateEventInfoFormData as p, type UnregisteredVendorFormData as q, type BaseResourceType as r, type CreateFormData as s, type CreateUnregisteredVendorFormData as t, type DateTimeWithPriceType as u, type DeviceInfo as v, type EventStatusType as w, type LocationGeoType as x, type OwnerType as y, type PaymentInfoType as z };
@@ -1,9 +1,9 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { EnumResourceType } from '../enums/index.mjs';
3
- import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-CqrscA5x.mjs';
4
- import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-MMBYi34A.mjs';
5
- import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType, e as SchoolReturnType, f as SchoolType } from '../post-Dpg2AwRf.mjs';
6
- import { G as GameDocType, a as GameLeaderboard } from '../game-CC5mxG64.mjs';
3
+ import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-B8dshdq5.mjs';
4
+ import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-ClbRuePq.mjs';
5
+ import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType, e as SchoolReturnType, f as SchoolType } from '../post-DveQ1mlc.mjs';
6
+ import { G as GameDocType, a as GameLeaderboard } from '../game-CKJKoqrR.mjs';
7
7
  import 'react-hook-form';
8
8
  import '../images/index.mjs';
9
9
 
@@ -1,9 +1,9 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { EnumResourceType } from '../enums/index.js';
3
- import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-2FaGRW-i.js';
4
- import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-B0WdAD-8.js';
5
- import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType, e as SchoolReturnType, f as SchoolType } from '../post-CISTnZDs.js';
6
- import { G as GameDocType, a as GameLeaderboard } from '../game-DhiKOr9_.js';
3
+ import { C as ChatType, R as ReportChatUser, N as NotificationCount, a as NotificationType, b as ResourceActivityType } from '../resourceActivities-BXsZrzFC.js';
4
+ import { E as EventType, c as EventListItemType, d as EventInfoType, e as RelationType, f as ResourceConnectionsType, U as UnregisteredVendorType, V as VendorType, g as VendorInfoType, h as UserLicenceType } from '../global-CDqmjLH1.js';
5
+ import { U as UserType, P as PartnerType, R as ResourceByUser, A as AdType, E as EnumAdStatus, S as SubscriptionPlansResponse, a as SubscriptionStatusData, b as PostType, c as EnumPostType, d as AppSettingsType, e as SchoolReturnType, f as SchoolType } from '../post-CKcK3MWE.js';
6
+ import { G as GameDocType, a as GameLeaderboard } from '../game-DAQTH29H.js';
7
7
  import 'react-hook-form';
8
8
  import '../images/index.js';
9
9
 
@@ -5196,7 +5196,7 @@ var defaultValues3 = {
5196
5196
  lastName: "",
5197
5197
  password: "",
5198
5198
  preferredRegion: "",
5199
- promoCode: "",
5199
+ promoCode: null,
5200
5200
  termsAgreement: null
5201
5201
  };
5202
5202
  function useRegisterForm() {
@@ -5709,7 +5709,8 @@ var schoolSchema = yup11.object().shape({
5709
5709
 
5710
5710
  // src/hooks/useSchoolForm.ts
5711
5711
  var defaultSchoolFormValues = {
5712
- active: false,
5712
+ // New schools are active by default
5713
+ active: true,
5713
5714
  contactDetails: null,
5714
5715
  location: defaultLocation,
5715
5716
  logo: null,