UNPKG

1.05 kBTypeScriptView Raw
1import ts from 'typescript';
2export declare const INTENT_ACTION = "action";
3declare type TOutput = {
4 requestBody: any;
5 response: any;
6 intentAuthType?: string;
7};
8/**
9 * Convert single intent 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 intentPath absolute path to intent
13 * @param options compiler options
14 */
15export declare function intentTypesToSchemaConverter(intentPath: string, options?: ts.CompilerOptions): TOutput;
16/**
17 * Generate full openapi spec from intents
18 * @param intentsDir absolute path to intents directory
19 * @param intents list of intent names
20 * @param integrationUuid integration unique identifier
21 * @param integrationName name of the integration
22 */
23export default function generator({ intentsDir, intents, integrationUuid, integrationName }: {
24 intentsDir: string;
25 intents: string[];
26 integrationUuid: string;
27 integrationName: string;
28}): string;
29export {};