mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
feat: add gift subscription API client and feature flag
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user