@hey-api/openapi-ts 0.97.1 → 0.97.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.
- package/README.md +70 -61
- package/dist/clients/angular/client.ts +1 -4
- package/dist/clients/angular/types.ts +3 -2
- package/dist/clients/angular/utils.ts +7 -8
- package/dist/clients/axios/client.ts +1 -4
- package/dist/clients/axios/types.ts +7 -2
- package/dist/clients/axios/utils.ts +6 -8
- package/dist/clients/core/params.ts +4 -4
- package/dist/clients/fetch/client.ts +1 -4
- package/dist/clients/fetch/types.ts +3 -2
- package/dist/clients/fetch/utils.ts +6 -8
- package/dist/clients/ky/client.ts +1 -4
- package/dist/clients/ky/types.ts +3 -2
- package/dist/clients/ky/utils.ts +6 -8
- package/dist/clients/next/client.ts +1 -4
- package/dist/clients/next/types.ts +7 -2
- package/dist/clients/next/utils.ts +6 -8
- package/dist/clients/nuxt/client.ts +7 -6
- package/dist/clients/nuxt/utils.ts +6 -8
- package/dist/clients/ofetch/client.ts +1 -4
- package/dist/clients/ofetch/types.ts +3 -2
- package/dist/clients/ofetch/utils.ts +6 -8
- package/dist/index.d.mts +988 -671
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{init-Bi6_Uyy_.mjs → init-D3VuY80Z.mjs} +1435 -978
- package/dist/init-D3VuY80Z.mjs.map +1 -0
- package/dist/internal.mjs +1 -1
- package/dist/run.mjs +2 -2
- package/dist/{src-CSz9FXkH.mjs → src-BeNy9O9X.mjs} +2 -2
- package/dist/{src-CSz9FXkH.mjs.map → src-BeNy9O9X.mjs.map} +1 -1
- package/package.json +6 -6
- package/dist/init-Bi6_Uyy_.mjs.map +0 -1
|
@@ -212,12 +212,13 @@ type MethodFn = <
|
|
|
212
212
|
|
|
213
213
|
type SseFn = <
|
|
214
214
|
TData = unknown,
|
|
215
|
-
|
|
215
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
216
|
+
_TError = unknown,
|
|
216
217
|
ThrowOnError extends boolean = false,
|
|
217
218
|
TResponseStyle extends ResponseStyle = 'fields',
|
|
218
219
|
>(
|
|
219
220
|
options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>,
|
|
220
|
-
) => Promise<ServerSentEventsResult<TData
|
|
221
|
+
) => Promise<ServerSentEventsResult<TData>>;
|
|
221
222
|
|
|
222
223
|
type RequestFn = <
|
|
223
224
|
TData = unknown,
|
|
@@ -147,14 +147,12 @@ const checkForExistence = (
|
|
|
147
147
|
return false;
|
|
148
148
|
};
|
|
149
149
|
|
|
150
|
-
export
|
|
151
|
-
security
|
|
152
|
-
...options
|
|
153
|
-
}: Pick<Required<RequestOptions>, 'security'> &
|
|
154
|
-
Pick<RequestOptions, 'auth' | 'query'> & {
|
|
150
|
+
export async function setAuthParams(
|
|
151
|
+
options: Pick<RequestOptions, 'auth' | 'query' | 'security'> & {
|
|
155
152
|
headers: Headers;
|
|
156
|
-
}
|
|
157
|
-
|
|
153
|
+
},
|
|
154
|
+
): Promise<void> {
|
|
155
|
+
for (const auth of options.security ?? []) {
|
|
158
156
|
if (checkForExistence(options, auth.name)) {
|
|
159
157
|
continue;
|
|
160
158
|
}
|
|
@@ -183,7 +181,7 @@ export const setAuthParams = async ({
|
|
|
183
181
|
break;
|
|
184
182
|
}
|
|
185
183
|
}
|
|
186
|
-
}
|
|
184
|
+
}
|
|
187
185
|
|
|
188
186
|
export const buildUrl: Client['buildUrl'] = (options) =>
|
|
189
187
|
getUrl({
|