PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.5
Yatra – Travel Booking & Tour Operator Software v3.0.5
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
yatra / resources / js / types / global.d.ts

global.d.ts in Yatra – Travel Booking & Tour Operator Software 3.0.5, at resources/js/types/global.d.ts

70 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 declare global {
2 function __(text: string, domain?: string): string;
3
4 interface Window {
5 yatraAdmin?: {
6 apiUrl: string;
7 nonce: string;
8 /** PNG in assets/images/yatra-icon.png — sidebar branding */
9 brandLogoUrl?: string;
10 pluginUrl?: string;
11 currency: string;
12 currencyPosition: string;
13 currencyDecimals: number;
14 thousandSeparator: string;
15 decimalSeparator: string;
16 capabilities: Record<string, boolean>;
17 // Pro / tier flags. These come from AdminAssetsProvider.php's
18 // wp_localize_script output. wp_localize_script serialises bools
19 // to "1" / "" strings — code that reads these should use truthy
20 // checks (`!!flag`) rather than strict `=== true`. See the
21 // BookingForm sub-tab gate + Discount Stacking tab visibility
22 // fixes for examples of the gotcha.
23 isPro?: boolean;
24 isAgency?: boolean;
25 isAiEligible?: boolean;
26 isWpAdmin?: boolean;
27 // Module-enabled flags. All are flipped by useModules() at runtime
28 // (after the /modules REST query resolves) and persisted on the
29 // window.yatraAdmin singleton so downstream components can read
30 // them synchronously without re-querying.
31 emailAutomationEnabled: boolean;
32 tripConsentEnabled: boolean;
33 additionalServicesEnabled: boolean;
34 abandonedBookingRecoveryEnabled: boolean;
35 dynamicPricingEnabled: boolean;
36 flexiblePaymentsEnabled?: boolean;
37 dynamicFormFieldEnabled?: boolean;
38 customLandingPagesModuleEnabled?: boolean;
39 showGoogleCalendarSettingsUI?: boolean;
40 advancedDiscountEnabled?: boolean;
41 aiAssistantEnabled?: boolean;
42 whiteLabelEnabled?: boolean;
43 whatsappEnabled?: boolean;
44 channelManagerEnabled?: boolean;
45 webhooksEnabled?: boolean;
46 // Brand / chrome
47 brandName?: string;
48 brandPrimaryColor?: string;
49 brandMenuOverrides?: Record<string, unknown>;
50 brandMenuOrder?: Record<string, string[]> | string[];
51 brandUiChrome?: Record<string, unknown>;
52 // Misc context
53 adminUrl?: string;
54 siteUrl?: string;
55 restUrl?: string;
56 version?: string;
57 proVersion?: string | null;
58 locale?: string;
59 timezone?: string;
60 countries?: Array<{ code: string; name: string }>;
61 userScopes?: { destinations?: number[]; activities?: number[]; trips?: number[]; categories?: number[] };
62 };
63 yatraBookingData?: {
64 currency: string;
65 };
66 }
67 }
68
69 export {};
70