refactor(payments): extract PAYMENT_METADATA_TYPE constants
This commit is contained in:
parent
0eeb3c351f
commit
5432dfe8f2
4 changed files with 24 additions and 4 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import * as z from 'zod'
|
||||
import { ADMIN_ALERT_TYPES } from '../models/adminAlertDismissal.js'
|
||||
import { PAYMENT_METADATA_TYPE_VALUES } from './paymentTypes.js'
|
||||
|
||||
export const emailSchema = z.object({
|
||||
email: z.string().trim().toLowerCase().email()
|
||||
|
|
@ -71,7 +72,7 @@ export const helcimInitializePaymentSchema = z.object({
|
|||
amount: z.number().min(0).optional(),
|
||||
customerCode: z.string().max(200).optional(),
|
||||
metadata: z.object({
|
||||
type: z.enum(['event_ticket', 'series_ticket', 'subscription', 'card_verify', 'membership_signup']).optional(),
|
||||
type: z.enum(PAYMENT_METADATA_TYPE_VALUES).optional(),
|
||||
eventTitle: z.string().max(500).optional(),
|
||||
eventId: z.string().max(200).optional(),
|
||||
seriesId: z.string().max(200).optional(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue