Common.ts 665 B

123456789101112131415161718192021222324252627282930313233343536
  1. import { IValidationItem } from '../hooks/Form';
  2. export interface KeyValuePair {
  3. label: string;
  4. value: string | number;
  5. }
  6. export interface IRes {
  7. code: number;
  8. message: string;
  9. data?: any;
  10. }
  11. export interface IPagination {
  12. offset?: number;
  13. limit?: number;
  14. }
  15. export interface IPaginationRes {
  16. count: number;
  17. limit: number;
  18. offset: number;
  19. total_count: number;
  20. }
  21. export enum ManageRequestMethods {
  22. DELETE = 'delete',
  23. CREATE = 'create',
  24. }
  25. export type FormHelperType = {
  26. formValue: { [x: string]: any };
  27. updateForm: (type: string, value: string) => void;
  28. validation: { [key: string]: IValidationItem };
  29. checkIsValid: Function;
  30. };