import { Option } from "@atomist/automation-client/lib/metadata/automationMetadata"; import { CommandListenerInvocation, SdmContext } from "@atomist/sdm"; import { Issue } from "../jiraDefs"; export declare class JiraHandlerParam { slackChannelName: string; slackChannel: string; } export interface JiraMapping { projectId: string; channel: string; componentId?: string; } export interface JiraItemCreated { id: string; key: string; self: string; } export declare function buildJiraHashKey(workspaceId: string, payload: JiraMapping): string; export declare function submitMappingPayload(ci: CommandListenerInvocation, payload: JiraMapping, active?: boolean): Promise; export declare const createJiraTicket: (data: any, ctx?: SdmContext) => Promise; export interface JiraProjectDefinition { key: string; name: string; lead: string; description: string; projectTypeKey: string; projectTemplateKey: string; assigneeType: string; extraData?: any; } export declare function createJiraProject(data: JiraProjectDefinition, ctx?: SdmContext): Promise; export interface JiraComponentDefinition { name: string; description: string; project: string; assigneeType: "PROJECT_LEAD" | "COMPONENT_LEAD" | "UNASSIGNED" | "PROJECT_DEFAULT"; extraData?: any; } export declare function createJiraComponent(data: JiraComponentDefinition, ctx?: SdmContext): Promise; export declare const createJiraResource: (apiUrl: string, data: any, update?: boolean, ctx?: SdmContext) => Promise; export declare function prepProjectSelect(search: string, ctx: SdmContext): Promise; export declare function prepComponentSelect(project: string, ctx: SdmContext): Promise; export interface JiraQueryLanguageIssueResults { issues: Issue[]; startAt: number; maxResults: number; total: number; } /** * Simple helper to retrieve issues via JQL query * * Notice - Pagination is NOT handled here, needs to be handled in the calling function. There are helper startAt/maxResults parameters so you do not * have to include these items in your query string * * @param {String} jql: JQL syntax only * @param {String} startAt?: The index to start retrieving from (for pagination) * @param {String} maxResults?: The max number of issues to retrieve * @param {SdmContext} ctx?: SdmContext to pass for authentication purposes. Should be used when calling this function from a command handler. * @returns {JiraQueryLanguageIssueResults} */ export declare function searchIssues(jql: string, startAt?: string, maxResults?: string, ctx?: SdmContext): Promise;