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: { desktop: Banner[]; mobile: 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: { facebook: boolean; google: boolean; steam: boolean; twitch: 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: boolean;
newAuthButtonsPill: boolean;
registerChoiceTypeTitle: string;
registerChoiceTypeSubtitle: string;
accountSetLimits: boolean;
accountTimeoutLimits: boolean;
kycIntegration: boolean;
kycIntegrationName: string;
modulesActive: boolean;
activeModules: string[];
modulesWithdraw: boolean;
activeWithdrawModules: string[];
enabledWidgets: string[];
contractsSection: boolean;
userMigration: boolean;
migrationNewDomain: string | null;
migrationDate: string | null;
contacts: BrandContacts;
authValidation: BrandValidationModules;
companyData: unknown[];
country: BrandCountry;
}

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 | null;
defaultLanguage: string;
country: string;
deposit: { min: number; max: number; cashInActive: boolean; message: string | null };
withdrawal: {
min: number; max: number; maxPerDay: number;
intervalType: string; timeBetween: number;
maxAutoAmount: number; dailyMaxAmount: number;
autoWithdrawActive: boolean; multiplierToAllowFirst: 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;
multiplierRealValue: number; casinoMultiplier: number;
casinoEnabled: boolean; moneyRolloverActive: boolean;
};
registration: { simplified: boolean; requestDocument: boolean; requestBirthdate: boolean; requestPhone: boolean };
analytics: { gtmId: string; pixelId: string; pixelApi: { id: string; token: string } };
legitimuz: { active: boolean; checkWithdrawActive: boolean; blockWithdrawMinValue: number };
terms: string | null;
footerHtml: string | null;
footerExtraCode: string | null;
texts: Record<string, string> | null;
spaLimits: {
period: unknown; time: unknown; bet: unknown;
loss: unknown; deposit: unknown; withdrawal: unknown; note: unknown;
};
appKeys: Record<string, unknown>;
zendeskLoginUser: boolean | null;
}

Tipos auxiliares

TipoDescrição
BannerBanner/slide: image, order, action, actionType, badge, alt, expireAt, altMobile
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 (inclui compat legado como captchaServices, turnstileSiteKey, singleStepFirstOnlyCpf)
BrandCountryPaís: id, name, code, currency, ddi
BrandLinksLinks da marca: blog, appDownload, promotions, affiliates, helpCenter, promotionsIframe, affiliatesLabel, reclameAqui, telegram, telegramLabel, centralizedExclusion
BrandFooterEmailsEmails do footer: legal, partner, support