n8n/packages/nodes-base/credentials/IntercomApi.credentials.ts
Jon b137e13845
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions
feat(Intercom Node): Update credential to new style (#11485)
2024-10-31 16:38:11 +00:00

43 lines
752 B
TypeScript

import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class IntercomApi implements ICredentialType {
name = 'intercomApi';
displayName = 'Intercom API';
documentationUrl = 'intercom';
properties: INodeProperties[] = [
{
displayName: 'API Key',
name: 'apiKey',
type: 'string',
typeOptions: { password: true },
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',
},
};
}