UNPKG

1.04 kBTypeScriptView Raw
1import ts from 'typescript';
2export declare const FUNCTION_ACTION = "action";
3declare type TOutput = {
4 requestBody: any;
5 response: any;
6 functionAuthType?: string;
7};
8/**
9 * Convert single func types to json schema
10 * This function tries to find the relevant type definitions, Params and `action` method resposne type
11 * and converts the types to json-schema
12 * @param functionPath absolute path to function
13 * @param options compiler options
14 */
15export declare function functionTypesToSchemaConverter(functionPath: string, options?: ts.CompilerOptions): TOutput;
16/**
17 * Generate full openapi spec from functions
18 * @param functionsDir absolute path to functions directory
19 * @param functions list of func names
20 * @param buid integration unique identifier
21 * @param integrationName name of the integration
22 */
23export default function generator({ functionsDir, functions, buid, integrationName }: {
24 functionsDir: string;
25 functions: string[];
26 buid: string;
27 integrationName: string;
28}): string;
29export {};
30
\No newline at end of file