UNPKG

@intuitionrobotics/jira

Version:
99 lines (98 loc) 2.16 kB
import { TypedMap } from "@intuitionrobotics/ts-common"; export type Config = { auth: JiraAuth; defaultAssignee: JiraUser; baseUrl?: string; }; export type JiraAuth = { email: string; apiKey: string; }; export type JiraUser = { accountId: string; name?: string; email?: string; }; export type JiraMark = { type: string; attrs: { href: string; }; }; export type JiraContent = { type: "paragraph" | string; text?: string; marks?: JiraMark[]; content?: JiraContent[]; }; export type JiraDescription = string | { type: "doc" | string; version: number; content: JiraContent[]; }; export type JiraIssue_Fields = { project: JiraProject; issuetype: IssueType; description: JiraDescription; summary: string; reporter?: { id: string; }; } & TypedMap<any>; export type IssueType = { id?: string; name: string; }; export type LabelType = { label: string[]; }; export type JiraProject = { id: string; name: string; key: string; }; export type BaseIssue = { id: string; key: string; self: string; url: string; }; export type JiraIssue = BaseIssue & { expand: string; fields: JiraIssue_Fields; }; export type FixVersionType = { fixVersions: { name: string; }[]; }; export type QueryItemWithOperator = { value: string; operator: string; }; export type JiraQuery = TypedMap<string | string[] | QueryItemWithOperator> & { status?: string | string[]; project?: string | string[]; fixVersion?: string | string[]; }; export type JiraResponse_IssuesQuery = { expand: string; startAt: number; maxResults: number; total: number; issues: JiraIssue[]; }; export declare const createFormData: (filename: string, buffer: Buffer) => { file: { value: Buffer<ArrayBufferLike>; options: { filename: string; }; }; }; export type JiraIssueText = string | { href: string; text: string; }; export declare const createText: (...texts: JiraIssueText[]) => JiraDescription; export declare const buildJQL: (query: JiraQuery) => string;