···11+---
22+'@hey-api/openapi-ts': patch
33+---
44+55+feat(parser): input supports Scalar API Registry with `scalar:` prefix
+11
docs/openapi-ts/configuration/input.md
···104104105105We also provide shorthands for other registries:
106106107107+::: details Scalar
108108+Prefix your input with `scalar:` to use the Scalar API Registry.
109109+110110+```js [long]
111111+export default {
112112+ input: 'scalar:@scalar/access-service', // [!code ++]
113113+};
114114+```
115115+116116+:::
117117+107118::: details ReadMe
108119Prefix your input with `readme:` to use the ReadMe API Registry.
109120
···11-export type { Auth } from '../core/auth';
22-export type { QuerySerializerOptions } from '../core/bodySerializer';
11+// This file is auto-generated by @hey-api/openapi-ts
22+33+export type { Auth } from '../core/auth.gen';
44+export type { QuerySerializerOptions } from '../core/bodySerializer.gen';
35export {
46 formDataBodySerializer,
57 jsonBodySerializer,
68 urlSearchParamsBodySerializer,
77-} from '../core/bodySerializer';
88-export { buildClientParams } from '../core/params';
99-export { createClient } from './client';
99+} from '../core/bodySerializer.gen';
1010+export { buildClientParams } from '../core/params.gen';
1111+export { createClient } from './client.gen';
1012export type {
1113 Client,
1214 ClientOptions,
···1719 RequestOptions,
1820 RequestResult,
1921 TDataShape,
2020-} from './types';
2121-export { createConfig } from './utils';
2222+} from './types.gen';
2323+export { createConfig } from './utils.gen';
···11+// This file is auto-generated by @hey-api/openapi-ts
22+13import type {
24 AxiosError,
35 AxiosInstance,
66+ AxiosRequestHeaders,
47 AxiosResponse,
58 AxiosStatic,
69 CreateAxiosDefaults,
710} from 'axios';
81199-import type { Auth } from '../core/auth';
1010-import type { Client as CoreClient, Config as CoreConfig } from '../core/types';
1212+import type { Auth } from '../core/auth.gen';
1313+import type {
1414+ Client as CoreClient,
1515+ Config as CoreConfig,
1616+} from '../core/types.gen';
11171218export interface Config<T extends ClientOptions = ClientOptions>
1319 extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>,
1420 CoreConfig {
1521 /**
1616- * Axios implementation. You can use this option to provide a custom
1717- * Axios instance.
2222+ * Axios implementation. You can use this option to provide either an
2323+ * `AxiosStatic` or an `AxiosInstance`.
1824 *
1925 * @default axios
2026 */
2121- axios?: AxiosStatic;
2727+ axios?: AxiosStatic | AxiosInstance;
2228 /**
2329 * Base URL for all requests made by this client.
2430 */
···3036 * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
3137 */
3238 headers?:
3333- | CreateAxiosDefaults['headers']
3939+ | AxiosRequestHeaders
3440 | Record<
3541 string,
3642 | string
···11+// This file is auto-generated by @hey-api/openapi-ts
22+13type Slot = 'body' | 'headers' | 'path' | 'query';
2435export type Field =
46 | {
57 in: Exclude<Slot, 'body'>;
88+ /**
99+ * Field name. This is the name we want the user to see and use.
1010+ */
611 key: string;
1212+ /**
1313+ * Field mapped name. This is the name we want to use in the request.
1414+ * If omitted, we use the same value as `key`.
1515+ */
716 map?: string;
817 }
918 | {
1019 in: Extract<Slot, 'body'>;
2020+ /**
2121+ * Key isn't required for bodies.
2222+ */
1123 key?: string;
1224 map?: string;
1325 };
···11+// This file is auto-generated by @hey-api/openapi-ts
22+13interface SerializeOptions<T>
24 extends SerializePrimitiveOptions,
35 SerializerOptions<T> {}
···11-import type { Auth, AuthToken } from './auth';
11+// This file is auto-generated by @hey-api/openapi-ts
22+33+import type { Auth, AuthToken } from './auth.gen';
24import type {
35 BodySerializer,
46 QuerySerializer,
57 QuerySerializerOptions,
66-} from './bodySerializer';
88+} from './bodySerializer.gen';
79810export interface Client<
911 RequestFn = never,
···8587 */
8688 querySerializer?: QuerySerializer | QuerySerializerOptions;
8789 /**
9090+ * A function validating request data. This is useful if you want to ensure
9191+ * the request conforms to the desired shape, so it can be safely sent to
9292+ * the server.
9393+ */
9494+ requestValidator?: (data: unknown) => Promise<unknown>;
9595+ /**
8896 * A function transforming response data before it's returned. This is useful
8997 * for post-processing data, e.g. converting ISO strings into Date objects.
9098 */
···96104 */
97105 responseValidator?: (data: unknown) => Promise<unknown>;
98106}
107107+108108+type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]
109109+ ? true
110110+ : [T] extends [never | undefined]
111111+ ? [undefined] extends [T]
112112+ ? false
113113+ : true
114114+ : false;
115115+116116+export type OmitNever<T extends Record<string, unknown>> = {
117117+ [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true
118118+ ? never
119119+ : K]: T[K];
120120+};