Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
+5
-5
@@ -3,10 +3,10 @@ import {
|
||||
getTenantSubscription as readTenantSubscription,
|
||||
updateTenantSubscriptionCustomerId as persistTenantSubscriptionCustomerId,
|
||||
type TenantSubscriptionWithDetails,
|
||||
} from "@toolctrl/db/subscriptions.server";
|
||||
} from "@hivegrid/db/subscriptions.server";
|
||||
import { clearTenantSubscriptionCache } from "~/utils/services/.server/subscriptionService";
|
||||
|
||||
export { getTenantSubscription, getTenantSubscriptions, type TenantSubscriptionWithDetails } from "@toolctrl/db/subscriptions.server";
|
||||
export { getTenantSubscription, getTenantSubscriptions, type TenantSubscriptionWithDetails } from "@hivegrid/db/subscriptions.server";
|
||||
|
||||
export async function getOrPersistTenantSubscription(tenantId: string): Promise<TenantSubscriptionWithDetails> {
|
||||
const subscription = await readTenantSubscription(tenantId);
|
||||
@@ -17,15 +17,15 @@ export async function getOrPersistTenantSubscription(tenantId: string): Promise<
|
||||
return subscription;
|
||||
}
|
||||
|
||||
export async function createTenantSubscription(tenantId: string, stripeCustomerId: string) {
|
||||
const item = await persistTenantSubscription({ tenantId, stripeCustomerId });
|
||||
export async function createTenantSubscription(tenantId: string, billingProviderCustomerId: string) {
|
||||
const item = await persistTenantSubscription({ tenantId, billingProviderCustomerId });
|
||||
// Cross-replica purge: clearTenantSubscriptionCache publishes on the
|
||||
// subscription pub/sub channel so peer web replicas drop their L1 too.
|
||||
clearTenantSubscriptionCache(tenantId);
|
||||
return item;
|
||||
}
|
||||
|
||||
export async function updateTenantSubscriptionCustomerId(tenantId: string, data: { stripeCustomerId: string }) {
|
||||
export async function updateTenantSubscriptionCustomerId(tenantId: string, data: { billingProviderCustomerId: string }) {
|
||||
const item = await persistTenantSubscriptionCustomerId(tenantId, data);
|
||||
clearTenantSubscriptionCache(tenantId);
|
||||
return item;
|
||||
|
||||
Reference in new issue
Block a user