feat: feature flag user whitelist support
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 9s
This commit is contained in:
parent
6d2921e3e0
commit
e28f962147
@ -1,7 +1,7 @@
|
|||||||
import { api } from './http-client'
|
import { api } from './http-client'
|
||||||
|
|
||||||
export interface AppConfigItem { id: string; key: string; value: string; description: string | null; environment: string; updatedAt: string }
|
export interface AppConfigItem { id: string; key: string; value: string; description: string | null; environment: string; updatedAt: string }
|
||||||
export interface FeatureFlagItem { id: string; name: string; enabled: boolean; description: string | null; rolloutPct: number }
|
export interface FeatureFlagItem { id: string; name: string; enabled: boolean; description: string | null; rolloutPct: number; whitelist?: string | null }
|
||||||
export interface ChangeLogItem { id: string; entityType: string; entityId: string; field: string; oldValue: string | null; newValue: string | null; changedBy: string | null; createdAt: string }
|
export interface ChangeLogItem { id: string; entityType: string; entityId: string; field: string; oldValue: string | null; newValue: string | null; changedBy: string | null; createdAt: string }
|
||||||
|
|
||||||
export function getConfig(): Promise<{ configs: AppConfigItem[]; flags: FeatureFlagItem[] }> { return api.get('/admin-api/config') }
|
export function getConfig(): Promise<{ configs: AppConfigItem[]; flags: FeatureFlagItem[] }> { return api.get('/admin-api/config') }
|
||||||
@ -9,4 +9,5 @@ export function setConfig(key: string, value: string): Promise<any> { return api
|
|||||||
export function updateConfig(key: string, value: string): Promise<any> { return api.patch(`/admin-api/config/${key}`, { value }) }
|
export function updateConfig(key: string, value: string): Promise<any> { return api.patch(`/admin-api/config/${key}`, { value }) }
|
||||||
export function deleteConfig(key: string): Promise<any> { return api.delete(`/admin-api/config/${key}`) }
|
export function deleteConfig(key: string): Promise<any> { return api.delete(`/admin-api/config/${key}`) }
|
||||||
export function toggleFlag(name: string, enabled: boolean): Promise<any> { return api.post(`/admin-api/config/flags/${name}`, { enabled }) }
|
export function toggleFlag(name: string, enabled: boolean): Promise<any> { return api.post(`/admin-api/config/flags/${name}`, { enabled }) }
|
||||||
|
export function setFlagWhitelist(name: string, whitelist: string): Promise<any> { return api.post(`/admin-api/config/flags/${name}`, { whitelist }) }
|
||||||
export function getChangeLog(): Promise<ChangeLogItem[]> { return api.get('/admin-api/config/changelog') }
|
export function getChangeLog(): Promise<ChangeLogItem[]> { return api.get('/admin-api/config/changelog') }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user