feat: add OAuth provider abstraction for CLI configuration (#3157)
Signed-off-by: Adam Tarantino <tarantino.adam@gmail.com>
This commit is contained in:
+14
-4
@@ -1150,24 +1150,34 @@
|
||||
},
|
||||
"ConfigKey": {
|
||||
"type": "object",
|
||||
"description": "Configuration key metadata for provider setup",
|
||||
"required": [
|
||||
"name",
|
||||
"required",
|
||||
"secret"
|
||||
"secret",
|
||||
"oauth_flow"
|
||||
],
|
||||
"properties": {
|
||||
"default": {
|
||||
"type": "string",
|
||||
"description": "Optional default value for the key",
|
||||
"nullable": true
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "The name of the configuration key (e.g., \"API_KEY\")"
|
||||
},
|
||||
"oauth_flow": {
|
||||
"type": "boolean",
|
||||
"description": "Whether this key should be configured using OAuth device code flow\nWhen true, the provider's configure_oauth() method will be called instead of prompting for manual input"
|
||||
},
|
||||
"required": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"description": "Whether this key is required for the provider to function"
|
||||
},
|
||||
"secret": {
|
||||
"type": "boolean"
|
||||
"type": "boolean",
|
||||
"description": "Whether this key should be stored securely (e.g., in keychain)"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -26,10 +26,30 @@ export type AuthorRequest = {
|
||||
metadata?: string | null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Configuration key metadata for provider setup
|
||||
*/
|
||||
export type ConfigKey = {
|
||||
/**
|
||||
* Optional default value for the key
|
||||
*/
|
||||
default?: string | null;
|
||||
/**
|
||||
* The name of the configuration key (e.g., "API_KEY")
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Whether this key should be configured using OAuth device code flow
|
||||
* When true, the provider's configure_oauth() method will be called instead of prompting for manual input
|
||||
*/
|
||||
oauth_flow: boolean;
|
||||
/**
|
||||
* Whether this key is required for the provider to function
|
||||
*/
|
||||
required: boolean;
|
||||
/**
|
||||
* Whether this key should be stored securely (e.g., in keychain)
|
||||
*/
|
||||
secret: boolean;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user