mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(Freshworks CRM Node): Add Search + Lookup functionality (#3131)
* Add fields and Ops for Lookup Search * Adds Search (Search + Lookup) operations * 🔨 credentials update * 🔨 improvements * ⚡ clean up and linter fixes * ⚡ merged search and query, more hints * ⚡ Improvements * ⚡ Add generic type to authentication method Co-authored-by: Michael Kret <michael.k@radency.com> Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
This commit is contained in:
@@ -31,12 +31,9 @@ export async function freshworksCrmApiRequest(
|
||||
body: IDataObject = {},
|
||||
qs: IDataObject = {},
|
||||
) {
|
||||
const { apiKey, domain } = await this.getCredentials('freshworksCrmApi') as FreshworksCrmApiCredentials;
|
||||
const { domain } = await this.getCredentials('freshworksCrmApi') as FreshworksCrmApiCredentials;
|
||||
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
Authorization: `Token token=${apiKey}`,
|
||||
},
|
||||
method,
|
||||
body,
|
||||
qs,
|
||||
@@ -52,7 +49,8 @@ export async function freshworksCrmApiRequest(
|
||||
delete options.qs;
|
||||
}
|
||||
try {
|
||||
return await this.helpers.request!(options);
|
||||
const credentialsType = 'freshworksCrmApi';
|
||||
return await this.helpers.requestWithAuthentication.call(this, credentialsType, options);
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user