UNPKG

@narthia/jira-client

Version:

A TypeScript Jira API client with dual ESM/CJS support for Jira REST API and Atlassian Forge applications. Zero runtime dependencies.

1,390 lines (1,378 loc) 736 kB
import { ForgeAPI } from '@forge/api'; /** Announcement banner configuration. */ interface AnnouncementBannerConfiguration { /** Hash of the banner data. The client detects updates by comparing hash IDs. */ hashId?: string; /** Flag indicating if the announcement banner can be dismissed by the user. */ isDismissible?: boolean; /** Flag indicating if the announcement banner is enabled or not. */ isEnabled?: boolean; /** The text on the announcement banner. */ message?: string; /** Visibility of the announcement banner. */ visibility?: "PUBLIC" | "PRIVATE"; } /** Configuration of the announcement banner. */ interface AnnouncementBannerConfigurationUpdate { /** Flag indicating if the announcement banner can be dismissed by the user. */ isDismissible?: boolean; /** Flag indicating if the announcement banner is enabled or not. */ isEnabled?: boolean; /** The text on the announcement banner. */ message?: string; /** Visibility of the announcement banner. Can be public or private. */ visibility?: string; } /** Details about data policies for a list of projects. */ interface ProjectDataPolicies { /** List of projects with data policies. */ projectDataPolicies?: ProjectWithDataPolicy[]; } /** Details about data policy. */ interface ProjectDataPolicy { /** * Whether the project contains any content inaccessible to the requesting * application. */ anyContentBlocked?: boolean; } /** Details about data policies for a project. */ interface ProjectWithDataPolicy { /** Data policy. */ dataPolicy?: ProjectDataPolicy; /** The project ID. */ id?: number; } /** Details about data policy. */ interface WorkspaceDataPolicy { /** * Whether the workspace contains any content inaccessible to the requesting * application. */ anyContentBlocked?: boolean; } /** The details of the available dashboard gadget. */ interface AvailableDashboardGadget { /** The module key of the gadget type. */ moduleKey?: string; /** The title of the gadget. */ title: string; /** The URI of the gadget type. */ uri?: string; } /** The list of available gadgets. */ interface AvailableDashboardGadgetsResponse { /** The list of available gadgets. */ gadgets: AvailableDashboardGadget[]; } /** Details for changing owners of shareable entities */ interface BulkChangeOwnerDetails { /** Whether the name is fixed automatically if it's duplicated after changing owner. */ autofixName: boolean; /** The account id of the new owner. */ newOwner: string; } /** Errors of bulk edit action. */ interface BulkEditActionError { /** The error messages. */ errorMessages: string[]; /** The errors. */ errors: { [key: string]: string; }; } /** Details of a request to bulk edit shareable entity. */ interface BulkEditShareableEntityRequest { /** Allowed action for bulk edit shareable entity */ action: "changeOwner" | "changePermission" | "addPermission" | "removePermission"; /** The details of change owner action. */ changeOwnerDetails?: BulkChangeOwnerDetails; /** The id list of shareable entities to be changed. */ entityIds: number[]; /** * Whether the actions are executed by users with Administer Jira global * permission. */ extendAdminPermissions?: boolean; /** The permission details to be changed. */ permissionDetails?: PermissionDetails; } /** Details of a request to bulk edit shareable entity. */ interface BulkEditShareableEntityResponse { /** Allowed action for bulk edit shareable entity */ action: "changeOwner" | "changePermission" | "addPermission" | "removePermission"; /** The mapping dashboard id to errors if any. */ entityErrors?: { /** Errors of bulk edit action. */ [key: string]: BulkEditActionError; }; } /** Details of a dashboard. */ interface Dashboard { /** The automatic refresh interval for the dashboard in milliseconds. */ automaticRefreshMs?: number; description?: string; /** The details of any edit share permissions for the dashboard. */ editPermissions?: SharePermission[]; /** The ID of the dashboard. */ id?: string; /** Whether the dashboard is selected as a favorite by the user. */ isFavourite?: boolean; /** Whether the current user has permission to edit the dashboard. */ isWritable?: boolean; /** The name of the dashboard. */ name?: string; /** The owner of the dashboard. */ owner?: UserBean; /** The number of users who have this dashboard as a favorite. */ popularity?: number; /** The rank of this dashboard. */ rank?: number; /** The URL of these dashboard details. */ self?: string; /** The details of any view share permissions for the dashboard. */ sharePermissions?: SharePermission[]; /** Whether the current dashboard is system dashboard. */ systemDashboard?: boolean; /** The URL of the dashboard. */ view?: string; } /** Details of a dashboard. */ interface DashboardDetails { /** The description of the dashboard. */ description?: string; /** The edit permissions for the dashboard. */ editPermissions: SharePermission[]; /** The name of the dashboard. */ name: string; /** The share permissions for the dashboard. */ sharePermissions: SharePermission[]; } /** Details of a gadget. */ interface DashboardGadget { /** * The color of the gadget. Should be one of `blue`, `red`, `yellow`, `green`, * `cyan`, `purple`, `gray`, or `white`. */ color: "blue" | "red" | "yellow" | "green" | "cyan" | "purple" | "gray" | "white"; /** The ID of the gadget instance. */ id: number; /** The module key of the gadget type. */ moduleKey?: string; /** The position of the gadget. */ position: DashboardGadgetPosition; /** The title of the gadget. */ title: string; /** The URI of the gadget type. */ uri?: string; } /** Details of a gadget position. */ interface DashboardGadgetPosition { "The column position of the gadget.": number; "The row position of the gadget.": number; } /** The list of gadgets on the dashboard. */ interface DashboardGadgetResponse { /** The list of gadgets. */ gadgets: DashboardGadget[]; } /** Details of the settings for a dashboard gadget. */ interface DashboardGadgetSettings { /** * The color of the gadget. Should be one of `blue`, `red`, `yellow`, `green`, * `cyan`, `purple`, `gray`, or `white`. */ color?: string; /** * Whether to ignore the validation of module key and URI. For example, when a * gadget is created that is a part of an application that isn't installed. */ ignoreUriAndModuleKeyValidation?: boolean; /** The module key of the gadget type. Can't be provided with `uri`. */ moduleKey?: string; /** * The position of the gadget. When the gadget is placed into the position, other * gadgets in the same column are moved down to accommodate it. */ position?: DashboardGadgetPosition; /** The title of the gadget. */ title?: string; /** The URI of the gadget type. Can't be provided with `moduleKey`. */ uri?: string; } /** The details of the gadget to update. */ interface DashboardGadgetUpdateRequest { /** * The color of the gadget. Should be one of `blue`, `red`, `yellow`, `green`, * `cyan`, `purple`, `gray`, or `white`. */ color?: string; /** The position of the gadget. */ position?: DashboardGadgetPosition; /** The title of the gadget. */ title?: string; } /** The project issue type hierarchy. */ interface Hierarchy { /** * The ID of the base level. This property is deprecated, see [Change notice: * Removing hierarchy level IDs from next-gen * APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/). */ baseLevelId?: number; /** Details about the hierarchy level. */ levels?: SimplifiedHierarchyLevel[]; } /** A page of items. */ interface PageBeanDashboard { /** Whether this is the last page. */ isLast?: boolean; /** The maximum number of items that could be returned. */ maxResults?: number; /** If there is another page of results, the URL of the next page. */ nextPage?: string; /** The URL of the page. */ self?: string; /** The index of the first item returned. */ startAt?: number; /** The number of items returned. */ total?: number; /** The list of items. */ values?: Dashboard[]; } /** A page containing dashboard details. */ interface PageOfDashboards { /** List of dashboards. */ dashboards?: Dashboard[]; /** The maximum number of results that could be on the page. */ maxResults?: number; /** The URL of the next page of results, if any. */ next?: string; /** The URL of the previous page of results, if any. */ prev?: string; /** The index of the first item returned on the page. */ startAt?: number; /** The number of results on the page. */ total?: number; } /** Details for permissions of shareable entities */ interface PermissionDetails { /** The edit permissions for the shareable entities. */ editPermissions: SharePermission[]; /** The share permissions for the shareable entities. */ sharePermissions: SharePermission[]; } /** Additional details about a project. */ interface ProjectInsight { /** The last issue update time. */ lastIssueUpdateTime?: string; /** Total issue count. */ totalIssueCount?: number; } /** The project landing page info. */ interface ProjectLandingPageInfo { attributes?: { [key: string]: string; }; boardId?: number; boardName?: string; projectKey?: string; projectType?: string; queueCategory?: string; queueId?: number; queueName?: string; simpleBoard?: boolean; simplified?: boolean; url?: string; } /** Permissions which a user has on a project. */ interface ProjectPermissions { /** Whether the logged user can edit the project. */ canEdit?: boolean; } /** Details of the group associated with the role. */ interface ProjectRoleGroup { /** The display name of the group. */ displayName?: string; /** The ID of the group. */ groupId?: string; /** * The name of the group. As a group's name can change, use of `groupId` is * recommended to identify the group. */ name?: string; } /** Details of the user associated with the role. */ interface ProjectRoleUser { /** * The account ID of the user, which uniquely identifies the user across all * Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. Returns *unknown* * if the record is deleted and corrupted, for example, as the result of a server * import. */ accountId?: string; } /** Details about a user assigned to a project role. */ interface RoleActor { actorGroup?: ProjectRoleGroup; actorUser?: ProjectRoleUser; /** The avatar of the role actor. */ avatarUrl?: string; /** * The display name of the role actor. For users, depending on the user’s privacy * setting, this may return an alternative value for the user's name. */ displayName?: string; /** The ID of the role actor. */ id?: number; /** * This property is no longer available and will be removed from the documentation * soon. See the [deprecation * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) * for details. */ name?: string; /** The type of role actor. */ type?: "atlassian-group-role-actor" | "atlassian-user-role-actor"; } interface SimplifiedHierarchyLevel { /** * The ID of the level above this one in the hierarchy. This property is * deprecated, see [Change notice: Removing hierarchy level IDs from next-gen * APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/). */ aboveLevelId?: number; /** * The ID of the level below this one in the hierarchy. This property is * deprecated, see [Change notice: Removing hierarchy level IDs from next-gen * APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/). */ belowLevelId?: number; /** * The external UUID of the hierarchy level. This property is deprecated, see * [Change notice: Removing hierarchy level IDs from next-gen * APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/). */ externalUuid?: string; hierarchyLevelNumber?: number; /** * The ID of the hierarchy level. This property is deprecated, see [Change notice: * Removing hierarchy level IDs from next-gen * APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/). */ id?: number; /** The issue types available in this hierarchy level. */ issueTypeIds?: number[]; /** The level of this item in the hierarchy. */ level?: number; /** The name of this hierarchy level. */ name?: string; /** * The ID of the project configuration. This property is deprecated, see [Change * oticen: Removing hierarchy level IDs from next-gen * APIs](https://developer.atlassian.com/cloud/jira/platform/change-notice-removing-hierarchy-level-ids-from-next-gen-apis/). */ projectConfigurationId?: number; } /** * The user account ID that the filter is shared with. For a request, specify the * `accountId` property for the user. */ interface UserBean { /** * The account ID of the user, which uniquely identifies the user across all * Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. */ accountId?: string; /** Whether the user is active. */ active?: boolean; /** The avatars of the user. */ avatarUrls?: UserBeanAvatarUrls; /** * The display name of the user. Depending on the user’s privacy setting, this may * return an alternative value. */ displayName?: string; /** * This property is deprecated in favor of `accountId` because of privacy changes. * See the [migration * guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) * for details. * The key of the user. */ key?: string; /** * This property is deprecated in favor of `accountId` because of privacy changes. * See the [migration * guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) * for details. * The username of the user. */ name?: string; /** The URL of the user. */ self?: string; } /** The avatars of the user. */ interface UserBeanAvatarUrls { /** The URL of the user's 16x16 pixel avatar. */ "16x16"?: string; /** The URL of the user's 24x24 pixel avatar. */ "24x24"?: string; /** The URL of the user's 32x32 pixel avatar. */ "32x32"?: string; /** The URL of the user's 48x48 pixel avatar. */ "48x48"?: string; } /** Contains details about a version approver. */ interface VersionApprover extends Record<string, unknown> { /** The Atlassian account ID of the approver. */ accountId?: string; /** A description of why the user is declining the approval. */ declineReason?: string; /** A description of what the user is approving within the specified version. */ description?: string; /** The status of the approval, which can be *PENDING*, *APPROVED*, or *DECLINED* */ status?: string; } /** Counts of the number of issues in various statuses. */ interface VersionIssuesStatus extends Record<string, unknown> { /** Count of issues with status *done*. */ done?: number; /** Count of issues with status *in progress*. */ inProgress?: number; /** Count of issues with status *to do*. */ toDo?: number; /** Count of issues with a status other than *to do*, *in progress*, and *done*. */ unmapped?: number; } /** List of users and groups found in a search. */ interface FoundUsersAndGroups { /** * The list of groups found in a search, including header text (Showing X of Y * matching groups) and total of matched groups. */ groups?: FoundGroups; /** * The list of users found in a search, including header text (Showing X of Y * matching users) and total of matched users. */ users?: FoundUsers; } /** A user found in a search. */ interface UserPickerUser { /** * The account ID of the user, which uniquely identifies the user across all * Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. */ accountId?: string; /** * The user account type. Can take the following values: * * * `atlassian` regular Atlassian user account * * `app` system account used for Connect applications and OAuth to represent * external systems * * `customer` Jira Service Desk account representing an external service desk */ accountType?: "atlassian" | "app" | "customer" | "unknown"; /** The avatar URL of the user. */ avatarUrl?: string; /** * The display name of the user. Depending on the user’s privacy setting, this may * be returned as null. */ displayName?: string; /** * The display name, email address, and key of the user with the matched query * string highlighted with the HTML bold tag. */ html?: string; /** * This property is no longer available. See the [deprecation * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) * for details. */ key?: string; /** * This property is no longer available . See the [deprecation * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) * for details. */ name?: string; } interface AddGroupBean extends Record<string, unknown> { /** The name of the group. */ name: string; } /** A group found in a search. */ interface FoundGroup { /** Avatar url for the group/team if present. */ avatarUrl?: string; /** * The ID of the group, which uniquely identifies the group across all Atlassian * products. For example, *952d12c3-5b5b-4d04-bb32-44d383afc4b2*. */ groupId?: string; /** The group name with the matched query string highlighted with the HTML bold tag. */ html?: string; labels?: GroupLabel[]; /** * Describes who/how the team is managed. The possible values are * \* external - when team is synced from an external directory like SCIM or HRIS, * and team members cannot be modified. * \* admins - when a team is managed by an admin (team members can only be * modified by admins). * \* team-members - managed by existing team members, new members need to be * invited to join. * \* open - anyone can join or modify this team. */ managedBy?: "EXTERNAL" | "ADMINS" | "TEAM_MEMBERS" | "OPEN"; /** * The name of the group. The name of a group is mutable, to reliably identify a * group use ``groupId`.` */ name?: string; /** * Describes the type of group. The possible values are * \* team-collaboration - A platform team managed in people directory. * \* userbase-group - a group of users created in adminhub. * \* admin-oversight - currently unused. */ usageType?: "USERBASE_GROUP" | "TEAM_COLLABORATION" | "ADMIN_OVERSIGHT"; } interface Group { /** Expand options that include additional group details in the response. */ expand?: string; /** * The ID of the group, which uniquely identifies the group across all Atlassian * products. For example, *952d12c3-5b5b-4d04-bb32-44d383afc4b2*. */ groupId?: string | null; /** The name of group. */ name?: string; /** The URL for these group details. */ self?: string; /** * A paginated list of the users that are members of the group. A maximum of 50 * users is returned in the list, to access additional users append * `[start-index:end-index]` to the expand request. For example, to access the * next 50 users, use`?expand=users[51:100]`. */ users?: PagedListUserDetailsApplicationUser; } /** Details about a group. */ interface GroupDetails { /** * The ID of the group, which uniquely identifies the group across all Atlassian * products. For example, *952d12c3-5b5b-4d04-bb32-44d383afc4b2*. */ groupId?: string | null; /** The name of the group. */ name?: string; } /** A group label. */ interface GroupLabel { /** The group label name. */ text?: string; /** The title of the group label. */ title?: string; /** The type of the group label. */ type?: "ADMIN" | "SINGLE" | "MULTIPLE"; } /** A page of items. */ interface PageBeanGroupDetails { /** Whether this is the last page. */ isLast?: boolean; /** The maximum number of items that could be returned. */ maxResults?: number; /** If there is another page of results, the URL of the next page. */ nextPage?: string; /** The URL of the page. */ self?: string; /** The index of the first item returned. */ startAt?: number; /** The number of items returned. */ total?: number; /** The list of items. */ values?: GroupDetails[]; } /** A page of items. */ interface PageBeanUserDetails { /** Whether this is the last page. */ isLast?: boolean; /** The maximum number of items that could be returned. */ maxResults?: number; /** If there is another page of results, the URL of the next page. */ nextPage?: string; /** The URL of the page. */ self?: string; /** The index of the first item returned. */ startAt?: number; /** The number of items returned. */ total?: number; /** The list of items. */ values?: UserDetails[]; } /** * A paged list. To access additional details append `[start-index:end-index]` to * the expand request. For example, `?expand=sharedUsers[10:40]` returns a list * starting at item 10 and finishing at item 40. */ interface PagedListUserDetailsApplicationUser { /** The index of the last item returned on the page. */ "end-index"?: number; /** The list of items. */ items?: UserDetails[]; /** The maximum number of results that could be on the page. */ "max-results"?: number; /** The number of items on the page. */ size?: number; /** The index of the first item returned on the page. */ "start-index"?: number; } interface UpdateUserToGroupBean extends Record<string, unknown> { /** * The account ID of the user, which uniquely identifies the user across all * Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. */ accountId?: string; /** * This property is no longer available. See the [deprecation * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) * for details. */ name?: string; } /** Details about an attachment. */ interface Attachment extends Record<string, unknown> { /** Details of the user who added the attachment. */ author?: UserDetails; /** The content of the attachment. */ content?: string; /** The datetime the attachment was created. */ created?: string; /** The file name of the attachment. */ filename?: string; /** The ID of the attachment. */ id?: string; /** The MIME type of the attachment. */ mimeType?: string; /** The URL of the attachment details response. */ self?: string; /** The size of the attachment. */ size?: number; /** The URL of a thumbnail representing the attachment. */ thumbnail?: string; } interface AttachmentArchiveEntry { abbreviatedName?: string; entryIndex?: number; mediaType?: string; name?: string; size?: number; } interface AttachmentArchiveImpl { /** The list of the items included in the archive. */ entries?: AttachmentArchiveEntry[]; /** The number of items in the archive. */ totalEntryCount?: number; } /** Metadata for an item in an attachment archive. */ interface AttachmentArchiveItemReadable { /** The position of the item within the archive. */ index?: number; /** The label for the archive item. */ label?: string; /** The MIME type of the archive item. */ mediaType?: string; /** The path of the archive item. */ path?: string; /** The size of the archive item. */ size?: string; } /** Metadata for an archive (for example a zip) and its contents. */ interface AttachmentArchiveMetadataReadable { /** The list of the items included in the archive. */ entries?: AttachmentArchiveItemReadable[]; /** The ID of the attachment. */ id?: number; /** The MIME type of the attachment. */ mediaType?: string; /** The name of the archive file. */ name?: string; /** The number of items included in the archive. */ totalEntryCount?: number; } /** Metadata for an issue attachment. */ interface AttachmentMetadata { /** Details of the user who attached the file. */ author?: User; /** The URL of the attachment. */ content?: string; /** The datetime the attachment was created. */ created?: string; /** The name of the attachment file. */ filename?: string; /** The ID of the attachment. */ id?: number; /** The MIME type of the attachment. */ mimeType?: string; /** Additional properties of the attachment. */ properties?: { [key: string]: unknown; }; /** The URL of the attachment metadata details. */ self?: string; /** The size of the attachment. */ size?: number; /** The URL of a thumbnail representing the attachment. */ thumbnail?: string; } /** Details of the instance's attachment settings. */ interface AttachmentSettings { /** Whether the ability to add attachments is enabled. */ enabled?: boolean; /** The maximum size of attachments permitted, in bytes. */ uploadLimit?: number; } interface ListWrapperCallbackApplicationRole { } interface ListWrapperCallbackGroupName { } interface MultipartFile { bytes?: string[]; contentType?: string; empty?: boolean; inputStream?: { [key: string]: unknown; }; name?: string; originalFilename?: string; resource?: Resource; size?: number; } interface Resource { description?: string; file?: Blob | ReadableStream; filename?: string; inputStream?: { [key: string]: unknown; }; open?: boolean; readable?: boolean; uri?: string; url?: string; } /** The application roles the user is assigned to. */ interface SimpleListWrapperApplicationRole { callback?: ListWrapperCallbackApplicationRole; items?: ApplicationRole[]; "max-results"?: number; pagingCallback?: ListWrapperCallbackApplicationRole; size?: number; } /** The groups that the user belongs to. */ interface SimpleListWrapperGroupName { callback?: ListWrapperCallbackGroupName; items?: GroupName[]; "max-results"?: number; pagingCallback?: ListWrapperCallbackGroupName; size?: number; } /** Property key details. */ interface PropertyKey { /** The key of the property. */ key?: string; /** The URL of the property. */ self?: string; } /** Details of the options to create for a custom field. */ interface BulkCustomFieldOptionCreateRequest { /** Details of options to create. */ options?: CustomFieldOptionCreate[]; } /** Details of the options to update for a custom field. */ interface BulkCustomFieldOptionUpdateRequest { /** Details of the options to update. */ options?: CustomFieldOptionUpdate[]; } /** Details of the custom field options for a context. */ interface CustomFieldContextOption { /** Whether the option is disabled. */ disabled: boolean; /** The ID of the custom field option. */ id: string; /** * For cascading options, the ID of the custom field option containing the * cascading option. */ optionId?: string; /** The value of the custom field option. */ value: string; } /** A list of custom field options for a context. */ interface CustomFieldCreatedContextOptionsList { /** The created custom field options. */ options?: CustomFieldContextOption[]; } /** Details of a custom option for a field. */ interface CustomFieldOption { /** The URL of these custom field option details. */ self?: string; /** The value of the custom field option. */ value?: string; } /** Details of a custom field option to create. */ interface CustomFieldOptionCreate { /** Whether the option is disabled. */ disabled?: boolean; /** For cascading options, the ID of a parent option. */ optionId?: string; /** The value of the custom field option. */ value: string; } /** Details of a custom field option for a context. */ interface CustomFieldOptionUpdate { /** Whether the option is disabled. */ disabled?: boolean; /** The ID of the custom field option. */ id: string; /** The value of the custom field option. */ value?: string; } /** A list of custom field options for a context. */ interface CustomFieldUpdatedContextOptionsList { /** The updated custom field options. */ options?: CustomFieldOptionUpdate[]; } /** * An ordered list of custom field option IDs and information on where to move * them. */ interface OrderOfCustomFieldOptions { /** * The ID of the custom field option or cascading option to place the moved * options after. Required if `position` isn't provided. */ after?: string; /** * A list of IDs of custom field options to move. The order of the custom field * option IDs in the list is the order they are given after the move. The list * must contain custom field options or cascading options, but not both. */ customFieldOptionIds: string[]; /** * The position the custom field options should be moved to. Required if `after` * isn't provided. */ position?: "First" | "Last"; } /** A page of items. */ interface PageBeanCustomFieldContextOption { /** Whether this is the last page. */ isLast?: boolean; /** The maximum number of items that could be returned. */ maxResults?: number; /** If there is another page of results, the URL of the next page. */ nextPage?: string; /** The URL of the page. */ self?: string; /** The index of the first item returned. */ startAt?: number; /** The number of items returned. */ total?: number; /** The list of items. */ values?: CustomFieldContextOption[]; } /** The result of the task execution. */ interface RemoveOptionFromIssuesResult { /** * A collection of errors related to unchanged issues. The collection size is * limited, which means not all errors may be returned. */ errors?: SimpleErrorCollection; /** The IDs of the modified issues. */ modifiedIssues?: number[]; /** The IDs of the unchanged issues, those issues where errors prevent modification. */ unmodifiedIssues?: number[]; } /** * A collection of errors related to unchanged issues. The collection size is * limited, which means not all errors may be returned. */ interface SimpleErrorCollection { /** * The list of error messages produced by this operation. For example, "input * parameter 'key' must be provided" */ errorMessages?: string[]; /** * The list of errors by parameter returned by the operation. For * example,"projectKey": "Project keys must start with an uppercase letter, * followed by one or more uppercase alphanumeric characters." */ errors?: { [key: string]: string; }; httpStatusCode?: number; } /** Priority schemes associated with the issue priority. */ interface ExpandPrioritySchemePage extends Record<string, unknown> { maxResults?: number; startAt?: number; total?: number; } /** Key fields from the linked issue. */ interface IssueLinkFields { /** The assignee of the linked issue. */ assignee?: UserDetails; /** The type of the linked issue. */ issueType?: IssueTypeDetails; /** Details about an issue type. */ issuetype?: IssueTypeDetails; /** The priority of the linked issue. */ priority?: Priority; /** The status of the linked issue. */ status?: StatusDetails; /** The summary description of the linked issue. */ summary?: string; /** The time tracking of the linked issue. */ timetracking?: TimeTrackingDetails; } /** Details of a link between issues. */ interface IssueLink { /** The ID of the issue link. */ id?: string; /** * Provides details about the linked issue. If presenting this link in a user * interface, use the `inward` field of the issue link type to label the link. */ inwardIssue: LinkedIssue; /** * Provides details about the linked issue. If presenting this link in a user * interface, use the `outward` field of the issue link type to label the link. */ outwardIssue: LinkedIssue; /** The URL of the issue link. */ self?: string; /** The type of link between the issues. */ type: IssueLinkType; } /** The ID or key of a linked issue. */ interface LinkedIssue { /** The fields associated with the issue. */ fields?: IssueLinkFields; /** The ID of an issue. Required if `key` isn't provided. */ id?: string; /** The key of an issue. Required if `id` isn't provided. */ key?: string; /** The URL of the issue. */ self?: string; } interface LinkIssueRequestJsonBean { /** A comment. */ comment?: Comment; /** The ID or key of a linked issue. */ inwardIssue: LinkedIssue; /** The ID or key of a linked issue. */ outwardIssue: LinkedIssue; /** * This object is used as follows: * * * In the [ issueLink](#api-rest-api-3-issueLink-post) resource it defines and * reports on the type of link between the issues. Find a list of issue link types * with [Get issue link types](#api-rest-api-3-issueLinkType-get). * * In the [ issueLinkType](#api-rest-api-3-issueLinkType-post) resource it * defines and reports on issue link types. */ type: IssueLinkType; } /** Time tracking details. */ interface TimeTrackingDetails { /** The original estimate of time needed for this issue in readable format. */ originalEstimate?: string; /** The original estimate of time needed for this issue in seconds. */ originalEstimateSeconds?: number; /** The remaining estimate of time needed for this issue in readable format. */ remainingEstimate?: string; /** The remaining estimate of time needed for this issue in seconds. */ remainingEstimateSeconds?: number; /** Time worked on this issue in readable format. */ timeSpent?: string; /** Time worked on this issue in seconds. */ timeSpentSeconds?: number; } /** Details of notifications which should be added to the notification scheme. */ interface AddNotificationsDetails extends Record<string, unknown> { /** The list of notifications which should be added to the notification scheme. */ notificationSchemeEvents: NotificationSchemeEventDetails[]; } /** Details of an notification scheme. */ interface CreateNotificationSchemeDetails extends Record<string, unknown> { /** The description of the notification scheme. */ description?: string; /** The name of the notification scheme. Must be unique (case-insensitive). */ name: string; /** The list of notifications which should be added to the notification scheme. */ notificationSchemeEvents?: NotificationSchemeEventDetails[]; } /** Details about a notification associated with an event. */ interface EventNotification { /** The email address. */ emailAddress?: string; /** * Expand options that include additional event notification details in the * response. */ expand?: string; /** The custom user or group field. */ field?: FieldDetails; /** The specified group. */ group?: GroupName; /** The ID of the notification. */ id?: number; /** Identifies the recipients of the notification. */ notificationType?: "CurrentAssignee" | "Reporter" | "CurrentUser" | "ProjectLead" | "ComponentLead" | "User" | "Group" | "ProjectRole" | "EmailAddress" | "AllWatchers" | "UserCustomField" | "GroupCustomField"; /** * As a group's name can change, use of `recipient` is recommended. The identifier * associated with the `notificationType` value that defines the receiver of the * notification, where the receiver isn't implied by `notificationType` value. So, * when `notificationType` is: * * * `User` The `parameter` is the user account ID. * * `Group` The `parameter` is the group name. * * `ProjectRole` The `parameter` is the project role ID. * * `UserCustomField` The `parameter` is the ID of the custom field. * * `GroupCustomField` The `parameter` is the ID of the custom field. */ parameter?: string; /** The specified project role. */ projectRole?: ProjectRole; /** * The identifier associated with the `notificationType` value that defines the * receiver of the notification, where the receiver isn't implied by the * `notificationType` value. So, when `notificationType` is: * * * `User`, `recipient` is the user account ID. * * `Group`, `recipient` is the group ID. * * `ProjectRole`, `recipient` is the project role ID. * * `UserCustomField`, `recipient` is the ID of the custom field. * * `GroupCustomField`, `recipient` is the ID of the custom field. */ recipient?: string; /** The specified user. */ user?: UserDetails; } /** Details about a notification event. */ interface NotificationEvent { /** The description of the event. */ description?: string; /** * The ID of the event. The event can be a [Jira system * event](https://confluence.atlassian.com/x/8YdKLg#Creatinganotificationscheme-eventsEvents) * or a [custom event](https://confluence.atlassian.com/x/AIlKLg). */ id?: number; /** The name of the event. */ name?: string; /** * The template of the event. Only custom events configured by Jira administrators * have template. */ templateEvent?: NotificationEvent; } interface NotificationSchemeAndProjectMappingJsonBean { notificationSchemeId?: string; projectId?: string; } /** Details about a notification scheme event. */ interface NotificationSchemeEvent { /** Details about a notification event. */ event?: NotificationEvent; notifications?: EventNotification[]; } /** Details of a notification scheme event. */ interface NotificationSchemeEventDetails extends Record<string, unknown> { /** The ID of the event. */ event: NotificationSchemeEventTypeId; /** The list of notifications mapped to a specified event. */ notifications: NotificationSchemeNotificationDetails[]; } /** The ID of an event that is being mapped to notifications. */ interface NotificationSchemeEventTypeId extends Record<string, unknown> { /** The ID of the notification scheme event. */ id: string; } /** The ID of a notification scheme. */ interface NotificationSchemeId extends Record<string, unknown> { /** The ID of a notification scheme. */ id: string; } /** Details of a notification within a notification scheme. */ interface NotificationSchemeNotificationDetails extends Record<string, unknown> { /** The notification type, e.g `CurrentAssignee`, `Group`, `EmailAddress`. */ notificationType: string; /** The value corresponding to the specified notification type. */ parameter?: string; } /** A page of items. */ interface PageBeanNotificationScheme { /** Whether this is the last page. */ isLast?: boolean; /** The maximum number of items that could be returned. */ maxResults?: number; /** If there is another page of results, the URL of the next page. */ nextPage?: string; /** The URL of the page. */ self?: string; /** The index of the first item returned. */ startAt?: number; /** The number of items returned. */ total?: number; /** The list of items. */ values?: NotificationScheme[]; } /** A page of items. */ interface PageBeanNotificationSchemeAndProjectMappingJsonBean { /** Whether this is the last page. */ isLast?: boolean; /** The maximum number of items that could be returned. */ maxResults?: number; /** If there is another page of results, the URL of the next page. */ nextPage?: string; /** The URL of the page. */ self?: string; /** The index of the first item returned. */ startAt?: number; /** The number of items returned. */ total?: number; /** The list of items. */ values?: NotificationSchemeAndProjectMappingJsonBean[]; } /** Details of a notification scheme. */ interface UpdateNotificationSchemeDetails extends Record<string, unknown> { /** The description of the notification scheme. */ description?: string; /** The name of the notification scheme. Must be unique. */ name?: string; } /** Details of an issue type screen scheme. */ interface IssueTypeScreenScheme { /** The description of the issue type screen scheme. */ description?: string; /** The ID of the issue type screen scheme. */ id: string; /** The name of the issue type screen scheme. */ name: string; } /** The details of an issue type screen scheme. */ interface IssueTypeScreenSchemeDetails { /** * The description of the issue type screen scheme. The maximum length is 255 * characters. */ description?: string; /** * The IDs of the screen schemes for the issue type IDs and *default*. A *default* * entry is required to create an issue type screen scheme, it defines the mapping * for all issue types without a screen scheme. */ issueTypeMappings: IssueTypeScreenSchemeMapping[]; /** * The name of the issue type screen scheme. The name must be unique. The maximum * length is 255 characters. */ name: string; } /** The ID of an issue type screen scheme. */ interface IssueTypeScreenSchemeId { /** The ID of the issue type screen scheme. */ id: string; } /** The screen scheme for an issue type. */ interface IssueTypeScreenSchemeItem { /** * The ID of the issue type or *default*. Only issue types used in classic * projects are accepted. When creating an issue screen scheme, an entry for * *default* must be provided and defines the mapping for all issue types without * a screen scheme. Otherwise, a *default* entry can't be provided. */ issueTypeId: string; /** The ID of the issue type screen scheme. */ issueTypeScreenSchemeId: string; /** The ID of the screen scheme. */ screenSchemeId: string; } /** The IDs of the screen schemes for the issue type IDs. */ interface IssueTypeScreenSchemeMapping { /** * The ID of the issue type or *default*. Only issue types used in classic * projects are accepted. An entry for *default* must be provided and defines the * mapping for all issue types without a screen scheme. */ issueTypeId: string; /** * The ID of the screen scheme. Only screen schemes used in classic projects are * accepted. */ screenSchemeId: string; } /** A list of issue type screen scheme mappings. */ interface IssueTypeScreenSchemeMappingDetails { /** * The list of issue type to screen scheme mappings. A *default* entry cannot be * specified because a default entry is added when an issue type screen scheme is * created. */ issueTypeMappings: IssueTypeScreenSchemeMapping[]; } /** Associated issue type screen scheme and project. */ interface IssueTypeScreenSchemeProjectAssociation { /** The ID of the issue type screen scheme. */ issueTypeScreenSchemeId?: string; /** The ID of the project. */ projectId?: string; } /** Issue type screen scheme with a list of the projects that use it. */ interface IssueTypeScreenSchemesProjects { /** Details of an issue type screen scheme. */ issueTypeScreenScheme: IssueTypeScreenScheme; /** The IDs of the projects using the issue type screen scheme. */ projectIds: string[]; } /** Details of an issue type screen scheme. */ interface IssueTypeScreenSchemeUpdateDetails { /** * The description of the issue type screen scheme. The maximum length is 255 * characters. */ description?: string; /** * The name of the issue type screen scheme. The name must be unique. The maximum * length is 255 characters. */ name?: string; } /** A page of items. */ interface PageBeanIssueTypeScreenSchemeItem { /** Whether this is the last page. */ isLast?: boolean; /** The maximum number of items that could be returned. */ maxResults?: number; /** If there is another page of results, the URL of the next page. */ nextPage?: string; /** The URL of the page. */ self?: string; /** The index of the first item returned. */ startAt?: number; /** The number of items returned. */ total?: number; /** The list of items. */ values?: IssueTypeScreenSchemeItem[]; } /** A page of items. */ interface PageBeanIssueTypeScreenSchemesProjects { /** Whether this is the last page. */ isLast?: boolean; /** The maximum number of items that could be returned. */ maxResults?: number; /** If there is another page of results, the URL of the next page. */ nextPage?: string; /** The URL of the page. */ self?: string; /** The index of the first item returned. */ startAt?: number; /** The number of items returned. */ total?: number; /** The list of items. */ values?: IssueTypeScreenSchemesProjects[]; } /** The ID of a screen scheme. */ interface UpdateDefaultScreenScheme { /** The ID of the screen scheme. */ screenSchemeId: string; } /** Details of a changed worklog. */ interface ChangedWorklog { /** Details of properties associated with the change. */ properties?: EntityProperty[]; /** The datetime of the change. */ updatedTime?: number; /** The ID of the worklog. */ worklogId?: number; } /** List of changed worklogs. */ interface ChangedWorklogs { lastPage?: boolean; /** The URL of the next list of changed worklogs. */ nextPage?: string; /** The URL of this changed worklogs list. */ self?: string; /** The datetime of the first worklog item in the list. */ since?: number; /** The datetime of the last worklog item in the list. */ until?: number; /** Changed worklog list. */ values?: ChangedWorklog[]; } /** Paginated list of worklog details */ interface PageOfWorklogs extends Record<string, unknown> { /** The maximum number of results that could be on the page. */ maxResults?: number; /** The index of the first item returned on the page. */ startAt?: number; /** The number of results on the page. */ total?: number; /** List of worklogs. */ worklogs?: Worklog[]; } /** Details of a worklog. */ interface Worklog extends Record<string, unknown> { /** Details of the user who created the worklog. */ author?: UserDetails; /** * A comment about the worklog in [Atlassian Document * Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/). * Optional when creating or updating a worklog. */ comment?: unknown; /** The datetime on which the worklog was created. */ created?: string; /** The ID of the worklog record. */ id?: string; /** The ID of the issue this worklog is for. */ issueId?: string; /** * Details of properties for the worklog. Optional when creating or updating a * worklog. */ properties?: EntityProperty[]; /** The URL of the worklog item. */ self?: string; /** * The datetime on which the worklog effort was started. Required when creating a * worklog. Optional when updating a worklog. */ started?: string; /** * The time spent working on the issue as days (\#d), hours (\#h), or minutes (\#m * or \#). Required when creating a worklog if `timeSpentSeconds` isn't provided. * Optional when updating a worklog. Cannot be provided if `timeSpentSecond` is * provided. */ timeSpent?: string; /** * The time in seconds spent working on the issue. Required when creating a * worklog if `timeSpent` isn't provided. Optional when updating a worklog. Cannot * be provided if `timeSpent` is provided. */ timeSpentSeconds?: number; /** Details of the user who last updated the worklog. */ updateAuthor?: UserDetails; /** The datetime on which the worklog was last updated. */ updated?: string; /** * Details about any restrictions in the visibility of the worklog. Optional when * creating or updating a worklog. */ visibility?: Visibility; } interfac