import { ICredentialType, INodeProperties, } from 'n8n-workflow'; // https://bitwarden.com/help/article/public-api/#authentication export class BitwardenApi implements ICredentialType { name = 'bitwardenApi'; displayName = 'Bitwarden API'; documentationUrl = 'bitwarden'; properties: INodeProperties[] = [ { displayName: 'Client ID', name: 'clientId', type: 'string', default: '', }, { displayName: 'Client Secret', name: 'clientSecret', type: 'string', default: '', }, { displayName: 'Environment', name: 'environment', type: 'options', default: 'cloudHosted', options: [ { name: 'Cloud-hosted', value: 'cloudHosted', }, { name: 'Self-hosted', value: 'selfHosted', }, ], }, { displayName: 'Self-hosted domain', name: 'domain', type: 'string', default: '', placeholder: 'https://www.mydomain.com', displayOptions: { show: { environment: [ 'selfHosted', ], }, }, }, ]; }