import { z } from "zod"; /** * Returns true when `url` is an acceptable promo destination or terms URL. * * Decision #6 rules (open-redirect guard included): * - Internal path: single leading "/" NOT followed by "/" or "\" (blocks //evil.com, /\evil.com) * - https URL whose host suffix-matches ".levr.bet" or equals "levr.bet" * - https URL whose host suffix-matches ".amplifyapp.com" * - localhost / 127.0.0.1 on any port, http OR https * - Everything else (including javascript:, data:, other hosts) is rejected. */ export declare function isAllowedPromoUrl(url: string): boolean; export declare const promoTermsBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"heading">; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"paragraph">; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"bullets">; items: z.ZodArray; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"ordered">; items: z.ZodArray; }, z.core.$strip>], "type">; export type PromoTermsBlock = z.infer; export declare const promoTermsSchema: z.ZodObject<{ eyebrow: z.ZodOptional; title: z.ZodString; subtitle: z.ZodOptional; blocks: z.ZodArray; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"paragraph">; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"bullets">; items: z.ZodArray; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"ordered">; items: z.ZodArray; }, z.core.$strip>], "type">>; }, z.core.$strip>; export type PromoTerms = z.infer; export declare const promoConfigSchema: z.ZodObject<{ id: z.ZodString; slug: z.ZodString; imageKey: z.ZodString; imageUrl: z.ZodString; destinationUrl: z.ZodString; termsUrl: z.ZodOptional; hasTerms: z.ZodBoolean; altText: z.ZodString; width: z.ZodOptional; activeStart: z.ZodOptional; activeEnd: z.ZodOptional; published: z.ZodBoolean; sortOrder: z.ZodNumber; createdAt: z.ZodString; updatedAt: z.ZodString; badgeFixtureId: z.ZodOptional; badgeFixtureIds: z.ZodOptional>; badgeHideFixtureIds: z.ZodOptional>; showGameBadge: z.ZodOptional; badgeUrl: z.ZodOptional; }, z.core.$strip>; export type PromoConfig = z.infer; /** * Resolves the games a promo's badge targets, regardless of whether the record * stores the legacy singular `badgeFixtureId` or the current `badgeFixtureIds` * array. Every consumer (dashboard map, client fixture cards, game-page promo * list) must go through this helper so single-game promos keep working. */ export declare function promoBadgeFixtureIds(promo: { badgeFixtureIds?: string[]; badgeFixtureId?: string; }): string[]; /** * Games targeted by the badge but hidden on that specific game only. Kept in * sync with `promoBadgeFixtureIds` (a hidden id must still be targeted). */ export declare function promoBadgeHiddenFixtureIds(promo: { badgeHideFixtureIds?: string[]; }): string[]; /** * True when the promo's badge should render on the given game's card. */ export declare function promoBadgeVisibleOn(promo: { showGameBadge?: boolean; badgeFixtureIds?: string[]; badgeFixtureId?: string; badgeHideFixtureIds?: string[]; }, fixtureId: string): boolean; export declare const promoRecordSchema: z.ZodObject<{ id: z.ZodString; slug: z.ZodString; imageKey: z.ZodString; imageUrl: z.ZodString; destinationUrl: z.ZodString; termsUrl: z.ZodOptional; hasTerms: z.ZodBoolean; altText: z.ZodString; width: z.ZodOptional; activeStart: z.ZodOptional; activeEnd: z.ZodOptional; published: z.ZodBoolean; sortOrder: z.ZodNumber; createdAt: z.ZodString; updatedAt: z.ZodString; badgeFixtureId: z.ZodOptional; badgeFixtureIds: z.ZodOptional>; badgeHideFixtureIds: z.ZodOptional>; showGameBadge: z.ZodOptional; badgeUrl: z.ZodOptional; terms: z.ZodOptional; title: z.ZodString; subtitle: z.ZodOptional; blocks: z.ZodArray; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"paragraph">; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"bullets">; items: z.ZodArray; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"ordered">; items: z.ZodArray; }, z.core.$strip>], "type">>; }, z.core.$strip>>; }, z.core.$strip>; export type PromoRecord = z.infer; /** Private manifest.json — full records including terms */ export declare const promoManifestSchema: z.ZodArray; hasTerms: z.ZodBoolean; altText: z.ZodString; width: z.ZodOptional; activeStart: z.ZodOptional; activeEnd: z.ZodOptional; published: z.ZodBoolean; sortOrder: z.ZodNumber; createdAt: z.ZodString; updatedAt: z.ZodString; badgeFixtureId: z.ZodOptional; badgeFixtureIds: z.ZodOptional>; badgeHideFixtureIds: z.ZodOptional>; showGameBadge: z.ZodOptional; badgeUrl: z.ZodOptional; terms: z.ZodOptional; title: z.ZodString; subtitle: z.ZodOptional; blocks: z.ZodArray; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"paragraph">; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"bullets">; items: z.ZodArray; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"ordered">; items: z.ZodArray; }, z.core.$strip>], "type">>; }, z.core.$strip>>; }, z.core.$strip>>; /** Public public.json — published-only, banner fields only (no terms) */ export declare const promoPublicListSchema: z.ZodArray; hasTerms: z.ZodBoolean; altText: z.ZodString; width: z.ZodOptional; activeStart: z.ZodOptional; activeEnd: z.ZodOptional; published: z.ZodBoolean; sortOrder: z.ZodNumber; createdAt: z.ZodString; updatedAt: z.ZodString; badgeFixtureId: z.ZodOptional; badgeFixtureIds: z.ZodOptional>; badgeHideFixtureIds: z.ZodOptional>; showGameBadge: z.ZodOptional; badgeUrl: z.ZodOptional; }, z.core.$strip>>; export declare const promoUploadInputSchema: z.ZodObject<{ slug: z.ZodString; destinationUrl: z.ZodString; termsUrl: z.ZodOptional; altText: z.ZodString; width: z.ZodOptional; activeStart: z.ZodOptional; activeEnd: z.ZodOptional; published: z.ZodDefault; sortOrder: z.ZodDefault; imageBase64: z.ZodOptional; imageContentType: z.ZodOptional>; terms: z.ZodOptional; title: z.ZodString; subtitle: z.ZodOptional; blocks: z.ZodArray; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"paragraph">; text: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"bullets">; items: z.ZodArray; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"ordered">; items: z.ZodArray; }, z.core.$strip>], "type">>; }, z.core.$strip>>; badgeFixtureId: z.ZodOptional; badgeFixtureIds: z.ZodOptional>; badgeHideFixtureIds: z.ZodOptional>; showGameBadge: z.ZodOptional; badgeUrl: z.ZodOptional; }, z.core.$strip>; export type PromoUploadInput = z.infer;