Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@avst-api/jira7-server

Package Overview
Dependencies
Maintainers
5
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@avst-api/jira7-server - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

18

handled-api/issue/link/type.d.ts

@@ -14,2 +14,20 @@ import { Issue } from '../../../types/issue';

export declare function getIssueLinkType<T = Issue.Link.Type.GetType.Response.OK>(options: Issue.Link.Type.GetType.Options.HandledApi): Promise<import("../../../definitions/issue_link_type").IssueLinkType>;
/**
* Create a new issue link type.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-createIssueLinkType
* @param options Request options.
*/
export declare function createIssueLinkType<T = Issue.Link.Type.CreateType.Response.OK>(options: Issue.Link.Type.CreateType.Options.HandledApi): Promise<import("../../../definitions/issue_link_type").IssueLinkType>;
/**
* Delete the specified issue link type.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-deleteIssueLinkType
* @param options Request options.
*/
export declare function deleteIssueLinkType<T = Issue.Link.Type.DeleteType.Response.OK>(options: Issue.Link.Type.DeleteType.Options.HandledApi): Promise<undefined>;
/**
* Update the specified issue link type.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-updateIssueLinkType
* @param options Request options.
*/
export declare function updateIssueLinkType<T = Issue.Link.Type.UpdateType.Response.OK>(options: Issue.Link.Type.UpdateType.Options.HandledApi): Promise<import("../../../definitions/issue_link_type").IssueLinkType>;
//# sourceMappingURL=type.d.ts.map

26

handled-api/issue/link/type.js
import { executeRequest } from '../../common';
import { getIssueLinkTypes as getIssueLinkTypesFn, getIssueLinkType as getIssueLinkTypeFn } from '../../../raw-api/issue/link/type';
import { getIssueLinkTypes as getIssueLinkTypesFn, getIssueLinkType as getIssueLinkTypeFn, createIssueLinkType as createIssueLinkTypeFn, deleteIssueLinkType as deleteIssueLinkTypeFn, updateIssueLinkType as updateIssueLinkTypeFn } from '../../../raw-api/issue/link/type';
/**

@@ -19,1 +19,25 @@ * Returns a list of available issue link types, if issue linking is enabled. Each issue link type has an id, a name and a label for the outward and inward link relationship.

}
/**
* Create a new issue link type.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-createIssueLinkType
* @param options Request options.
*/
export function createIssueLinkType(options) {
return executeRequest(() => createIssueLinkTypeFn(options), options.errorStrategy);
}
/**
* Delete the specified issue link type.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-deleteIssueLinkType
* @param options Request options.
*/
export function deleteIssueLinkType(options) {
return executeRequest(() => deleteIssueLinkTypeFn(options), options.errorStrategy);
}
/**
* Update the specified issue link type.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-updateIssueLinkType
* @param options Request options.
*/
export function updateIssueLinkType(options) {
return executeRequest(() => updateIssueLinkTypeFn(options), options.errorStrategy);
}

@@ -14,2 +14,28 @@ import { Issue } from '../../types/issue';

export declare function getIssueType<T = Issue.Type.GetType.Response.OK>(options: Issue.Type.GetType.Options.HandledApi): Promise<import("../../definitions/issue_type").IssueType>;
/**
* Creates an issue type from a JSON representation and adds the issue newly created issue type to the default issue type scheme.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-createIssueType
* @param options Request options.
*/
export declare function createIssueType<T = Issue.Type.CreateType.Response.OK>(options: Issue.Type.CreateType.Options.HandledApi): Promise<import("../../definitions/issue_type").IssueType>;
/**
* Deletes the specified issue type. If the issue type has any associated issues, these issues will be migrated to the alternative issue type specified in the parameter.
* You can determine the alternative issue types by calling the /rest/api/2/issuetype/{id}/alternatives resource.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-deleteIssueType
* @param options Request options.
*/
export declare function deleteIssueType<T = Issue.Type.DeleteType.Response.OK>(options: Issue.Type.DeleteType.Options.HandledApi): Promise<undefined>;
/**
* Updates the specified issue type from a JSON representation.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-updateIssueType
* @param options Request options.
*/
export declare function updateIssueType<T = Issue.Type.UpdateType.Response.OK>(options: Issue.Type.UpdateType.Options.HandledApi): Promise<import("../../definitions/issue_type").IssueType>;
/**
* Returns a list of all alternative issue types for the given issue type id. The list will contain these issues types, to which issues assigned to the given issue type can be migrated.
* The suitable alternatives are issue types which are assigned to the same workflow, the same field configuration and the same screen scheme.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-getAlternativeIssueTypes
* @param options Request options.
*/
export declare function getAlternativeIssueTypes<T = Issue.Type.GetAlternativeTypes.Response.OK>(options: Issue.Type.GetAlternativeTypes.Options.HandledApi): Promise<Issue.Type.GetAlternativeTypes.Response.OK>;
//# sourceMappingURL=type.d.ts.map
import { executeRequest } from '../common';
import { getIssueTypes as getIssueTypesFn, getIssueType as getIssueTypeFn } from '../../raw-api/issue/type';
import { getIssueTypes as getIssueTypesFn, getIssueType as getIssueTypeFn, createIssueType as createIssueTypeFn, deleteIssueType as deleteIssueTypeFn, updateIssueType as updateIssueTypeFn, getAlternativeIssueTypes as getAlternativeIssueTypesFn } from '../../raw-api/issue/type';
/**

@@ -19,1 +19,35 @@ * Returns a list of all issue types visible to the user.

}
/**
* Creates an issue type from a JSON representation and adds the issue newly created issue type to the default issue type scheme.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-createIssueType
* @param options Request options.
*/
export function createIssueType(options) {
return executeRequest(() => createIssueTypeFn(options), options.errorStrategy);
}
/**
* Deletes the specified issue type. If the issue type has any associated issues, these issues will be migrated to the alternative issue type specified in the parameter.
* You can determine the alternative issue types by calling the /rest/api/2/issuetype/{id}/alternatives resource.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-deleteIssueType
* @param options Request options.
*/
export function deleteIssueType(options) {
return executeRequest(() => deleteIssueTypeFn(options), options.errorStrategy);
}
/**
* Updates the specified issue type from a JSON representation.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-updateIssueType
* @param options Request options.
*/
export function updateIssueType(options) {
return executeRequest(() => updateIssueTypeFn(options), options.errorStrategy);
}
/**
* Returns a list of all alternative issue types for the given issue type id. The list will contain these issues types, to which issues assigned to the given issue type can be migrated.
* The suitable alternatives are issue types which are assigned to the same workflow, the same field configuration and the same screen scheme.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-getAlternativeIssueTypes
* @param options Request options.
*/
export function getAlternativeIssueTypes(options) {
return executeRequest(() => getAlternativeIssueTypesFn(options), options.errorStrategy);
}

2

package.json
{
"name": "@avst-api/jira7-server",
"version": "0.4.0",
"version": "0.5.0",
"description": "Adaptavist Managed API for Jira Server 7.13.9",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -14,2 +14,20 @@ import { Issue } from '../../../types/issue';

export declare function getIssueLinkType(options: Issue.Link.Type.GetType.Options.RawApi): Promise<import("@avst-api/commons").Response<import("../../../definitions/issue_link_type").IssueLinkType | undefined>>;
/**
* Create a new issue link type.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-createIssueLinkType
* @param options Request options.
*/
export declare function createIssueLinkType(options: Issue.Link.Type.CreateType.Options.RawApi): Promise<import("@avst-api/commons").Response<import("../../../definitions/issue_link_type").IssueLinkType | undefined>>;
/**
* Delete the specified issue link type.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-deleteIssueLinkType
* @param options Request options.
*/
export declare function deleteIssueLinkType(options: Issue.Link.Type.DeleteType.Options.RawApi): Promise<import("@avst-api/commons").Response<undefined>>;
/**
* Update the specified issue link type.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-updateIssueLinkType
* @param options Request options.
*/
export declare function updateIssueLinkType(options: Issue.Link.Type.UpdateType.Options.RawApi): Promise<import("@avst-api/commons").Response<import("../../../definitions/issue_link_type").IssueLinkType | undefined>>;
//# sourceMappingURL=type.d.ts.map

@@ -1,2 +0,2 @@

import { httpGet } from '../../common';
import { httpDelete, httpGet, httpPost, httpPut } from '../../common';
/**

@@ -20,1 +20,28 @@ * Returns a list of available issue link types, if issue linking is enabled. Each issue link type has an id, a name and a label for the outward and inward link relationship.

}
/**
* Create a new issue link type.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-createIssueLinkType
* @param options Request options.
*/
export function createIssueLinkType(options) {
const { connectionId: instanceId, headers, body } = options;
return httpPost(instanceId, '/rest/api/2/issueLinkType/', body, headers);
}
/**
* Delete the specified issue link type.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-deleteIssueLinkType
* @param options Request options.
*/
export function deleteIssueLinkType(options) {
const { connectionId: instanceId, issueLinkTypeId, headers } = options;
return httpDelete(instanceId, `/rest/api/2/issueLinkType/${issueLinkTypeId}`, headers, true);
}
/**
* Update the specified issue link type.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-updateIssueLinkType
* @param options Request options.
*/
export function updateIssueLinkType(options) {
const { connectionId: instanceId, issueLinkTypeId, headers, body } = options;
return httpPut(instanceId, `/rest/api/2/issueLinkType/${issueLinkTypeId}`, body, headers);
}

@@ -14,2 +14,28 @@ import { Issue } from '../../types/issue';

export declare function getIssueType(options: Issue.Type.GetType.Options.RawApi): Promise<import("@avst-api/commons").Response<import("../../definitions/issue_type").IssueType | undefined>>;
/**
* Creates an issue type from a JSON representation and adds the issue newly created issue type to the default issue type scheme.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-createIssueType
* @param options Request options.
*/
export declare function createIssueType(options: Issue.Type.CreateType.Options.RawApi): Promise<import("@avst-api/commons").Response<import("../../definitions/issue_type").IssueType | undefined>>;
/**
* Deletes the specified issue type. If the issue type has any associated issues, these issues will be migrated to the alternative issue type specified in the parameter.
* You can determine the alternative issue types by calling the /rest/api/2/issuetype/{id}/alternatives resource.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-deleteIssueType
* @param options Request options.
*/
export declare function deleteIssueType(options: Issue.Type.DeleteType.Options.RawApi): Promise<import("@avst-api/commons").Response<undefined>>;
/**
* Updates the specified issue type from a JSON representation.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-updateIssueType
* @param options Request options.
*/
export declare function updateIssueType(options: Issue.Type.UpdateType.Options.RawApi): Promise<import("@avst-api/commons").Response<import("../../definitions/issue_type").IssueType | undefined>>;
/**
* Returns a list of all alternative issue types for the given issue type id. The list will contain these issues types, to which issues assigned to the given issue type can be migrated.
* The suitable alternatives are issue types which are assigned to the same workflow, the same field configuration and the same screen scheme.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-getAlternativeIssueTypes
* @param options Request options.
*/
export declare function getAlternativeIssueTypes(options: Issue.Type.GetAlternativeTypes.Options.RawApi): Promise<import("@avst-api/commons").Response<Issue.Type.GetAlternativeTypes.Response.OK | undefined>>;
//# sourceMappingURL=type.d.ts.map

@@ -1,2 +0,3 @@

import { httpGet } from '../common';
import { constructUrl } from '@avst-api/commons';
import { httpDelete, httpGet, httpPost, httpPut } from '../common';
/**

@@ -20,1 +21,40 @@ * Returns a list of all issue types visible to the user.

}
/**
* Creates an issue type from a JSON representation and adds the issue newly created issue type to the default issue type scheme.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-createIssueType
* @param options Request options.
*/
export function createIssueType(options) {
const { connectionId: instanceId, headers, body } = options;
return httpPost(instanceId, '/rest/api/2/issuetype', body, headers);
}
/**
* Deletes the specified issue type. If the issue type has any associated issues, these issues will be migrated to the alternative issue type specified in the parameter.
* You can determine the alternative issue types by calling the /rest/api/2/issuetype/{id}/alternatives resource.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-deleteIssueType
* @param options Request options.
*/
export function deleteIssueType(options) {
const { connectionId: instanceId, headers, id, alternativeIssueTypeId } = options;
const queryParams = { alternativeIssueTypeId };
return httpDelete(instanceId, constructUrl(`/rest/api/2/issuetype/${id}`, queryParams), headers, true);
}
/**
* Updates the specified issue type from a JSON representation.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-updateIssueType
* @param options Request options.
*/
export function updateIssueType(options) {
const { connectionId: instanceId, headers, body, id } = options;
return httpPut(instanceId, `/rest/api/2/issuetype/${id}`, body, headers);
}
/**
* Returns a list of all alternative issue types for the given issue type id. The list will contain these issues types, to which issues assigned to the given issue type can be migrated.
* The suitable alternatives are issue types which are assigned to the same workflow, the same field configuration and the same screen scheme.
* Documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-getAlternativeIssueTypes
* @param options Request options.
*/
export function getAlternativeIssueTypes(options) {
const { connectionId: instanceId, headers, id } = options;
return httpGet(instanceId, `/rest/api/2/issuetype/${id}/alternatives`, headers);
}

@@ -0,1 +1,16 @@

# 0.5.0
- Added support for the following Issue Link Type methods:
* [Create issue link type](https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-createIssueLinkType) that can be used as `Issue.Link.Type.createType` or `All.createIssueLinkType`.
* [Delete issue link type](https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-deleteIssueLinkType) that can be used as `Issue.Link.Type.deleteType` or `All.deleteIssueLinkType`.
* [Update issue link type](https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issueLinkType-updateIssueLinkType) that can be used as `Issue.Link.Type.updateType` or `All.updateIssueLinkType`.
- Added support for the following Issue Type methods:
* [Create issue type](https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-createIssueType) that can be used as `Issue.Type.createType` or `All.createIssueType`.
* [Delete issue type](https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-deleteIssueType) that can be used as `Issue.Type.deleteType` or `All.deleteIssueType`.
* [Update issue type](https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-updateIssueType) that can be used as `Issue.Type.updateType` or `All.updateIssueType`.
* [Get alternative issue types](https://docs.atlassian.com/software/jira/docs/api/REST/7.13.9/#api/2/issuetype-getAlternativeIssueTypes) that can be used as `Issue.Type.getAlternativeTypes` or `All.getAlternativeIssueTypes`.
# 0.4.0

@@ -2,0 +17,0 @@

@@ -1032,2 +1032,56 @@ import { ErrorStrategyOption, AssistedErrorStrategyOption } from '../handled-api/common';

}
namespace CreateType {
interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption {
}
type Body = IssueLinkType;
namespace Response {
type OK = IssueLinkType;
type Error = undefined;
}
namespace Options {
interface Base {
body: Issue.Link.Type.CreateType.Body;
}
interface RawApi extends Base, ConnectionOption, HeadersOption {
}
interface HandledApi extends RawApi, ErrorStrategyOption {
}
}
}
namespace DeleteType {
interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption {
}
namespace Response {
type OK = undefined;
type Error = undefined;
}
namespace Options {
interface Base {
issueLinkTypeId: string;
}
interface RawApi extends Base, ConnectionOption, HeadersOption {
}
interface HandledApi extends RawApi, ErrorStrategyOption {
}
}
}
namespace UpdateType {
interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption {
}
type Body = IssueLinkType;
namespace Response {
type OK = IssueLinkType;
type Error = undefined;
}
namespace Options {
interface Base {
issueLinkTypeId: string;
body: Issue.Link.Type.UpdateType.Body;
}
interface RawApi extends Base, ConnectionOption, HeadersOption {
}
interface HandledApi extends RawApi, ErrorStrategyOption {
}
}
}
}

@@ -1361,2 +1415,82 @@ namespace Remote {

}
namespace CreateType {
interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption {
}
type Body = {
name?: string;
description?: string;
type?: 'subask' | 'standard';
};
namespace Response {
type OK = IssueType;
type Error = undefined;
}
namespace Options {
interface Base {
body: Issue.Type.CreateType.Body;
}
interface RawApi extends Base, ConnectionOption, HeadersOption {
}
interface HandledApi extends RawApi, ErrorStrategyOption {
}
}
}
namespace DeleteType {
interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption {
}
namespace Response {
type OK = undefined;
type Error = undefined;
}
namespace Options {
interface Base {
id: string | number;
alternativeIssueTypeId?: string;
}
interface RawApi extends Base, ConnectionOption, HeadersOption {
}
interface HandledApi extends RawApi, ErrorStrategyOption {
}
}
}
namespace UpdateType {
interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption {
}
type Body = {
name?: string;
description?: string;
avatarId?: number;
};
namespace Response {
type OK = IssueType;
type Error = undefined;
}
namespace Options {
interface Base {
id: string | number;
body: Issue.Type.UpdateType.Body;
}
interface RawApi extends Base, ConnectionOption, HeadersOption {
}
interface HandledApi extends RawApi, ErrorStrategyOption {
}
}
}
namespace GetAlternativeTypes {
interface Options extends Options.Base, HeadersOption, AssistedErrorStrategyOption {
}
namespace Response {
type OK = IssueType[];
type Error = undefined;
}
namespace Options {
interface Base {
id: string | number;
}
interface RawApi extends Base, ConnectionOption, HeadersOption {
}
interface HandledApi extends RawApi, ErrorStrategyOption {
}
}
}
}

@@ -1363,0 +1497,0 @@ namespace Priority {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc