Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 11x 11x 2x 2x 2x 2x 2x | import { DocumentClient } from 'aws-sdk/clients/dynamodb';
import { unmarshallDeviceSettings } from './schema/tableSchema';
import { DeviceSettings } from '../types.d';
export const convertDbStreamToSettings = (record: {
dynamodb: { NewImage: DocumentClient.AttributeMap };
}): DeviceSettings => {
const { dynamodb } = record;
const { NewImage: newImage } = dynamodb;
console.log('new Image ', newImage);
console.log('new Image string', JSON.stringify(newImage));
return (unmarshallDeviceSettings(newImage) as DeviceSettings);
};
|