n8n-nodes-binalyze-air
Version:
Binalyze AIR nodes for automating DFIR with n8n workflows
123 lines (122 loc) • 4.3 kB
TypeScript
import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-workflow';
import { AirCredentials } from '../../../../credentials/AirApi.credentials';
export interface Organization {
_id: number;
name: string;
totalEndpoints: number;
owner?: string;
shareableDeploymentEnabled: boolean;
deploymentToken: string;
isDefault: boolean;
updatedAt: string;
createdAt: string;
tags?: string[];
}
export interface OrganizationsResponse {
success: boolean;
result: {
entities: Organization[];
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;
};
statusCode: number;
errors: string[];
}
export interface OrganizationContact {
name: string;
title?: string;
phone?: string;
mobile?: string;
email: string;
}
export interface CreateOrganizationRequest {
name: string;
shareableDeploymentEnabled: boolean;
contact: OrganizationContact;
note?: string;
}
export declare const api: {
getOrganizations(context: IExecuteFunctions | ILoadOptionsFunctions, credentials: AirCredentials, options?: {
pageNumber?: number;
pageSize?: number;
searchTerm?: string;
nameFilter?: string;
sortBy?: string;
sortType?: string;
}): Promise<OrganizationsResponse>;
getAllOrganizations(context: IExecuteFunctions | ILoadOptionsFunctions, credentials: AirCredentials, nameFilter?: string, pageSize?: number): Promise<Organization[]>;
createOrganization(context: IExecuteFunctions | ILoadOptionsFunctions, credentials: AirCredentials, data: CreateOrganizationRequest): Promise<{
success: boolean;
result: Organization;
statusCode: number;
errors: string[];
}>;
updateOrganization(context: IExecuteFunctions | ILoadOptionsFunctions, credentials: AirCredentials, id: number, data: Partial<CreateOrganizationRequest>): Promise<{
success: boolean;
result: Organization;
statusCode: number;
errors: string[];
}>;
getOrganizationById(context: IExecuteFunctions | ILoadOptionsFunctions, credentials: AirCredentials, id: number): Promise<{
success: boolean;
result: Organization & {
note?: string;
contact?: OrganizationContact;
statistics?: {
endpoint: {
total: number;
managed: number;
};
case: {
total: number;
open: number;
closed: number;
archived: number;
};
};
};
statusCode: number;
errors: string[];
}>;
checkOrganizationNameExists(context: IExecuteFunctions | ILoadOptionsFunctions, credentials: AirCredentials, name: string): Promise<{
success: boolean;
result: boolean;
statusCode: number;
errors: string[];
}>;
updateOrganizationShareableDeployment(context: IExecuteFunctions | ILoadOptionsFunctions, credentials: AirCredentials, id: number, status: boolean): Promise<{
success: boolean;
result: null;
statusCode: number;
errors: string[];
}>;
deleteOrganization(context: IExecuteFunctions | ILoadOptionsFunctions, credentials: AirCredentials, id: number): Promise<{
success: boolean;
result: null;
statusCode: number;
errors: string[];
}>;
addTagsToOrganization(context: IExecuteFunctions | ILoadOptionsFunctions, credentials: AirCredentials, id: number, tags: string[]): Promise<{
success: boolean;
result: Organization;
statusCode: number;
errors: string[];
}>;
deleteTagsFromOrganization(context: IExecuteFunctions | ILoadOptionsFunctions, credentials: AirCredentials, id: number, tags: string[]): Promise<{
success: boolean;
result: Organization;
statusCode: number;
errors: string[];
}>;
};