Fix linting
This commit is contained in:
@@ -33,13 +33,13 @@ export default createBillingSchema({
|
||||
id: 'price_1NNwYHI1i3VnbZTqI2UzaHIe',
|
||||
name: 'Addon 2',
|
||||
cost: 9.99,
|
||||
type: 'flat',
|
||||
type: 'flat' as const,
|
||||
},
|
||||
{
|
||||
id: 'price_1P8N0zI1i3VnbZTqtUPc1Zvr',
|
||||
name: 'Addon 3',
|
||||
cost: 0,
|
||||
type: 'per_seat',
|
||||
type: 'per_seat' as const,
|
||||
tiers: [
|
||||
{
|
||||
upTo: 1,
|
||||
@@ -67,7 +67,7 @@ export default createBillingSchema({
|
||||
id: 'starter-yearly',
|
||||
name: 'Base',
|
||||
cost: 99.99,
|
||||
type: 'flat',
|
||||
type: 'flat' as const,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,5 +24,3 @@
|
||||
"privacyPolicy": "Privacy Policy",
|
||||
"privacyPolicyDescription": "Our privacy policy and how we use your data"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
enum LineItemType {
|
||||
export enum LineItemType {
|
||||
Flat = 'flat',
|
||||
PerSeat = 'per_seat',
|
||||
Metered = 'metered',
|
||||
}
|
||||
|
||||
const BillingIntervalSchema = z.enum(['month', 'year']);
|
||||
const LineItemTypeSchema = z.nativeEnum(LineItemType);
|
||||
const LineItemTypeSchema = z.enum(['flat', 'per_seat', 'metered']);
|
||||
|
||||
export const BillingProviderSchema = z.enum([
|
||||
'stripe',
|
||||
@@ -66,7 +66,8 @@ export const LineItemSchema = z
|
||||
})
|
||||
.refine(
|
||||
(data) =>
|
||||
data.type !== 'metered' || (data.unit && data.tiers !== undefined),
|
||||
data.type !== LineItemType.Metered ||
|
||||
(data.unit && data.tiers !== undefined),
|
||||
{
|
||||
message: 'Metered line items must have a unit and tiers',
|
||||
path: ['type', 'unit', 'tiers'],
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { SupabaseClient } from '@supabase/supabase-js';
|
||||
|
||||
import { createBillingWebhooksService } from '@kit/billing-gateway';
|
||||
import { getLogger } from '@kit/shared/logger';
|
||||
import { Database } from '@kit/supabase/database';
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user