mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
📘 Create type for HTTPRN v2 auth params
This commit is contained in:
parent
cf54e6ab07
commit
f7cff0382a
|
@ -207,11 +207,11 @@ export const nodeHelpers = mixins(
|
||||||
let credentialDisplayName: string;
|
let credentialDisplayName: string;
|
||||||
let selectedCredentials: INodeCredentialsDetails;
|
let selectedCredentials: INodeCredentialsDetails;
|
||||||
|
|
||||||
const { authenticateWith, genericAuthType, nodeCredentialType } = node.parameters as {
|
const {
|
||||||
authenticateWith: 'none' | 'genericAuth' | 'nodeCredential';
|
authenticateWith,
|
||||||
genericAuthType: string;
|
genericAuthType,
|
||||||
nodeCredentialType: string;
|
nodeCredentialType,
|
||||||
};
|
} = node.parameters as HttpRequestNode.V2.AuthParams;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this.isHttpRequestNodeV2(node) &&
|
this.isHttpRequestNodeV2(node) &&
|
||||||
|
@ -476,3 +476,13 @@ function reportUnsetCredential(credentialType: ICredentialType) {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare namespace HttpRequestNode {
|
||||||
|
namespace V2 {
|
||||||
|
type AuthParams = {
|
||||||
|
authenticateWith: 'none' | 'genericAuth' | 'nodeCredential';
|
||||||
|
genericAuthType: string;
|
||||||
|
nodeCredentialType: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue