n8n/packages/@n8n/nodes-langchain/credentials/ZepApi.credentials.ts

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

49 lines
888 B
TypeScript
Raw Normal View History

import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class ZepApi implements ICredentialType {
name = 'zepApi';
displayName = 'Zep Api';
documentationUrl = 'zep';
properties: INodeProperties[] = [
{
displayName: 'API URL',
name: 'apiUrl',
required: true,
type: 'string',
default: 'http://localhost:8000',
},
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
typeOptions: { password: true },
required: false,
default: '',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '={{$credentials.apiKey ? "Bearer " + $credentials.apiKey : undefined }}',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: '={{$credentials.apiUrl}}',
url: '/api/v1/collection',
},
};
}