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)

108 lines 8.36 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var StitchServiceErrorCode; (function (StitchServiceErrorCode) { StitchServiceErrorCode[StitchServiceErrorCode["MissingAuthReq"] = 0] = "MissingAuthReq"; StitchServiceErrorCode[StitchServiceErrorCode["InvalidSession"] = 1] = "InvalidSession"; StitchServiceErrorCode[StitchServiceErrorCode["UserAppDomainMismatch"] = 2] = "UserAppDomainMismatch"; StitchServiceErrorCode[StitchServiceErrorCode["DomainNotAllowed"] = 3] = "DomainNotAllowed"; StitchServiceErrorCode[StitchServiceErrorCode["ReadSizeLimitExceeded"] = 4] = "ReadSizeLimitExceeded"; StitchServiceErrorCode[StitchServiceErrorCode["InvalidParameter"] = 5] = "InvalidParameter"; StitchServiceErrorCode[StitchServiceErrorCode["MissingParameter"] = 6] = "MissingParameter"; StitchServiceErrorCode[StitchServiceErrorCode["TwilioError"] = 7] = "TwilioError"; StitchServiceErrorCode[StitchServiceErrorCode["GCMError"] = 8] = "GCMError"; StitchServiceErrorCode[StitchServiceErrorCode["HTTPError"] = 9] = "HTTPError"; StitchServiceErrorCode[StitchServiceErrorCode["AWSError"] = 10] = "AWSError"; StitchServiceErrorCode[StitchServiceErrorCode["MongoDBError"] = 11] = "MongoDBError"; StitchServiceErrorCode[StitchServiceErrorCode["ArgumentsNotAllowed"] = 12] = "ArgumentsNotAllowed"; StitchServiceErrorCode[StitchServiceErrorCode["FunctionExecutionError"] = 13] = "FunctionExecutionError"; StitchServiceErrorCode[StitchServiceErrorCode["NoMatchingRuleFound"] = 14] = "NoMatchingRuleFound"; StitchServiceErrorCode[StitchServiceErrorCode["InternalServerError"] = 15] = "InternalServerError"; StitchServiceErrorCode[StitchServiceErrorCode["AuthProviderNotFound"] = 16] = "AuthProviderNotFound"; StitchServiceErrorCode[StitchServiceErrorCode["AuthProviderAlreadyExists"] = 17] = "AuthProviderAlreadyExists"; StitchServiceErrorCode[StitchServiceErrorCode["ServiceNotFound"] = 18] = "ServiceNotFound"; StitchServiceErrorCode[StitchServiceErrorCode["ServiceTypeNotFound"] = 19] = "ServiceTypeNotFound"; StitchServiceErrorCode[StitchServiceErrorCode["ServiceAlreadyExists"] = 20] = "ServiceAlreadyExists"; StitchServiceErrorCode[StitchServiceErrorCode["ServiceCommandNotFound"] = 21] = "ServiceCommandNotFound"; StitchServiceErrorCode[StitchServiceErrorCode["ValueNotFound"] = 22] = "ValueNotFound"; StitchServiceErrorCode[StitchServiceErrorCode["ValueAlreadyExists"] = 23] = "ValueAlreadyExists"; StitchServiceErrorCode[StitchServiceErrorCode["ValueDuplicateName"] = 24] = "ValueDuplicateName"; StitchServiceErrorCode[StitchServiceErrorCode["FunctionNotFound"] = 25] = "FunctionNotFound"; StitchServiceErrorCode[StitchServiceErrorCode["FunctionAlreadyExists"] = 26] = "FunctionAlreadyExists"; StitchServiceErrorCode[StitchServiceErrorCode["FunctionDuplicateName"] = 27] = "FunctionDuplicateName"; StitchServiceErrorCode[StitchServiceErrorCode["FunctionSyntaxError"] = 28] = "FunctionSyntaxError"; StitchServiceErrorCode[StitchServiceErrorCode["FunctionInvalid"] = 29] = "FunctionInvalid"; StitchServiceErrorCode[StitchServiceErrorCode["IncomingWebhookNotFound"] = 30] = "IncomingWebhookNotFound"; StitchServiceErrorCode[StitchServiceErrorCode["IncomingWebhookAlreadyExists"] = 31] = "IncomingWebhookAlreadyExists"; StitchServiceErrorCode[StitchServiceErrorCode["IncomingWebhookDuplicateName"] = 32] = "IncomingWebhookDuplicateName"; StitchServiceErrorCode[StitchServiceErrorCode["RuleNotFound"] = 33] = "RuleNotFound"; StitchServiceErrorCode[StitchServiceErrorCode["ApiKeyNotFound"] = 34] = "ApiKeyNotFound"; StitchServiceErrorCode[StitchServiceErrorCode["RuleAlreadyExists"] = 35] = "RuleAlreadyExists"; StitchServiceErrorCode[StitchServiceErrorCode["RuleDuplicateName"] = 36] = "RuleDuplicateName"; StitchServiceErrorCode[StitchServiceErrorCode["AuthProviderDuplicateName"] = 37] = "AuthProviderDuplicateName"; StitchServiceErrorCode[StitchServiceErrorCode["RestrictedHost"] = 38] = "RestrictedHost"; StitchServiceErrorCode[StitchServiceErrorCode["ApiKeyAlreadyExists"] = 39] = "ApiKeyAlreadyExists"; StitchServiceErrorCode[StitchServiceErrorCode["IncomingWebhookAuthFailed"] = 40] = "IncomingWebhookAuthFailed"; StitchServiceErrorCode[StitchServiceErrorCode["ExecutionTimeLimitExceeded"] = 41] = "ExecutionTimeLimitExceeded"; StitchServiceErrorCode[StitchServiceErrorCode["FunctionNotCallable"] = 42] = "FunctionNotCallable"; StitchServiceErrorCode[StitchServiceErrorCode["UserAlreadyConfirmed"] = 43] = "UserAlreadyConfirmed"; StitchServiceErrorCode[StitchServiceErrorCode["UserNotFound"] = 44] = "UserNotFound"; StitchServiceErrorCode[StitchServiceErrorCode["UserDisabled"] = 45] = "UserDisabled"; StitchServiceErrorCode[StitchServiceErrorCode["Unknown"] = 46] = "Unknown"; })(StitchServiceErrorCode = exports.StitchServiceErrorCode || (exports.StitchServiceErrorCode = {})); var apiErrorCodes = { MissingAuthReq: StitchServiceErrorCode.MissingAuthReq, InvalidSession: StitchServiceErrorCode.InvalidSession, UserAppDomainMismatch: StitchServiceErrorCode.UserAppDomainMismatch, DomainNotAllowed: StitchServiceErrorCode.DomainNotAllowed, ReadSizeLimitExceeded: StitchServiceErrorCode.ReadSizeLimitExceeded, InvalidParameter: StitchServiceErrorCode.InvalidParameter, MissingParameter: StitchServiceErrorCode.MissingParameter, TwilioError: StitchServiceErrorCode.TwilioError, GCMError: StitchServiceErrorCode.GCMError, HTTPError: StitchServiceErrorCode.HTTPError, AWSError: StitchServiceErrorCode.AWSError, MongoDBError: StitchServiceErrorCode.MongoDBError, ArgumentsNotAllowed: StitchServiceErrorCode.ArgumentsNotAllowed, FunctionExecutionError: StitchServiceErrorCode.FunctionExecutionError, NoMatchingRuleFound: StitchServiceErrorCode.NoMatchingRuleFound, InternalServerError: StitchServiceErrorCode.InternalServerError, AuthProviderNotFound: StitchServiceErrorCode.AuthProviderNotFound, AuthProviderAlreadyExists: StitchServiceErrorCode.AuthProviderAlreadyExists, ServiceNotFound: StitchServiceErrorCode.ServiceNotFound, ServiceTypeNotFound: StitchServiceErrorCode.ServiceTypeNotFound, ServiceAlreadyExists: StitchServiceErrorCode.ServiceAlreadyExists, ServiceCommandNotFound: StitchServiceErrorCode.ServiceCommandNotFound, ValueNotFound: StitchServiceErrorCode.ValueNotFound, ValueAlreadyExists: StitchServiceErrorCode.ValueAlreadyExists, ValueDuplicateName: StitchServiceErrorCode.ValueDuplicateName, FunctionNotFound: StitchServiceErrorCode.FunctionNotFound, FunctionAlreadyExists: StitchServiceErrorCode.FunctionAlreadyExists, FunctionDuplicateName: StitchServiceErrorCode.FunctionDuplicateName, FunctionSyntaxError: StitchServiceErrorCode.FunctionSyntaxError, FunctionInvalid: StitchServiceErrorCode.FunctionInvalid, IncomingWebhookNotFound: StitchServiceErrorCode.IncomingWebhookNotFound, IncomingWebhookAlreadyExists: StitchServiceErrorCode.IncomingWebhookAlreadyExists, IncomingWebhookDuplicateName: StitchServiceErrorCode.IncomingWebhookDuplicateName, RuleNotFound: StitchServiceErrorCode.RuleNotFound, APIKeyNotFound: StitchServiceErrorCode.ApiKeyNotFound, RuleAlreadyExists: StitchServiceErrorCode.RuleAlreadyExists, RuleDuplicateName: StitchServiceErrorCode.RuleDuplicateName, AuthProviderDuplicateName: StitchServiceErrorCode.AuthProviderDuplicateName, RestrictedHost: StitchServiceErrorCode.RestrictedHost, APIKeyAlreadyExists: StitchServiceErrorCode.ApiKeyAlreadyExists, IncomingWebhookAuthFailed: StitchServiceErrorCode.IncomingWebhookAuthFailed, ExecutionTimeLimitExceeded: StitchServiceErrorCode.ExecutionTimeLimitExceeded, FunctionNotCallable: StitchServiceErrorCode.FunctionNotCallable, UserAlreadyConfirmed: StitchServiceErrorCode.UserAlreadyConfirmed, UserNotFound: StitchServiceErrorCode.UserNotFound, UserDisabled: StitchServiceErrorCode.UserDisabled }; function stitchServiceErrorCodeFromApi(code) { if (!(code in apiErrorCodes)) { return StitchServiceErrorCode.Unknown; } return apiErrorCodes[code]; } exports.stitchServiceErrorCodeFromApi = stitchServiceErrorCodeFromApi; //# sourceMappingURL=StitchServiceErrorCode.js.map