import { HandlerContext } from "@atomist/automation-client"; import * as types from "../../typings/types"; import { JiraPreference } from "../cache/lookup"; /** * Get all projects that are mapped to this channel * @param {HandlerContext} ctx * @param {string} channel * @returns {string[]} Array of project ids */ export declare const getMappedProjectsbyChannel: (ctx: HandlerContext, channel: string) => Promise; export interface JiraProjectComponentMap { componentId: string; projectId: string; } /** * Get all components that are mapped to this channel * @param {HandlerContext} ctx * @param {string} channel * @returns {JiraProjectComponentMap[]} Returns an array of all the project/component maps for this channel */ export declare const getMappedComponentsbyChannel: (ctx: HandlerContext, channel: string) => Promise; /** * Find all channels that a given JiraIssue event needs to notify based on the project and/or components defined in the issue. * * @param {HandlerContext} ctx * @param {OnJiraIssueEvent.JiraIssue} event * @returns {string[]} An array of channel names to update */ export declare const jiraChannelLookup: (ctx: HandlerContext, event: types.OnJiraIssueEvent.JiraIssue) => Promise; /** * Parse an array of JIRA channel preferences for a given "check" (aka preference) and determine which channels have this notification enabled. * Return only the channels that have subscribed to events of this type. * * @param {JiraPreference[]} channels * @param {OnJiraIssueEvent.JiraIssue} event * @param {string} check * @returns {JiraPreference[]} */ export declare const jiraParseChannels: (channels: JiraPreference[], event: types.OnJiraIssueEvent.JiraIssue, check: string) => Promise; /** * Determine channels to notify and parse their individual channel preferences to see if they should be notified * * @param {HandlerContext} ctx * @param {OnJiraIssueEvent.JiraIssue} event * @returns {JiraPreference[]} */ export declare const jiraDetermineNotifyChannels: (ctx: HandlerContext, event: types.OnJiraIssueEvent.JiraIssue) => Promise; /** * Use this function to retrieve the chat channels for a given repo * @param {HandlerContext} ctx HandlerContext * @param {string} name Name of the repo to find channels for * @returns {string[]} Array of strings. The names of the channels. */ export declare function findChannelByRepo(ctx: HandlerContext, name: string): Promise; /** * Use this function to retrieve mapped chat channels for multiple repos at the same time * * @param {HandlerContext} ctx * @param {string[]} repos * @returns {string[]} An array of channel names */ export declare function findChannelsByRepos(ctx: HandlerContext, repos: string[]): Promise;