mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(Copper Node): Update credential to support HTTP Request node (#9837)
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
import type { ICredentialType, INodeProperties } from 'n8n-workflow';
|
||||
import type {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export class CopperApi implements ICredentialType {
|
||||
name = 'copperApi';
|
||||
@@ -25,4 +30,22 @@ export class CopperApi implements ICredentialType {
|
||||
default: '',
|
||||
},
|
||||
];
|
||||
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: 'generic',
|
||||
properties: {
|
||||
headers: {
|
||||
'X-PW-AccessToken': '={{$credentials.apiKey}}',
|
||||
'X-PW-Application': 'developer_api',
|
||||
'X-PW-UserEmail': '={{$credentials.email}}',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: 'https://api.copper.com/developer_api/v1/',
|
||||
url: 'users/me',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user