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

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

29 lines
581 B
TypeScript
Raw Normal View History

import type { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2019-12-13 13:50:59 -08:00
export class CodaApi implements ICredentialType {
name = 'codaApi';
2019-12-13 13:50:59 -08:00
displayName = 'Coda API';
documentationUrl = 'coda';
properties: INodeProperties[] = [
2019-12-13 13:50:59 -08:00
{
displayName: 'Access Token',
name: 'accessToken',
type: 'string',
typeOptions: { password: true },
2019-12-13 13:50:59 -08:00
default: '',
},
];
test: ICredentialTestRequest = {
request: {
baseURL: 'https://coda.io/apis/v1/whoami',
headers: {
Authorization: '=Bearer {{$credentials.accessToken}}',
},
},
};
2019-12-13 13:50:59 -08:00
}