Refactor code for readability and order

Made several changes across different files primarily focusing on readability. Arranged CSS classes in a standardized order for easier reading and maintenance. Arranged and formatted import lines, function declarations, and component return statements for legibility. Removed unnecessary React imports in some files.
This commit is contained in:
gbuomprisco
2024-06-21 17:58:20 +08:00
parent 8c929e6685
commit 9294e1c823
15 changed files with 26 additions and 41 deletions

View File

@@ -67,11 +67,11 @@ export abstract class BillingStrategyProviderService {
amount: number;
}>;
abstract getSubscription(
subscriptionId: string,
): Promise<UpsertSubscriptionParams & {
// we can't always guarantee that the target account id will be present
// so we need to make it optional and let the consumer handle it
target_account_id: string | undefined;
}>;
abstract getSubscription(subscriptionId: string): Promise<
UpsertSubscriptionParams & {
// we can't always guarantee that the target account id will be present
// so we need to make it optional and let the consumer handle it
target_account_id: string | undefined;
}
>;
}

View File

@@ -19,4 +19,4 @@ interface LineItem {
}
export type UpsertOrderParams =
Database['public']['Functions']['upsert_order']['Args'];
Database['public']['Functions']['upsert_order']['Args'];

View File

@@ -88,9 +88,7 @@ export class StripeWebhookHandlerService
onSubscriptionDeleted: (subscriptionId: string) => Promise<unknown>;
onPaymentSucceeded: (sessionId: string) => Promise<unknown>;
onPaymentFailed: (sessionId: string) => Promise<unknown>;
onInvoicePaid: (
data: UpsertSubscriptionParams,
) => Promise<unknown>;
onInvoicePaid: (data: UpsertSubscriptionParams) => Promise<unknown>;
onEvent?(event: Stripe.Event): Promise<unknown>;
},
) {
@@ -294,9 +292,7 @@ export class StripeWebhookHandlerService
private async handleInvoicePaid(
event: Stripe.InvoicePaidEvent,
onInvoicePaid: (
data: UpsertSubscriptionParams,
) => Promise<unknown>,
onInvoicePaid: (data: UpsertSubscriptionParams) => Promise<unknown>,
) {
const stripe = await this.loadStripe();