1 | import * as ts from 'typescript';
|
2 | import * as TJS from 'typescript-json-schema';
|
3 | export declare function isFunctionClass(tsNode: ts.Node): boolean;
|
4 | export declare function getIdentifier(tsNode: ts.ClassDeclaration | ts.PropertyDeclaration): ts.Identifier;
|
5 | export declare function getFunctionName(tsSourceFile: ts.SourceFile): string;
|
6 | export declare function getPropertyValue(tsNode: ts.ClassDeclaration, propertyName: string): any;
|
7 | export declare function transformer(generator: TJS.JsonSchemaGenerator): ts.TransformerFactory<ts.SourceFile>;
|
8 | export declare class FunctionCodeProcessor {
|
9 | private readonly srcFunctionsDir;
|
10 | private readonly transformer;
|
11 | constructor(srcFunctionsDir: string, transformer: any);
|
12 | run(): Promise<void>;
|
13 | }
|
14 | export declare class OpenApiSpecGenerator {
|
15 | private readonly srcFunctionsDir;
|
16 | private readonly bearerConfig;
|
17 | constructor(srcFunctionsDir: string, bearerConfig: {
|
18 | integrationTitle: string | undefined;
|
19 | integrationUuid: string;
|
20 | });
|
21 | build(): Promise<string>;
|
22 | }
|
23 | export interface ISchemaParam {
|
24 | in: 'query' | 'header';
|
25 | schema: {
|
26 | type: 'string';
|
27 | format?: 'uuid';
|
28 | };
|
29 | description: string;
|
30 | required: boolean;
|
31 | name: string;
|
32 | }
|
33 | export interface IOpenApiSpec {
|
34 | openapi: string;
|
35 | info: any;
|
36 | servers: any[];
|
37 | tags: any[];
|
38 | paths: {
|
39 | [key: string]: {
|
40 | post: {
|
41 | parameters: any[];
|
42 | summary: any[];
|
43 | requestBody: {
|
44 | content: {
|
45 | 'application/json': {
|
46 | schema: any;
|
47 | };
|
48 | };
|
49 | };
|
50 | responses: Record<TStatus, TResponse>;
|
51 | };
|
52 | };
|
53 | };
|
54 | }
|
55 | declare type TStatus = '200' | '401' | '403';
|
56 | declare type TResponse = {
|
57 | description: string;
|
58 | content: {
|
59 | 'application/json': {
|
60 | schema: any;
|
61 | };
|
62 | };
|
63 | };
|
64 | export {};
|