@hey-api/openapi-ts 0.78.3 → 0.79.1
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.
- package/README.md +34 -13
- package/bin/index.cjs +8 -0
- package/dist/chunk-H4ADXQ4D.js +39 -0
- package/dist/chunk-H4ADXQ4D.js.map +1 -0
- package/dist/clients/axios/types.ts +2 -1
- package/dist/clients/core/params.ts +10 -0
- package/dist/clients/core/types.ts +14 -0
- package/dist/index.cjs +65 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +49 -49
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +11 -11
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/{types.d-CaH9PF-K.d.cts → types.d-BRYhp7DX.d.cts} +1783 -268
- package/dist/{types.d-CaH9PF-K.d.ts → types.d-BRYhp7DX.d.ts} +1783 -268
- package/package.json +2 -1
- package/dist/chunk-YJGQGZQU.js +0 -39
- package/dist/chunk-YJGQGZQU.js.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
AxiosError,
|
|
3
3
|
AxiosInstance,
|
|
4
|
+
AxiosRequestHeaders,
|
|
4
5
|
AxiosResponse,
|
|
5
6
|
AxiosStatic,
|
|
6
7
|
CreateAxiosDefaults,
|
|
@@ -33,7 +34,7 @@ export interface Config<T extends ClientOptions = ClientOptions>
|
|
|
33
34
|
* {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
|
|
34
35
|
*/
|
|
35
36
|
headers?:
|
|
36
|
-
|
|
|
37
|
+
| AxiosRequestHeaders
|
|
37
38
|
| Record<
|
|
38
39
|
string,
|
|
39
40
|
| string
|
|
@@ -3,11 +3,21 @@ type Slot = 'body' | 'headers' | 'path' | 'query';
|
|
|
3
3
|
export type Field =
|
|
4
4
|
| {
|
|
5
5
|
in: Exclude<Slot, 'body'>;
|
|
6
|
+
/**
|
|
7
|
+
* Field name. This is the name we want the user to see and use.
|
|
8
|
+
*/
|
|
6
9
|
key: string;
|
|
10
|
+
/**
|
|
11
|
+
* Field mapped name. This is the name we want to use in the request.
|
|
12
|
+
* If omitted, we use the same value as `key`.
|
|
13
|
+
*/
|
|
7
14
|
map?: string;
|
|
8
15
|
}
|
|
9
16
|
| {
|
|
10
17
|
in: Extract<Slot, 'body'>;
|
|
18
|
+
/**
|
|
19
|
+
* Key isn't required for bodies.
|
|
20
|
+
*/
|
|
11
21
|
key?: string;
|
|
12
22
|
map?: string;
|
|
13
23
|
};
|
|
@@ -102,3 +102,17 @@ export interface Config {
|
|
|
102
102
|
*/
|
|
103
103
|
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
104
104
|
}
|
|
105
|
+
|
|
106
|
+
type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]
|
|
107
|
+
? true
|
|
108
|
+
: [T] extends [never | undefined]
|
|
109
|
+
? [undefined] extends [T]
|
|
110
|
+
? false
|
|
111
|
+
: true
|
|
112
|
+
: false;
|
|
113
|
+
|
|
114
|
+
export type OmitNever<T extends Record<string, unknown>> = {
|
|
115
|
+
[K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true
|
|
116
|
+
? never
|
|
117
|
+
: K]: T[K];
|
|
118
|
+
};
|