@@ -34,10 +34,10 @@ type BatchProcessingOptions<T = BasePartialBatchProcessor> = {
34
34
* If true skip the group on error during processing.
35
35
*/
36
36
skipGroupOnError ?: T extends
37
- | SqsFifoPartialProcessor
38
- | SqsFifoPartialProcessorAsync
39
- ? boolean
40
- : never ;
37
+ | SqsFifoPartialProcessor
38
+ | SqsFifoPartialProcessorAsync
39
+ ? boolean
40
+ : never ;
41
41
/**
42
42
* Set this to false to prevent throwing an error if the entire batch fails.
43
43
*/
@@ -48,10 +48,10 @@ type BatchProcessingOptions<T = BasePartialBatchProcessor> = {
48
48
* When set to `false`, the records will be processed sequentially.
49
49
*/
50
50
processInParallel ?: T extends
51
- | SqsFifoPartialProcessor
52
- | SqsFifoPartialProcessorAsync
53
- ? never
54
- : boolean ;
51
+ | SqsFifoPartialProcessor
52
+ | SqsFifoPartialProcessorAsync
53
+ ? never
54
+ : boolean ;
55
55
} ;
56
56
57
57
/**
@@ -111,7 +111,7 @@ type PartialItemFailureResponse = { batchItemFailures: PartialItemFailures[] };
111
111
*
112
112
* You can optionally pass a `logger` for debug and warning messages.
113
113
*
114
- * @note `innerSchema` supports only Zod schemas, while `schema` supports any Standard Schema-compatible parsing library.
114
+ * Note: `innerSchema` supports only Zod schemas, while `schema` supports any Standard Schema-compatible parsing library.
115
115
*
116
116
* @property parser - Required when using schema parsing (import from `@aws-lambda-powertools/batch/parser`)
117
117
* @property schema - Complete event schema (mutually exclusive with innerSchema)
@@ -121,50 +121,50 @@ type PartialItemFailureResponse = { batchItemFailures: PartialItemFailures[] };
121
121
*/
122
122
type BasePartialBatchProcessorParserConfig =
123
123
| {
124
- /**
125
- * Required when using schema parsing - import from `@aws-lambda-powertools/batch/parser`
126
- */
127
- parser : typeof parser ;
128
- /**
129
- * Complete event schema using Standard Schema specification, mutually exclusive with `innerSchema`
130
- */
131
- schema : StandardSchemaV1 ;
132
- innerSchema ?: never ;
133
- transformer ?: never ;
134
- /**
135
- * Optional logger for debug and warning messages
136
- */
137
- logger ?: Pick < GenericLogger , 'debug' | 'warn' | 'error' > ;
138
- }
124
+ /**
125
+ * Required when using schema parsing - import from `@aws-lambda-powertools/batch/parser`
126
+ */
127
+ parser : typeof parser ;
128
+ /**
129
+ * Complete event schema using Standard Schema specification, mutually exclusive with `innerSchema`
130
+ */
131
+ schema : StandardSchemaV1 ;
132
+ innerSchema ?: never ;
133
+ transformer ?: never ;
134
+ /**
135
+ * Optional logger for debug and warning messages
136
+ */
137
+ logger ?: Pick < GenericLogger , 'debug' | 'warn' | 'error' > ;
138
+ }
139
139
| {
140
- /**
141
- * Required when using schema parsing - import from `@aws-lambda-powertools/batch/parser`
142
- */
143
- parser : typeof parser ;
144
- schema ?: never ;
145
- /**
146
- * Payload-only Zod schema, mutually exclusive with `schema`
147
- */
148
- innerSchema : ZodType ;
149
- /**
150
- * Payload transformer, only available with `innerSchema`
151
- */
152
- transformer ?: 'json' | 'base64' | 'unmarshall' ;
153
- /**
154
- * Optional logger for debug and warning messages
155
- */
156
- logger ?: Pick < GenericLogger , 'debug' | 'warn' | 'error' > ;
157
- }
140
+ /**
141
+ * Required when using schema parsing - import from `@aws-lambda-powertools/batch/parser`
142
+ */
143
+ parser : typeof parser ;
144
+ schema ?: never ;
145
+ /**
146
+ * Payload-only Zod schema, mutually exclusive with `schema`
147
+ */
148
+ innerSchema : ZodType ;
149
+ /**
150
+ * Payload transformer, only available with `innerSchema`
151
+ */
152
+ transformer ?: 'json' | 'base64' | 'unmarshall' ;
153
+ /**
154
+ * Optional logger for debug and warning messages
155
+ */
156
+ logger ?: Pick < GenericLogger , 'debug' | 'warn' | 'error' > ;
157
+ }
158
158
| {
159
- parser ?: never ;
160
- schema ?: never ;
161
- innerSchema ?: never ;
162
- transformer ?: never ;
163
- /**
164
- * Optional logger for debug and warning messages
165
- */
166
- logger ?: Pick < GenericLogger , 'debug' | 'warn' | 'error' > ;
167
- } ;
159
+ parser ?: never ;
160
+ schema ?: never ;
161
+ innerSchema ?: never ;
162
+ transformer ?: never ;
163
+ /**
164
+ * Optional logger for debug and warning messages
165
+ */
166
+ logger ?: Pick < GenericLogger , 'debug' | 'warn' | 'error' > ;
167
+ } ;
168
168
169
169
/**
170
170
* Utility type for creating typed record handlers with custom payload schemas.
@@ -227,17 +227,17 @@ type ParsedRecord<TRecord, TPayload, TOldPayload = TPayload> = TRecord extends {
227
227
}
228
228
? Omit < TRecord , 'body' > & { body : TPayload }
229
229
: TRecord extends { kinesis : { data : string } }
230
- ? Omit < TRecord , 'kinesis' > & {
231
- kinesis : Omit < TRecord [ 'kinesis' ] , 'data' > & { data : TPayload } ;
232
- }
233
- : TRecord extends { dynamodb ?: StreamRecord }
234
- ? Omit < TRecord , 'dynamodb' > & {
235
- dynamodb : Omit < StreamRecord , 'NewImage' | 'OldImage' > & {
236
- NewImage : TPayload ;
237
- OldImage : TOldPayload ;
238
- } ;
239
- }
240
- : TRecord ;
230
+ ? Omit < TRecord , 'kinesis' > & {
231
+ kinesis : Omit < TRecord [ 'kinesis' ] , 'data' > & { data : TPayload } ;
232
+ }
233
+ : TRecord extends { dynamodb ?: StreamRecord }
234
+ ? Omit < TRecord , 'dynamodb' > & {
235
+ dynamodb : Omit < StreamRecord , 'NewImage' | 'OldImage' > & {
236
+ NewImage : TPayload ;
237
+ OldImage : TOldPayload ;
238
+ } ;
239
+ }
240
+ : TRecord ;
241
241
242
242
export type {
243
243
BatchProcessingOptions ,
0 commit comments