vovk 3.0.0-draft.69 → 3.0.0-draft.70
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/createRPC.js +1 -1
- package/dist/client/types.d.ts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/client/createRPC.ts +2 -1
- package/src/client/types.ts +1 -1
- package/src/types.ts +1 -1
package/dist/client/createRPC.js
CHANGED
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:
|
|
54
|
+
httpMethod: HttpMethod;
|
|
55
55
|
getEndpoint: (data: {
|
|
56
56
|
apiRoot: string;
|
|
57
57
|
params: {
|
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
package/src/client/createRPC.ts
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
type VovkControllerParams,
|
|
5
5
|
type VovkControllerQuery,
|
|
6
6
|
type KnownAny,
|
|
7
|
+
type HttpMethod,
|
|
7
8
|
} from '../types';
|
|
8
9
|
import { type VovkClientOptions, type VovkClient, type VovkDefaultFetcherOptions, VovkValidateOnClient } from './types';
|
|
9
10
|
|
|
@@ -77,7 +78,7 @@ const createRPC = <T, OPTS extends Record<string, KnownAny> = VovkDefaultFetcher
|
|
|
77
78
|
|
|
78
79
|
const internalOptions: Parameters<typeof fetcher>[0] = {
|
|
79
80
|
name: staticMethodName as keyof T,
|
|
80
|
-
httpMethod,
|
|
81
|
+
httpMethod: httpMethod as HttpMethod,
|
|
81
82
|
getEndpoint,
|
|
82
83
|
validate,
|
|
83
84
|
defaultHandler,
|
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:
|
|
84
|
+
httpMethod: HttpMethod;
|
|
85
85
|
getEndpoint: (data: {
|
|
86
86
|
apiRoot: string;
|
|
87
87
|
params: { [key: string]: string };
|
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:
|
|
12
|
+
httpMethod: string; // HttpMethod type makes JSON incompatible with VovkHandlerSchema type
|
|
13
13
|
validation?: { query?: KnownAny; body?: KnownAny };
|
|
14
14
|
openapi?: OperationObject;
|
|
15
15
|
custom?: Record<string, KnownAny>;
|