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;
|
|
|
|
admin: {
|
|
|
|
wcpay_welcome_page_connect_nonce: string;
|
|
|
|
currentUserData: {
|
|
|
|
first_name: string;
|
|
|
|
};
|
|
|
|
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;
|
|
|
|
'customer-effort-score-tracks': boolean;
|
|
|
|
homescreen: boolean;
|
|
|
|
marketing: boolean;
|
|
|
|
'minified-js': boolean;
|
|
|
|
'mobile-app-banner': boolean;
|
|
|
|
navigation: boolean;
|
2022-08-03 17:42:22 +00:00
|
|
|
'new-product-management-experience': boolean;
|
2022-04-19 08:31:15 +00:00
|
|
|
onboarding: boolean;
|
|
|
|
'onboarding-tasks': boolean;
|
|
|
|
'payment-gateway-suggestions': boolean;
|
2023-01-06 02:30:23 +00:00
|
|
|
'product-variation-management': boolean;
|
2023-10-11 14:37:41 +00:00
|
|
|
'product-virtual-downloadable': boolean;
|
2023-10-23 13:34:24 +00:00
|
|
|
'product-external-affiliate': boolean;
|
2023-11-23 16:24:51 +00:00
|
|
|
'product-grouped': boolean;
|
2023-12-20 19:41:00 +00:00
|
|
|
'product-linked': 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;
|
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 {};
|