@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
| Tipo | Descrição |
|---|---|
Banner | Banner/slide: image, order, action, actionType, badge, alt |
BrandSocial | Links sociais: tiktok, twitter, youtube, facebook, instagram |
BrandSponsorship | Patrocinador: id, name, banner, pageUrl, text, icon, order, isMain |
BrandContactEntry | Contato: link, email |
BrandContacts | Grupos: sac, general, support, complaints, customerService |
BrandValidationModules | Validação por módulo: casino, global, sports, deposit, etc. |
BrandAuthConfig | Config de auth: security, captcha, register, 2FA |
BrandCountry | País: id, name, code, currency, ddi |
BrandLinks | Links da marca: blog, appDownload, promotions, affiliates, helpCenter |
BrandFooterEmails | Emails do footer: legal, partner, support |