This commit is contained in:
Iliyan Angelov
2025-11-19 12:27:01 +02:00
parent 2043ac897c
commit 34b4c969d4
469 changed files with 26870 additions and 8329 deletions

View File

@@ -36,6 +36,24 @@ export interface UpdateStripeSettingsRequest {
stripe_webhook_secret?: string;
}
export interface PayPalSettingsResponse {
status: string;
data: {
paypal_client_id: string;
paypal_client_secret: string;
paypal_mode: string;
paypal_client_secret_masked: string;
has_client_id: boolean;
has_client_secret: boolean;
};
}
export interface UpdatePayPalSettingsRequest {
paypal_client_id?: string;
paypal_client_secret?: string;
paypal_mode?: string;
}
export interface SmtpSettingsResponse {
status: string;
data: {
@@ -168,6 +186,29 @@ const systemSettingsService = {
return response.data;
},
/**
* Get PayPal settings (Admin only)
*/
getPayPalSettings: async (): Promise<PayPalSettingsResponse> => {
const response = await apiClient.get<PayPalSettingsResponse>(
'/api/admin/system-settings/paypal'
);
return response.data;
},
/**
* Update PayPal settings (Admin only)
*/
updatePayPalSettings: async (
settings: UpdatePayPalSettingsRequest
): Promise<PayPalSettingsResponse> => {
const response = await apiClient.put<PayPalSettingsResponse>(
'/api/admin/system-settings/paypal',
settings
);
return response.data;
},
/**
* Get SMTP settings (Admin only)
*/
@@ -277,6 +318,8 @@ export type {
UpdateCurrencyRequest,
StripeSettingsResponse,
UpdateStripeSettingsRequest,
PayPalSettingsResponse,
UpdatePayPalSettingsRequest,
SmtpSettingsResponse,
UpdateSmtpSettingsRequest,
TestSmtpEmailRequest,