@@ -99,32 +99,19 @@ type PartialItemFailureResponse = { batchItemFailures: PartialItemFailures[] };
99
99
* @property transformer - The transformer to be used for parsing the payload
100
100
* @property logger - The logger to be used for logging debug and warning messages.
101
101
*/
102
- type BasePartialBatchProcessorParserConfig = {
103
- /**
104
- * The schema for the full event including the extended inner payload schema.
105
- *
106
- * StandardSchema is supported.
107
- */
108
- schema ?: StandardSchemaV1 ;
109
- /**
110
- * The schema for the inner payload of the event.
111
- * Only Zod schemas are supported.
112
- */
113
- innerSchema ?: StandardSchemaV1 ;
114
- /**
115
- * The transformer to be used for parsing the payload.
116
- * No transformers will be used if this is not provided.
117
- * Supported transformers are:
118
- * 1. 'json': Uses JSONStringified helper
119
- * 2. 'base64': Uses Base64Encoded helper
120
- * 3. 'unmarshall': Uses DynamoDBMarshalled helper
121
- */
122
- transformer ?: 'json' | 'base64' | 'unmarshall' ;
123
- /**
124
- * The logger to be used for logging debug and warning messages.
125
- */
126
- logger ?: Pick < GenericLogger , 'debug' | 'warn' | 'error' > ;
127
- } ;
102
+ type BasePartialBatchProcessorParserConfig =
103
+ | {
104
+ schema ?: StandardSchemaV1 ;
105
+ innerSchema ?: never ;
106
+ transformer ?: never ;
107
+ logger ?: Pick < GenericLogger , 'debug' | 'warn' | 'error' > ;
108
+ }
109
+ | {
110
+ schema ?: never ;
111
+ innerSchema ?: StandardSchemaV1 ;
112
+ transformer ?: 'json' | 'base64' | 'unmarshall' ;
113
+ logger ?: Pick < GenericLogger , 'debug' | 'warn' | 'error' > ;
114
+ } ;
128
115
129
116
export type {
130
117
BatchProcessingOptions ,
0 commit comments