n8n-nodes-binalyze-air
Version:
Binalyze AIR nodes for automating DFIR with n8n workflows
70 lines (69 loc) • 2.11 kB
TypeScript
import { IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-workflow';
import { AirCredentials } from '../../../../../credentials/AirApi.credentials';
export interface UserProfile {
name: string;
surname: string;
department: string;
}
export interface UserRole {
_id: string;
createdAt: string;
updatedAt: string;
name: string;
createdBy: string;
tag: string;
privilegeTypes: string[];
}
export interface User {
_id: string;
email: string;
username: string;
organizationIds: string;
strategy: string;
profile: UserProfile;
tfaEnabled: boolean;
createdAt: string;
updatedAt: string;
roles: UserRole[];
}
export interface OrganizationUsersResponse {
success: boolean;
result: {
entities: User[];
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 declare const api: {
getOrganizationUsers(context: IExecuteFunctions | ILoadOptionsFunctions, credentials: AirCredentials, organizationId: number | string, options?: {
pageNumber?: number;
pageSize?: number;
sortBy?: string;
sortType?: string;
}): Promise<OrganizationUsersResponse>;
assignUsersToOrganization(context: IExecuteFunctions | ILoadOptionsFunctions, credentials: AirCredentials, organizationId: number | string, userIds: string[]): Promise<{
success: boolean;
result: null;
statusCode: number;
errors: string[];
}>;
removeUserFromOrganization(context: IExecuteFunctions | ILoadOptionsFunctions, credentials: AirCredentials, organizationId: number | string, userIds: string[]): Promise<{
success: boolean;
result: null;
statusCode: number;
errors: string[];
}>;
};