···11import type { ClientPlugins, UserPlugins } from '../plugins';
22-import type {
33- ArrayOfObjectsToObjectMap,
44- ExtractArrayOfObjects,
55- ExtractWithDiscriminator,
66-} from './utils';
22+import type { ArrayOfObjectsToObjectMap, ExtractArrayOfObjects } from './utils';
7384export type Formatters = 'biome' | 'prettier';
95···1612 | 'snake_case'
1713 | 'SCREAMING_SNAKE_CASE';
18141515+interface Input {
1616+ /**
1717+ * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
1818+ *
1919+ * Projects are private by default, you will need to be authenticated
2020+ * to download OpenAPI specifications. We recommend using project API
2121+ * keys in CI workflows and personal API keys for local development.
2222+ *
2323+ * API key isn't required for public projects. You can also omit this
2424+ * parameter and provide an environment variable `HEY_API_TOKEN`.
2525+ */
2626+ api_key?: string;
2727+ /**
2828+ * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
2929+ *
3030+ * You can fetch the last build from branch by providing the branch
3131+ * name.
3232+ */
3333+ branch?: string;
3434+ /**
3535+ * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
3636+ *
3737+ * You can fetch an exact specification by providing a commit sha.
3838+ * This will always return the same file.
3939+ */
4040+ commit_sha?: string;
4141+ /**
4242+ * Prevent parts matching the regular expression from being processed.
4343+ * You can select both operations and components by reference within
4444+ * the bundled input. In case of conflicts, `exclude` takes precedence
4545+ * over `include`.
4646+ *
4747+ * @example
4848+ * operation: '^#/paths/api/v1/foo/get$'
4949+ * schema: '^#/components/schemas/Foo$'
5050+ */
5151+ exclude?: string;
5252+ /**
5353+ * Process only parts matching the regular expression. You can select both
5454+ * operations and components by reference within the bundled input. In
5555+ * case of conflicts, `exclude` takes precedence over `include`.
5656+ *
5757+ * @example
5858+ * operation: '^#/paths/api/v1/foo/get$'
5959+ * schema: '^#/components/schemas/Foo$'
6060+ */
6161+ include?: string;
6262+ /**
6363+ * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
6464+ *
6565+ * Organization created in Hey API platform.
6666+ */
6767+ organization?: string;
6868+ /**
6969+ * Path to the OpenAPI specification. This can be either local or remote path.
7070+ * Both JSON and YAML file formats are supported. You can also pass the parsed
7171+ * object directly if you're fetching the file yourself.
7272+ */
7373+ path?:
7474+ | 'https://get.heyapi.dev/<organization>/<project>'
7575+ | (string & {})
7676+ | Record<string, unknown>;
7777+ /**
7878+ * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
7979+ *
8080+ * Project created in Hey API platform.
8181+ */
8282+ project?: string;
8383+ /**
8484+ * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
8585+ *
8686+ * If you're tagging your specifications with custom tags, you can use
8787+ * them to filter the results. When you provide multiple tags, only
8888+ * the first match will be returned.
8989+ */
9090+ tags?: ReadonlyArray<string>;
9191+ /**
9292+ * **Requires `path` to start with `https://get.heyapi.dev` or be undefined**
9393+ *
9494+ * Every OpenAPI document contains a required version field. You can
9595+ * use this value to fetch the last uploaded specification matching
9696+ * the value.
9797+ */
9898+ version?: string;
9999+}
100100+19101export interface UserConfig {
20102 /**
21103 * Path to the config file. Set this value if you don't use the default
···36118 * Alternatively, you can define a configuration object with more options.
37119 */
38120 input:
3939- | string
121121+ | 'https://get.heyapi.dev/<organization>/<project>'
122122+ | (string & {})
40123 | Record<string, unknown>
4141- | {
4242- /**
4343- * Prevent parts matching the regular expression from being processed.
4444- * You can select both operations and components by reference within
4545- * the bundled input. In case of conflicts, `exclude` takes precedence
4646- * over `include`.
4747- *
4848- * @example
4949- * operation: '^#/paths/api/v1/foo/get$'
5050- * schema: '^#/components/schemas/Foo$'
5151- */
5252- exclude?: string;
5353- /**
5454- * Process only parts matching the regular expression. You can select both
5555- * operations and components by reference within the bundled input. In
5656- * case of conflicts, `exclude` takes precedence over `include`.
5757- *
5858- * @example
5959- * operation: '^#/paths/api/v1/foo/get$'
6060- * schema: '^#/components/schemas/Foo$'
6161- */
6262- include?: string;
6363- /**
6464- * Path to the OpenAPI specification. This can be either local or remote path.
6565- * Both JSON and YAML file formats are supported. You can also pass the parsed
6666- * object directly if you're fetching the file yourself.
6767- */
6868- path: string | Record<string, unknown>;
6969- };
124124+ | Input;
70125 /**
71126 * The relative location of the logs folder
72127 *
···257312 | 'watch'
258313> &
259314 Pick<UserConfig, 'base' | 'name' | 'request'> & {
260260- input: ExtractWithDiscriminator<UserConfig['input'], { path: unknown }>;
315315+ input: Omit<Input, 'path'> & Pick<Required<Input>, 'path'>;
261316 logs: Extract<Required<UserConfig['logs']>, object>;
262317 output: Extract<UserConfig['output'], object>;
263318 pluginOrder: ReadonlyArray<ClientPlugins['name']>;