wallaby-cash 3.7.0 → 3.8.0

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.
@@ -0,0 +1,17 @@
1
+ import * as v from 'valibot';
2
+ export declare const apiValidators: ({
3
+ method: string;
4
+ path: string;
5
+ request: v.LazySchema<v.GenericSchema>;
6
+ response: v.LazySchema<v.GenericSchema>;
7
+ } | {
8
+ method: string;
9
+ path: string;
10
+ response: v.LazySchema<v.GenericSchema>;
11
+ request?: undefined;
12
+ } | {
13
+ method: string;
14
+ path: string;
15
+ response: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>, undefined>;
16
+ request?: undefined;
17
+ })[];
@@ -0,0 +1,23 @@
1
+ import * as v from 'valibot';
2
+ import { RuntimeValidationMode } from '../types';
3
+ interface MatchedValidators {
4
+ request?: v.GenericSchema;
5
+ response?: v.GenericSchema;
6
+ }
7
+ /** Looks up the request/response schemas for a route, or `undefined` for an endpoint not covered by the spec. */
8
+ export declare function findValidators(method: string, rawPath: string): MatchedValidators | undefined;
9
+ interface AssertApiResponseParams {
10
+ method: string;
11
+ path: string;
12
+ data: unknown;
13
+ mode: RuntimeValidationMode;
14
+ }
15
+ export declare function assertValidApiResponse({ method, path, data, mode }: AssertApiResponseParams): void;
16
+ interface AssertApiRequestParams {
17
+ method: string;
18
+ path: string;
19
+ body: unknown;
20
+ mode: RuntimeValidationMode;
21
+ }
22
+ export declare function assertValidApiRequest({ method, path, body, mode }: AssertApiRequestParams): void;
23
+ export {};