UNPKG

2.63 kBTypeScriptView Raw
1declare type THeader = {
2 openapi: string;
3 info: {
4 title: string;
5 };
6 servers: {
7 url: string;
8 }[];
9 tags: {}[];
10 components: {
11 securitySchemes: {
12 [key: string]: {
13 type: string;
14 in: string;
15 description: string;
16 name: string;
17 };
18 };
19 };
20};
21declare type TParam = {
22 name: string;
23 schema: {
24 type: string;
25 format: string;
26 };
27 in: string;
28 description: string;
29 required?: boolean;
30};
31export declare function specPath({ buid, functionName, requestBody, response, oauth }: {
32 buid: string;
33 functionName: string;
34 requestBody: any;
35 response: any;
36 oauth: boolean;
37}): {
38 [x: string]: {
39 post: {
40 parameters: (TParam | undefined)[];
41 summary: string;
42 requestBody: {
43 content: {
44 'application/json': {
45 schema: any;
46 };
47 };
48 };
49 responses: {
50 '200': {
51 description: string;
52 content: {
53 'application/json': {
54 schema: any;
55 };
56 };
57 };
58 '401': {
59 description: string;
60 content: {
61 'application/json': {
62 schema: {
63 type: string;
64 properties: {
65 error: {
66 type: string;
67 };
68 };
69 };
70 };
71 };
72 };
73 '403': {
74 description: string;
75 content: {
76 'application/json': {
77 schema: {
78 type: string;
79 properties: {
80 error: {
81 type: string;
82 };
83 };
84 };
85 };
86 };
87 };
88 };
89 security: {
90 'API Key': never[];
91 }[];
92 };
93 };
94};
95export declare function topOfSpec(integrationName: string): THeader;
96export {};