@moccona/apicodegen 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,29 @@
1
+ import { ServerOptions, PluginOption } from 'vite';
2
+
3
+ type FetchDocRequestInit = {
4
+ method?: string;
5
+ body?: string | FormData;
6
+ headers?: Record<string, string>;
7
+ };
8
+ declare enum Adaptors {
9
+ fetch = "fetch",
10
+ axios = "axios"
11
+ }
12
+ type ProviderInitOptions = {
13
+ docURL: string;
14
+ output: string;
15
+ baseURL?: string;
16
+ importClientSource?: string;
17
+ requestOptions?: FetchDocRequestInit;
18
+ verbose?: boolean;
19
+ adaptor?: keyof typeof Adaptors;
20
+ };
21
+
22
+ type apiCodeGenPluginOptions = ProviderInitOptions & {
23
+ name: string;
24
+ proxy?: ServerOptions["proxy"];
25
+ };
26
+ declare const tsc: (path: string) => Promise<void>;
27
+ declare function apiCodeGenPlugin(options: apiCodeGenPluginOptions[]): PluginOption;
28
+
29
+ export { apiCodeGenPlugin, type apiCodeGenPluginOptions, tsc };