Variable SqsEnvelopeConst
SqsEnvelope: { parse<T extends ZodType<any, ZodTypeDef, any>>( data: unknown, schema: T, ): TypeOf<T>[]; safeParse<T extends ZodType<any, ZodTypeDef, any>>( data: unknown, schema: T, ): ParsedResult<unknown, TypeOf<T>[]>;} = ... Type declaration
parse:function
parse<T extends ZodType<any, ZodTypeDef, any>>( data: unknown, schema: T,): TypeOf<T>[] Type Parameters
- T extends ZodType<any, ZodTypeDef, any>
Returns TypeOf<T>[]
safeParse:function
safeParse<T extends ZodType<any, ZodTypeDef, any>>( data: unknown, schema: T,): ParsedResult<unknown, TypeOf<T>[]> Type Parameters
- T extends ZodType<any, ZodTypeDef, any>
Returns ParsedResult<unknown, TypeOf<T>[]>
SQS Envelope to extract array of Records
The record's
body
parameter is a string and needs to be parsed against the provided schema.If you know that the
body
is a JSON string, you can useJSONStringified
to parse it, for example: