vovk 3.0.0-draft.66 → 3.0.0-draft.69
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/client/types.d.ts +1 -1
- package/dist/openapi/openapi.d.ts +4 -1
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/client/types.ts +1 -1
- package/src/openapi/openapi.ts +5 -1
- package/src/types.ts +1 -1
package/dist/client/types.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export type VovkClient<T, OPTS extends {
|
|
|
51
51
|
}> = OmitNever<VovkClientWithNever<T, OPTS>>;
|
|
52
52
|
export type VovkClientFetcher<OPTS extends Record<string, KnownAny> = Record<string, never>, T = KnownAny> = (options: {
|
|
53
53
|
name: keyof T;
|
|
54
|
-
httpMethod: HttpMethod
|
|
54
|
+
httpMethod: `${HttpMethod}`;
|
|
55
55
|
getEndpoint: (data: {
|
|
56
56
|
apiRoot: string;
|
|
57
57
|
params: {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { OperationObject } from 'openapi3-ts/oas31';
|
|
2
2
|
import { fromSchema } from './fromSchema';
|
|
3
|
-
|
|
3
|
+
type OperationObjectWithCustomProperties = OperationObject & {
|
|
4
|
+
[key in `${'x' | 'X'}-${string}`]: any;
|
|
5
|
+
};
|
|
6
|
+
declare const openapiDecorator: (openAPIOperationObject?: OperationObjectWithCustomProperties | undefined) => (target: import("..").KnownAny, propertyKey: string) => void;
|
|
4
7
|
export declare const openapi: typeof openapiDecorator & {
|
|
5
8
|
fromSchema: typeof fromSchema;
|
|
6
9
|
};
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
package/src/client/types.ts
CHANGED
|
@@ -81,7 +81,7 @@ export type VovkClient<T, OPTS extends { [key: string]: KnownAny }> = OmitNever<
|
|
|
81
81
|
export type VovkClientFetcher<OPTS extends Record<string, KnownAny> = Record<string, never>, T = KnownAny> = (
|
|
82
82
|
options: {
|
|
83
83
|
name: keyof T;
|
|
84
|
-
httpMethod: HttpMethod
|
|
84
|
+
httpMethod: `${HttpMethod}`;
|
|
85
85
|
getEndpoint: (data: {
|
|
86
86
|
apiRoot: string;
|
|
87
87
|
params: { [key: string]: string };
|
package/src/openapi/openapi.ts
CHANGED
|
@@ -2,7 +2,11 @@ import type { OperationObject } from 'openapi3-ts/oas31';
|
|
|
2
2
|
import { createDecorator } from '../createDecorator';
|
|
3
3
|
import { fromSchema } from './fromSchema';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type OperationObjectWithCustomProperties = OperationObject & {
|
|
6
|
+
[key in `${'x' | 'X'}-${string}`]: any;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const openapiDecorator = createDecorator(null, (openAPIOperationObject: OperationObjectWithCustomProperties = {}) => {
|
|
6
10
|
return (handlerSchema) => ({
|
|
7
11
|
...handlerSchema,
|
|
8
12
|
openapi: {
|
package/src/types.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type StaticClass = Function; // eslint-disable-line @typescript-eslint/no
|
|
|
9
9
|
|
|
10
10
|
export type VovkHandlerSchema = {
|
|
11
11
|
path: string;
|
|
12
|
-
httpMethod: HttpMethod
|
|
12
|
+
httpMethod: `${HttpMethod}`;
|
|
13
13
|
validation?: { query?: KnownAny; body?: KnownAny };
|
|
14
14
|
openapi?: OperationObject;
|
|
15
15
|
custom?: Record<string, KnownAny>;
|