UNPKG

my-test123

Version:
46 lines 1.5 kB
import { switchModel } from './common.model'; var UserMapper = /** @class */ (function () { function UserMapper() { this.serviceToUiMapTree = [{ fromPath: ['id'], toPath: ['id'] }, { fromPath: ['attributes', 'fullName'], toPath: ['name'] }, { fromPath: ['attributes', 'imageURL'], toPath: ['avatar'] }, { fromPath: ['attributes', 'username'], toPath: ['username'] }, { toPath: ['currentUser'], toValue: false }]; this.uiToServiceMapTree = [{ toPath: ['id'], fromPath: ['id'] }, { toPath: ['attributes', 'fullName'], fromPath: ['name'] }, { toPath: ['attributes', 'imageURL'], fromPath: ['avatar'] }, { toPath: ['attributes', 'username'], fromPath: ['username'] }, { toPath: ['type'], toValue: 'identities' }]; } UserMapper.prototype.toUIModel = function (arg) { return switchModel(arg, this.serviceToUiMapTree); }; UserMapper.prototype.toServiceModel = function (arg) { return switchModel(arg, this.uiToServiceMapTree); }; return UserMapper; }()); export { UserMapper }; //# sourceMappingURL=user.js.map