2
0
Files
bot/packages/forge/blocks/difyAi/auth.ts

24 lines
685 B
TypeScript
Raw Normal View History

import { option, AuthDefinition } from '@typebot.io/forge'
import { defaultBaseUrl } from './constants'
export const auth = {
type: 'encryptedCredentials',
name: 'Dify.AI account',
schema: option.object({
apiEndpoint: option.string.layout({
label: 'API Endpoint',
isRequired: true,
helperText: 'URI where the Service API is hosted.',
withVariableButton: false,
defaultValue: defaultBaseUrl,
}),
apiKey: option.string.layout({
label: 'App API key',
isRequired: true,
helperText: 'API Secret Key for your Dify App.',
inputType: 'password',
withVariableButton: false,
}),
}),
} satisfies AuthDefinition