import { StatusDetailsAsResponse } from "../definitions/StatusDetailsAsResponse"; import { HeadersOption, ConnectionOption } from "@avst-api/commons"; import { AssistedErrorStrategyOption } from "../handled-api/common"; import { ErrorStrategyOption } from "../handled-api/common"; import { StatusCategoryAsResponse } from "../definitions/StatusCategoryAsResponse"; import { PageBeanWorkflowSchemeAsResponse } from "../definitions/PageBeanWorkflowSchemeAsResponse"; import { WorkflowSchemeAsResponse } from "../definitions/WorkflowSchemeAsResponse"; import { WorkflowScheme } from "../definitions/WorkflowScheme"; import { IssueTypeWorkflowMappingAsResponse } from "../definitions/IssueTypeWorkflowMappingAsResponse"; import { IssueTypeWorkflowMapping } from "../definitions/IssueTypeWorkflowMapping"; import { IssueTypesWorkflowMappingAsResponse } from "../definitions/IssueTypesWorkflowMappingAsResponse"; import { IssueTypesWorkflowMapping } from "../definitions/IssueTypesWorkflowMapping"; import { ContainerOfWorkflowSchemeAssociationsAsResponse } from "../definitions/ContainerOfWorkflowSchemeAssociationsAsResponse"; import { WorkflowSchemeProjectAssociation } from "../definitions/WorkflowSchemeProjectAssociation"; import { DefaultWorkflowAsResponse } from "../definitions/DefaultWorkflowAsResponse"; import { DefaultWorkflow } from "../definitions/DefaultWorkflow"; import { WorkflowTransitionProperty } from "../definitions/WorkflowTransitionProperty"; import { WorkflowTransitionPropertyAsResponse } from "../definitions/WorkflowTransitionPropertyAsResponse"; import { PageBeanWorkflowAsResponse } from "../definitions/PageBeanWorkflowAsResponse"; import { ErrorCollectionAsResponse } from "../definitions/ErrorCollectionAsResponse"; export declare namespace Workflow { namespace Status { namespace GetStatuses { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = Array; type Error = undefined; } namespace Options { interface Base { } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace GetStatus { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = StatusDetailsAsResponse; type Error = undefined; } namespace Options { interface Base { /** * The ID or name of the status. */ idOrName: string; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace Category { namespace GetCategories { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = Array; type Error = undefined; } namespace Options { interface Base { } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace GetCategory { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = StatusCategoryAsResponse; type Error = undefined; } namespace Options { interface Base { /** * The ID or key of the status category. */ idOrKey: string; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } } } namespace Scheme { namespace GetSchemes { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = PageBeanWorkflowSchemeAsResponse; type Error = undefined; } namespace Options { interface Base { /** * 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; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace CreateScheme { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } type Body = { /** * The name of the workflow scheme. The name must be unique. The maximum length is 255 characters. Required when creating a workflow scheme. */ name: string; /** * The description of the workflow scheme. */ description?: string; /** * The name of the default workflow for the workflow scheme. The default workflow has *All Unassigned Issue Types* assigned to it in Jira. If `defaultWorkflow` is not specified when creating a workflow scheme, it is set to *Jira Workflow (jira)*. */ defaultWorkflow?: string; /** * The issue type to workflow mappings, where each mapping is an issue type ID and workflow name pair. Note that an issue type can only be mapped to one workflow in a workflow scheme. */ issueTypeMappings?: { [x: string]: string; }; /** * Whether to create or update a draft workflow scheme when updating an active workflow scheme. An active workflow scheme is a workflow scheme that is used by at least one project. The following examples show how this property works: * Update an active workflow scheme with `updateDraftIfNeeded` set to `true`: If a draft workflow scheme exists, it is updated. Otherwise, a draft workflow scheme is created. * Update an active workflow scheme with `updateDraftIfNeeded` set to `false`: An error is returned, as active workflow schemes cannot be updated. * Update an inactive workflow scheme with `updateDraftIfNeeded` set to `true`: The workflow scheme is updated, as inactive workflow schemes do not require drafts to update. Defaults to `false`. */ updateDraftIfNeeded?: boolean; }; namespace Response { type OK = WorkflowSchemeAsResponse; type Error = undefined; } namespace Options { interface Base { body: Workflow.Scheme.CreateScheme.Body; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace GetScheme { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = WorkflowSchemeAsResponse; type Error = undefined; } namespace Options { interface Base { /** * The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. */ id: number; /** * Returns the workflow scheme's draft rather than scheme itself, if set to true. If the workflow scheme does not have a draft, then the workflow scheme is returned. */ returnDraftIfExists?: boolean; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace UpdateScheme { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } type Body = WorkflowScheme; namespace Response { type OK = WorkflowSchemeAsResponse; type Error = undefined; } namespace Options { interface Base { /** * The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. */ id: number; body: Workflow.Scheme.UpdateScheme.Body; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace DeleteScheme { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = undefined; type Error = undefined; } namespace Options { interface Base { /** * The ID of the workflow scheme. Find this ID by editing the desired workflow scheme in Jira. The ID is shown in the URL as `schemeId`. For example, *schemeId=10301*. */ id: number; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace GetWorkflowForIssueType { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = IssueTypeWorkflowMappingAsResponse; type Error = undefined; } namespace Options { interface Base { /** * The ID of the workflow scheme. */ id: number; /** * The ID of the issue type. */ issueType: string; /** * Returns the mapping from the workflow scheme's draft rather than the workflow scheme, if set to true. If no draft exists, the mapping from the workflow scheme is returned. */ returnDraftIfExists?: boolean; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace SetWorkflowForIssueType { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } type Body = IssueTypeWorkflowMapping; namespace Response { type OK = WorkflowSchemeAsResponse; type Error = undefined; } namespace Options { interface Base { /** * The ID of the workflow scheme. */ id: number; /** * The ID of the issue type. */ issueType: string; body: Workflow.Scheme.SetWorkflowForIssueType.Body; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace DeleteWorkflowForIssueType { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = WorkflowSchemeAsResponse; type Error = undefined; } namespace Options { interface Base { /** * The ID of the workflow scheme. */ id: number; /** * The ID of the issue type. */ issueType: string; /** * Set to true to create or update the draft of a workflow scheme and update the mapping in the draft, when the workflow scheme cannot be edited. Defaults to `false`. */ updateDraftIfNeeded?: boolean; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace GetIssueTypesForWorkflow { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = Array; type Error = undefined; } namespace Options { interface Base { /** * The ID of the workflow scheme. */ id: number; /** * The name of a workflow in the scheme. Limits the results to the workflow-issue type mapping for the specified workflow. */ workflowName?: string; /** * Returns the mapping from the workflow scheme's draft rather than the workflow scheme, if set to true. If no draft exists, the mapping from the workflow scheme is returned. */ returnDraftIfExists?: boolean; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace SetIssueTypesForWorkflow { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } type Body = IssueTypesWorkflowMapping; namespace Response { type OK = WorkflowSchemeAsResponse; type Error = undefined; } namespace Options { interface Base { /** * The ID of the workflow scheme. */ id: number; /** * The name of the workflow. */ workflowName: string; body: Workflow.Scheme.SetIssueTypesForWorkflow.Body; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace DeleteIssueTypesForWorkflow { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = undefined; type Error = undefined; } namespace Options { interface Base { /** * The ID of the workflow scheme. */ id: number; /** * The name of the workflow. */ workflowName: string; /** * Set to true to create or update the draft of a workflow scheme and delete the mapping from the draft, when the workflow scheme cannot be edited. Defaults to `false`. */ updateDraftIfNeeded?: boolean; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace Project { namespace GetProjectAssociations { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = ContainerOfWorkflowSchemeAssociationsAsResponse; type Error = undefined; } namespace Options { interface Base { /** * The ID of a project to return the workflow schemes for. To include multiple projects, provide an ampersand-Jim: oneseparated list. For example, `projectId=10000&projectId=10001`. */ projectId: Array; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace AssignWorkflow { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } type Body = WorkflowSchemeProjectAssociation; namespace Response { type OK = any; type Error = undefined; } namespace Options { interface Base { body: Workflow.Scheme.Project.AssignWorkflow.Body; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } } namespace GetDefaultWorkflow { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = DefaultWorkflowAsResponse; type Error = undefined; } namespace Options { interface Base { /** * The ID of the workflow scheme. */ id: number; /** * Set to `true` to return the default workflow for the workflow scheme's draft rather than scheme itself. If the workflow scheme does not have a draft, then the default workflow for the workflow scheme is returned. */ returnDraftIfExists?: boolean; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace UpdateDefaultWorkflow { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } type Body = DefaultWorkflow; namespace Response { type OK = WorkflowSchemeAsResponse; type Error = undefined; } namespace Options { interface Base { /** * The ID of the workflow scheme. */ id: number; body: Workflow.Scheme.UpdateDefaultWorkflow.Body; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace DeleteDefaultWorkflow { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = WorkflowSchemeAsResponse; type Error = undefined; } namespace Options { interface Base { /** * The ID of the workflow scheme. */ id: number; /** * Set to true to create or update the draft of a workflow scheme and delete the mapping from the draft, when the workflow scheme cannot be edited. Defaults to `false`. */ updateDraftIfNeeded?: boolean; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } } namespace Transition { namespace Property { namespace UpdateProperty { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } type Body = WorkflowTransitionProperty; namespace Response { type OK = WorkflowTransitionPropertyAsResponse; type Error = undefined; } namespace Options { interface Base { /** * The ID of the transition. To get the ID, view the workflow in text mode in the Jira admin settings. The ID is shown next to the transition. */ transitionId: number; /** * The key of the property being updated, also known as the name of the property. Set this to the same value as the `key` defined in the request body. */ key: string; /** * The name of the workflow that the transition belongs to. */ workflowName: string; /** * The workflow status. Set to `live` for inactive workflows or `draft` for draft workflows. Active workflows cannot be edited. */ workflowMode?: "live" | "draft"; body: Workflow.Transition.Property.UpdateProperty.Body; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace CreateProperty { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } type Body = WorkflowTransitionProperty; namespace Response { type OK = WorkflowTransitionPropertyAsResponse; type Error = undefined; } namespace Options { interface Base { /** * The ID of the transition. To get the ID, view the workflow in text mode in the Jira admin settings. The ID is shown next to the transition. */ transitionId: number; /** * The key of the property being added, also known as the name of the property. Set this to the same value as the `key` defined in the request body. */ key: string; /** * The name of the workflow that the transition belongs to. */ workflowName: string; /** * The workflow status. Set to *live* for inactive workflows or *draft* for draft workflows. Active workflows cannot be edited. */ workflowMode?: "live" | "draft"; body: Workflow.Transition.Property.CreateProperty.Body; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } namespace DeleteProperty { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = undefined; type Error = undefined; } namespace Options { interface Base { /** * The ID of the transition. To get the ID, view the workflow in text mode in the Jira admin settings. The ID is shown next to the transition. */ transitionId: number; /** * The name of the transition property to delete, also known as the name of the property. */ key: string; /** * The name of the workflow that the transition belongs to. */ workflowName: string; /** * The workflow status. Set to `live` for inactive workflows or `draft` for draft workflows. Active workflows cannot be edited. */ workflowMode?: "live" | "draft"; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } } } namespace GetWorkflows { interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption { } namespace Response { type OK = PageBeanWorkflowAsResponse; type Error = ErrorCollectionAsResponse | undefined; } namespace Options { interface Base { /** * 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; /** * The name of a workflow to return. To include multiple workflows, provide an ampersand-separated list. For example, `workflowName=name1&workflowName=name2`. */ workflowName?: Array; /** * Use [expand](#expansion) to include additional information in the response. This parameter accepts a comma-separated list. Expand options include: * `transitions` For each workflow, returns information about the transitions inside the workflow. * `transitions.rules` For each workflow transition, returns information about its rules. Transitions are included automatically if this expand is requested. * `transitions.properties` For each workflow transition, returns information about its properties. Transitions are included automatically if this expand is requested. * `statuses` For each workflow, returns information about the statuses inside the workflow. * `statuses.properties` For each workflow status, returns information about its properties. Statuses are included automatically if this expand is requested. * `default` For each workflow, returns information about whether this is the default workflow. * `schemes` For each workflow, returns information about the workflow schemes the workflow is assigned to. * `projects` For each workflow, returns information about the projects the workflow is assigned to, through workflow schemes. * `hasDraftWorkflow` For each workflow, returns information about whether the workflow has a draft version. * `operations` For each workflow, returns information about the actions that can be undertaken on the workflow. */ expand?: string; /** * String used to perform a case-insensitive partial match with workflow name. */ queryString?: string; /** * [Order](#ordering) the results by a field: * `name` Sorts by workflow name. * `created` Sorts by create time. * `updated` Sorts by update time. */ orderBy?: "name" | "-name" | "+name" | "created" | "-created" | "+created" | "updated" | "+updated" | "-updated"; /** * Filters active and inactive workflows. */ isActive?: boolean; } interface RawApi extends Base, ConnectionOption, HeadersOption { } interface HandledApi extends RawApi, ErrorStrategyOption { } } } } //# sourceMappingURL=workflow.d.ts.map