Skip to content

Commit

Permalink
Don't share billing periods between frontend and workers for now
Browse files Browse the repository at this point in the history
  • Loading branch information
rupertbates committed Jan 31, 2025
1 parent 9c134ee commit 4340e15
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ export type WeeklyBillingPeriod =
| typeof Quarterly
| typeof Annual;

export const allBillingPeriods = [Monthly, Quarterly, Annual] as const;

const weeklyBillingPeriods = (): WeeklyBillingPeriod[] => {
return [Monthly, Quarterly, Annual];
};
Expand Down
7 changes: 5 additions & 2 deletions support-workers/src/typescript/model/billingPeriod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { z } from 'zod';
import { allBillingPeriods } from '../../../../support-frontend/assets/helpers/productPrice/billingPeriods';

export const billingPeriodSchema = z.enum(allBillingPeriods);
export const billingPeriodSchema = z.union([
z.literal('Monthly'), //TODO: share this with support-frontend, when I did this knip complained about unused exports so I'll look into it later
z.literal('Annual'),
z.literal('Quarterly'),
]);
export type BillingPeriod = z.infer<typeof billingPeriodSchema>;

0 comments on commit 4340e15

Please sign in to comment.