File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 88} from '@aws-sdk/lib-dynamodb' ;
99import { Letter , LetterSchema , LettersSchema } from './types' ;
1010import { Logger } from 'pino' ;
11+ import { z } from 'zod' ;
1112
1213export type PagingOptions = Partial < {
1314 exclusiveStartKey : Record < string , any > ,
@@ -140,6 +141,10 @@ export class LetterRepository {
140141 ':supplierStatus' : `${ supplierId } #${ status } `
141142 }
142143 } ) ) ;
143- return LettersSchema . parse ( result . Items ) ;
144+ this . log ( {
145+ description : 'items' ,
146+ result,
147+ } )
148+ return z . array ( LetterSchema ) . parse ( result . Items ) ;
144149 }
145150}
Original file line number Diff line number Diff line change @@ -30,8 +30,6 @@ export const LetterSchema = z.object({
3030 ttl : z . int ( )
3131} ) . describe ( 'Letter' ) ;
3232
33- export const LettersSchema = z . array ( LetterSchema ) ;
34-
3533/**
3634 * Letter is the type used for storing letters in the database.
3735 * The supplierStatus is a composite key combining supplierId and status.
You can’t perform that action at this time.
0 commit comments