Fix type errors

This commit is contained in:
2025-11-12 09:50:37 +02:00
parent 5ef7f58f5d
commit b216f7b211
2 changed files with 5 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ import { createBillingEventHandlerService } from './billing-event-handler.servic
type ClientProvider = () => SupabaseClient<Database>; type ClientProvider = () => SupabaseClient<Database>;
// the billing provider from the database // the billing provider from the database
type BillingProvider = Enums<'billing_provider'>; type BillingProvider = Enums<{ schema: 'medreport' }, 'billing_provider'>;
/** /**
* @name getBillingEventHandlerService * @name getBillingEventHandlerService

View File

@@ -74,14 +74,14 @@ class OrderWebhooksService {
} }
logger.info(ctx, 'Status change processed. No notifications to send.'); logger.info(ctx, 'Status change processed. No notifications to send.');
} catch (e: any) { } catch (e) {
if (actions.length) if (actions.length)
await Promise.all( await Promise.all(
actions.map((action) => actions.map((action) =>
createNotificationLog({ createNotificationLog({
action, action,
status: 'FAIL', status: 'FAIL',
comment: e?.message, comment: e instanceof Error ? e.message : 'Unknown error',
relatedRecordId: analysisOrder.id, relatedRecordId: analysisOrder.id,
}), }),
), ),
@@ -201,11 +201,11 @@ class OrderWebhooksService {
status: 'SUCCESS', status: 'SUCCESS',
relatedRecordId: orderCart.order_id, relatedRecordId: orderCart.order_id,
}); });
} catch (e: any) { } catch (e) {
createNotificationLog({ createNotificationLog({
action: NotificationAction.TTO_ORDER_CONFIRMATION, action: NotificationAction.TTO_ORDER_CONFIRMATION,
status: 'FAIL', status: 'FAIL',
comment: e?.message, comment: e instanceof Error ? e.message : 'Unknown error',
relatedRecordId: ttoReservation.id, relatedRecordId: ttoReservation.id,
}); });
logger.error( logger.error(