Pular para o conteúdo principal

@cactus-agents/types

Source of truth para tipos compartilhados entre pacotes. Não contém lógica — apenas interfaces e tipos TypeScript.

Instalação

pnpm add @cactus-agents/types

BrandConfig

O tipo principal que representa toda a configuração de uma marca:

type BrandConfig = {
appearance: BrandAppearance;
features: BrandFeatures;
settings: BrandSettings;
};

BrandAppearance

Dados visuais vindos de GET /appearance:

interface BrandAppearance {
logo: string;
logoIcon: string;
banners: Banner[];
casinoBanners: Banner[];
popupBanners: Banner[];
recommendedBanners: Banner[];
social: BrandSocial;
links: BrandLinks;
footerEmails: BrandFooterEmails;
sponsorships: BrandSponsorship[];
cssCode: string | null;
themeColors: Record<string, string>;
}

BrandFeatures

Feature flags vindos de GET /bff/features:

interface BrandFeatures {
socialAuth: boolean;
biggestWinnersCarousel: boolean;
recentWinnersCarousel: boolean;
topBarFiveItems: boolean;
cookieConsentPopup: boolean;
gamesDemoMode: boolean;
gamesShowRtpInfo: boolean;
homeAsSportsbook: boolean;
casinoNomenclature: string;
maintenanceMode: boolean;
newAuthButtons: boolean;
newAuthFlow: boolean;
authConfig: BrandAuthConfig;
registerChoiceType: string;
// ... módulos, validação, contatos, country
}

BrandSettings

Configurações de negócio vindas de POST /bookmaker-settings:

interface BrandSettings {
name: string;
seoH1: string;
seoTitle: string;
seoDescription: string;
email: string;
phone: string;
defaultLanguage: string;
country: BrandCountry;
deposit: { min: number; max: number; cashInActive: boolean; message: string };
withdrawal: {
min: number; max: number; maxPerDay: number;
intervalType: string; timeBetween: number;
// ...
};
betting: { minBetAmount: number; maxBetAmount: number; minQuota: number; maxQuota: number; enablePin: boolean };
bonus: { firstDeposit: { active: boolean; percentage: number; max: number; message: string }; referral: { ... } };
rollover: { casinoExpiresIn: number; sportsExpiresIn: number; /* ... */ };
registration: { simplified: boolean; requestDocument: boolean; requestBirthdate: boolean; requestPhone: boolean };
analytics: { gtmId: string; pixelId: string; pixelApi: string };
// ...
}

Tipos auxiliares

TipoDescrição
BannerBanner/slide: image, order, action, actionType, badge, alt
BrandSocialLinks sociais: tiktok, twitter, youtube, facebook, instagram
BrandSponsorshipPatrocinador: id, name, banner, pageUrl, text, icon, order, isMain
BrandContactEntryContato: link, email
BrandContactsGrupos: sac, general, support, complaints, customerService
BrandValidationModulesValidação por módulo: casino, global, sports, deposit, etc.
BrandAuthConfigConfig de auth: security, captcha, register, 2FA
BrandCountryPaís: id, name, code, currency, ddi
BrandLinksLinks da marca: blog, appDownload, promotions, affiliates, helpCenter
BrandFooterEmailsEmails do footer: legal, partner, support