mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-27 05:29:42 -08:00
57 lines
1.1 KiB
TypeScript
57 lines
1.1 KiB
TypeScript
|
import {
|
||
|
ICredentialType,
|
||
|
NodePropertyTypes,
|
||
|
} from 'n8n-workflow';
|
||
|
|
||
|
// https://bitwarden.com/help/article/public-api/#authentication
|
||
|
|
||
|
export class BitwardenApi implements ICredentialType {
|
||
|
name = 'bitwardenApi';
|
||
|
displayName = 'Bitwarden API';
|
||
|
documentationUrl = 'bitwarden';
|
||
|
properties = [
|
||
|
{
|
||
|
displayName: 'Client ID',
|
||
|
name: 'clientId',
|
||
|
type: 'string' as NodePropertyTypes,
|
||
|
default: '',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Client Secret',
|
||
|
name: 'clientSecret',
|
||
|
type: 'string' as NodePropertyTypes,
|
||
|
default: '',
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Environment',
|
||
|
name: 'environment',
|
||
|
type: 'options' as NodePropertyTypes,
|
||
|
default: 'cloudHosted',
|
||
|
options: [
|
||
|
{
|
||
|
name: 'Cloud-hosted',
|
||
|
value: 'cloudHosted',
|
||
|
},
|
||
|
{
|
||
|
name: 'Self-hosted',
|
||
|
value: 'selfHosted',
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
{
|
||
|
displayName: 'Self-hosted domain',
|
||
|
name: 'domain',
|
||
|
type: 'string' as NodePropertyTypes,
|
||
|
default: '',
|
||
|
placeholder: 'https://www.mydomain.com',
|
||
|
displayOptions: {
|
||
|
show: {
|
||
|
environment: [
|
||
|
'selfHosted',
|
||
|
],
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
];
|
||
|
}
|