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

25 lines
736 B
TypeScript
Raw Normal View History

import { option, AuthDefinition } from '@typebot.io/forge'
import { defaultBaseUrl } from './constants'
export const auth = {
type: 'encryptedCredentials',
name: 'NocoDB account',
schema: option.object({
baseUrl: option.string.layout({
label: 'Base URL',
isRequired: true,
helperText: 'Change it only if you are self-hosting NocoDB.',
withVariableButton: false,
defaultValue: defaultBaseUrl,
}),
apiKey: option.string.layout({
label: 'API Token',
isRequired: true,
helperText:
'You can generate an API token [here](https://app.nocodb.com/#/account/tokens)',
inputType: 'password',
withVariableButton: false,
}),
}),
} satisfies AuthDefinition