-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* New endpoints added * lib version changed in baseClient
- Loading branch information
1 parent
8c1b61e
commit 27ede89
Showing
71 changed files
with
1,730 additions
and
806 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import * as Models from './models'; | ||
import * as Parameters from './parameters'; | ||
import { Client } from '../clients'; | ||
import { Callback } from '../callback'; | ||
import { RequestConfig } from '../requestConfig'; | ||
|
||
export class IssueCustomFieldConfigurationApps { | ||
constructor(private client: Client) {} | ||
|
||
/** | ||
* Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of configurations for a custom field. The result can be filtered by | ||
* `contextId` or `issueId`, otherwise all configurations are returned. Invalid IDs are ignored. | ||
* | ||
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global | ||
* permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app that created | ||
* the custom field. | ||
*/ | ||
async getCustomFieldConfiguration<T = Models.PageContextualConfiguration>( | ||
parameters: Parameters.GetCustomFieldConfiguration, | ||
callback: Callback<T> | ||
): Promise<void>; | ||
/** | ||
* Returns a [paginated](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#pagination) list of configurations for a custom field. The result can be filtered by | ||
* `contextId` or `issueId`, otherwise all configurations are returned. Invalid IDs are ignored. | ||
* | ||
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global | ||
* permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app that created | ||
* the custom field. | ||
*/ | ||
async getCustomFieldConfiguration<T = Models.PageContextualConfiguration>( | ||
parameters: Parameters.GetCustomFieldConfiguration, | ||
callback?: never | ||
): Promise<T>; | ||
async getCustomFieldConfiguration<T = Models.PageContextualConfiguration>( | ||
parameters: Parameters.GetCustomFieldConfiguration, | ||
callback?: Callback<T>, | ||
): Promise<void | T> { | ||
const config: RequestConfig = { | ||
url: `/rest/api/2/app/field/${parameters.fieldIdOrKey}/context/configuration`, | ||
method: 'GET', | ||
params: { | ||
contextId: parameters.contextId, | ||
issueId: parameters.issueId, | ||
startAt: parameters.startAt, | ||
maxResults: parameters.maxResults, | ||
}, | ||
}; | ||
|
||
return this.client.sendRequest(config, callback, { | ||
methodName: 'version2.issueCustomFieldConfigurationApps.getCustomFieldConfiguration', | ||
}); | ||
} | ||
|
||
/** | ||
* Update the configuration for contexts of a custom field. | ||
* | ||
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global | ||
* permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app that created | ||
* the custom field. | ||
*/ | ||
async updateCustomFieldConfiguration<T = unknown>( | ||
parameters: Parameters.UpdateCustomFieldConfiguration, | ||
callback: Callback<T> | ||
): Promise<void>; | ||
/** | ||
* Update the configuration for contexts of a custom field. | ||
* | ||
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** *Administer Jira* [global | ||
* permission](https://confluence.atlassian.com/x/x4dKLg). Jira permissions are not required for the app that created | ||
* the custom field. | ||
*/ | ||
async updateCustomFieldConfiguration<T = unknown>( | ||
parameters: Parameters.UpdateCustomFieldConfiguration, | ||
callback?: never | ||
): Promise<T>; | ||
async updateCustomFieldConfiguration<T = unknown>( | ||
parameters: Parameters.UpdateCustomFieldConfiguration, | ||
callback?: Callback<T>, | ||
): Promise<void | T> { | ||
const config: RequestConfig = { | ||
url: `/rest/api/2/app/field/${parameters.fieldIdOrKey}/context/configuration`, | ||
method: 'PUT', | ||
data: { | ||
configurations: parameters.configurations, | ||
}, | ||
}; | ||
|
||
return this.client.sendRequest(config, callback, { | ||
methodName: 'version2.issueCustomFieldConfigurationApps.updateCustomFieldConfiguration', | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** Details of the contextual configuration for a custom field. */ | ||
export interface ContextualConfiguration { | ||
/** The ID of the context the configuration is associated with. */ | ||
contextId: number; | ||
/** The configuration associated with the context. */ | ||
configuration?: {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/** Details about the project. */ | ||
export interface CreateProjectDetails { | ||
/** | ||
* 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; | ||
/** | ||
* This parameter is deprecated because of privacy changes. Use `leadAccountId` instead. See the [migration | ||
* guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) | ||
* for details. The user name of the project lead. Either `lead` or `leadAccountId` must be set when creating a | ||
* project. Cannot be provided with `leadAccountId`. | ||
*/ | ||
lead?: 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?: string; | ||
/** 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-2-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-2-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-2-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-2-projectCategory-get) operation. | ||
*/ | ||
categoryId?: number; | ||
/** | ||
* 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?: string; | ||
/** | ||
* A predefined configuration for a project. The type of the `projectTemplateKey` must match with the type of the | ||
* `projectTypeKey`. | ||
*/ | ||
projectTemplateKey?: string; | ||
/** | ||
* The ID of the workflow scheme for the project. Use the [Get all workflow | ||
* schemes](#api-rest-api-2-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-2-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-2-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-2-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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ContextualConfiguration } from './contextualConfiguration'; | ||
|
||
/** Details of configurations for a custom field. */ | ||
export interface CustomFieldConfigurations { | ||
configurations: ContextualConfiguration[]; | ||
} |
Oops, something went wrong.