The event.detail.data structure keeps breaking when a user profile update hits our Lambda. The SDK type definition says data is a User, but the runtime payload has it nested under data.data. Here’s the handler:
export const handler = async (event: EventBridgeEvent<GenesysWebhook, any>) => {
const payload = event.detail.data;
// payload.userId is undefined, but payload.data.userId exists
console.log(payload);
};
Why is the event schema not matching the SDK types?