diff --git a/packages/parser/src/schemas/index.ts b/packages/parser/src/schemas/index.ts index eedaaeb80..ed70209a5 100644 --- a/packages/parser/src/schemas/index.ts +++ b/packages/parser/src/schemas/index.ts @@ -60,7 +60,13 @@ export { SnsSqsNotificationSchema, SnsNotificationSchema, } from './sns.js'; -export { SqsSchema, SqsRecordSchema } from './sqs.js'; +export { + SqsSchema, + SqsRecordSchema, + SqsMsgAttributeSchema, + SqsMsgAttributeDataTypeSchema, + SqsAttributesSchema, +} from './sqs.js'; export { TransferFamilySchema } from './transfer-family.js'; export { VpcLatticeSchema } from './vpc-lattice.js'; export { VpcLatticeV2Schema } from './vpc-latticev2.js'; diff --git a/packages/parser/src/schemas/sqs.ts b/packages/parser/src/schemas/sqs.ts index f3c8ecd11..83fde66e6 100644 --- a/packages/parser/src/schemas/sqs.ts +++ b/packages/parser/src/schemas/sqs.ts @@ -1,11 +1,18 @@ import { z } from 'zod'; +const SqsMsgAttributeDataTypeSchema = z.union([ + z.literal('String'), + z.literal('Number'), + z.literal('Binary'), + z.string(), +]); + const SqsMsgAttributeSchema = z.object({ stringValue: z.string().optional(), binaryValue: z.string().optional(), stringListValues: z.array(z.string()).optional(), binaryListValues: z.array(z.string()).optional(), - dataType: z.string(), + dataType: SqsMsgAttributeDataTypeSchema, }); const SqsAttributesSchema = z.object({ @@ -96,4 +103,10 @@ const SqsSchema = z.object({ Records: z.array(SqsRecordSchema).min(1), }); -export { SqsSchema, SqsRecordSchema }; +export { + SqsSchema, + SqsRecordSchema, + SqsMsgAttributeSchema, + SqsMsgAttributeDataTypeSchema, + SqsAttributesSchema, +};