1 | import doctrine from 'doctrine';
|
2 | import * as TS from 'ts-morph';
|
3 | import * as TJS from 'typescript-json-schema';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | export interface Definition {
|
9 |
|
10 | title: string;
|
11 |
|
12 | description?: string;
|
13 |
|
14 | config: Config;
|
15 |
|
16 | version: string;
|
17 | params: {
|
18 |
|
19 | schema: TJS.Definition;
|
20 |
|
21 | order: string[];
|
22 |
|
23 | http: boolean;
|
24 |
|
25 | context: boolean;
|
26 | };
|
27 | returns: {
|
28 |
|
29 | schema: TJS.Definition;
|
30 |
|
31 | async: boolean;
|
32 |
|
33 | http: boolean;
|
34 | };
|
35 | }
|
36 | export interface Config {
|
37 | language: string;
|
38 | defaultExport: boolean;
|
39 | namedExport?: string;
|
40 | }
|
41 | export interface DefinitionOptions {
|
42 | emit?: boolean;
|
43 | emitOptions?: TS.EmitOptions;
|
44 | compilerOptions?: TS.CompilerOptions;
|
45 | jsonSchemaOptions?: TJS.PartialArgs;
|
46 | }
|
47 | export declare type PartialDefinitionOptions = Partial<DefinitionOptions>;
|
48 | export interface DefinitionBuilder {
|
49 | sourceFile: TS.SourceFile;
|
50 | main: TS.FunctionDeclaration;
|
51 | docs?: doctrine.Annotation;
|
52 | title: string;
|
53 | definition: Partial<Definition>;
|
54 | }
|