///
/**
* Pro Feature definition
*/
interface ProFeature {
name: string
description: string
enabled: boolean
}
/**
* License information
*/
interface LicenseInfo {
isActive: boolean
isPaying: boolean
isTrial: boolean
hasProPlugin: boolean
planTitle: string
planName: string
expiresAt: string | null
activationUrl: string
accountUrl: string
}
/**
* Plugin limits based on free/pro
*/
interface PluginLimits {
currencies: number
canAddCheckoutFields: boolean
conditionalLogic: boolean
}
/**
* Global Swift Commerce data from WordPress
*/
interface swiftCommerceData {
ajaxUrl: string
nonce: string
restNonce: string
apiUrl: string
pluginUrl: string
adminUrl: string
siteUrl: string
user: {
name: string
email: string
avatar: string
}
siteName: string
isPro: boolean
proVersion?: string
proFeatures: Record
license: LicenseInfo
limits: PluginLimits
upgradeUrl: string
/** Currency info provided by Pro plugin */
currency?: {
code: string
symbol: string
position: 'left' | 'right' | 'left_space' | 'right_space'
}
/** Global Styles provided by Pro plugin */
globalStyles?: {
colors: Array<{ id: string; name: string; value: string; isDefault?: boolean }>
typography: Array<{
id: string; name: string; fontFamily: string; fontWeight: string;
fontSize: string; lineHeight: string; letterSpacing: string;
textTransform: string; isDefault?: boolean
}>
}
}
declare global {
interface Window {
swiftCommerceData: swiftCommerceData
}
}
export {}