///
import { FormikErrors, FormikProps, FormikTouched } from 'formik';
import { GetServerSidePropsContext } from 'next';
import qs from 'querystring';
import { ReactNode } from 'react';
import * as Stream from 'stream';
import * as z from 'zod';
import { ZodRawShape } from 'zod/lib/src/types/base';
export interface MockIncomingMessage extends Stream.Readable {
method: string;
url: string;
}
export interface MockGetServerSidePropsContext {
req: MockIncomingMessage;
resolvedUrl: string;
}
declare type Primitive = string | number | boolean;
declare type DefaultValues = {
[P in keyof T]: T[P] extends Primitive ? DefaultValues | T[P] | '' : DefaultValues;
};
declare type FieldError = {
path: (string | number)[];
message: string;
};
declare type PostResponseError = {
type: 'ValidationError';
message: string;
stack?: string | undefined;
fieldErrors: FieldError[];
} | {
type: 'MutationError';
message: string;
stack?: string | undefined;
fieldErrors?: null;
};
declare type PostResponse = {
success: true;
input: TValues;
data: TMutationData;
error?: null;
} | {
success: false;
input: TValues;
data?: null;
error: PostResponseError;
};
declare type PagePropsValue = {
endpoints: {
/**
* endpoint for using in `fetch()`
*/
fetch: string;
/**
* endpoint for using in `