1
0

env.d.ts 2.7 KB

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