mono/packages/ecommerce/dist-lib/EcommerceBundle.d.ts
2026-02-21 09:30:31 +01:00

31 lines
1.1 KiB
TypeScript

import { default as React } from 'react';
export interface EcommerceBundleDependencies {
user: {
id?: string;
email?: string;
user_metadata?: {
display_name?: string;
};
} | null;
toast: {
success: (message: string) => void;
error: (message: string) => void;
};
onFetchAddresses: (userId: string) => Promise<any[]>;
onSaveAddress: (userId: string, addresses: any[]) => Promise<void>;
onPlaceOrder: (data: any) => Promise<void>;
onFetchTransactions: () => Promise<any[]>;
onNavigate: (path: string) => void;
siteName?: string;
contactEmail?: string;
/** Stripe publishable key — enables Stripe payment option. */
stripePublishableKey?: string;
/** API base URL for Stripe endpoints (e.g. "http://localhost:3333"). */
apiBaseUrl?: string;
/** Stripe return URL for redirect-based payment methods. */
stripeReturnUrl?: string;
/** Currency code for Stripe (default: "eur"). */
currency?: string;
}
export declare const EcommerceBundle: React.FC<EcommerceBundleDependencies>;