/** * Time-related Constants * * Common time values and durations used throughout the application * for timeouts, delays, caching, and other time-based operations. * * @module time/constants */ import { type CountryCode } from '@plyaz/types'; export declare const DAYS_IN_WEEK = 7; export declare const EARLY_MORNING_HOURS = 6; /** * Time conversion and duration constants */ export declare const TIME_CONSTANTS: { /** * One millisecond in milliseconds */ readonly MILLISECOND: 1; /** * One second in milliseconds */ readonly SECOND: 1000; /** * One minute in milliseconds */ readonly MINUTE: 60000; /** * One hour in milliseconds */ readonly HOUR: 3600000; /** * One day in milliseconds */ readonly DAY: 86400000; /** * One week in milliseconds */ readonly WEEK: 604800000; /** * One month in milliseconds (30 days average) */ readonly MONTH: 2592000000; /** * One year in milliseconds (365 days) */ readonly YEAR: 31536000000; /** * Number of milliseconds in one second */ readonly MILLISECONDS_PER_SECOND: 1000; /** * Number of seconds in one minute */ readonly SECONDS_PER_MINUTE: 60; /** * Number of minutes in one hour */ readonly MINUTES_PER_HOUR: 60; /** * Number of hours in one day */ readonly HOURS_PER_DAY: 24; /** * Number of days in one week */ readonly DAYS_PER_WEEK: 7; /** * Number of days in one month (average) */ readonly DAYS_PER_MONTH: 30; /** * Number of days in one year */ readonly DAYS_PER_YEAR: 365; /** * Number of weeks in one year */ readonly WEEKS_PER_YEAR: 52; /** * Number of months in one year */ readonly MONTHS_PER_YEAR: 12; /** * 100 milliseconds */ readonly HUNDRED_MS: 100; /** * 250 milliseconds */ readonly QUARTER_SECOND: 250; /** * 500 milliseconds (half second) */ readonly HALF_SECOND: 500; /** * 2 seconds in milliseconds */ readonly TWO_SECONDS: 2000; /** * 3 seconds in milliseconds */ readonly THREE_SECONDS: 3000; /** * 5 seconds in milliseconds */ readonly FIVE_SECONDS: 5000; /** * 10 seconds in milliseconds */ readonly TEN_SECONDS: 10000; /** * 30 seconds in milliseconds */ readonly THIRTY_SECONDS: 30000; /** * 2 minutes in milliseconds */ readonly TWO_MINUTES: 120000; /** * 5 minutes in milliseconds */ readonly FIVE_MINUTES: 300000; /** * 10 minutes in milliseconds */ readonly TEN_MINUTES: 600000; /** * 15 minutes in milliseconds */ readonly FIFTEEN_MINUTES: 900000; /** * 30 minutes in milliseconds */ readonly THIRTY_MINUTES: 1800000; /** * 1 hour in milliseconds */ readonly ONE_HOUR: 3600000; /** * 2 hours in milliseconds */ readonly TWO_HOURS: 7200000; /** * 6 hours in milliseconds */ readonly SIX_HOURS: 21600000; /** * 12 hours in milliseconds */ readonly TWELVE_HOURS: 43200000; /** * Default timeout duration in milliseconds (5 seconds) */ readonly DEFAULT_TIMEOUT: 5000; /** * Default short timeout in milliseconds (1 second) */ readonly DEFAULT_SHORT_TIMEOUT: 1000; /** * Default long timeout in milliseconds (30 seconds) */ readonly DEFAULT_LONG_TIMEOUT: 30000; /** * Default retry delay in milliseconds (100ms) */ readonly DEFAULT_RETRY_DELAY: 100; /** * Default exponential backoff base delay in milliseconds (1 second) */ readonly DEFAULT_BACKOFF_BASE: 1000; /** * Default maximum backoff delay in milliseconds (30 seconds) */ readonly DEFAULT_MAX_BACKOFF: 30000; /** * Default number of retry attempts */ readonly DEFAULT_RETRY_ATTEMPTS: 3; /** * Default debounce delay in milliseconds (50ms) */ readonly DEFAULT_DEBOUNCE_DELAY: 50; /** * Default throttle delay in milliseconds (100ms) */ readonly DEFAULT_THROTTLE_DELAY: 100; /** * Default animation frame duration in milliseconds (~60fps) */ readonly DEFAULT_ANIMATION_FRAME: 16.67; /** * Default transition duration in milliseconds (300ms) */ readonly DEFAULT_TRANSITION_DURATION: 300; /** * Default cache time-to-live in seconds (5 minutes) */ readonly DEFAULT_CACHE_TTL: 300; /** * Default short cache TTL in seconds (1 minute) */ readonly DEFAULT_SHORT_CACHE_TTL: 60; /** * Default long cache TTL in seconds (1 hour) */ readonly DEFAULT_LONG_CACHE_TTL: 3600; /** * Default session timeout in milliseconds (30 minutes) */ readonly DEFAULT_SESSION_TIMEOUT: 1800000; /** * Default idle timeout in milliseconds (15 minutes) */ readonly DEFAULT_IDLE_TIMEOUT: 900000; /** * Default poll interval in milliseconds (5 seconds) */ readonly DEFAULT_POLL_INTERVAL: 5000; /** * Default heartbeat interval in milliseconds (30 seconds) */ readonly DEFAULT_HEARTBEAT_INTERVAL: 30000; /** * Default port number for servers */ readonly DEFAULT_PORT: 3000; /** * Default HTTP port */ readonly HTTP_PORT: 80; /** * Default HTTPS port */ readonly HTTPS_PORT: 443; /** * Default WebSocket port */ readonly WEBSOCKET_PORT: 8080; /** * Default database port (PostgreSQL) */ readonly DATABASE_PORT: 5432; /** * Default Redis port */ readonly REDIS_PORT: 6379; /** * WebSocket normal closure code */ readonly WEBSOCKET_CLOSE_NORMAL: 1000; /** * WebSocket going away code */ readonly WEBSOCKET_CLOSE_GOING_AWAY: 1001; /** * WebSocket protocol error code */ readonly WEBSOCKET_CLOSE_PROTOCOL_ERROR: 1002; /** * WebSocket unsupported data code */ readonly WEBSOCKET_CLOSE_UNSUPPORTED: 1003; /** * WebSocket abnormal closure code */ readonly WEBSOCKET_CLOSE_ABNORMAL: 1006; /** * WebSocket retry delay in milliseconds (500ms) */ readonly WEBSOCKET_RETRY_DELAY: 500; /** * WebSocket ping interval in milliseconds (30 seconds) */ readonly WEBSOCKET_PING_INTERVAL: 30000; /** * WebSocket reconnect delay in milliseconds (1 second) */ readonly WEBSOCKET_RECONNECT_DELAY: 1000; /** * WebSocket max reconnect delay in milliseconds (30 seconds) */ readonly WEBSOCKET_MAX_RECONNECT_DELAY: 30000; }; /** * Country → Time Zone Mapping * Based on IANA time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) */ export declare const COUNTRY_TIMEZONES: Record; export declare const ALL_COUNTRY_TIMEZONES: string[]; /** * A single record describing the available time zones for a given country. */ export interface CountryTimezoneEntry { countryCode: CountryCode; timeZones: string[]; } /** * Full mapping of all countries → time zones. */ export type CountryTimezones = Record; /** * A flattened list of all unique IANA time zones supported globally. */ export type AllTimezones = string[]; export declare const DAYS_OF_WEEK: number[]; export declare const HOURS_OF_DAY: number[]; /** * Type for time constant values */ export type TimeConstant = (typeof TIME_CONSTANTS)[keyof typeof TIME_CONSTANTS]; //# sourceMappingURL=constants.d.ts.map