feat(Intercom Node): Update credential to new style (#11485)

This commit is contained in:
Jon
2024-10-31 16:38:11 +00:00
committed by GitHub
parent 130c942f63
commit b137e13845
2 changed files with 28 additions and 13 deletions

View File

@@ -1,4 +1,9 @@
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
import type {
IAuthenticateGeneric,
ICredentialTestRequest,
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class IntercomApi implements ICredentialType {
name = 'intercomApi';
@@ -16,4 +21,22 @@ export class IntercomApi implements ICredentialType {
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',
},
};
}