Fix linting

This commit is contained in:
giancarlo
2024-04-23 00:15:41 +08:00
parent 17e0781581
commit 6814cc7089
6 changed files with 2027 additions and 2031 deletions

View File

@@ -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

View File

@@ -24,5 +24,3 @@
"privacyPolicy": "Privacy Policy",
"privacyPolicyDescription": "Our privacy policy and how we use your data"
}

View File

@@ -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'],

View File

@@ -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