PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.15
Yatra – Travel Booking & Tour Operator Software v3.0.15
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 2.0.10 All 83 releases
yatra / resources / js / types / global.d.ts

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

81 lines 2.9 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 /** Pro build resolves trip-specific email template overrides. */
33 emailTemplateOverridesEnabled?: boolean;
34 tripConsentEnabled: boolean;
35 additionalServicesEnabled: boolean;
36 abandonedBookingRecoveryEnabled: boolean;
37 dynamicPricingEnabled: boolean;
38 flexiblePaymentsEnabled?: boolean;
39 dynamicFormFieldEnabled?: boolean;
40 /** Pro build supports per-trip booking form conditions. */
41 bookingFormConditionsEnabled?: boolean;
42 customLandingPagesModuleEnabled?: boolean;
43 showGoogleCalendarSettingsUI?: boolean;
44 advancedDiscountEnabled?: boolean;
45 aiAssistantEnabled?: boolean;
46 whiteLabelEnabled?: boolean;
47 whatsappEnabled?: boolean;
48 channelManagerEnabled?: boolean;
49 webhooksEnabled?: boolean;
50 /** Pro "Scheduled Payments" module — drives the Payments submenu. */
51 scheduledPaymentsEnabled?: boolean;
52 // Brand / chrome
53 brandName?: string;
54 brandPrimaryColor?: string;
55 brandMenuOverrides?: Record<string, unknown>;
56 brandMenuOrder?: Record<string, string[]> | string[];
57 brandUiChrome?: Record<string, unknown>;
58 // Misc context
59 adminUrl?: string;
60 siteUrl?: string;
61 restUrl?: string;
62 version?: string;
63 proVersion?: string | null;
64 locale?: string;
65 timezone?: string;
66 countries?: Array<{ code: string; name: string }>;
67 userScopes?: {
68 destinations?: number[];
69 activities?: number[];
70 trips?: number[];
71 categories?: number[];
72 };
73 };
74 yatraBookingData?: {
75 currency: string;
76 };
77 }
78 }
79
80 export {};
81