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)

121 lines 3.65 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var AwsS3Actions; (function (AwsS3Actions) { AwsS3Actions["Put"] = "put"; AwsS3Actions["SignPolicy"] = "signPolicy"; })(AwsS3Actions = exports.AwsS3Actions || (exports.AwsS3Actions = {})); var AwsSesActions; (function (AwsSesActions) { AwsSesActions["Send"] = "send"; })(AwsSesActions = exports.AwsSesActions || (exports.AwsSesActions = {})); var HttpActions; (function (HttpActions) { HttpActions["Get"] = "get"; HttpActions["Post"] = "post"; HttpActions["Put"] = "put"; HttpActions["Delete"] = "delete"; HttpActions["Head"] = "head"; HttpActions["Patch"] = "patch"; })(HttpActions = exports.HttpActions || (exports.HttpActions = {})); var TwilioActions; (function (TwilioActions) { TwilioActions["Send"] = "send"; })(TwilioActions = exports.TwilioActions || (exports.TwilioActions = {})); var AwsRuleCreator = (function () { function AwsRuleCreator(name, actions) { this.name = name; this.actions = actions; this.type = "aws"; } return AwsRuleCreator; }()); exports.AwsRuleCreator = AwsRuleCreator; var AwsS3RuleCreator = (function () { function AwsS3RuleCreator(name, actions) { this.name = name; this.actions = actions; this.type = "aws-s3"; } return AwsS3RuleCreator; }()); exports.AwsS3RuleCreator = AwsS3RuleCreator; var AwsSesRuleCreator = (function () { function AwsSesRuleCreator(name, actions) { this.name = name; this.actions = actions; this.type = "aws-ses"; } return AwsSesRuleCreator; }()); exports.AwsSesRuleCreator = AwsSesRuleCreator; var HttpRuleCreator = (function () { function HttpRuleCreator(name, actions) { this.name = name; this.actions = actions; this.type = "http"; } return HttpRuleCreator; }()); exports.HttpRuleCreator = HttpRuleCreator; var MongoDbRuleCreator = (function () { function MongoDbRuleCreator(namespace, rule) { this.namespace = namespace; this.rule = rule; this.type = "mongodb"; } return MongoDbRuleCreator; }()); exports.MongoDbRuleCreator = MongoDbRuleCreator; var TwilioRuleCreator = (function () { function TwilioRuleCreator(name, actions) { this.name = name; this.actions = actions; this.type = "twilio"; } return TwilioRuleCreator; }()); exports.TwilioRuleCreator = TwilioRuleCreator; var RuleCreatorCodec = (function () { function RuleCreatorCodec() { } RuleCreatorCodec.prototype.encode = function (from) { switch (from.type) { case "mongodb": return new MongoDbCodec().encode(from); default: return from; } }; return RuleCreatorCodec; }()); exports.RuleCreatorCodec = RuleCreatorCodec; var MongoDbCodec = (function () { function MongoDbCodec() { } MongoDbCodec.prototype.encode = function (from) { from.rule["namespace"] = from.namespace; return from.rule; }; return MongoDbCodec; }()); exports.MongoDbCodec = MongoDbCodec; var RuleResponse = (function () { function RuleResponse() { } return RuleResponse; }()); exports.RuleResponse = RuleResponse; var RuleResponseCodec = (function () { function RuleResponseCodec() { } RuleResponseCodec.prototype.encode = function (from) { return {}; }; RuleResponseCodec.prototype.decode = function (from) { return {}; }; return RuleResponseCodec; }()); exports.RuleResponseCodec = RuleResponseCodec; //# sourceMappingURL=RulesResources.js.map