env.d.ts 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /// <reference types="vite/client" />
  2. interface SubPageData {
  3. sId?: string;
  4. enabled?: boolean;
  5. download?: string;
  6. upload?: string;
  7. total?: string;
  8. used?: string;
  9. remained?: string;
  10. totalByte?: string | number;
  11. expire?: string | number;
  12. lastOnline?: string | number;
  13. subUrl?: string;
  14. subJsonUrl?: string;
  15. subClashUrl?: string;
  16. subTitle?: string;
  17. links?: string[];
  18. emails?: string[];
  19. datepicker?: 'gregorian' | 'jalalian';
  20. downloadByte?: string | number;
  21. uploadByte?: string | number;
  22. usedByte?: string | number;
  23. }
  24. interface Window {
  25. X_UI_BASE_PATH?: string;
  26. X_UI_CUR_VER?: string;
  27. __SUB_PAGE_DATA__?: SubPageData;
  28. }
  29. declare module 'qs' {
  30. interface StringifyOptions {
  31. arrayFormat?: 'indices' | 'brackets' | 'repeat' | 'comma';
  32. encode?: boolean;
  33. encoder?: (str: unknown, defaultEncoder: (s: unknown) => string, charset: string, type: 'key' | 'value') => string;
  34. allowDots?: boolean;
  35. skipNulls?: boolean;
  36. addQueryPrefix?: boolean;
  37. }
  38. interface ParseOptions {
  39. depth?: number;
  40. arrayLimit?: number;
  41. allowDots?: boolean;
  42. parseArrays?: boolean;
  43. ignoreQueryPrefix?: boolean;
  44. }
  45. export function stringify(obj: unknown, options?: StringifyOptions): string;
  46. export function parse(str: string, options?: ParseOptions): Record<string, unknown>;
  47. const qs: { stringify: typeof stringify; parse: typeof parse };
  48. export default qs;
  49. }
  50. declare module 'persian-calendar-suite' {
  51. import type { ComponentType, ReactNode } from 'react';
  52. type DateInput = string | number | null;
  53. type OutputFormat = 'iso' | 'shamsi' | 'gregorian' | 'hijri' | 'timestamp';
  54. interface PersianDateTimePickerProps {
  55. value?: DateInput;
  56. onChange?: (value: number | string | null) => void;
  57. defaultValue?: string | number | 'now' | null;
  58. showTime?: boolean;
  59. minuteStep?: number;
  60. outputFormat?: OutputFormat;
  61. showFooter?: boolean;
  62. theme?: Record<string, unknown>;
  63. disabledHours?: number[];
  64. minDate?: string | Date | null;
  65. maxDate?: string | Date | null;
  66. enabledDates?: string[] | null;
  67. disabledDates?: string[] | null;
  68. disabledWeekDays?: number[];
  69. persianNumbers?: boolean;
  70. rtlCalendar?: boolean;
  71. placeholder?: string;
  72. disabled?: boolean;
  73. className?: string;
  74. children?: ReactNode;
  75. }
  76. export const PersianDateTimePicker: ComponentType<PersianDateTimePickerProps>;
  77. export const PersianCalendar: ComponentType<Record<string, unknown>>;
  78. export const PersianDateRangePicker: ComponentType<Record<string, unknown>>;
  79. export const PersianTimePicker: ComponentType<Record<string, unknown>>;
  80. export const PersianTimeline: ComponentType<Record<string, unknown>>;
  81. }