n8n/packages/nodes-base/credentials/BitwardenApi.credentials.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1 KiB
TypeScript
Raw Permalink Normal View History

import type { 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',
typeOptions: { password: true },
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'],
},
},
},
];
}