updates
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user