n8n-nodes-binalyze-air
Version:
Binalyze AIR nodes for automating DFIR with n8n workflows
32 lines (31 loc) • 1.34 kB
TypeScript
import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-workflow';
import { AirCredentials } from '../../../credentials/AirApi.credentials';
export interface BaseApiResponse<T = any> {
success: boolean;
result: T;
statusCode: number;
errors: string[];
}
export interface PaginatedApiResponse<T> extends BaseApiResponse<{
entities: T[];
filters: Array<{
name: string;
type: string;
options: string[];
filterUrl: string | null;
}>;
sortables: string[];
totalEntityCount: number;
currentPage: number;
pageSize: number;
previousPage: number;
totalPageCount: number;
nextPage: number;
}> {
}
export type EmptyApiResponse = BaseApiResponse<null>;
export type SuccessApiResponse = BaseApiResponse<{
success: boolean;
}>;
export declare function buildHttpRequest<T = any>(credentials: AirCredentials, method: 'GET' | 'POST' | 'PUT' | 'DELETE', endpoint: string, data?: T, queryParams?: Record<string, string | number>): import("n8n-workflow").IHttpRequestOptions;
export declare function executeHttpRequest<T, R>(context: IExecuteFunctions | ILoadOptionsFunctions, credentials: AirCredentials, method: 'GET' | 'POST' | 'PUT' | 'DELETE', endpoint: string, operationName: string, data?: T, queryParams?: Record<string, string | number>): Promise<R>;