/*! * Copyright Adaptavist 2022 (c) All rights reserved */ import { TaskProgressBeanObjectAsResponse } from "../definitions/TaskProgressBeanObjectAsResponse"; import { ErrorStrategyOption } from "../errorStrategy"; import { HeadersOption } from "@managed-api/commons-core"; import { ProjectAsResponse } from "../definitions/ProjectAsResponse"; import { ProjectIdentifiersAsResponse } from "../definitions/ProjectIdentifiersAsResponse"; import { StringList } from "../definitions/StringList"; import { PageBeanProjectAsResponse } from "../definitions/PageBeanProjectAsResponse"; import { IssueTypeWithStatusAsResponse } from "../definitions/IssueTypeWithStatusAsResponse"; export interface DeleteProjectAsyncRequest extends HeadersOption, ErrorStrategyOption { /** * The project ID or project key (case sensitive). */ projectIdOrKey: string; } export declare type DeleteProjectAsyncResponseOK = undefined; declare type DeleteProjectAsyncResponseErrorType = TaskProgressBeanObjectAsResponse; export interface DeleteProjectAsyncResponseError extends DeleteProjectAsyncResponseErrorType { } export interface RestoreDeletedProjectRequest extends HeadersOption, ErrorStrategyOption { /** * The project ID or project key (case sensitive). */ projectIdOrKey: string; } declare type RestoreDeletedProjectResponseOKType = ProjectAsResponse; export interface RestoreDeletedProjectResponseOK extends RestoreDeletedProjectResponseOKType { } export declare type RestoreDeletedProjectResponseError = undefined; declare type AtLeastOne = Keys extends keyof T ? Required> & Partial> : never; declare type ProjectTypeParams = AtLeastOne<{ /** * The [project type](https://confluence.atlassian.com/x/GwiiLQ#Jiraapplicationsoverview-Productfeaturesandprojecttypes), which defines the application-specific feature set. If you don't specify the project template you have to specify the project type. */ projectTypeKey?: "software" | "service_desk" | "business"; /** * A predefined configuration for a project. The type of the `projectTemplateKey` must match with the type of the `projectTypeKey`. */ projectTemplateKey?: "com.pyxis.greenhopper.jira:gh-simplified-agility-kanban" | "com.pyxis.greenhopper.jira:gh-simplified-agility-scrum" | "com.pyxis.greenhopper.jira:gh-simplified-basic" | "com.pyxis.greenhopper.jira:gh-simplified-kanban-classic" | "com.pyxis.greenhopper.jira:gh-simplified-scrum-classic" | "com.atlassian.servicedesk:simplified-it-service-management" | "com.atlassian.servicedesk:simplified-general-service-desk" | "com.atlassian.servicedesk:simplified-internal-service-desk" | "com.atlassian.servicedesk:simplified-external-service-desk" | "com.atlassian.servicedesk:simplified-hr-service-desk" | "com.atlassian.servicedesk:simplified-facilities-service-desk" | "com.atlassian.servicedesk:simplified-legal-service-desk" | "com.atlassian.jira-core-project-templates:jira-core-simplified-content-management" | "com.atlassian.jira-core-project-templates:jira-core-simplified-document-approval" | "com.atlassian.jira-core-project-templates:jira-core-simplified-lead-tracking" | "com.atlassian.jira-core-project-templates:jira-core-simplified-process-control" | "com.atlassian.jira-core-project-templates:jira-core-simplified-procurement" | "com.atlassian.jira-core-project-templates:jira-core-simplified-project-management" | "com.atlassian.jira-core-project-templates:jira-core-simplified-recruitment" | "com.atlassian.jira-core-project-templates:jira-core-simplified-task-"; }>; export interface CreateProjectRequest extends HeadersOption, ErrorStrategyOption { body: ProjectTypeParams & { /** * Project keys must be unique and start with an uppercase letter followed by one or more uppercase alphanumeric characters. The maximum length is 10 characters. */ key: string; /** * The name of the project. */ name: string; /** * A brief description of the project. */ description?: string; /** * The account ID of the project lead. Either `lead` or `leadAccountId` must be set when creating a project. Cannot be provided with `lead`. */ leadAccountId: string; /** * A link to information about this project, such as project documentation */ url?: string; /** * The default assignee when creating issues for this project. */ assigneeType?: "PROJECT_LEAD" | "UNASSIGNED"; /** * An integer value for the project's avatar. */ avatarId?: number; /** * The ID of the issue security scheme for the project, which enables you to control who can and cannot view issues. Use the [Get issue security schemes](#api-rest-api-3-issuesecurityschemes-get) resource to get all issue security scheme IDs. */ issueSecurityScheme?: number; /** * The ID of the permission scheme for the project. Use the [Get all permission schemes](#api-rest-api-3-permissionscheme-get) resource to see a list of all permission scheme IDs. */ permissionScheme?: number; /** * The ID of the notification scheme for the project. Use the [Get notification schemes](#api-rest-api-3-notificationscheme-get) resource to get a list of notification scheme IDs. */ notificationScheme?: number; /** * The ID of the project's category. A complete list of category IDs is found using the [Get all project categories](#api-rest-api-3-projectCategory-get) operation. */ categoryId?: number; /** * The ID of the workflow scheme for the project. Use the [Get all workflow schemes](#api-rest-api-3-workflowscheme-get) operation to get a list of workflow scheme IDs. If you specify the workflow scheme you cannot specify the project template key. */ workflowScheme?: number; /** * The ID of the issue type screen scheme for the project. Use the [Get all issue type screen schemes](#api-rest-api-3-issuetypescreenscheme-get) operation to get a list of issue type screen scheme IDs. If you specify the issue type screen scheme you cannot specify the project template key. */ issueTypeScreenScheme?: number; /** * The ID of the issue type scheme for the project. Use the [Get all issue type schemes](#api-rest-api-3-issuetypescheme-get) operation to get a list of issue type scheme IDs. If you specify the issue type scheme you cannot specify the project template key. */ issueTypeScheme?: number; /** * The ID of the field configuration scheme for the project. Use the [Get all field configuration schemes](#api-rest-api-3-fieldconfigurationscheme-get) operation to get a list of field configuration scheme IDs. If you specify the field configuration scheme you cannot specify the project template key. */ fieldConfigurationScheme?: number; }; } declare type CreateProjectResponseOKType = ProjectIdentifiersAsResponse; export interface CreateProjectResponseOK extends CreateProjectResponseOKType { } export declare type CreateProjectResponseError = undefined; export interface GetProjectsRequest extends HeadersOption, ErrorStrategyOption { /** * 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. Must be less than or equal to 100. If a value greater than 100 is provided, the `maxResults` parameter will default to 100. */ maxResults?: number; /** * [Order](#ordering) the results by a field. * `category` Sorts by project category. A complete list of category IDs is found using [Get all project categories](#api-rest-api-3-projectCategory-get). * `issueCount` Sorts by the total number of issues in each project. * `key` Sorts by project key. * `lastIssueUpdatedTime` Sorts by the last issue update time. * `name` Sorts by project name. * `owner` Sorts by project lead. * `archivedDate` EXPERIMENTAL. Sorts by project archived date. * `deletedDate` EXPERIMENTAL. Sorts by project deleted date. */ orderBy?: "category" | "-category" | "+category" | "key" | "-key" | "+key" | "name" | "-name" | "+name" | "owner" | "-owner" | "+owner" | "issueCount" | "-issueCount" | "+issueCount" | "lastIssueUpdatedDate" | "-lastIssueUpdatedDate" | "+lastIssueUpdatedDate" | "archivedDate" | "+archivedDate" | "-archivedDate" | "deletedDate" | "+deletedDate" | "-deletedDate"; /** * The project IDs to filter the results by. To include multiple IDs, provide an ampersand-separated list. For example, `id=10000&id=10001`. Up to 50 project IDs can be provided. */ id?: Array; /** * The project keys to filter the results by. To include multiple keys, provide an ampersand-separated list. For example, `keys=PA&keys=PB`. Up to 50 project keys can be provided. */ keys?: Array; /** * Filter the results using a literal string. Projects with a matching `key` or `name` are returned (case insensitive). */ query?: string; /** * Orders results by the [project type](https://confluence.atlassian.com/x/GwiiLQ#Jiraapplicationsoverview-Productfeaturesandprojecttypes). This parameter accepts a comma-separated list. Valid values are `business`, `service_desk`, and `software`. */ typeKey?: string; /** * The ID of the project's category. A complete list of category IDs is found using the [Get all project categories](#api-rest-api-3-projectCategory-get) operation. */ categoryId?: number; /** * Filter results by projects for which the user can: * `view` the project, meaning that they have one of the following permissions: * *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * `browse` the project, meaning that they have the *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * `edit` the project, meaning that they have one of the following permissions: * *Administer projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project. * *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg). * `create` the project, meaning that they have the *Create issues* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project in which the issue is created. */ action?: "view" | "browse" | "edit" | "create"; /** * Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expanded options include: * `description` Returns the project description. * `projectKeys` Returns all project keys associated with a project. * `lead` Returns information about the project lead. * `issueTypes` Returns all issue types associated with the project. * `url` Returns the URL associated with the project. * `insight` EXPERIMENTAL. Returns the insight details of total issue count and last issue update time for the project. */ expand?: string; /** * EXPERIMENTAL. Filter results by project status: * `live` Search live projects. * `archived` Search archived projects. * `deleted` Search deleted projects, those in the recycle bin. */ status?: Array<"live" | "archived" | "deleted">; /** * EXPERIMENTAL. A list of project properties to return for the project. This parameter accepts a comma-separated list. */ properties?: Array; /** * EXPERIMENTAL. A query string used to search properties. The query string cannot be specified using a JSON object. For example, to search for the value of `nested` from `{"something":{"nested":1,"other":2}}` use `[thepropertykey].something.nested=1`. Note that the propertyQuery key is enclosed in square brackets to enable searching where the propertyQuery key includes dot (.) or equals (=) characters. Note that `thepropertykey` is only returned when included in `properties`. */ propertyQuery?: string; } declare type GetProjectsResponseOKType = PageBeanProjectAsResponse; export interface GetProjectsResponseOK extends GetProjectsResponseOKType { } export declare type GetProjectsResponseError = undefined; export interface GetProjectRequest extends HeadersOption, ErrorStrategyOption { /** * The project ID or project key (case sensitive). */ projectIdOrKey: string; /** * Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Note that the project description, issue types, and project lead are included in all responses by default. Expand options include: * `description` The project description. * `issueTypes` The issue types associated with the project. * `lead` The project lead. * `projectKeys` All project keys associated with the project. * `issueTypeHierarchy` The project issue type hierarchy. */ expand?: string; /** * A list of project properties to return for the project. This parameter accepts a comma-separated list. */ properties?: Array; } declare type GetProjectResponseOKType = ProjectAsResponse; export interface GetProjectResponseOK extends GetProjectResponseOKType { } export declare type GetProjectResponseError = undefined; export interface UpdateProjectRequest extends HeadersOption, ErrorStrategyOption { /** * The project ID or project key (case sensitive). */ projectIdOrKey: string; /** * Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Note that the project description, issue types, and project lead are included in all responses by default. Expand options include: * `description` The project description. * `issueTypes` The issue types associated with the project. * `lead` The project lead. * `projectKeys` All project keys associated with the project. */ expand?: string; body: { /** * Project keys must be unique and start with an uppercase letter followed by one or more uppercase alphanumeric characters. The maximum length is 10 characters. Required when creating a project. Optional when updating a project. */ key?: string; /** * The name of the project. Required when creating a project. Optional when updating a project. */ name?: string; /** * A brief description of the project. */ description?: string; /** * The account ID of the project lead. Either `lead` or `leadAccountId` must be set when creating a project. Optional when updating a project. Cannot be provided with `lead`. */ leadAccountId?: string; /** * A link to information about this project, such as project documentation */ url?: string; /** * The default assignee when creating issues for this project. */ assigneeType?: "PROJECT_LEAD" | "UNASSIGNED"; /** * An integer value for the project's avatar. */ avatarId?: number; /** * The ID of the issue security scheme for the project, which enables you to control who can and cannot view issues. Use the [Get issue security schemes](#api-rest-api-3-issuesecurityschemes-get) resource to get all issue security scheme IDs. */ issueSecurityScheme?: number; /** * The ID of the permission scheme for the project. Use the [Get all permission schemes](#api-rest-api-3-permissionscheme-get) resource to see a list of all permission scheme IDs. */ permissionScheme?: number; /** * The ID of the notification scheme for the project. Use the [Get notification schemes](#api-rest-api-3-notificationscheme-get) resource to get a list of notification scheme IDs. */ notificationScheme?: number; /** * The ID of the project's category. A complete list of category IDs is found using the [Get all project categories](#api-rest-api-3-projectCategory-get) operation. */ categoryId?: number; }; } declare type UpdateProjectResponseOKType = ProjectAsResponse; export interface UpdateProjectResponseOK extends UpdateProjectResponseOKType { } export declare type UpdateProjectResponseError = undefined; export interface DeleteProjectRequest extends HeadersOption, ErrorStrategyOption { /** * The project ID or project key (case sensitive). */ projectIdOrKey: string; /** * Whether this project is placed in the Jira recycle bin where it will be available for restoration. */ enableUndo?: boolean; } export declare type DeleteProjectResponseOK = undefined; export declare type DeleteProjectResponseError = undefined; export interface GetStatusesForProjectRequest extends HeadersOption, ErrorStrategyOption { /** * The project ID or project key (case sensitive). */ projectIdOrKey: string; } declare type GetStatusesForProjectResponseOKType = Array; export interface GetStatusesForProjectResponseOK extends GetStatusesForProjectResponseOKType { } export declare type GetStatusesForProjectResponseError = undefined; export {}; //# sourceMappingURL=project.d.ts.map