Skip to content

Commit e4d9ab0

Browse files
committed
chore: add types for client_metadata
1 parent a850bee commit e4d9ab0

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

ui/src/lib/api.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ export interface Client {
8181

8282
interface CreateClientRequest {
8383
name: string;
84+
app_type?: string;
85+
callbacks?: string[];
86+
allowed_logout_urls?: string[];
87+
web_origins?: string[];
88+
client_metadata?: { [key: string]: any };
8489
[key: string]: unknown;
8590
}
8691

@@ -399,11 +404,16 @@ const MOCK_FEATURE_FLAGS: FeatureFlags = {
399404
*/
400405
export async function getFeatureFlags() {
401406
try {
402-
const response = await request<FeatureFlagsResponse>(`${config.apiBaseUrl}/feature-flags`);
407+
const response = await request<FeatureFlagsResponse>(
408+
`${config.apiBaseUrl}/feature-flags`,
409+
);
403410
return response.flags;
404411
} catch (error) {
405412
// If backend endpoint doesn't exist yet, return mock data in development
406-
if (config.apiBaseUrl.includes('localhost') || config.apiBaseUrl.includes('local')) {
413+
if (
414+
config.apiBaseUrl.includes('localhost') ||
415+
config.apiBaseUrl.includes('local')
416+
) {
407417
console.warn('Feature flags endpoint not available, using mock data');
408418
return MOCK_FEATURE_FLAGS;
409419
}

ui/src/stores/client-store.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export class ClientStore {
4040
callbacks?: string[];
4141
allowed_logout_urls?: string[];
4242
web_origins?: string[];
43+
client_metadata?: { [key: string]: any };
4344
}) {
4445
try {
4546
const newClient = await createClientApi(clientData);

0 commit comments

Comments
 (0)