2021-04-20 17:17:19 +00:00
|
|
|
declare global {
|
|
|
|
interface Window {
|
2024-04-08 08:29:49 +00:00
|
|
|
location: Location;
|
2022-12-12 13:56:28 +00:00
|
|
|
pagenow: string;
|
|
|
|
adminpage: string;
|
2021-04-20 17:17:19 +00:00
|
|
|
wcSettings: {
|
|
|
|
preloadOptions: Record< string, unknown >;
|
2021-06-09 19:38:22 +00:00
|
|
|
adminUrl: string;
|
2024-04-08 08:29:49 +00:00
|
|
|
currentUserId: number;
|
2024-04-16 02:36:43 +00:00
|
|
|
currentThemeIsFSETheme: boolean;
|
2024-04-08 08:29:49 +00:00
|
|
|
admin: {
|
|
|
|
wcpay_welcome_page_connect_nonce: string;
|
|
|
|
currentUserData: {
|
|
|
|
first_name: string;
|
|
|
|
};
|
2024-05-30 23:19:30 +00:00
|
|
|
plugins: {
|
|
|
|
activePlugins: string[];
|
|
|
|
installedPlugins: string[];
|
|
|
|
},
|
2024-04-08 08:29:49 +00:00
|
|
|
wcpayWelcomePageIncentive: {
|
|
|
|
id: string;
|
|
|
|
description: string;
|
|
|
|
cta_label: string;
|
|
|
|
tc_url: string;
|
|
|
|
};
|
|
|
|
currency?: {
|
|
|
|
symbol: string;
|
|
|
|
};
|
|
|
|
currentUserId: number;
|
|
|
|
};
|
2021-04-20 17:17:19 +00:00
|
|
|
};
|
2022-04-19 08:31:15 +00:00
|
|
|
wcAdminFeatures: {
|
|
|
|
'activity-panels': boolean;
|
|
|
|
analytics: boolean;
|
|
|
|
coupons: boolean;
|
|
|
|
homescreen: boolean;
|
|
|
|
marketing: boolean;
|
|
|
|
'minified-js': boolean;
|
|
|
|
'mobile-app-banner': boolean;
|
|
|
|
navigation: boolean;
|
|
|
|
onboarding: boolean;
|
|
|
|
'onboarding-tasks': boolean;
|
|
|
|
'payment-gateway-suggestions': boolean;
|
2024-05-28 06:55:14 +00:00
|
|
|
'pattern-toolkit-full-composability': boolean;
|
2024-01-23 14:46:52 +00:00
|
|
|
'product-pre-publish-modal': boolean;
|
2024-03-11 13:55:31 +00:00
|
|
|
'product-custom-fields': boolean;
|
2022-04-19 08:31:15 +00:00
|
|
|
'remote-inbox-notifications': boolean;
|
|
|
|
'remote-free-extensions': boolean;
|
|
|
|
settings: boolean;
|
|
|
|
'shipping-label-banner': boolean;
|
|
|
|
subscriptions: boolean;
|
|
|
|
'store-alerts': boolean;
|
|
|
|
'transient-notices': boolean;
|
|
|
|
'wc-pay-promotion': boolean;
|
|
|
|
'wc-pay-welcome-page': boolean;
|
2022-09-15 03:58:47 +00:00
|
|
|
'woo-mobile-welcome': boolean;
|
2022-06-23 01:54:38 +00:00
|
|
|
'shipping-smart-defaults': boolean;
|
2022-07-05 05:02:52 +00:00
|
|
|
'shipping-setting-tour': boolean;
|
2024-04-22 06:49:59 +00:00
|
|
|
'launch-your-store': boolean;
|
2022-04-19 08:31:15 +00:00
|
|
|
};
|
2022-12-12 13:56:28 +00:00
|
|
|
wp: {
|
2023-10-27 04:08:27 +00:00
|
|
|
updates?: {
|
|
|
|
ajax: ( action, data: {
|
2023-11-06 08:35:43 +00:00
|
|
|
slug?: string;
|
2023-10-27 04:08:27 +00:00
|
|
|
plugin?: string;
|
|
|
|
theme?: string;
|
|
|
|
success?: function;
|
|
|
|
error?: function;
|
|
|
|
} ) => JQuery.Promise;
|
|
|
|
};
|
2022-12-12 13:56:28 +00:00
|
|
|
autosave?: {
|
|
|
|
server: {
|
|
|
|
postChanged: () => boolean;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
tinymce?: {
|
|
|
|
get: ( name: string ) => {
|
|
|
|
isHidden: () => boolean;
|
|
|
|
isDirty: () => boolean;
|
|
|
|
};
|
|
|
|
};
|
2023-04-19 07:28:18 +00:00
|
|
|
getUserSetting?: ( name: string ) => string | undefined;
|
|
|
|
setUserSetting?: ( name: string, value: string ) => void;
|
|
|
|
deleteUserSetting?: ( name: string ) => void;
|
2021-04-20 17:17:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*~ If your module exports nothing, you'll need this line. Otherwise, delete it */
|
|
|
|
export {};
|