mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor(core): Improve test-webhooks (no-changelog) (#8069)
Remove duplication, improve readability, and expand tests for `TestWebhooks.ts` - in anticipation for storing test webhooks in Redis. --------- Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -261,7 +261,10 @@ export interface IExternalHooksClass {
|
||||
|
||||
export type WebhookCORSRequest = Request & { method: 'OPTIONS' };
|
||||
|
||||
export type WebhookRequest = Request<{ path: string }> & { method: IHttpRequestMethods };
|
||||
export type WebhookRequest = Request<{ path: string }> & {
|
||||
method: IHttpRequestMethods;
|
||||
params: Record<string, string>;
|
||||
};
|
||||
|
||||
export type WaitingWebhookRequest = WebhookRequest & {
|
||||
params: WebhookRequest['path'] & { suffix?: string };
|
||||
@@ -874,3 +877,11 @@ export abstract class SecretsProvider {
|
||||
}
|
||||
|
||||
export type N8nInstanceType = 'main' | 'webhook' | 'worker';
|
||||
|
||||
export type RegisteredWebhook = {
|
||||
sessionId?: string;
|
||||
timeout: NodeJS.Timeout;
|
||||
workflowEntity: IWorkflowDb;
|
||||
workflow: Workflow;
|
||||
destinationNode?: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user