UNPKG

mongodb-stitch

Version:

[![Join the chat at https://gitter.im/mongodb/stitch](https://badges.gitter.im/mongodb/stitch.svg)](https://gitter.im/mongodb/stitch?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

67 lines 2.73 kB
(function (factory) { if (typeof module === "object" && typeof module.exports === "object") { var v = factory(require, exports); if (v !== undefined) module.exports = v; } else if (typeof define === "function" && define.amd) { define(["require", "exports"], factory); } })(function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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; }()); exports.FunctionCreatorCodec = 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; }()); exports.FunctionResponseCodec = FunctionResponseCodec; }); //# sourceMappingURL=FunctionsResources.js.map