@@ -48,13 +48,19 @@ const ticketEntryZod = z.object({
4848 purchaserData : purchaseSchema ,
4949} ) ;
5050
51+ const ticketInfoEntryZod = ticketEntryZod . extend ( {
52+ refunded : z . boolean ( ) ,
53+ fulfilled : z . boolean ( ) ,
54+ } ) ;
55+
5156type TicketEntry = z . infer < typeof ticketEntryZod > ;
57+ type TicketInfoEntry = z . infer < typeof ticketInfoEntryZod > ;
5258
5359const responseJsonSchema = zodToJsonSchema ( ticketEntryZod ) ;
5460
5561const getTicketsResponseJsonSchema = zodToJsonSchema (
5662 z . object ( {
57- tickets : z . array ( ticketEntryZod ) ,
63+ tickets : z . array ( ticketInfoEntryZod ) ,
5864 } ) ,
5965) ;
6066
@@ -97,7 +103,7 @@ const ticketsPlugin: FastifyPluginAsync = async (fastify, _options) => {
97103 async ( request , reply ) => {
98104 const eventId = ( request . params as Record < string , string > ) . eventId ;
99105 const eventType = request . query ?. type ;
100- const issuedTickets : TicketEntry [ ] = [ ] ;
106+ const issuedTickets : TicketInfoEntry [ ] = [ ] ;
101107 switch ( eventType ) {
102108 case "merch" :
103109 const command = new QueryCommand ( {
@@ -120,6 +126,8 @@ const ticketsPlugin: FastifyPluginAsync = async (fastify, _options) => {
120126 type : "merch" ,
121127 valid : true ,
122128 ticketId : unmarshalled [ "stripe_pi" ] ,
129+ refunded : unmarshalled [ "refunded" ] ,
130+ fulfilled : unmarshalled [ "fulfilled" ] ,
123131 purchaserData : {
124132 email : unmarshalled [ "email" ] ,
125133 productId : eventId ,
0 commit comments