@prismatic-io/spectral
Version:
Utility library for building Prismatic connectors and code-native integrations
30 lines (29 loc) • 1.31 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.OAuth2PkceMethod = exports.OAuth2Type = void 0;
exports.templateConnectionInputs = templateConnectionInputs;
const merge_1 = __importDefault(require("lodash/merge"));
var OAuth2Type;
(function (OAuth2Type) {
/**
* This connection uses the OAuth 2.0 client credentials flow. See
* https://prismatic.io/docs/integrations/connections/oauth2/client-credentials-grant-type/
*/
OAuth2Type["ClientCredentials"] = "client_credentials";
/**
* This connection uses the OAuth 2.0 auth code flow. See
* https://prismatic.io/docs/integrations/connections/oauth2/authorization-code-grant-type/
*/
OAuth2Type["AuthorizationCode"] = "authorization_code";
})(OAuth2Type || (exports.OAuth2Type = OAuth2Type = {}));
var OAuth2PkceMethod;
(function (OAuth2PkceMethod) {
OAuth2PkceMethod["Plain"] = "plain";
OAuth2PkceMethod["S256"] = "S256";
})(OAuth2PkceMethod || (exports.OAuth2PkceMethod = OAuth2PkceMethod = {}));
function templateConnectionInputs(inputs, templateInputs, _authType) {
return (0, merge_1.default)(inputs, templateInputs);
}