import { t as IRestApiContext } from "./types2.mjs"; import { n as VersionNode } from "./versions.mjs"; import { t as WorkflowData } from "./workflows.mjs"; import { RawAxiosRequestHeaders } from "axios"; import { INode, INodeCredentialsDetails } from "n8n-workflow"; //#region src/api/templates.d.ts interface IWorkflowTemplateNode extends Pick { credentials?: IWorkflowTemplateNodeCredentials; } interface IWorkflowTemplateNodeCredentials { [key: string]: string | INodeCredentialsDetails; } interface IWorkflowTemplate { id: number; name: string; workflow: Pick & { nodes: IWorkflowTemplateNode[]; }; } interface ITemplatesNode extends VersionNode { id: number; categories?: ITemplatesCategory[]; } interface ITemplatesCollection { id: number; name: string; nodes: ITemplatesNode[]; workflows: Array<{ id: number; }>; } interface ITemplatesImage { id: number; url: string; } interface ITemplatesCollectionExtended extends ITemplatesCollection { description: string | null; image: ITemplatesImage[]; categories: ITemplatesCategory[]; createdAt: string; } interface ITemplatesCollectionFull extends ITemplatesCollectionExtended { full: true; } interface ITemplatesCollectionResponse extends ITemplatesCollectionExtended { workflows: ITemplatesWorkflow[]; } interface ITemplatesWorkflow { id: number; createdAt: string; name: string; nodes: ITemplatesNode[]; totalViews: number; user: { username: string; name: string; avatar: string; verified: boolean; }; readyToDemo?: boolean | null; } interface ITemplatesWorkflowInfo { nodeCount: number; nodeTypes: { [key: string]: { count: number; }; }; } type TemplateSearchFacet = { field_name: string; sampled: boolean; stats: { total_values: number; }; counts: Array<{ count: number; highlighted: string; value: string; }>; }; interface ITemplatesWorkflowResponse extends ITemplatesWorkflow, IWorkflowTemplate { description: string | null; image: ITemplatesImage[]; categories: ITemplatesCategory[]; workflowInfo: ITemplatesWorkflowInfo; } interface ITemplatesWorkflowFull extends ITemplatesWorkflowResponse { full: true; } interface ITemplatesQuery { categories: string[]; search: string; apps?: string[]; nodes?: string[]; sort?: string; combineWith?: string; } interface ITemplatesCategory { id: number; name: string; } declare function testHealthEndpoint(apiEndpoint: string): Promise; declare function getCategories(apiEndpoint: string, headers?: RawAxiosRequestHeaders): Promise<{ categories: ITemplatesCategory[]; }>; declare function getCollections(apiEndpoint: string, query: ITemplatesQuery, headers?: RawAxiosRequestHeaders): Promise<{ collections: ITemplatesCollection[]; }>; declare function getWorkflows(apiEndpoint: string, query: { page: number; limit: number; categories: string[]; search: string; sort?: string; apps?: string[]; nodes?: string[]; combineWith?: string; }, headers?: RawAxiosRequestHeaders): Promise<{ totalWorkflows: number; workflows: ITemplatesWorkflow[]; filters: TemplateSearchFacet[]; }>; declare function getCollectionById(apiEndpoint: string, collectionId: string, headers?: RawAxiosRequestHeaders): Promise<{ collection: ITemplatesCollectionResponse; }>; declare function getTemplateById(apiEndpoint: string, templateId: string, headers?: RawAxiosRequestHeaders): Promise<{ workflow: ITemplatesWorkflowResponse; }>; declare function getWorkflowTemplate(apiEndpoint: string, templateId: string, headers?: RawAxiosRequestHeaders): Promise; interface IInstanceAiExamplesQuery { category?: string; subcategory?: string; page?: number; limit?: number; } interface IInstanceAiExampleWorkflow { id: number; name: string; category: string; subcategory?: string; relevanceScore?: number; prompt?: string; nodes: Array<{ name: string; displayName?: string; icon?: string; iconData?: { type: string; fileBuffer: string; }; }>; } interface IInstanceAiExamplesResponse { categories: string[]; subcategories: Record; totalWorkflows: number; workflows: IInstanceAiExampleWorkflow[]; } declare function getInstanceAiExamples(context: IRestApiContext, query: IInstanceAiExamplesQuery): Promise; //#endregion export { getWorkflowTemplate as C, getTemplateById as S, testHealthEndpoint as T, TemplateSearchFacet as _, ITemplatesCollection as a, getCollections as b, ITemplatesNode as c, ITemplatesWorkflowFull as d, ITemplatesWorkflowInfo as f, IWorkflowTemplateNodeCredentials as g, IWorkflowTemplateNode as h, ITemplatesCategory as i, ITemplatesQuery as l, IWorkflowTemplate as m, IInstanceAiExamplesQuery as n, ITemplatesCollectionFull as o, ITemplatesWorkflowResponse as p, IInstanceAiExamplesResponse as r, ITemplatesCollectionResponse as s, IInstanceAiExampleWorkflow as t, ITemplatesWorkflow as u, getCategories as v, getWorkflows as w, getInstanceAiExamples as x, getCollectionById as y }; //# sourceMappingURL=templates.d.mts.map