Services Framework
Configuration
Admin-level service settings reference
Separate from user credentials, services can define admin-level configuration settings. These are configured once by an admin and shared across all users of the service.
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Admin-level service settings reference
const SERVICE_CONFIGURATION_OPTIONS = [
{
key: "baseUrl",
description: "API base URL",
type: "url",
required: false,
defaultValue: "https://api.example.com",
},
{
key: "apiVersion",
description: "API version to use",
type: "select",
required: true,
defaultValue: "v2",
options: JSON.stringify([
{ value: "v1", label: "Version 1" },
{ value: "v2", label: "Version 2" },
]),
},
] as const;
| Field | Required | Description |
|---|---|---|
key | Yes | Unique identifier for the setting |
description | Yes | Label shown to the admin |
type | Yes | Input type: text, password, url, or select |
required | Yes | Whether the field is required |
defaultValue | No | Default value |
options | No | JSON-stringified array of { value, label } for select type |
createClient(context: AuthenticatedServiceContext<Settings, CustomAuth>) {
const baseUrl = context.serviceConfig.settings.baseUrl;
return new ApiClient({ baseUrl });
}
