mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-15 21:24:48 +00:00
feat: integrate support for multi step auth flows for providers that require additional questions (#18035)
This commit is contained in:
@@ -2496,6 +2496,9 @@ export class Oauth extends HeyApiClient {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
method?: number
|
||||
inputs?: {
|
||||
[key: string]: string
|
||||
}
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
@@ -2508,6 +2511,7 @@ export class Oauth extends HeyApiClient {
|
||||
{ in: "query", key: "directory" },
|
||||
{ in: "query", key: "workspace" },
|
||||
{ in: "body", key: "method" },
|
||||
{ in: "body", key: "inputs" },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -1769,6 +1769,34 @@ export type SubtaskPartInput = {
|
||||
export type ProviderAuthMethod = {
|
||||
type: "oauth" | "api"
|
||||
label: string
|
||||
prompts?: Array<
|
||||
| {
|
||||
type: "text"
|
||||
key: string
|
||||
message: string
|
||||
placeholder?: string
|
||||
when?: {
|
||||
key: string
|
||||
op: "eq" | "neq"
|
||||
value: string
|
||||
}
|
||||
}
|
||||
| {
|
||||
type: "select"
|
||||
key: string
|
||||
message: string
|
||||
options: Array<{
|
||||
label: string
|
||||
value: string
|
||||
hint?: string
|
||||
}>
|
||||
when?: {
|
||||
key: string
|
||||
op: "eq" | "neq"
|
||||
value: string
|
||||
}
|
||||
}
|
||||
>
|
||||
}
|
||||
|
||||
export type ProviderAuthAuthorization = {
|
||||
@@ -3983,6 +4011,12 @@ export type ProviderOauthAuthorizeData = {
|
||||
* Auth method index
|
||||
*/
|
||||
method: number
|
||||
/**
|
||||
* Prompt inputs
|
||||
*/
|
||||
inputs?: {
|
||||
[key: string]: string
|
||||
}
|
||||
}
|
||||
path: {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user