additional stripe changes and Billing info cleanup

This commit is contained in:
Corey Blais committed 2026-04-16 20:44:53 -04:00
1 parent c757132cbd
commit 96e5694b01
11 files changed
+258 -76

No files matched your search

@@ -2,6 +2,7 @@ import { db } from '../db/client.js';
import type {
AuthContext,
AuthSessionRow,
BillingInterval,
BillingPlan,
IntegrationTokenRow,
IntegrationTokenScope,
@@ -38,6 +39,7 @@ const mapSessionAuthRow = (
workspace_workspace_type: WorkspaceType;
workspace_billing_email: string | null;
workspace_billing_plan: BillingPlan;
workspace_billing_interval: BillingInterval;
workspace_subscription_status: SubscriptionStatus;
workspace_stripe_customer_id: string | null;
workspace_stripe_subscription_id: string | null;
@@ -76,6 +78,7 @@ const mapSessionAuthRow = (
workspace_type: row.workspace_workspace_type,
billing_email: row.workspace_billing_email,
billing_plan: row.workspace_billing_plan,
billing_interval: row.workspace_billing_interval,
subscription_status: row.workspace_subscription_status,
stripe_customer_id: row.workspace_stripe_customer_id,
stripe_subscription_id: row.workspace_stripe_subscription_id,
@@ -123,6 +126,7 @@ const mapIntegrationTokenAuthRow = (
workspace_workspace_type: WorkspaceType;
workspace_billing_email: string | null;
workspace_billing_plan: BillingPlan;
workspace_billing_interval: BillingInterval;
workspace_subscription_status: SubscriptionStatus;
workspace_stripe_customer_id: string | null;
workspace_stripe_subscription_id: string | null;
@@ -161,6 +165,7 @@ const mapIntegrationTokenAuthRow = (
workspace_type: row.workspace_workspace_type,
billing_email: row.workspace_billing_email,
billing_plan: row.workspace_billing_plan,
billing_interval: row.workspace_billing_interval,
subscription_status: row.workspace_subscription_status,
stripe_customer_id: row.workspace_stripe_customer_id,
stripe_subscription_id: row.workspace_stripe_subscription_id,
@@ -345,6 +350,7 @@ export const resolveAuth = async (tokenHash: string, token: string) => {
workspace_workspace_type: WorkspaceType;
workspace_billing_email: string | null;
workspace_billing_plan: BillingPlan;
workspace_billing_interval: BillingInterval;
workspace_subscription_status: SubscriptionStatus;
workspace_stripe_customer_id: string | null;
workspace_stripe_subscription_id: string | null;
@@ -378,6 +384,7 @@ export const resolveAuth = async (tokenHash: string, token: string) => {
workspaces.workspace_type AS workspace_workspace_type,
workspaces.billing_email AS workspace_billing_email,
workspaces.billing_plan AS workspace_billing_plan,
workspaces.billing_interval AS workspace_billing_interval,
workspaces.subscription_status AS workspace_subscription_status,
workspaces.stripe_customer_id AS workspace_stripe_customer_id,
workspaces.stripe_subscription_id AS workspace_stripe_subscription_id,
@@ -433,6 +440,7 @@ export const resolveIntegrationTokenAuth = async (tokenHash: string, token: stri
workspace_workspace_type: WorkspaceType;
workspace_billing_email: string | null;
workspace_billing_plan: BillingPlan;
workspace_billing_interval: BillingInterval;
workspace_subscription_status: SubscriptionStatus;
workspace_stripe_customer_id: string | null;
workspace_stripe_subscription_id: string | null;
@@ -471,6 +479,7 @@ export const resolveIntegrationTokenAuth = async (tokenHash: string, token: stri
workspaces.workspace_type AS workspace_workspace_type,
workspaces.billing_email AS workspace_billing_email,
workspaces.billing_plan AS workspace_billing_plan,
workspaces.billing_interval AS workspace_billing_interval,
workspaces.subscription_status AS workspace_subscription_status,
workspaces.stripe_customer_id AS workspace_stripe_customer_id,
workspaces.stripe_subscription_id AS workspace_stripe_subscription_id,