chore(billing) - remove feature flag (#20531)

- remove feature flag
- remove old enforce cap usage logic
This commit is contained in:
Etienne
2026-05-13 18:52:29 +02:00
committed by GitHub
parent 695a374efd
commit fcd2d586ee
69 changed files with 729 additions and 4371 deletions
@@ -16,7 +16,7 @@ import { mockedUserData } from '~/testing/mock-data/users';
import { GET_PUBLIC_WORKSPACE_DATA_BY_DOMAIN } from '@/auth/graphql/queries/getPublicWorkspaceDataByDomain';
import { BILLING_PORTAL_SESSION } from '@/settings/billing/graphql/queries/billingPortalSession';
import { GET_METERED_PRODUCTS_USAGE } from '@/settings/billing/graphql/queries/getMeteredProductsUsage';
import { GET_RESOURCE_CREDIT_USAGE } from '@/settings/billing/graphql/queries/getResourceCreditUsage';
import { LIST_PLANS } from '@/settings/billing/graphql/queries/listPlans';
import { GET_ROLES } from '@/settings/roles/graphql/queries/getRolesQuery';
import { mockBillingPlans } from '~/testing/mock-data/billing-plans';
@@ -530,28 +530,19 @@ export const graphqlMocks = {
data: mockBillingPlans,
});
}),
graphql.query(getOperationName(GET_METERED_PRODUCTS_USAGE) ?? '', () => {
graphql.query(getOperationName(GET_RESOURCE_CREDIT_USAGE) ?? '', () => {
return HttpResponse.json({
data: {
getMeteredProductsUsage: [
getResourceCreditUsage: [
{
__typename: 'BillingMeteredProductUsage',
productKey: 'WORKFLOW_NODE_EXECUTION',
__typename: 'BillingResourceCreditUsage',
productKey: 'RESOURCE_CREDIT',
usedCredits: 1000,
grantedCredits: 500000,
rolloverCredits: 0,
totalGrantedCredits: 500000,
unitPriceCents: 1,
},
{
__typename: 'BillingMeteredProductUsage',
productKey: 'RESOURCE_CREDIT',
usedCredits: 0,
grantedCredits: 10000,
rolloverCredits: 0,
totalGrantedCredits: 10000,
unitPriceCents: 1,
},
],
},
});