env.d.ts 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. X_UI_DB_TYPE?: string;
  28. __SUB_PAGE_DATA__?: SubPageData;
  29. }
  30. declare module 'qs' {
  31. interface StringifyOptions {
  32. arrayFormat?: 'indices' | 'brackets' | 'repeat' | 'comma';
  33. encode?: boolean;
  34. encoder?: (str: unknown, defaultEncoder: (s: unknown) => string, charset: string, type: 'key' | 'value') => string;
  35. allowDots?: boolean;
  36. skipNulls?: boolean;
  37. addQueryPrefix?: boolean;
  38. }
  39. interface ParseOptions {
  40. depth?: number;
  41. arrayLimit?: number;
  42. allowDots?: boolean;
  43. parseArrays?: boolean;
  44. ignoreQueryPrefix?: boolean;
  45. }
  46. export function stringify(obj: unknown, options?: StringifyOptions): string;
  47. export function parse(str: string, options?: ParseOptions): Record<string, unknown>;
  48. const qs: { stringify: typeof stringify; parse: typeof parse };
  49. export default qs;
  50. }
  51. declare module 'persian-calendar-suite' {
  52. import type { ComponentType, ReactNode } from 'react';
  53. type DateInput = string | number | null;
  54. type OutputFormat = 'iso' | 'shamsi' | 'gregorian' | 'hijri' | 'timestamp';
  55. interface PersianDateTimePickerProps {
  56. value?: DateInput;
  57. onChange?: (value: number | string | null) => void;
  58. defaultValue?: string | number | 'now' | null;
  59. showTime?: boolean;
  60. minuteStep?: number;
  61. outputFormat?: OutputFormat;
  62. showFooter?: boolean;
  63. theme?: Record<string, unknown>;
  64. disabledHours?: number[];
  65. minDate?: string | Date | null;
  66. maxDate?: string | Date | null;
  67. enabledDates?: string[] | null;
  68. disabledDates?: string[] | null;
  69. disabledWeekDays?: number[];
  70. persianNumbers?: boolean;
  71. rtlCalendar?: boolean;
  72. placeholder?: string;
  73. disabled?: boolean;
  74. className?: string;
  75. children?: ReactNode;
  76. }
  77. export const PersianDateTimePicker: ComponentType<PersianDateTimePickerProps>;
  78. export const PersianCalendar: ComponentType<Record<string, unknown>>;
  79. export const PersianDateRangePicker: ComponentType<Record<string, unknown>>;
  80. export const PersianTimePicker: ComponentType<Record<string, unknown>>;
  81. export const PersianTimeline: ComponentType<Record<string, unknown>>;
  82. }