forked from MrRefactoring/jira.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinfo.ts
33 lines (30 loc) · 1.24 KB
/
info.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import * as Models from './models';
import { Callback } from '../callback';
import { Client } from '../clients';
import { RequestConfig } from '../requestConfig';
export class Info {
constructor(private client: Client) {}
/**
* This method retrieves information about the Jira Service Management instance such as software version, builds, and
* related links.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/service-desk/rest/intro/#permissions) required**: None,
* the user does not need to be logged in.
*/
async getInfo<T = Models.SoftwareInfo>(callback: Callback<T>): Promise<void>;
/**
* This method retrieves information about the Jira Service Management instance such as software version, builds, and
* related links.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/service-desk/rest/intro/#permissions) required**: None,
* the user does not need to be logged in.
*/
async getInfo<T = Models.SoftwareInfo>(callback?: never): Promise<T>;
async getInfo<T = Models.SoftwareInfo>(callback?: Callback<T>): Promise<void | T> {
const config: RequestConfig = {
url: '/rest/servicedeskapi/info',
method: 'GET',
};
return this.client.sendRequest(config, callback);
}
}