Deprecate legacy core datasource token (#14096)

This commit is contained in:
Weiko
2025-08-27 20:09:54 +02:00
committed by GitHub
parent c6aa419c18
commit 533d7fe49a
321 changed files with 702 additions and 849 deletions
@@ -36,21 +36,18 @@ import { PermissionsModule } from 'src/engine/metadata-modules/permissions/permi
PermissionsModule,
WorkspaceModule,
BillingModule,
TypeOrmModule.forFeature(
[
BillingSubscription,
BillingSubscriptionItem,
BillingCustomer,
BillingProduct,
BillingPrice,
BillingMeter,
BillingEntitlement,
Workspace,
UserWorkspace,
FeatureFlag,
],
'core',
),
TypeOrmModule.forFeature([
BillingSubscription,
BillingSubscriptionItem,
BillingCustomer,
BillingProduct,
BillingPrice,
BillingMeter,
BillingEntitlement,
Workspace,
UserWorkspace,
FeatureFlag,
]),
],
controllers: [BillingWebhookController],
providers: [
@@ -23,11 +23,11 @@ const TRIAL_PERIOD_ALERT_TITLE = 'TRIAL_PERIOD_ALERT'; // to set in Stripe confi
export class BillingWebhookAlertService {
protected readonly logger = new Logger(BillingWebhookAlertService.name);
constructor(
@InjectRepository(BillingSubscription, 'core')
@InjectRepository(BillingSubscription)
private readonly billingSubscriptionRepository: Repository<BillingSubscription>,
@InjectRepository(BillingProduct, 'core')
@InjectRepository(BillingProduct)
private readonly billingProductRepository: Repository<BillingProduct>,
@InjectRepository(BillingSubscriptionItem, 'core')
@InjectRepository(BillingSubscriptionItem)
private readonly billingSubscriptionItemRepository: Repository<BillingSubscriptionItem>,
) {}
@@ -17,7 +17,7 @@ import { BillingCustomer } from 'src/engine/core-modules/billing/entities/billin
export class BillingWebhookCustomerService {
protected readonly logger = new Logger(BillingWebhookCustomerService.name);
constructor(
@InjectRepository(BillingCustomer, 'core')
@InjectRepository(BillingCustomer)
private readonly billingCustomerRepository: Repository<BillingCustomer>,
) {}
@@ -18,9 +18,9 @@ import { BillingEntitlement } from 'src/engine/core-modules/billing/entities/bil
@Injectable()
export class BillingWebhookEntitlementService {
constructor(
@InjectRepository(BillingCustomer, 'core')
@InjectRepository(BillingCustomer)
private readonly billingCustomerRepository: Repository<BillingCustomer>,
@InjectRepository(BillingEntitlement, 'core')
@InjectRepository(BillingEntitlement)
private readonly billingEntitlementRepository: Repository<BillingEntitlement>,
) {}
@@ -14,7 +14,7 @@ const SUBSCRIPTION_CYCLE_BILLING_REASON = 'subscription_cycle';
export class BillingWebhookInvoiceService {
protected readonly logger = new Logger(BillingWebhookInvoiceService.name);
constructor(
@InjectRepository(BillingSubscriptionItem, 'core')
@InjectRepository(BillingSubscriptionItem)
private readonly billingSubscriptionItemRepository: Repository<BillingSubscriptionItem>,
) {}
@@ -23,11 +23,11 @@ export class BillingWebhookPriceService {
protected readonly logger = new Logger(BillingWebhookPriceService.name);
constructor(
private readonly stripeBillingMeterService: StripeBillingMeterService,
@InjectRepository(BillingPrice, 'core')
@InjectRepository(BillingPrice)
private readonly billingPriceRepository: Repository<BillingPrice>,
@InjectRepository(BillingMeter, 'core')
@InjectRepository(BillingMeter)
private readonly billingMeterRepository: Repository<BillingMeter>,
@InjectRepository(BillingProduct, 'core')
@InjectRepository(BillingProduct)
private readonly billingProductRepository: Repository<BillingProduct>,
) {}
@@ -14,7 +14,7 @@ import { isStripeValidProductMetadata } from 'src/engine/core-modules/billing/ut
export class BillingWebhookProductService {
protected readonly logger = new Logger(BillingWebhookProductService.name);
constructor(
@InjectRepository(BillingProduct, 'core')
@InjectRepository(BillingProduct)
private readonly billingProductRepository: Repository<BillingProduct>,
) {}
@@ -40,13 +40,13 @@ export class BillingWebhookSubscriptionService {
private readonly stripeCustomerService: StripeCustomerService,
@InjectMessageQueue(MessageQueue.workspaceQueue)
private readonly messageQueueService: MessageQueueService,
@InjectRepository(BillingSubscription, 'core')
@InjectRepository(BillingSubscription)
private readonly billingSubscriptionRepository: Repository<BillingSubscription>,
@InjectRepository(BillingSubscriptionItem, 'core')
@InjectRepository(BillingSubscriptionItem)
private readonly billingSubscriptionItemRepository: Repository<BillingSubscriptionItem>,
@InjectRepository(Workspace, 'core')
@InjectRepository(Workspace)
private readonly workspaceRepository: Repository<Workspace>,
@InjectRepository(BillingCustomer, 'core')
@InjectRepository(BillingCustomer)
private readonly billingCustomerRepository: Repository<BillingCustomer>,
private readonly billingSubscriptionService: BillingSubscriptionService,
private readonly workspaceService: WorkspaceService,