mongodb-stitch
Version:
[](https://gitter.im/mongodb/stitch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
55 lines • 2.04 kB
JavaScript
var FunctionCreatorFields;
(function (FunctionCreatorFields) {
FunctionCreatorFields["Name"] = "name";
FunctionCreatorFields["Source"] = "source";
FunctionCreatorFields["CanEvaluate"] = "can_evaluate";
FunctionCreatorFields["Private"] = "private";
})(FunctionCreatorFields || (FunctionCreatorFields = {}));
var FunctionCreatorCodec = (function () {
function FunctionCreatorCodec() {
}
FunctionCreatorCodec.prototype.decode = function (from) {
return {
canEvaluate: from[FunctionCreatorFields.CanEvaluate],
name: from[FunctionCreatorFields.Name],
private: from[FunctionCreatorFields.Private],
source: from[FunctionCreatorFields.Source]
};
};
FunctionCreatorCodec.prototype.encode = function (from) {
var _a;
return _a = {},
_a[FunctionCreatorFields.Name] = from.name,
_a[FunctionCreatorFields.Source] = from.source,
_a[FunctionCreatorFields.CanEvaluate] = from.canEvaluate,
_a[FunctionCreatorFields.Private] = from.private,
_a;
};
return FunctionCreatorCodec;
}());
export { FunctionCreatorCodec };
var FunctionResponseFields;
(function (FunctionResponseFields) {
FunctionResponseFields["Id"] = "id";
FunctionResponseFields["Name"] = "name";
})(FunctionResponseFields || (FunctionResponseFields = {}));
var FunctionResponseCodec = (function () {
function FunctionResponseCodec() {
}
FunctionResponseCodec.prototype.decode = function (from) {
return {
id: from[FunctionResponseFields.Id],
name: from[FunctionResponseFields.Name]
};
};
FunctionResponseCodec.prototype.encode = function (from) {
var _a;
return _a = {},
_a[FunctionResponseFields.Id] = from.id,
_a[FunctionResponseFields.Name] = from.name,
_a;
};
return FunctionResponseCodec;
}());
export { FunctionResponseCodec };
//# sourceMappingURL=FunctionsResources.js.map