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

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

43 lines
752 B
TypeScript
Raw Normal View History

import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
2019-11-15 12:10:51 -08:00
export class IntercomApi implements ICredentialType {
name = 'intercomApi';
2019-11-15 12:10:51 -08:00
displayName = 'Intercom API';
documentationUrl = 'intercom';
properties: INodeProperties[] = [
2019-11-15 12:10:51 -08:00
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
typeOptions: { password: true },
2019-11-15 12:10:51 -08:00
default: '',
},
];
authenticate: IAuthenticateGeneric = {
type: 'generic',
properties: {
headers: {
Authorization: '=Bearer {{$credentials.apiKey}}',
Accept: 'application/json',
},
},
};
test: ICredentialTestRequest = {
request: {
baseURL: 'https://api.intercom.io',
url: '/me',
method: 'GET',
},
};
2019-11-15 12:10:51 -08:00
}