mongodb-stitch
Version:
[](https://gitter.im/mongodb/stitch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
28 lines • 796 B
JavaScript
var Fields;
(function (Fields) {
Fields["Id"] = "_id";
Fields["Name"] = "name";
Fields["Type"] = "type";
})(Fields || (Fields = {}));
var ServiceResponseCodec = (function () {
function ServiceResponseCodec() {
}
ServiceResponseCodec.prototype.decode = function (from) {
return {
id: from[Fields.Id],
name: from[Fields.Name],
type: from[Fields.Type]
};
};
ServiceResponseCodec.prototype.encode = function (from) {
var _a;
return _a = {},
_a[Fields.Id] = from.id,
_a[Fields.Name] = from.name,
_a[Fields.Type] = from.type,
_a;
};
return ServiceResponseCodec;
}());
export { ServiceResponseCodec };
//# sourceMappingURL=ServicesResources.js.map