feat: add gift subscription API client and feature flag

This commit is contained in:
Fringg
2026-03-09 18:49:21 +03:00
parent 880b2d45fe
commit a49520566e
3 changed files with 111 additions and 0 deletions

View File

@@ -23,6 +23,10 @@ export interface EmailAuthEnabled {
enabled: boolean;
}
export interface GiftEnabled {
enabled: boolean;
}
export interface TelegramWidgetConfig {
bot_username: string;
size: 'large' | 'medium' | 'small';
@@ -251,6 +255,16 @@ export const brandingApi = {
return response.data;
},
// Get gift enabled (public, no auth required)
getGiftEnabled: async (): Promise<GiftEnabled> => {
try {
const response = await apiClient.get<GiftEnabled>('/cabinet/branding/gift-enabled');
return response.data;
} catch {
return { enabled: false };
}
},
// Get analytics counters (public, no auth required)
getAnalyticsCounters: async (): Promise<AnalyticsCounters> => {
try {