mongodb-stitch
Version:
[](https://gitter.im/mongodb/stitch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
30 lines • 893 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
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;
}());
exports.ServiceResponseCodec = ServiceResponseCodec;
//# sourceMappingURL=ServicesResources.js.map