UNPKG

@broadcom/endevor-bridge-for-git-for-zowe-cli

Version:

Endevor Bridge for Git plug-in for Zowe CLI

139 lines (135 loc) 4.63 kB
'use strict'; var EBGOptions = require('./EBGOptions.js'); var index = require('../../node_modules/@broadcom/bridge-for-git-zowe-client/dist/index.js'); /* * Copyright (c) 2019 Broadcom. All Rights Reserved. The term * "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. * * This software and all information contained therein is * confidential and proprietary and shall not be duplicated, * used, disclosed, or disseminated in any way except as * authorized by the applicable license agreement, without the * express written permission of Broadcom. All authorized * reproductions must be marked with this language. * * EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO * THE EXTENT PERMITTED BY APPLICABLE LAW, BROADCOM PROVIDES THIS * SOFTWARE WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT * LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL BROADCOM * BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR * DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS SOFTWARE, * INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS * INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS * EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE. */ class WebhookOptions extends EBGOptions.EBGOptions { } WebhookOptions.ID = { name: "id", description: "ID of the webhook to update/delete.", type: "number", required: false, }; WebhookOptions.ENABLED = { name: "enabled", description: "Specifies if the webhook is active.", type: "boolean", defaultValue: true, required: false, }; WebhookOptions.NAME = { name: "name", description: "Webhook name.", type: "string", required: false, }; WebhookOptions.URL = { name: "webhook-url", aliases: ["url"], description: "Webhook URL.", type: "string", required: false, }; WebhookOptions.AUTH_NAME = { name: "authorization-username", aliases: ["auth-name"], description: "Authorization username if your webhook requires authorization.", type: "string", required: false, }; WebhookOptions.AUTH_SECRET = { name: "authorization-secret", aliases: ["auth-secret"], description: "Authorization secret if your webhook requires authorization.", type: "string", required: false, }; WebhookOptions.AUTH_TYPE = { name: "authorization-type", aliases: ["auth-type"], description: "authorization type.", allowableValues: { values: ["NO", "API_KEY", "BEARER", "BASIC", "CUSTOM"], caseSensitive: true, }, type: "string", defaultValue: "NO", required: false, }; WebhookOptions.DESCRIPTION = { name: "description", description: "Webhook description.", type: "string", required: false, }; WebhookOptions.BRANCHES = { name: "branches", aliases: ["br"], description: "Enable the webhook only for specific branches of your mapping.", type: "array", required: false, }; WebhookOptions.OPERATION_TYPES = { name: "operation-types", aliases: ["operations"], description: "The webhook is triggered only for the specified operations - leave this param unspecified for all operations.", allowableValues: { values: [ index.OperationTypeE.BRIDGE_INITIATE, index.OperationTypeE.BRIDGE_START, index.OperationTypeE.BRIDGE_BENCHMARK, index.OperationTypeE.SYNC, index.OperationTypeE.MIGRATE_MAPPING, index.OperationTypeE.BRIDGE_HEARTBEAT, index.OperationTypeE.BRIDGE_STOP, index.OperationTypeE.DELETE_BRANCH, index.OperationTypeE.DELETE_MAPPING, index.OperationTypeE.GENERATE, index.OperationTypeE.INIT_REPOSITORY, index.OperationTypeE.REFRESH, index.OperationTypeE.UPDATE_REPOSITORY, ], caseSensitive: true, }, type: "array", required: false, }; WebhookOptions.OPERATION_RESULTS = { name: "operation-results", description: "The webhook is triggered only for the specified results of the operations - leave this param unspecified for all results.", allowableValues: { values: [ index.OperationResultCodeE.SUCCESS, index.OperationResultCodeE.FAILED, index.OperationResultCodeE.SKIPPED, index.OperationResultCodeE.SKIPPED_RETRY, index.OperationResultCodeE.WARNING, index.OperationResultCodeE.EXCEPTION, ], caseSensitive: true, }, type: "array", required: false, }; exports.WebhookOptions = WebhookOptions;