/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { ErrorStrategyOption } from "../errorStrategy"; import { HeadersOption } from "@managed-api/commons-core"; import { IssueFieldsCreate } from "../definitions/IssueFields"; import { HistoryMetadata } from "../definitions/HistoryMetadata"; import { FieldUpdateOperation } from "../definitions/FieldUpdateOperation"; import { CreatedIssueAsResponse } from "../definitions/CreatedIssueAsResponse"; import { ErrorCollectionAsResponse } from "../definitions/ErrorCollectionAsResponse"; import { CreatedIssuesAsResponse } from "../definitions/CreatedIssuesAsResponse"; import { IssueBeanAsResponse } from "../definitions/IssueBeanAsResponse"; import { IssueFieldsUpdate } from "../definitions/IssueFields"; import { PageBeanChangelogAsResponse } from "../definitions/PageBeanChangelogAsResponse"; import { IssueChangelogIds } from "../definitions/IssueChangelogIds"; import { PageOfChangelogsAsResponse } from "../definitions/PageOfChangelogsAsResponse"; import { Notification } from "../definitions/Notification"; interface CreateIssueBody { /** * Details of a transition. Required when performing a transition, optional when creating or editing an issue. */ transition?: { /** * The ID of the issue transition. Required when specifying a transition to undertake. */ id: string; }; /** * List of issue screen fields to update, specifying the sub-field to update and its value for each field. This field provides a straightforward option when setting a sub-field. When multiple sub-fields or other operations are required, use `update`. Fields included in here cannot be included in `update`. */ fields?: IssueFieldsCreate; /** * List of operations to perform on issue screen fields. Note that fields included in here cannot be included in `fields`. */ update?: { [x: string]: Array; }; /** * Additional issue history details. */ historyMetadata?: HistoryMetadata; /** * Details of issue properties to be add or update. */ properties?: { /** * The key of the property. */ key: string; /** * The value of the property. */ value: any; }[]; [x: string]: any; } export interface CreateIssueRequest extends HeadersOption, ErrorStrategyOption { /** * Whether the project in which the issue is created is added to the user's **Recently viewed** project list, as shown under **Projects** in Jira. */ updateHistory?: boolean; body: CreateIssueBody; } export interface CreateIssueResponseOK extends CreatedIssueAsResponse { } export declare type CreateIssueResponseError = ErrorCollectionAsResponse; export interface CreateIssuesRequest extends HeadersOption, ErrorStrategyOption { body: { issueUpdates: CreateIssueBody[]; [x: string]: any; }; } export interface CreateIssuesResponseOK extends CreatedIssuesAsResponse { } export declare type CreateIssuesResponseError = CreatedIssuesAsResponse | undefined; export interface GetIssueRequest extends HeadersOption, ErrorStrategyOption { /** * The ID or key of the issue. */ issueIdOrKey: string; /** * A list of fields to return for the issue. This parameter accepts a comma-separated list. Use it to retrieve a subset of fields. Allowed values: * `*all` Returns all fields. * `*navigable` Returns navigable fields. * Any issue field, prefixed with a minus to exclude. Examples: * `summary,comment` Returns only the summary and comments fields. * `-description` Returns all (default) fields except description. * `*navigable,-comment` Returns all navigable fields except comment. This parameter may be specified multiple times. For example, `fields=field1,field2& fields=field3`. Note: All fields are returned by default. This differs from [Search for issues using JQL (GET)](#api-rest-api-3-search-get) and [Search for issues using JQL (POST)](#api-rest-api-3-search-post) where the default is all navigable fields. */ fields?: Array; /** * Whether fields in `fields` are referenced by keys rather than IDs. This parameter is useful where fields have been added by a connect app and a field's key may differ from its ID. */ fieldsByKeys?: boolean; /** * Use [expand](#expansion) to include additional information about the issues in the response. This parameter accepts a comma-separated list. Expand options include: * `renderedFields` Returns field values rendered in HTML format. * `names` Returns the display name of each field. * `schema` Returns the schema describing a field type. * `transitions` Returns all possible transitions for the issue. * `editmeta` Returns information about how each field can be edited. * `changelog` Returns a list of recent updates to an issue, sorted by date, starting from the most recent. * `versionedRepresentations` Returns a JSON array for each version of a field's value, with the highest number representing the most recent version. Note: When included in the request, the `fields` parameter is ignored. */ expand?: string; /** * A list of issue properties to return for the issue. This parameter accepts a comma-separated list. Allowed values: * `*all` Returns all issue properties. * Any issue property key, prefixed with a minus to exclude. Examples: * `*all` Returns all properties. * `*all,-prop1` Returns all properties except `prop1`. * `prop1,prop2` Returns `prop1` and `prop2` properties. This parameter may be specified multiple times. For example, `properties=prop1,prop2& properties=prop3`. */ properties?: Array; /** * Whether the project in which the issue is created is added to the user's **Recently viewed** project list, as shown under **Projects** in Jira. This also populates the [JQL issues search](#api-rest-api-3-search-get) `lastViewed` field. */ updateHistory?: boolean; /** * Whether to fail the request quickly in case of an error while loading fields for an issue. For `failFast=true`, if one field fails, the entire operation fails. For `failFast=false`, the operation will continue even if a field fails. It will return a valid response, but without values for the failed field(s). */ failFast?: boolean; } declare type GetIssueResponseOKType = IssueBeanAsResponse; export interface GetIssueResponseOK extends GetIssueResponseOKType { } declare type GetIssueResponseErrorType = ErrorCollectionAsResponse; export interface GetIssueResponseError extends GetIssueResponseErrorType { } export interface EditIssueRequest extends HeadersOption, ErrorStrategyOption { /** * The ID or key of the issue. */ issueIdOrKey: string; /** * Whether a notification email about the issue update is sent to all watchers. To disable the notification, administer Jira or administer project permissions are required. If the user doesn't have the necessary permission the request is ignored. */ notifyUsers?: boolean; /** * Whether screen security should be overridden to enable hidden fields to be edited. Available to Connect app users with admin permissions. */ overrideScreenSecurity?: boolean; /** * Whether screen security should be overridden to enable uneditable fields to be edited. Available to Connect app users with admin permissions. */ overrideEditableFlag?: boolean; /** * Whether the response should contain the issue with fields edited in this request. The returned issue will have the same format as in the Get issue API. */ returnIssue?: boolean; /** * The Get issue API expand parameter to use in the response if the returnIssue parameter is true. */ expand?: string; body: { /** * Details of a transition. Required when performing a transition, optional when creating or editing an issue. */ transition?: { /** * The ID of the issue transition. Required when specifying a transition to undertake. */ id: string; }; /** * List of issue screen fields to update, specifying the sub-field to update and its value for each field. This field provides a straightforward option when setting a sub-field. When multiple sub-fields or other operations are required, use `update`. Fields included in here cannot be included in `update`. */ fields?: IssueFieldsUpdate; /** * List of operations to perform on issue screen fields. Note that fields included in here cannot be included in `fields`. */ update?: { [x: string]: Array; }; /** * Additional issue history details. */ historyMetadata?: HistoryMetadata; /** * Details of issue properties to be add or update. */ properties?: { /** * The key of the property. */ key: string; /** * The value of the property. */ value: any; }[]; [x: string]: any; }; } export declare type EditIssueResponseOK = Omit | undefined; export declare type EditIssueResponseError = undefined; export interface DeleteIssueRequest extends HeadersOption, ErrorStrategyOption { /** * The ID or key of the issue. */ issueIdOrKey: string; /** * Whether the issue's subtasks are deleted when the issue is deleted. */ deleteSubtasks?: "true" | "false"; } export declare type DeleteIssueResponseOK = undefined; export declare type DeleteIssueResponseError = undefined; export interface AssignIssueRequest extends HeadersOption, ErrorStrategyOption { /** * The ID or key of the issue to be assigned. */ issueIdOrKey: string; body: { /** * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. Required in requests. */ accountId: string; }; } export declare type AssignIssueResponseOK = any; export declare type AssignIssueResponseError = undefined; export interface GetIssueChangeLogsRequest extends HeadersOption, ErrorStrategyOption { /** * The ID or key of the issue. */ issueIdOrKey: string; /** * The index of the first item to return in a page of results (page offset). */ startAt?: number; /** * The maximum number of items to return per page. */ maxResults?: number; } declare type GetIssueChangeLogsResponseOKType = PageBeanChangelogAsResponse; export interface GetIssueChangeLogsResponseOK extends GetIssueChangeLogsResponseOKType { } export declare type GetIssueChangeLogsResponseError = undefined; export interface GetIssueChangeLogsByIdRequest extends HeadersOption, ErrorStrategyOption { /** * The ID or key of the issue. */ issueIdOrKey: string; body: IssueChangelogIds; } declare type GetIssueChangeLogsByIdResponseOKType = PageOfChangelogsAsResponse; export interface GetIssueChangeLogsByIdResponseOK extends GetIssueChangeLogsByIdResponseOKType { } export declare type GetIssueChangeLogsByIdResponseError = undefined; export interface SendNotificationForIssueRequest extends HeadersOption, ErrorStrategyOption { /** * ID or key of the issue that the notification is sent for. */ issueIdOrKey: string; body: Notification; } export declare type SendNotificationForIssueResponseOK = any; export declare type SendNotificationForIssueResponseError = undefined; export {}; //# sourceMappingURL=issue.d.ts.map