import type { IDataObject, IExecuteFunctions, IHookFunctions, IHttpRequestMethods, ILoadOptionsFunctions, INode } from 'n8n-workflow'; import type { ICippCredentials, ITenant } from './types'; /** * Gets OAuth2 access token from Azure AD using client credentials flow */ export declare function getAccessToken(this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions, credentials: ICippCredentials): Promise; /** * Makes an authenticated request to the CIPP API */ export declare function cippApiRequest(this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions, method: IHttpRequestMethods, endpoint: string, body?: IDataObject, query?: IDataObject): Promise; /** * Fetches the list of tenants from CIPP */ export declare function getTenantList(this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions): Promise; /** * Fetch raw secure score array for a tenant, using an in-memory cache. * Cache is keyed by clientId:tenantId:tenantFilter:$top so different tenants * and history depths each get their own entry. Output mode transforms are * applied by the caller after this returns, so a single cache entry serves * all output modes for the same underlying data. */ export declare function getSecureScoreCached(this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions, tenantFilter: string, top: number): Promise; /** * Helper to get a resource locator value (handles both list and id modes) */ export declare function getResourceLocatorValue(value: unknown): string; /** * Extracts the tenant filter from the resource locator parameter, returning '' if not set. * Uses getNodeParameter default to safely return '' when the parameter is not registered * for the current operation, while still surfacing real errors (bad types, corrupt state). */ export declare function getTenantFilter(context: IExecuteFunctions, i: number): string; /** * Strips Graph API URL prefixes and leading slashes from an endpoint string. */ export declare function normalizeGraphEndpoint(endpoint: string): string; /** * Parses a value as JSON, returning an IDataObject or IDataObject[]. * Throws a friendly NodeOperationError on invalid input. */ export declare function parseJsonPayload(node: INode, value: unknown, fieldName: string, itemIndex: number): IDataObject | IDataObject[]; /** * Like parseJsonPayload but enforces the result is an object (not array). */ export declare function parseJsonObjectPayload(node: INode, value: unknown, fieldName: string, itemIndex: number): IDataObject; /** * Returns true if the payload (object or array) has content. */ export declare function hasPayloadContent(payload: IDataObject | IDataObject[]): boolean; /** * Returns true if the endpoint matches the Teams schedule path pattern. */ export declare function isTeamsScheduleEndpoint(endpoint: string): boolean; /** * Lists items from a CIPP endpoint, applying returnAll/limit slicing. * Replaces the common pattern of: call API → check returnAll → slice to limit. */ export declare function listWithSlice(context: IExecuteFunctions, i: number, method: IHttpRequestMethods, endpoint: string, body?: IDataObject, qs?: IDataObject): Promise; /** * Executes a POST action against a CIPP endpoint, automatically reading * tenantFilter and merging it into the body. */ export declare function postAction(context: IExecuteFunctions, i: number, endpoint: string, body?: IDataObject): Promise; /** * Recursively converts string values that are plain decimal numbers into actual numbers. * Handles nested objects and arrays. Leaves empty strings, hex, whitespace-only, * booleans, dates, and UUIDs unchanged. */ export declare function normalizeNumericValues(data: IDataObject | IDataObject[]): IDataObject | IDataObject[]; /** * Builds an OData-style query string from base params and OData options. */ export declare function buildOdataQuery(baseQs: IDataObject, params: { select?: string | string[]; filter?: string; top?: number; orderby?: string; }): IDataObject; //# sourceMappingURL=GenericFunctions.d.ts.map