You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If `innerSchema` is used with DynamoDB streams, the schema will be applied to both the `NewImage` and the `OldImage` by default. If you want to have dedicated schemas, see the section below.
363
+
361
364
#### Using full event schema
362
365
363
366
For complete control over validation, extend the built-in schemas with your custom payload schema. This approach gives you full control over the entire event structure.
* Note: If `innerSchema` is used with DynamoDB streams, the schema will be applied to both the NewImage and the OldImage by default. If you want to have separate schema for both, you will need to extend the schema and use the full schema for parsing.
149
+
*
116
150
* @param eventType - The type of event to process (SQS, Kinesis, DynamoDB)
* Extend the schema according to the event type passed.
13
12
*
14
-
* If useTransformers is true, extend using opinionated transformers.
13
+
* If `useTransformers` is true, extend using opinionated transformers.
15
14
* Otherwise, extend without any transformers.
16
15
*
16
+
* The vendor is already checked at runtime to ensure Zod is being used when required using `StandardSchemaV1['~standard'].vendor`.
17
+
*
17
18
* @param options - The options for creating the extended schema
18
19
* @param options.eventType - The type of event to process (SQS, Kinesis, DynamoDB)
19
-
* @param options.schema - The StandardSchema to be used for parsing
20
+
* @param options.innerSchema - The StandardSchema to be used for parsing. To avoid forcing a direct dependency on Zod, we use `unknown` here, which is not ideal but necessary.
20
21
* @param options.useTransformers - Whether to use transformers for parsing
21
22
* @param options.logger - A logger instance for logging
0 commit comments