@hapaul/api 0.1.1 → 0.1.2
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/dist/index.d.ts +7 -13
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ResponseObjectMap, SuccessResponse } from "openapi-typescript-helpers";
|
|
1
|
+
import { MaybeOptionalInit, ParseAsResponse } from "openapi-fetch";
|
|
2
|
+
import { PathsWithMethod, ResponseObjectMap, SuccessResponse } from "openapi-typescript-helpers";
|
|
3
3
|
|
|
4
4
|
//#region schema.d.ts
|
|
5
5
|
|
|
@@ -2199,17 +2199,11 @@ type InitParam<Init> = RequiredKeysOf<Init> extends never ? [(Init & {
|
|
|
2199
2199
|
})?] : [Init & {
|
|
2200
2200
|
[key: string]: unknown;
|
|
2201
2201
|
}];
|
|
2202
|
-
type
|
|
2203
|
-
type
|
|
2204
|
-
type
|
|
2205
|
-
type
|
|
2206
|
-
type
|
|
2207
|
-
type IDeleteParams = Parameters<IClient['DELETE']>;
|
|
2208
|
-
type GetPaths = IGetParams[0];
|
|
2209
|
-
type PostPaths = IPostParams[0];
|
|
2210
|
-
type PutPaths = IPutParams[0];
|
|
2211
|
-
type PatchPaths = IPatchParams[0];
|
|
2212
|
-
type DeletePaths = IDeleteParams[0];
|
|
2202
|
+
type GetPaths = PathsWithMethod<paths, 'get'>;
|
|
2203
|
+
type PostPaths = PathsWithMethod<paths, 'post'>;
|
|
2204
|
+
type PutPaths = PathsWithMethod<paths, 'put'>;
|
|
2205
|
+
type PatchPaths = PathsWithMethod<paths, 'patch'>;
|
|
2206
|
+
type DeletePaths = PathsWithMethod<paths, 'delete'>;
|
|
2213
2207
|
type GetParams<T extends GetPaths> = InitParam<MaybeOptionalInit<paths[T], 'get'>>;
|
|
2214
2208
|
type PostParams<T extends PostPaths> = InitParam<MaybeOptionalInit<paths[T], 'post'>>;
|
|
2215
2209
|
type PutParams<T extends PutPaths> = InitParam<MaybeOptionalInit<paths[T], 'put'>>;
|