From a903b281fb4abf268bfb4e1855470fe0057f0c87 Mon Sep 17 00:00:00 2001 From: Vladislav Tupikin Date: Fri, 6 Dec 2019 16:18:21 +0300 Subject: [PATCH] editorconfig added (#222) --- .editorconfig | 16 ++ types/api/backlog.d.ts | 32 ++-- types/api/board.d.ts | 318 ++++++++++++++++----------------- types/api/epic.d.ts | 80 ++++----- types/api/issue.d.ts | 370 +++++++++++++++++++-------------------- types/api/issueType.d.ts | 76 ++++---- types/api/project.d.ts | 106 +++++------ types/api/search.d.ts | 72 ++++---- types/api/sprint.d.ts | 132 +++++++------- types/api/user.d.ts | 94 +++++----- types/config.d.ts | 18 +- types/index.d.ts | 151 ++++++++-------- 12 files changed, 740 insertions(+), 725 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..a4f2817f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +tab_width = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 120 + +[*.html] +indent_size = 4 +tab_width = 4 +max_line_length = off diff --git a/types/api/backlog.d.ts b/types/api/backlog.d.ts index 27ef8dc7..72a19fbf 100644 --- a/types/api/backlog.d.ts +++ b/types/api/backlog.d.ts @@ -1,21 +1,21 @@ import { Callback } from "types"; export class Backlog { - moveIssuesToBacklog( - opts?: { - issues?: string[]; - }, - callback?: Callback - ): Promise; + moveIssuesToBacklog( + opts?: { + issues?: string[]; + }, + callback?: Callback + ): Promise; - moveIssuesToBacklogForBoard( - opts: { - boardId: number; - issues?: string[]; - rankBeforeIssue?: string; - rankAfterIssue?: string; - rankCustomFieldId?: number; - }, - callback?: Callback - ): Promise; + moveIssuesToBacklogForBoard( + opts: { + boardId: number; + issues?: string[]; + rankBeforeIssue?: string; + rankAfterIssue?: string; + rankCustomFieldId?: number; + }, + callback?: Callback + ): Promise; } diff --git a/types/api/board.d.ts b/types/api/board.d.ts index 88c8d951..e384d48a 100644 --- a/types/api/board.d.ts +++ b/types/api/board.d.ts @@ -2,163 +2,163 @@ import { Callback } from "types"; import { Board as BoardModel } from "types/models"; export class Board { - getAllBoards( - opts?: { - startAt?: number; - maxResults?: number; - type?: string; - name?: string; - projectKeyOrId?: string | number; - accountIdLocation?: string; - userkeyLocation?: string; - usernameLocation?: string; - projectLocation?: string; - includePrivate?: boolean; - negateLocationFiltering?: boolean; - orderBy?: string; - expand?: string; - }, - callback?: Callback - ): Promise; - createBoard( - name: string, - type: string, - filterId: number, - location: { - type: string; - projectKeyOrId: string; - }, - callback?: Callback - ): Promise; - getBoardByFilterId(opts: { - filterId: number; - startAt?: number; - maxResults?: number; - }, callback?: Callback): Promise; - getBoard(opts: { - boardId: number | string; - }, callback?: Callback): Promise; - deleteBoard(opts: { - boardId: number | string; - }, callback?: Callback): Promise; - getIssuesForBacklog(opts: { - boardId: number | string; - startAt?: number; - maxResults?: number; - jql?: string; - validateQuery?: boolean; - fields?: string[]; - expand?: string; - }, callback?: Callback): Promise; - getConfiguration(opts: { - boardId: number | string; - }, callback?: Callback): Promise; - getEpics(opts: { - boardId: number | string; - startAt?: number; - maxResults?: number; - done?: string; - }, callback?: Callback): Promise; - getIssuesWithoutEpic(opts: { - boardId: number | string; - startAt?: number; - maxResults?: number; - jql?: string; - validateQuery?: boolean; - fields?: string[]; - expand?: string; - }, callback?: Callback): Promise; - getIssuesForEpic(opts: { - boardId: number | string; - epicId: number | string; - startAt?: number; - maxResults?: number; - jql?: string; - validateQuery?: boolean; - fields?: string[]; - expand?: string; - }, callback?: Callback): Promise; - getFeaturesForBoard(opts: { - boardId: number | string; - }, callback?: Callback): Promise; - toggleFeatures(opts: { - boardId: number | string; - boardIdBody?: number | string; - feature?: string; - enabling?: boolean; - }, callback?: Callback): Promise; - getIssuesForBoard(opts: { - boardId: number | string; - startAt?: number; - maxResults?: number; - jql?: string; - validateQuery?: boolean; - fields?: string[]; - expand?: string; - }, callback?: Callback): Promise; - moveIssuesToBoard(opts: { - boardId: number | string; - issues?: string[]; - rankBeforeIssue?: string; - rankAfterIssue?: string; - rankCustomFieldId?: number | string; - }, callback?: Callback): Promise; - getProjects(opts: { - boardId: number | string; - startAt?: number; - maxResults?: number; - }, callback?: Callback): Promise; - getProjectsFull(opts: { - boardId: number | string; - }, callback?: Callback): Promise; - getBoardPropertyKeys(opts: { - boardId: number | string; - }, callback?: Callback): Promise; - getBoardProperty(opts: { - boardId: number | string; - propertyKey: string; - }, callback?: Callback): Promise; - setBoardProperty(opts: { - boardId: number | string; - propertyKey: string; - property: any; - }, callback?: Callback): Promise; - deleteBoardProperty(opts: { - boardId: number | string; - propertyKey: string; - }, callback?: Callback): Promise; - getAllQuickFilters(opts: { - boardId: number | string; - startAt?: number; - maxResults?: number; - }, callback?: Callback): Promise; - getQuickFilter(opts: { - boardId: number | string; - quickFilterId: number | string; - }, callback?: Callback): Promise; - getReportsForBoard(opts: { - boardId: number | string; - }, callback?: Callback): Promise; - getAllSprints(opts: { - boardId: number | string; - startAt?: number; - maxResults?: number; - state?: string; - }, callback?: Callback): Promise; - getIssuesForSprint(opts: { - boardId: number | string; - sprintId: number | string; - startAt?: number; - maxResults?: number; - jql?: string; - validateQuery?: boolean; - fields?: string[]; - expand?: string; - }, callback?: Callback): Promise; - getAllVersions(opts: { - boardId: number | string; - startAt?: number; - maxResults?: number; - released?: string; - }, callback?: Callback): Promise; + getAllBoards( + opts?: { + startAt?: number; + maxResults?: number; + type?: string; + name?: string; + projectKeyOrId?: string | number; + accountIdLocation?: string; + userkeyLocation?: string; + usernameLocation?: string; + projectLocation?: string; + includePrivate?: boolean; + negateLocationFiltering?: boolean; + orderBy?: string; + expand?: string; + }, + callback?: Callback + ): Promise; + createBoard( + name: string, + type: string, + filterId: number, + location: { + type: string; + projectKeyOrId: string; + }, + callback?: Callback + ): Promise; + getBoardByFilterId(opts: { + filterId: number; + startAt?: number; + maxResults?: number; + }, callback?: Callback): Promise; + getBoard(opts: { + boardId: number | string; + }, callback?: Callback): Promise; + deleteBoard(opts: { + boardId: number | string; + }, callback?: Callback): Promise; + getIssuesForBacklog(opts: { + boardId: number | string; + startAt?: number; + maxResults?: number; + jql?: string; + validateQuery?: boolean; + fields?: string[]; + expand?: string; + }, callback?: Callback): Promise; + getConfiguration(opts: { + boardId: number | string; + }, callback?: Callback): Promise; + getEpics(opts: { + boardId: number | string; + startAt?: number; + maxResults?: number; + done?: string; + }, callback?: Callback): Promise; + getIssuesWithoutEpic(opts: { + boardId: number | string; + startAt?: number; + maxResults?: number; + jql?: string; + validateQuery?: boolean; + fields?: string[]; + expand?: string; + }, callback?: Callback): Promise; + getIssuesForEpic(opts: { + boardId: number | string; + epicId: number | string; + startAt?: number; + maxResults?: number; + jql?: string; + validateQuery?: boolean; + fields?: string[]; + expand?: string; + }, callback?: Callback): Promise; + getFeaturesForBoard(opts: { + boardId: number | string; + }, callback?: Callback): Promise; + toggleFeatures(opts: { + boardId: number | string; + boardIdBody?: number | string; + feature?: string; + enabling?: boolean; + }, callback?: Callback): Promise; + getIssuesForBoard(opts: { + boardId: number | string; + startAt?: number; + maxResults?: number; + jql?: string; + validateQuery?: boolean; + fields?: string[]; + expand?: string; + }, callback?: Callback): Promise; + moveIssuesToBoard(opts: { + boardId: number | string; + issues?: string[]; + rankBeforeIssue?: string; + rankAfterIssue?: string; + rankCustomFieldId?: number | string; + }, callback?: Callback): Promise; + getProjects(opts: { + boardId: number | string; + startAt?: number; + maxResults?: number; + }, callback?: Callback): Promise; + getProjectsFull(opts: { + boardId: number | string; + }, callback?: Callback): Promise; + getBoardPropertyKeys(opts: { + boardId: number | string; + }, callback?: Callback): Promise; + getBoardProperty(opts: { + boardId: number | string; + propertyKey: string; + }, callback?: Callback): Promise; + setBoardProperty(opts: { + boardId: number | string; + propertyKey: string; + property: any; + }, callback?: Callback): Promise; + deleteBoardProperty(opts: { + boardId: number | string; + propertyKey: string; + }, callback?: Callback): Promise; + getAllQuickFilters(opts: { + boardId: number | string; + startAt?: number; + maxResults?: number; + }, callback?: Callback): Promise; + getQuickFilter(opts: { + boardId: number | string; + quickFilterId: number | string; + }, callback?: Callback): Promise; + getReportsForBoard(opts: { + boardId: number | string; + }, callback?: Callback): Promise; + getAllSprints(opts: { + boardId: number | string; + startAt?: number; + maxResults?: number; + state?: string; + }, callback?: Callback): Promise; + getIssuesForSprint(opts: { + boardId: number | string; + sprintId: number | string; + startAt?: number; + maxResults?: number; + jql?: string; + validateQuery?: boolean; + fields?: string[]; + expand?: string; + }, callback?: Callback): Promise; + getAllVersions(opts: { + boardId: number | string; + startAt?: number; + maxResults?: number; + released?: string; + }, callback?: Callback): Promise; } diff --git a/types/api/epic.d.ts b/types/api/epic.d.ts index 07113965..11d731ea 100644 --- a/types/api/epic.d.ts +++ b/types/api/epic.d.ts @@ -1,44 +1,44 @@ import { Callback } from 'types'; export class Epic { - getIssuesWithoutEpic(opts?: { - startAt?: number; - maxResults?: number; - jql?: string; - validateQuery?: boolean; - fields?: string[]; - expand?: string; - }, callback?: Callback): Promise; - removeIssuesFromEpic(opts?: { - issues?: string[]; - }, callback?: Callback): Promise; - getEpic(opts: { - epicId: number | string; - }, callback?: Callback): Promise; - partiallyUpdateEpic(opts: { - epicId: number | string; - name?: string; - summary?: string; - color?: any; - done?: boolean; - }, callback?: Callback): Promise; - getIssuesForEpic(opts: { - epicId: number | string; - startAt?: number; - maxResults?: number; - jql?: string; - validateQuery?: boolean; - fields?: string[]; - expand?: string; - }, callback?: Callback): Promise; - moveIssuesToEpic(opts: { - epicId: number | string; - issues?: string[]; - }, callback?: Callback): Promise; - rankEpics(opts: { - epicId: number | string; - rankBeforeEpic?: string; - rankAfterEpic?: string; - rankCustomFieldId?: number; - }, callback?: Callback): Promise; + getIssuesWithoutEpic(opts?: { + startAt?: number; + maxResults?: number; + jql?: string; + validateQuery?: boolean; + fields?: string[]; + expand?: string; + }, callback?: Callback): Promise; + removeIssuesFromEpic(opts?: { + issues?: string[]; + }, callback?: Callback): Promise; + getEpic(opts: { + epicId: number | string; + }, callback?: Callback): Promise; + partiallyUpdateEpic(opts: { + epicId: number | string; + name?: string; + summary?: string; + color?: any; + done?: boolean; + }, callback?: Callback): Promise; + getIssuesForEpic(opts: { + epicId: number | string; + startAt?: number; + maxResults?: number; + jql?: string; + validateQuery?: boolean; + fields?: string[]; + expand?: string; + }, callback?: Callback): Promise; + moveIssuesToEpic(opts: { + epicId: number | string; + issues?: string[]; + }, callback?: Callback): Promise; + rankEpics(opts: { + epicId: number | string; + rankBeforeEpic?: string; + rankAfterEpic?: string; + rankCustomFieldId?: number; + }, callback?: Callback): Promise; } diff --git a/types/api/issue.d.ts b/types/api/issue.d.ts index afbf52ff..67973041 100644 --- a/types/api/issue.d.ts +++ b/types/api/issue.d.ts @@ -1,204 +1,204 @@ import { Callback } from 'types'; export interface HistoryMetadataParticipant { - [key: string]: any; - id?: string; - displayName?: string; - displayNameKey?: string; - type?: string; - avatarUrl?: string; - url?: string; + [key: string]: any; + id?: string; + displayName?: string; + displayNameKey?: string; + type?: string; + avatarUrl?: string; + url?: string; } export interface HistoryMetadata { - [key: string]: any; - type?: string; - description?: string; - descriptionKey?: string; - activityDescription?: string; - activityDescriptionKey?: string; - emailDescription?: string; - emailDescriptionKey?: string; - actor?: HistoryMetadataParticipant; - generator?: HistoryMetadataParticipant; - cause?: HistoryMetadataParticipant; - extraData?: any; + [key: string]: any; + type?: string; + description?: string; + descriptionKey?: string; + activityDescription?: string; + activityDescriptionKey?: string; + emailDescription?: string; + emailDescriptionKey?: string; + actor?: HistoryMetadataParticipant; + generator?: HistoryMetadataParticipant; + cause?: HistoryMetadataParticipant; + extraData?: any; } export class Issue { - [method: string]: any; + [method: string]: any; - editIssue( - opts: { - issueKey?: string | number; - issueId?: string | number; - notifyUsers?: boolean; - overrideScreenSecurity?: boolean; - overrideEditableFlag?: boolean; - issue?: { - [key: string]: any; - transition?: { - [key: string]: any; - id?: string | number; - }; - fields?: any; - update?: any; - historyMetadata?: HistoryMetadata, - properties: any[]; - } - }, - callback?: Callback - ): Promise; + editIssue( + opts: { + issueKey?: string | number; + issueId?: string | number; + notifyUsers?: boolean; + overrideScreenSecurity?: boolean; + overrideEditableFlag?: boolean; + issue?: { + [key: string]: any; + transition?: { + [key: string]: any; + id?: string | number; + }; + fields?: any; + update?: any; + historyMetadata?: HistoryMetadata, + properties: any[]; + } + }, + callback?: Callback + ): Promise; - addComment( - opts: { - [key: string]: any; - issueId?: string; - issueKey?: string; - expand?: string; - body?: string; - visibility?: { - [key: string]: any; - type?: string | 'role' | 'group'; - value?: string; - }; - properties?: any[]; - }, - callback?: Callback - ): Promise; + addComment( + opts: { + [key: string]: any; + issueId?: string; + issueKey?: string; + expand?: string; + body?: string; + visibility?: { + [key: string]: any; + type?: string | 'role' | 'group'; + value?: string; + }; + properties?: any[]; + }, + callback?: Callback + ): Promise; - deleteComment( - opts: { - issueId?: string | number; - issueKey?: string | number; - commentId: string | number; - }, - callback?: Callback - ): Promise; + deleteComment( + opts: { + issueId?: string | number; + issueKey?: string | number; + commentId: string | number; + }, + callback?: Callback + ): Promise; - getChangelog( - opts: { - issueId?: number | string, - issueKey?: number | string, - startAt?: number, - maxResults?: number - }, - callback?: Callback - ): Promise; + getChangelog( + opts: { + issueId?: number | string, + issueKey?: number | string, + startAt?: number, + maxResults?: number + }, + callback?: Callback + ): Promise; - addWorkLog( - opts: { - [key: string]: any, - issueId?: number | string, - issueKey?: number | string, - notifyUsers?: boolean, - adjustEstimate?: 'auto' | 'new' | 'manual' | 'leave', - newEstimate?: string, - reduceBy?: string, - expand?: string, - overrideEditableFlag?: boolean, - comment?: any, - visibility?: { - [key: string]: any, - type?: 'group' | 'role', - value?: string - }, - started?: string, - timeSpent?: string, - timeSpentSeconds?: number | string, - properties?: Array<{ - [key: string]: any - }> - }, - callback?: Callback - ): Promise; + addWorkLog( + opts: { + [key: string]: any, + issueId?: number | string, + issueKey?: number | string, + notifyUsers?: boolean, + adjustEstimate?: 'auto' | 'new' | 'manual' | 'leave', + newEstimate?: string, + reduceBy?: string, + expand?: string, + overrideEditableFlag?: boolean, + comment?: any, + visibility?: { + [key: string]: any, + type?: 'group' | 'role', + value?: string + }, + started?: string, + timeSpent?: string, + timeSpentSeconds?: number | string, + properties?: Array<{ + [key: string]: any + }> + }, + callback?: Callback + ): Promise; - getWorklog( - opts: { - issueId?: number | string, - issueKey?: number | string, - id: string, - expand?: string - }, - callback?: Callback - ): Promise; + getWorklog( + opts: { + issueId?: number | string, + issueKey?: number | string, + id: string, + expand?: string + }, + callback?: Callback + ): Promise; - updateWorklog( - opts: { - [key: string]: any, - issueId?: number | string, - issueKey?: number | string, - id: string, - notifyUsers?: boolean, - adjustEstimate?: 'auto' | 'new' | 'manual' | 'leave', - newEstimate?: string, - expand?: string, - overrideEditableFlag?: boolean, - comment?: any, - visibility?: { - [key: string]: any, - type?: 'group' | 'role', - value?: string - }, - started?: string, - timeSpent?: string, - timeSpentSeconds?: number | string, - properties?: Array<{ - [key: string]: any - }> - }, - callback?: Callback - ): Promise; + updateWorklog( + opts: { + [key: string]: any, + issueId?: number | string, + issueKey?: number | string, + id: string, + notifyUsers?: boolean, + adjustEstimate?: 'auto' | 'new' | 'manual' | 'leave', + newEstimate?: string, + expand?: string, + overrideEditableFlag?: boolean, + comment?: any, + visibility?: { + [key: string]: any, + type?: 'group' | 'role', + value?: string + }, + started?: string, + timeSpent?: string, + timeSpentSeconds?: number | string, + properties?: Array<{ + [key: string]: any + }> + }, + callback?: Callback + ): Promise; - deleteWorklog( - opts: { - issueId?: number | string, - issueKey?: number | string, - id: string, - notifyUsers?: boolean, - adjustEstimate?: string, - newEstimate?: string, - increaseBy?: string, - overrideEditableFlag?: boolean - }, - callback?: Callback - ): Promise; + deleteWorklog( + opts: { + issueId?: number | string, + issueKey?: number | string, + id: string, + notifyUsers?: boolean, + adjustEstimate?: string, + newEstimate?: string, + increaseBy?: string, + overrideEditableFlag?: boolean + }, + callback?: Callback + ): Promise; - addAttachment( - opts: { - filename: string | string[], - issueId?: string | number, - issueKey?: string | number, - headers?: { - 'X-Atlassian-Token'?: string, - charset?: string, - [key: string]: any - } - }, - callback?: Callback - ): Promise>; + addAttachment( + opts: { + filename: string | string[], + issueId?: string | number, + issueKey?: string | number, + headers?: { + 'X-Atlassian-Token'?: string, + charset?: string, + [key: string]: any + } + }, + callback?: Callback + ): Promise>; } diff --git a/types/api/issueType.d.ts b/types/api/issueType.d.ts index 0e142dce..89e4f58a 100644 --- a/types/api/issueType.d.ts +++ b/types/api/issueType.d.ts @@ -2,47 +2,47 @@ import { Callback } from 'types'; import { IssueType as IssueTypeModel } from 'types/models'; export class IssueType { - getAllIssueTypes( - opts?: {}, - callback?: Callback, - ): Promise; + getAllIssueTypes( + opts?: {}, + callback?: Callback, + ): Promise; - createIssueType( - opts: { - name: string; - description?: string; - type?: 'subtype' | 'standard'; - }, - callback?: Callback, - ): Promise; + createIssueType( + opts: { + name: string; + description?: string; + type?: 'subtype' | 'standard'; + }, + callback?: Callback, + ): Promise; - getIssueType( - opts: { issueTypeId: string }, - callback?: Callback, - ): Promise; + getIssueType( + opts: { issueTypeId: string }, + callback?: Callback, + ): Promise; - updateIssueType( - opts: { - issueTypeId: string; - issueType: Partial<{ - name: string; - description: string; - avatarId: string | number; - }>; - }, - callback?: Callback, - ): Promise; + updateIssueType( + opts: { + issueTypeId: string; + issueType: Partial<{ + name: string; + description: string; + avatarId: string | number; + }>; + }, + callback?: Callback, + ): Promise; - deleteIssueType( - opts: { - issueTypeId: string; - alternativeIssueTypeId?: string; - }, - callback?: Callback, - ): Promise; + deleteIssueType( + opts: { + issueTypeId: string; + alternativeIssueTypeId?: string; + }, + callback?: Callback, + ): Promise; - getAlternativeIssueTypes( - opts: { issueTypeId: string }, - callback?: Callback, - ): Promise; + getAlternativeIssueTypes( + opts: { issueTypeId: string }, + callback?: Callback, + ): Promise; } diff --git a/types/api/project.d.ts b/types/api/project.d.ts index 97cbc735..b87e3da0 100644 --- a/types/api/project.d.ts +++ b/types/api/project.d.ts @@ -2,70 +2,70 @@ import { Callback } from "types"; import { PageBeanVersion } from 'types/models'; export class Project { - getAllProjects( - opts?: { - expand?: string; - recent?: number; - properties?: string[]; - apiVersion?: string | number | 2 | 3; - }, - callback?: Callback - ): Promise; + getAllProjects( + opts?: { + expand?: string; + recent?: number; + properties?: string[]; + apiVersion?: string | number | 2 | 3; + }, + callback?: Callback + ): Promise; - updateProject( - opts: { - projectIdOrKey: string | number; - expand?: string; - key?: string; - name?: string; - projectTypeKey?: string; - projectTemplateKey?: string; - description?: string; - lead?: string; - leadAccountId?: string; - url?: string; - assigneeType?: string; - avatarId?: number; - issueSecurityScheme?: number; - permissionScheme?: number; - notificationScheme?: number; - categoryId?: number; - }, - callback?: Callback - ): Promise; + updateProject( + opts: { + projectIdOrKey: string | number; + expand?: string; + key?: string; + name?: string; + projectTypeKey?: string; + projectTemplateKey?: string; + description?: string; + lead?: string; + leadAccountId?: string; + url?: string; + assigneeType?: string; + avatarId?: number; + issueSecurityScheme?: number; + permissionScheme?: number; + notificationScheme?: number; + categoryId?: number; + }, + callback?: Callback + ): Promise; - deleteProject( - opts: { projectIdOrKey: string | number }, - callback?: Callback - ): Promise; + deleteProject( + opts: { projectIdOrKey: string | number }, + callback?: Callback + ): Promise; - createProject(opts?: any, callback?: Callback): Promise; + createProject(opts?: any, callback?: Callback): Promise; - getProjectProperties(opts: any, callback?: Callback): Promise; + getProjectProperties(opts: any, callback?: Callback): Promise; - getProject(opts: any, callback?: Callback): Promise; + getProject(opts: any, callback?: Callback): Promise; - getComponents(opts: any, callback?: Callback): Promise; + getComponents(opts: any, callback?: Callback): Promise; - getStatuses(opts: any, callback?: Callback): Promise; + getStatuses(opts: any, callback?: Callback): Promise; - getVersions(opts: any, callback?: Callback): Promise; + getVersions(opts: any, callback?: Callback): Promise; - getVersionsPaginated(opts: { - projectIdOrKey: string; - startAt?: number; - maxResults?: number; - orderBy?: string; - query?: string; - status?: string; - expand?: any[]; - }, callback?: Callback): Promise; + getVersionsPaginated(opts: { + projectIdOrKey: string; + startAt?: number; + maxResults?: number; + orderBy?: string; + query?: string; + status?: string; + expand?: any[]; + }, callback?: Callback): Promise; - getRoles(opts: any, callback?: Callback): Promise; + getRoles(opts: any, callback?: Callback): Promise; - getRole(opts: any, callback?: Callback): Promise; + getRole(opts: any, callback?: Callback): Promise; - updateRole(opts: any, callback?: Callback): Promise; + updateRole(opts: any, callback?: Callback): Promise; - addToRole(opts: any, callback?: Callback): Promise; + addToRole(opts: any, callback?: Callback): Promise; } diff --git a/types/api/search.d.ts b/types/api/search.d.ts index c14a7687..77f78c40 100644 --- a/types/api/search.d.ts +++ b/types/api/search.d.ts @@ -1,46 +1,46 @@ import { Callback } from "types"; export interface IssueResponse { - expand: string; - id: string; - self: string; - key: string; - renderedFields: any; - properties: any; - names: any; - schema: any; - transitions: any[]; - operations: any; - editmeta: any; - changelog: any; - versionedRepresentations: any; - fieldsToInclude: any; - fields: any; + expand: string; + id: string; + self: string; + key: string; + renderedFields: any; + properties: any; + names: any; + schema: any; + transitions: any[]; + operations: any; + editmeta: any; + changelog: any; + versionedRepresentations: any; + fieldsToInclude: any; + fields: any; } export interface SearchResult { - expand: string; - startAt: number; - maxResults: number; - total: number; - issues: IssueResponse[]; - warningMessages: string[]; - names: any; - schema: any; + expand: string; + startAt: number; + maxResults: number; + total: number; + issues: IssueResponse[]; + warningMessages: string[]; + names: any; + schema: any; } export class Search { - search( - opts: { - method?: 'GET' | 'POST' | 'get' | 'post' - jql?: string; - startAt?: number; - maxResults?: number; - validateQuery?: string | boolean | 'strict' | 'warn' | 'none' | 'true' | 'false'; - expand?: string[]; - properties?: string[]; - fieldsByKeys?: boolean; - }, - callback?: Callback - ): Promise; + search( + opts: { + method?: 'GET' | 'POST' | 'get' | 'post' + jql?: string; + startAt?: number; + maxResults?: number; + validateQuery?: string | boolean | 'strict' | 'warn' | 'none' | 'true' | 'false'; + expand?: string[]; + properties?: string[]; + fieldsByKeys?: boolean; + }, + callback?: Callback + ): Promise; } diff --git a/types/api/sprint.d.ts b/types/api/sprint.d.ts index b3a0414d..eed53881 100644 --- a/types/api/sprint.d.ts +++ b/types/api/sprint.d.ts @@ -4,70 +4,70 @@ import { Sprint as SprintModel } from 'types/models'; export type SprintId = string | number; export class Sprint { - createSprint( - sprint: Pick< - SprintModel, - | 'name' // - | 'startDate' - | 'endDate' - | 'originBoardId' - | 'goal' - >, - callback?: Callback - ): Promise; - getSprint( - opts: { - sprintId: SprintId; - filter?: number; - startAt?: number; - maxResults?: number; - }, - callback?: Callback - ): Promise; - updateSprint( - opts: { sprintId: SprintId } & Partial, - callback?: Callback - ): Promise; - partiallyUpdateSprint( - opts: { sprintId: SprintId } & Partial, - callback?: Callback - ): Promise; - deleteSprint( - opts: { - sprintId: SprintId; - filter?: number; - startAt?: number; - maxResults?: number; - }, - callback?: Callback - ): Promise; - getSprintIssues( - opts: { - sprintId: SprintId; - startAt?: number; - maxResults?: number; - jql?: string; - validateQuery?: boolean; - fields?: string[]; - expand?: string; - }, - callback?: Callback - ): Promise; - moveSprintIssues( - opts: { - sprintId: SprintId; - issues: string[]; - rankBeforeIssue?: string; - rankAfterIssue?: string; - rankCustomFieldId?: string; - }, - callback?: Callback - ): Promise; - swapSprint( - opts: { - sprintId: SprintId; - sprintToSwapWith: string; - }, - callback?: Callback - ): Promise; + createSprint( + sprint: Pick< + SprintModel, + | 'name' // + | 'startDate' + | 'endDate' + | 'originBoardId' + | 'goal' + >, + callback?: Callback + ): Promise; + getSprint( + opts: { + sprintId: SprintId; + filter?: number; + startAt?: number; + maxResults?: number; + }, + callback?: Callback + ): Promise; + updateSprint( + opts: { sprintId: SprintId } & Partial, + callback?: Callback + ): Promise; + partiallyUpdateSprint( + opts: { sprintId: SprintId } & Partial, + callback?: Callback + ): Promise; + deleteSprint( + opts: { + sprintId: SprintId; + filter?: number; + startAt?: number; + maxResults?: number; + }, + callback?: Callback + ): Promise; + getSprintIssues( + opts: { + sprintId: SprintId; + startAt?: number; + maxResults?: number; + jql?: string; + validateQuery?: boolean; + fields?: string[]; + expand?: string; + }, + callback?: Callback + ): Promise; + moveSprintIssues( + opts: { + sprintId: SprintId; + issues: string[]; + rankBeforeIssue?: string; + rankAfterIssue?: string; + rankCustomFieldId?: string; + }, + callback?: Callback + ): Promise; + swapSprint( + opts: { + sprintId: SprintId; + sprintToSwapWith: string; + }, + callback?: Callback + ): Promise; } diff --git a/types/api/user.d.ts b/types/api/user.d.ts index 9b8efb70..09789228 100644 --- a/types/api/user.d.ts +++ b/types/api/user.d.ts @@ -1,63 +1,63 @@ import { Callback } from "types"; export interface UserInfo { - self: string; - key: string; - accountId: string; - name: string; - emailAddress: string; - avatarUrls: AvatarUrls; - displayName: string; - active: boolean; - timeZone: string; - groups: ApplicationRoles; - applicationRoles: ApplicationRoles; + self: string; + key: string; + accountId: string; + name: string; + emailAddress: string; + avatarUrls: AvatarUrls; + displayName: string; + active: boolean; + timeZone: string; + groups: ApplicationRoles; + applicationRoles: ApplicationRoles; } export interface ApplicationRoles { - size: number; - items: any[]; + size: number; + items: any[]; } export interface AvatarUrls { - "48x48": string; - "24x24": string; - "16x16": string; - "32x32": string; + "48x48": string; + "24x24": string; + "16x16": string; + "32x32": string; } export class User { - getUser( - opts: { - accountId?: string; - username?: string; - userKey?: string; - expand?: string; - }, - callback?: Callback, - ): Promise; + getUser( + opts: { + accountId?: string; + username?: string; + userKey?: string; + expand?: string; + }, + callback?: Callback, + ): Promise; - deleteUser(opts: any, callback?: Callback): Promise; - createUser(opts: any, callback?: Callback): Promise; - editUser(opts: any, callback?: Callback): Promise; - multiProjectSearchAssignable(opts: any, callback?: Callback): Promise; - searchAssignable(opts: any, callback?: Callback): Promise; - createTemporaryAvatar(opts: any, callback?: Callback): Promise; - convertTemporaryAvatar(opts: any, callback?: Callback): Promise; - deleteAvatar(opts: any, callback?: Callback): Promise; - getAvatars(opts: any, callback?: Callback): Promise; - getDefaultColumns(opts: any, callback?: Callback): Promise; - setDefaultColumns(opts: any, callback?: Callback): Promise; - resetDefaultColumns(opts: any, callback?: Callback): Promise; - changePassword(opts: any, callback?: Callback): Promise; - searchPermissions(opts: any, callback?: Callback): Promise; - searchPicker(opts: any, callback?: Callback): Promise; - search(opts: any, callback?: Callback): Promise; + deleteUser(opts: any, callback?: Callback): Promise; + createUser(opts: any, callback?: Callback): Promise; + editUser(opts: any, callback?: Callback): Promise; + multiProjectSearchAssignable(opts: any, callback?: Callback): Promise; + searchAssignable(opts: any, callback?: Callback): Promise; + createTemporaryAvatar(opts: any, callback?: Callback): Promise; + convertTemporaryAvatar(opts: any, callback?: Callback): Promise; + deleteAvatar(opts: any, callback?: Callback): Promise; + getAvatars(opts: any, callback?: Callback): Promise; + getDefaultColumns(opts: any, callback?: Callback): Promise; + setDefaultColumns(opts: any, callback?: Callback): Promise; + resetDefaultColumns(opts: any, callback?: Callback): Promise; + changePassword(opts: any, callback?: Callback): Promise; + searchPermissions(opts: any, callback?: Callback): Promise; + searchPicker(opts: any, callback?: Callback): Promise; + search(opts: any, callback?: Callback): Promise; - all(opts: { - startAt?: number, - maxResults?: number - }, callback?: Callback): Promise; + all(opts: { + startAt?: number, + maxResults?: number + }, callback?: Callback): Promise; - viewIssueSearch(opts: any, callback?: Callback): Promise; + viewIssueSearch(opts: any, callback?: Callback): Promise; } diff --git a/types/config.d.ts b/types/config.d.ts index fe7da8fd..aebcb04f 100644 --- a/types/config.d.ts +++ b/types/config.d.ts @@ -9,17 +9,17 @@ export interface Config { strictSSL?: boolean; version?: string; basic_auth?: { - email?: string; - api_token?: string; - username?: string; - password?: string; - base64?: string; + email?: string; + api_token?: string; + username?: string; + password?: string; + base64?: string; }; oauth?: { - consumer_key: string; - private_key: string; - token: string; - token_secret: string; + consumer_key: string; + private_key: string; + token: string; + token_secret: string; }; cookie_jar?: any; promise?: PromiseLike; diff --git a/types/index.d.ts b/types/index.d.ts index 42ba0ec5..de8bc28e 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -2,19 +2,19 @@ import { Callback } from './callback'; import { Config } from './config'; import { CoreOptions } from 'request'; import { - ApplicationProperties, - Attachment, - Backlog, - Board, - Epic, - Issue, - IssueType, - Labels, - Project, - Search, - Sprint, - User, - Version, + ApplicationProperties, + Attachment, + Backlog, + Board, + Epic, + Issue, + IssueType, + Labels, + Project, + Search, + Sprint, + User, + Version, } from './api'; export * from './config'; @@ -22,69 +22,68 @@ export * from './callback'; export * from './models'; export default class JiraClient { - constructor(config: Config); + constructor(config: Config); + applicationProperties: ApplicationProperties; + attachment: Attachment; + auditing: any; + auth: any; + avatar: any; + backlog: Backlog; + board: Board; + comment: any; + component: any; + customFieldOption: any; + dashboard: any; + epic: Epic; + field: any; + filter: any; + group: any; + groupUserPicker: any; + groups: any; + issue: Issue; + issueLink: any; + issueLinkType: any; + issueType: IssueType; + jql: any; + labels: Labels; + licenseRole: any; + licenseValidator: any; + myPermissions: any; + myPreferences: any; + myself: any; + password: any; + permissions: any; + permissionScheme: any; + priority: any; + project: Project; + projectCategory: any; + projectValidate: any; + reindex: any; + resolution: any; + roles: any; + screens: any; + search: Search; + securityLevel: any; + serverInfo: any; + settings: any; + sprint: Sprint; + status: any; + statusCategory: any; + user: User; + version: Version; + webhook: any; + workflow: any; + workflowScheme: any; + worklog: any; - applicationProperties: ApplicationProperties; - attachment: Attachment; - auditing: any; - auth: any; - avatar: any; - backlog: Backlog; - board: Board; - comment: any; - component: any; - customFieldOption: any; - dashboard: any; - epic: Epic; - field: any; - filter: any; - group: any; - groupUserPicker: any; - groups: any; - issue: Issue; - issueLink: any; - issueLinkType: any; - issueType: IssueType; - jql: any; - labels: Labels; - licenseRole: any; - licenseValidator: any; - myPermissions: any; - myPreferences: any; - myself: any; - password: any; - permissions: any; - permissionScheme: any; - priority: any; - project: Project; - projectCategory: any; - projectValidate: any; - reindex: any; - resolution: any; - roles: any; - screens: any; - search: Search; - securityLevel: any; - serverInfo: any; - settings: any; - sprint: Sprint; - status: any; - statusCategory: any; - user: User; - version: Version; - webhook: any; - workflow: any; - workflowScheme: any; - worklog: any; + buildAgileURL(path: string, forcedVersion?: number | string): string; + buildAuthURL(path: string, forcedVersion?: number | string): string; + buildURL(path: string, forcedVersion?: number | string): string; + buildWebhookURL(path: string, forcedVersion?: number | string): string; + makeRequest(options: CoreOptions, callback?: Callback, successString?: string): Promise; - buildAgileURL(path: string, forcedVersion?: number | string): string; - buildAuthURL(path: string, forcedVersion?: number | string): string; - buildURL(path: string, forcedVersion?: number | string): string; - buildWebhookURL(path: string, forcedVersion?: number | string): string; - makeRequest(options: CoreOptions, callback?: Callback, successString?: string): Promise; - - static oauth_util: { - getAuthorizeURL(config: any, callback: any): any, - swapRequestTokenWithAccessToken(config: any, callback: any): void; - }; + static oauth_util: { + getAuthorizeURL(config: any, callback: any): any, + swapRequestTokenWithAccessToken(config: any, callback: any): void; + }; }