@resolution/jira-api-client 0.4.6 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +27 -4
- package/lib/index.d.ts +13 -0
- package/lib/index.js +17 -1
- package/lib/index.js.map +1 -1
- package/lib/openapi/platform/BaseJiraPlatformApiClient.d.ts +1 -1
- package/lib/openapi/platform/BaseJiraPlatformApiClient.js +1 -1
- package/lib/openapi/platform/services/DashboardsService.d.ts +7 -1
- package/lib/openapi/platform/services/DashboardsService.js +4 -1
- package/lib/openapi/platform/services/DashboardsService.js.map +1 -1
- package/lib/openapi/platform/services/IssueSearchService.d.ts +8 -1
- package/lib/openapi/platform/services/IssueSearchService.js +2 -1
- package/lib/openapi/platform/services/IssueSearchService.js.map +1 -1
- package/lib/openapi/platform/services/IssuesService.d.ts +8 -1
- package/lib/openapi/platform/services/IssuesService.js +2 -1
- package/lib/openapi/platform/services/IssuesService.js.map +1 -1
- package/lib/openapi/platform/services/PermissionsService.d.ts +7 -0
- package/lib/openapi/platform/services/PermissionsService.js +7 -0
- package/lib/openapi/platform/services/PermissionsService.js.map +1 -1
- package/lib/openapi/serviceManagement/BaseJiraServiceManagementApiClient.d.ts +46 -0
- package/lib/openapi/serviceManagement/BaseJiraServiceManagementApiClient.js +78 -0
- package/lib/openapi/serviceManagement/BaseJiraServiceManagementApiClient.js.map +1 -0
- package/lib/openapi/serviceManagement/core/CommonHttpClient.d.ts +196 -0
- package/lib/openapi/serviceManagement/core/CommonHttpClient.js +390 -0
- package/lib/openapi/serviceManagement/core/CommonHttpClient.js.map +1 -0
- package/lib/openapi/serviceManagement/core/CommonHttpService.d.ts +9 -0
- package/lib/openapi/serviceManagement/core/CommonHttpService.js +29 -0
- package/lib/openapi/serviceManagement/core/CommonHttpService.js.map +1 -0
- package/lib/openapi/serviceManagement/core/CommonValidationSchemaStorage.d.ts +35 -0
- package/lib/openapi/serviceManagement/core/CommonValidationSchemaStorage.js +65 -0
- package/lib/openapi/serviceManagement/core/CommonValidationSchemaStorage.js.map +1 -0
- package/lib/openapi/serviceManagement/models/assets.d.ts +54 -0
- package/lib/openapi/serviceManagement/models/assets.js +60 -0
- package/lib/openapi/serviceManagement/models/assets.js.map +1 -0
- package/lib/openapi/serviceManagement/models/common.d.ts +228 -0
- package/lib/openapi/serviceManagement/models/common.js +172 -0
- package/lib/openapi/serviceManagement/models/common.js.map +1 -0
- package/lib/openapi/serviceManagement/models/customer.d.ts +30 -0
- package/lib/openapi/serviceManagement/models/customer.js +27 -0
- package/lib/openapi/serviceManagement/models/customer.js.map +1 -0
- package/lib/openapi/serviceManagement/models/info.d.ts +18 -0
- package/lib/openapi/serviceManagement/models/info.js +24 -0
- package/lib/openapi/serviceManagement/models/info.js.map +1 -0
- package/lib/openapi/serviceManagement/models/knowledgebase.d.ts +24 -0
- package/lib/openapi/serviceManagement/models/knowledgebase.js +32 -0
- package/lib/openapi/serviceManagement/models/knowledgebase.js.map +1 -0
- package/lib/openapi/serviceManagement/models/organization.d.ts +76 -0
- package/lib/openapi/serviceManagement/models/organization.js +65 -0
- package/lib/openapi/serviceManagement/models/organization.js.map +1 -0
- package/lib/openapi/serviceManagement/models/request.d.ts +594 -0
- package/lib/openapi/serviceManagement/models/request.js +516 -0
- package/lib/openapi/serviceManagement/models/request.js.map +1 -0
- package/lib/openapi/serviceManagement/models/servicedesk.d.ts +525 -0
- package/lib/openapi/serviceManagement/models/servicedesk.js +442 -0
- package/lib/openapi/serviceManagement/models/servicedesk.js.map +1 -0
- package/lib/openapi/serviceManagement/services/AssetsService.d.ts +61 -0
- package/lib/openapi/serviceManagement/services/AssetsService.js +113 -0
- package/lib/openapi/serviceManagement/services/AssetsService.js.map +1 -0
- package/lib/openapi/serviceManagement/services/CustomerService.d.ts +63 -0
- package/lib/openapi/serviceManagement/services/CustomerService.js +93 -0
- package/lib/openapi/serviceManagement/services/CustomerService.js.map +1 -0
- package/lib/openapi/serviceManagement/services/InfoService.d.ts +34 -0
- package/lib/openapi/serviceManagement/services/InfoService.js +71 -0
- package/lib/openapi/serviceManagement/services/InfoService.js.map +1 -0
- package/lib/openapi/serviceManagement/services/KnowledgebaseService.d.ts +81 -0
- package/lib/openapi/serviceManagement/services/KnowledgebaseService.js +106 -0
- package/lib/openapi/serviceManagement/services/KnowledgebaseService.js.map +1 -0
- package/lib/openapi/serviceManagement/services/OrganizationService.d.ts +589 -0
- package/lib/openapi/serviceManagement/services/OrganizationService.js +762 -0
- package/lib/openapi/serviceManagement/services/OrganizationService.js.map +1 -0
- package/lib/openapi/serviceManagement/services/RequestService.d.ts +2736 -0
- package/lib/openapi/serviceManagement/services/RequestService.js +3056 -0
- package/lib/openapi/serviceManagement/services/RequestService.js.map +1 -0
- package/lib/openapi/serviceManagement/services/RequesttypeService.d.ts +166 -0
- package/lib/openapi/serviceManagement/services/RequesttypeService.js +190 -0
- package/lib/openapi/serviceManagement/services/RequesttypeService.js.map +1 -0
- package/lib/openapi/serviceManagement/services/ServicedeskService.d.ts +1268 -0
- package/lib/openapi/serviceManagement/services/ServicedeskService.js +1510 -0
- package/lib/openapi/serviceManagement/services/ServicedeskService.js.map +1 -0
- package/lib/openapi/serviceManagement/validationSchemaStorage.d.ts +3 -0
- package/lib/openapi/serviceManagement/validationSchemaStorage.js +144 -0
- package/lib/openapi/serviceManagement/validationSchemaStorage.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { CommonHttpService } from "../core/CommonHttpService";
|
|
2
|
+
import { type UserDto } from "../models/common";
|
|
3
|
+
import type { CustomerCreateDto } from "../models/customer";
|
|
4
|
+
/** @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-customer */
|
|
5
|
+
export declare class CustomerService extends CommonHttpService {
|
|
6
|
+
/**
|
|
7
|
+
* This method adds a customer to the Jira Service Management instance by passing
|
|
8
|
+
* a JSON file including an email address and display name. The display name does
|
|
9
|
+
* not need to be unique. The record's identifiers, `name` and `key`, are
|
|
10
|
+
* automatically generated from the request details.
|
|
11
|
+
*
|
|
12
|
+
* **[Permissions](#permissions) required**: Jira Administrator Global permission
|
|
13
|
+
*
|
|
14
|
+
* @returns Returns the customer details.
|
|
15
|
+
*
|
|
16
|
+
* example: {
|
|
17
|
+
* "accountId":
|
|
18
|
+
* "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
19
|
+
* "name": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
20
|
+
* "key": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
21
|
+
* "emailAddress": "fred@example.com",
|
|
22
|
+
* "displayName": "Fred F. User",
|
|
23
|
+
* "active": true,
|
|
24
|
+
* "timeZone": "Australia/Sydney",
|
|
25
|
+
* "_links": {
|
|
26
|
+
* "jiraRest":
|
|
27
|
+
* "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
28
|
+
* "avatarUrls": {
|
|
29
|
+
* "16x16":
|
|
30
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
|
|
31
|
+
* "24x24":
|
|
32
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
|
|
33
|
+
* "32x32":
|
|
34
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue",
|
|
35
|
+
* "48x48":
|
|
36
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue"
|
|
37
|
+
* },
|
|
38
|
+
* "self":
|
|
39
|
+
* "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b"
|
|
40
|
+
* }
|
|
41
|
+
* }
|
|
42
|
+
* @path {POST} /rest/servicedeskapi/customer
|
|
43
|
+
* @scopes-current manage:servicedesk-customer
|
|
44
|
+
* @scopes-beta read:customer:jira-service-management, write:customer:jira-service-management,
|
|
45
|
+
* read:user:jira
|
|
46
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-customer#api-rest-servicedeskapi-customer-post
|
|
47
|
+
*/
|
|
48
|
+
createCustomer: ({ strictConflictStatusCode, customerCreateDto, }: {
|
|
49
|
+
/**
|
|
50
|
+
* Optional boolean flag to return 409 Conflict status code for duplicate customer
|
|
51
|
+
* creation request
|
|
52
|
+
*/
|
|
53
|
+
strictConflictStatusCode?: boolean | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* @example {
|
|
56
|
+
* "displayName": "Fred F. User",
|
|
57
|
+
* "email": "fred@example.com"
|
|
58
|
+
* }
|
|
59
|
+
*/
|
|
60
|
+
customerCreateDto: CustomerCreateDto;
|
|
61
|
+
}) => Promise<UserDto>;
|
|
62
|
+
static initialize(): void;
|
|
63
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CustomerService = void 0;
|
|
4
|
+
// DO NOT EDIT!
|
|
5
|
+
// This file is generated by "api-typescript-generator".
|
|
6
|
+
// To update this file run "yarn build:openapi".
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
const commonHttpClient = require("../core/CommonHttpClient");
|
|
9
|
+
const CommonHttpService_1 = require("../core/CommonHttpService");
|
|
10
|
+
const common_1 = require("../models/common");
|
|
11
|
+
const validationSchemaStorage_1 = require("../validationSchemaStorage");
|
|
12
|
+
/** @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-customer */
|
|
13
|
+
class CustomerService extends CommonHttpService_1.CommonHttpService {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
/**
|
|
17
|
+
* This method adds a customer to the Jira Service Management instance by passing
|
|
18
|
+
* a JSON file including an email address and display name. The display name does
|
|
19
|
+
* not need to be unique. The record's identifiers, `name` and `key`, are
|
|
20
|
+
* automatically generated from the request details.
|
|
21
|
+
*
|
|
22
|
+
* **[Permissions](#permissions) required**: Jira Administrator Global permission
|
|
23
|
+
*
|
|
24
|
+
* @returns Returns the customer details.
|
|
25
|
+
*
|
|
26
|
+
* example: {
|
|
27
|
+
* "accountId":
|
|
28
|
+
* "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
29
|
+
* "name": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
30
|
+
* "key": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
31
|
+
* "emailAddress": "fred@example.com",
|
|
32
|
+
* "displayName": "Fred F. User",
|
|
33
|
+
* "active": true,
|
|
34
|
+
* "timeZone": "Australia/Sydney",
|
|
35
|
+
* "_links": {
|
|
36
|
+
* "jiraRest":
|
|
37
|
+
* "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
38
|
+
* "avatarUrls": {
|
|
39
|
+
* "16x16":
|
|
40
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
|
|
41
|
+
* "24x24":
|
|
42
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
|
|
43
|
+
* "32x32":
|
|
44
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue",
|
|
45
|
+
* "48x48":
|
|
46
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue"
|
|
47
|
+
* },
|
|
48
|
+
* "self":
|
|
49
|
+
* "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b"
|
|
50
|
+
* }
|
|
51
|
+
* }
|
|
52
|
+
* @path {POST} /rest/servicedeskapi/customer
|
|
53
|
+
* @scopes-current manage:servicedesk-customer
|
|
54
|
+
* @scopes-beta read:customer:jira-service-management, write:customer:jira-service-management,
|
|
55
|
+
* read:user:jira
|
|
56
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-customer#api-rest-servicedeskapi-customer-post
|
|
57
|
+
*/
|
|
58
|
+
this.createCustomer = ({ strictConflictStatusCode, customerCreateDto, }) => {
|
|
59
|
+
return this.getClientInstance()
|
|
60
|
+
.request({
|
|
61
|
+
path: "/rest/servicedeskapi/customer",
|
|
62
|
+
method: "POST",
|
|
63
|
+
query: {
|
|
64
|
+
strictConflictStatusCode,
|
|
65
|
+
},
|
|
66
|
+
headers: {
|
|
67
|
+
"Content-Type": "application/json",
|
|
68
|
+
},
|
|
69
|
+
body: customerCreateDto,
|
|
70
|
+
})
|
|
71
|
+
.then(this.getClientInstance().responseHandler({
|
|
72
|
+
201: {
|
|
73
|
+
"application/json": "json",
|
|
74
|
+
},
|
|
75
|
+
}))
|
|
76
|
+
.then(commonHttpClient.castResponse())
|
|
77
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("CustomerService.createCustomer.response"))
|
|
78
|
+
.then(commonHttpClient.getBody);
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
static initialize() {
|
|
82
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("CustomerService.createCustomer.response", zod_1.z
|
|
83
|
+
.object({
|
|
84
|
+
status: zod_1.z.literal(201),
|
|
85
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
86
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("UserDto"),
|
|
87
|
+
})
|
|
88
|
+
.describe("CustomerService.createCustomer.response"));
|
|
89
|
+
validationSchemaStorage_1.validationSchemaStorage.registerOnce([common_1.registerCommonValidationSchemas]);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.CustomerService = CustomerService;
|
|
93
|
+
//# sourceMappingURL=CustomerService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomerService.js","sourceRoot":"","sources":["../../../../src/openapi/serviceManagement/services/CustomerService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,6BAAwB;AAExB,6DAA6D;AAC7D,iEAA8D;AAC9D,6CAG0B;AAE1B,wEAAqE;AACrE,2FAA2F;AAC3F,MAAa,eAAgB,SAAQ,qCAAiB;IAAtD;;QACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAyCG;QACH,mBAAc,GAAG,CAAC,EAChB,wBAAwB,EACxB,iBAAiB,GAclB,EAAoB,EAAE;YACrB,OAAO,IAAI,CAAC,iBAAiB,EAAE;iBAC5B,OAAO,CAAC;gBACP,IAAI,EAAE,+BAA+B;gBACrC,MAAM,EAAE,MAAM;gBACd,KAAK,EAAE;oBACL,wBAAwB;iBACzB;gBACD,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,iBAAiB;aACxB,CAAC;iBACD,IAAI,CACH,IAAI,CAAC,iBAAiB,EAAE,CAAC,eAAe,CAAC;gBACvC,GAAG,EAAE;oBACH,kBAAkB,EAAE,MAAM;iBAC3B;aACF,CAAC,CACH;iBACA,IAAI,CACH,gBAAgB,CAAC,YAAY,EAIzB,CACL;iBACA,IAAI,CACH,iDAAuB,CAAC,SAAS,CAC/B,yCAAyC,CAC1C,CACF;iBACA,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC,CAAC;IAcJ,CAAC;IAbC,MAAM,CAAC,UAAU;QACf,iDAAuB,CAAC,kBAAkB,CACxC,yCAAyC,EACzC,OAAC;aACE,MAAM,CAAC;YACN,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YACtB,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,iDAAuB,CAAC,IAAI,CAAC,SAAS,CAAC;SAC9C,CAAC;aACD,QAAQ,CAAC,yCAAyC,CAAC,CACvD,CAAC;QACF,iDAAuB,CAAC,YAAY,CAAC,CAAC,wCAA+B,CAAC,CAAC,CAAC;IAC1E,CAAC;CACF;AA1GD,0CA0GC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CommonHttpService } from "../core/CommonHttpService";
|
|
2
|
+
import { type SoftwareInfoDto } from "../models/info";
|
|
3
|
+
/** @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-info */
|
|
4
|
+
export declare class InfoService extends CommonHttpService {
|
|
5
|
+
/**
|
|
6
|
+
* This method retrieves information about the Jira Service Management instance
|
|
7
|
+
* such as software version, builds, and related links.
|
|
8
|
+
*
|
|
9
|
+
* **[Permissions](#permissions) required**: None, the user does not need to be
|
|
10
|
+
* logged in.
|
|
11
|
+
*
|
|
12
|
+
* @returns Returns the runtime information for the Jira Service Management instance.
|
|
13
|
+
*
|
|
14
|
+
* example: {
|
|
15
|
+
* "_links": {
|
|
16
|
+
* "self": "https://your-domain.atlassian.net/rest/servicedeskapi/info"
|
|
17
|
+
* },
|
|
18
|
+
* "buildChangeSet": "c6679417c550918e7c94a9eaaada133f15dc8ff0",
|
|
19
|
+
* "buildDate": {
|
|
20
|
+
* "epochMillis": 1442259240000,
|
|
21
|
+
* "friendly": "Monday 02:34 AM",
|
|
22
|
+
* "iso8601": "2015-09-15T02:34:00+0700",
|
|
23
|
+
* "jira": "2015-09-15T02:34:00.000+0700"
|
|
24
|
+
* },
|
|
25
|
+
* "isLicensedForUse": true,
|
|
26
|
+
* "platformVersion": "7.0.1",
|
|
27
|
+
* "version": "3.0.1"
|
|
28
|
+
* }
|
|
29
|
+
* @path {GET} /rest/servicedeskapi/info
|
|
30
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-info#api-rest-servicedeskapi-info-get
|
|
31
|
+
*/
|
|
32
|
+
getInfo: () => Promise<SoftwareInfoDto>;
|
|
33
|
+
static initialize(): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InfoService = void 0;
|
|
4
|
+
// DO NOT EDIT!
|
|
5
|
+
// This file is generated by "api-typescript-generator".
|
|
6
|
+
// To update this file run "yarn build:openapi".
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
const commonHttpClient = require("../core/CommonHttpClient");
|
|
9
|
+
const CommonHttpService_1 = require("../core/CommonHttpService");
|
|
10
|
+
const info_1 = require("../models/info");
|
|
11
|
+
const validationSchemaStorage_1 = require("../validationSchemaStorage");
|
|
12
|
+
/** @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-info */
|
|
13
|
+
class InfoService extends CommonHttpService_1.CommonHttpService {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
/**
|
|
17
|
+
* This method retrieves information about the Jira Service Management instance
|
|
18
|
+
* such as software version, builds, and related links.
|
|
19
|
+
*
|
|
20
|
+
* **[Permissions](#permissions) required**: None, the user does not need to be
|
|
21
|
+
* logged in.
|
|
22
|
+
*
|
|
23
|
+
* @returns Returns the runtime information for the Jira Service Management instance.
|
|
24
|
+
*
|
|
25
|
+
* example: {
|
|
26
|
+
* "_links": {
|
|
27
|
+
* "self": "https://your-domain.atlassian.net/rest/servicedeskapi/info"
|
|
28
|
+
* },
|
|
29
|
+
* "buildChangeSet": "c6679417c550918e7c94a9eaaada133f15dc8ff0",
|
|
30
|
+
* "buildDate": {
|
|
31
|
+
* "epochMillis": 1442259240000,
|
|
32
|
+
* "friendly": "Monday 02:34 AM",
|
|
33
|
+
* "iso8601": "2015-09-15T02:34:00+0700",
|
|
34
|
+
* "jira": "2015-09-15T02:34:00.000+0700"
|
|
35
|
+
* },
|
|
36
|
+
* "isLicensedForUse": true,
|
|
37
|
+
* "platformVersion": "7.0.1",
|
|
38
|
+
* "version": "3.0.1"
|
|
39
|
+
* }
|
|
40
|
+
* @path {GET} /rest/servicedeskapi/info
|
|
41
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-info#api-rest-servicedeskapi-info-get
|
|
42
|
+
*/
|
|
43
|
+
this.getInfo = () => {
|
|
44
|
+
return this.getClientInstance()
|
|
45
|
+
.request({
|
|
46
|
+
path: "/rest/servicedeskapi/info",
|
|
47
|
+
method: "GET",
|
|
48
|
+
})
|
|
49
|
+
.then(this.getClientInstance().responseHandler({
|
|
50
|
+
200: {
|
|
51
|
+
"application/json": "json",
|
|
52
|
+
},
|
|
53
|
+
}))
|
|
54
|
+
.then(commonHttpClient.castResponse())
|
|
55
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("InfoService.getInfo.response"))
|
|
56
|
+
.then(commonHttpClient.getBody);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
static initialize() {
|
|
60
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("InfoService.getInfo.response", zod_1.z
|
|
61
|
+
.object({
|
|
62
|
+
status: zod_1.z.literal(200),
|
|
63
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
64
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("SoftwareInfoDto"),
|
|
65
|
+
})
|
|
66
|
+
.describe("InfoService.getInfo.response"));
|
|
67
|
+
validationSchemaStorage_1.validationSchemaStorage.registerOnce([info_1.registerInfoValidationSchemas]);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.InfoService = InfoService;
|
|
71
|
+
//# sourceMappingURL=InfoService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoService.js","sourceRoot":"","sources":["../../../../src/openapi/serviceManagement/services/InfoService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,6BAAwB;AAExB,6DAA6D;AAC7D,iEAA8D;AAC9D,yCAGwB;AACxB,wEAAqE;AACrE,uFAAuF;AACvF,MAAa,WAAY,SAAQ,qCAAiB;IAAlD;;QACE;;;;;;;;;;;;;;;;;;;;;;;;;;WA0BG;QACH,YAAO,GAAG,GAA6B,EAAE;YACvC,OAAO,IAAI,CAAC,iBAAiB,EAAE;iBAC5B,OAAO,CAAC;gBACP,IAAI,EAAE,2BAA2B;gBACjC,MAAM,EAAE,KAAK;aACd,CAAC;iBACD,IAAI,CACH,IAAI,CAAC,iBAAiB,EAAE,CAAC,eAAe,CAAC;gBACvC,GAAG,EAAE;oBACH,kBAAkB,EAAE,MAAM;iBAC3B;aACF,CAAC,CACH;iBACA,IAAI,CACH,gBAAgB,CAAC,YAAY,EAIzB,CACL;iBACA,IAAI,CAAC,iDAAuB,CAAC,SAAS,CAAC,8BAA8B,CAAC,CAAC;iBACvE,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC,CAAC;IAcJ,CAAC;IAbC,MAAM,CAAC,UAAU;QACf,iDAAuB,CAAC,kBAAkB,CACxC,8BAA8B,EAC9B,OAAC;aACE,MAAM,CAAC;YACN,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YACtB,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,iDAAuB,CAAC,IAAI,CAAC,iBAAiB,CAAC;SACtD,CAAC;aACD,QAAQ,CAAC,8BAA8B,CAAC,CAC5C,CAAC;QACF,iDAAuB,CAAC,YAAY,CAAC,CAAC,oCAA6B,CAAC,CAAC,CAAC;IACxE,CAAC;CACF;AAhED,kCAgEC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { CommonHttpService } from "../core/CommonHttpService";
|
|
2
|
+
import { type PagedDtoArticleDto } from "../models/common";
|
|
3
|
+
/** @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-knowledgebase */
|
|
4
|
+
export declare class KnowledgebaseService extends CommonHttpService {
|
|
5
|
+
/**
|
|
6
|
+
* Returns articles which match the given query string across all service desks.
|
|
7
|
+
*
|
|
8
|
+
* **[Permissions](#permissions) required**: Permission to access the [customer
|
|
9
|
+
* portal](https://confluence.atlassian.com/servicedeskcloud/configuring-the-customer-portal-732528918.html).
|
|
10
|
+
*
|
|
11
|
+
* @returns Returns the articles, on the specified page of the results.
|
|
12
|
+
*
|
|
13
|
+
* example: {
|
|
14
|
+
* "_expands": [],
|
|
15
|
+
* "size": 2,
|
|
16
|
+
* "start": 2,
|
|
17
|
+
* "limit": 2,
|
|
18
|
+
* "isLastPage": false,
|
|
19
|
+
* "_links": {
|
|
20
|
+
* "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
|
|
21
|
+
* "context": "context",
|
|
22
|
+
* "next":
|
|
23
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/knowledgebase/article?start=4&limit=2",
|
|
24
|
+
* "prev":
|
|
25
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/knowledgebase/article?start=0&limit=2"
|
|
26
|
+
* },
|
|
27
|
+
* "values": [
|
|
28
|
+
* {
|
|
29
|
+
* "title": "Stolen computer",
|
|
30
|
+
* "excerpt": "assuming your computer was stolen",
|
|
31
|
+
* "source": {
|
|
32
|
+
* "type": "confluence",
|
|
33
|
+
* "pageId": "8786177",
|
|
34
|
+
* "spaceKey": "IT"
|
|
35
|
+
* },
|
|
36
|
+
* "content": {
|
|
37
|
+
* "iframeSrc":
|
|
38
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/knowledgebase/article/view/8786177"
|
|
39
|
+
* }
|
|
40
|
+
* },
|
|
41
|
+
* {
|
|
42
|
+
* "title": "Upgrading computer",
|
|
43
|
+
* "excerpt": "each computer older then 3 years can be upgraded",
|
|
44
|
+
* "source": {
|
|
45
|
+
* "type": "confluence",
|
|
46
|
+
* "pageId": "8785228",
|
|
47
|
+
* "spaceKey": "IT"
|
|
48
|
+
* },
|
|
49
|
+
* "content": {
|
|
50
|
+
* "iframeSrc":
|
|
51
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/knowledgebase/article/view/8785228"
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
* ]
|
|
55
|
+
* }
|
|
56
|
+
* @path {GET} /rest/servicedeskapi/knowledgebase/article
|
|
57
|
+
* @scopes-current read:servicedesk-request
|
|
58
|
+
* @scopes-beta read:knowledgebase:jira-service-management
|
|
59
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-knowledgebase#api-rest-servicedeskapi-knowledgebase-article-get
|
|
60
|
+
*/
|
|
61
|
+
getArticles: ({ query, highlight, start, limit, }: {
|
|
62
|
+
/** The string used to filter the articles (required). */
|
|
63
|
+
query: string;
|
|
64
|
+
/**
|
|
65
|
+
* If set to true matching query term in the title and excerpt will be highlighted
|
|
66
|
+
* using the `@@@hl@@@term@@@endhl@@@` syntax. Default: false.
|
|
67
|
+
*/
|
|
68
|
+
highlight: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* The starting index of the returned objects. Base index: 0. See the
|
|
71
|
+
* [Pagination](#pagination) section for more details.
|
|
72
|
+
*/
|
|
73
|
+
start?: number | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* The maximum number of items to return per page. Default: 50. See the
|
|
76
|
+
* [Pagination](#pagination) section for more details.
|
|
77
|
+
*/
|
|
78
|
+
limit?: number | undefined;
|
|
79
|
+
}) => Promise<PagedDtoArticleDto>;
|
|
80
|
+
static initialize(): void;
|
|
81
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KnowledgebaseService = void 0;
|
|
4
|
+
// DO NOT EDIT!
|
|
5
|
+
// This file is generated by "api-typescript-generator".
|
|
6
|
+
// To update this file run "yarn build:openapi".
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
const commonHttpClient = require("../core/CommonHttpClient");
|
|
9
|
+
const CommonHttpService_1 = require("../core/CommonHttpService");
|
|
10
|
+
const common_1 = require("../models/common");
|
|
11
|
+
const validationSchemaStorage_1 = require("../validationSchemaStorage");
|
|
12
|
+
/** @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-knowledgebase */
|
|
13
|
+
class KnowledgebaseService extends CommonHttpService_1.CommonHttpService {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
/**
|
|
17
|
+
* Returns articles which match the given query string across all service desks.
|
|
18
|
+
*
|
|
19
|
+
* **[Permissions](#permissions) required**: Permission to access the [customer
|
|
20
|
+
* portal](https://confluence.atlassian.com/servicedeskcloud/configuring-the-customer-portal-732528918.html).
|
|
21
|
+
*
|
|
22
|
+
* @returns Returns the articles, on the specified page of the results.
|
|
23
|
+
*
|
|
24
|
+
* example: {
|
|
25
|
+
* "_expands": [],
|
|
26
|
+
* "size": 2,
|
|
27
|
+
* "start": 2,
|
|
28
|
+
* "limit": 2,
|
|
29
|
+
* "isLastPage": false,
|
|
30
|
+
* "_links": {
|
|
31
|
+
* "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
|
|
32
|
+
* "context": "context",
|
|
33
|
+
* "next":
|
|
34
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/knowledgebase/article?start=4&limit=2",
|
|
35
|
+
* "prev":
|
|
36
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/knowledgebase/article?start=0&limit=2"
|
|
37
|
+
* },
|
|
38
|
+
* "values": [
|
|
39
|
+
* {
|
|
40
|
+
* "title": "Stolen computer",
|
|
41
|
+
* "excerpt": "assuming your computer was stolen",
|
|
42
|
+
* "source": {
|
|
43
|
+
* "type": "confluence",
|
|
44
|
+
* "pageId": "8786177",
|
|
45
|
+
* "spaceKey": "IT"
|
|
46
|
+
* },
|
|
47
|
+
* "content": {
|
|
48
|
+
* "iframeSrc":
|
|
49
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/knowledgebase/article/view/8786177"
|
|
50
|
+
* }
|
|
51
|
+
* },
|
|
52
|
+
* {
|
|
53
|
+
* "title": "Upgrading computer",
|
|
54
|
+
* "excerpt": "each computer older then 3 years can be upgraded",
|
|
55
|
+
* "source": {
|
|
56
|
+
* "type": "confluence",
|
|
57
|
+
* "pageId": "8785228",
|
|
58
|
+
* "spaceKey": "IT"
|
|
59
|
+
* },
|
|
60
|
+
* "content": {
|
|
61
|
+
* "iframeSrc":
|
|
62
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/knowledgebase/article/view/8785228"
|
|
63
|
+
* }
|
|
64
|
+
* }
|
|
65
|
+
* ]
|
|
66
|
+
* }
|
|
67
|
+
* @path {GET} /rest/servicedeskapi/knowledgebase/article
|
|
68
|
+
* @scopes-current read:servicedesk-request
|
|
69
|
+
* @scopes-beta read:knowledgebase:jira-service-management
|
|
70
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-knowledgebase#api-rest-servicedeskapi-knowledgebase-article-get
|
|
71
|
+
*/
|
|
72
|
+
this.getArticles = ({ query, highlight, start, limit, }) => {
|
|
73
|
+
return this.getClientInstance()
|
|
74
|
+
.request({
|
|
75
|
+
path: "/rest/servicedeskapi/knowledgebase/article",
|
|
76
|
+
method: "GET",
|
|
77
|
+
query: {
|
|
78
|
+
query,
|
|
79
|
+
highlight,
|
|
80
|
+
start,
|
|
81
|
+
limit,
|
|
82
|
+
},
|
|
83
|
+
})
|
|
84
|
+
.then(this.getClientInstance().responseHandler({
|
|
85
|
+
200: {
|
|
86
|
+
"application/json": "json",
|
|
87
|
+
},
|
|
88
|
+
}))
|
|
89
|
+
.then(commonHttpClient.castResponse())
|
|
90
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("KnowledgebaseService.getArticles.response"))
|
|
91
|
+
.then(commonHttpClient.getBody);
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
static initialize() {
|
|
95
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("KnowledgebaseService.getArticles.response", zod_1.z
|
|
96
|
+
.object({
|
|
97
|
+
status: zod_1.z.literal(200),
|
|
98
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
99
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("PagedDtoArticleDto"),
|
|
100
|
+
})
|
|
101
|
+
.describe("KnowledgebaseService.getArticles.response"));
|
|
102
|
+
validationSchemaStorage_1.validationSchemaStorage.registerOnce([common_1.registerCommonValidationSchemas]);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
exports.KnowledgebaseService = KnowledgebaseService;
|
|
106
|
+
//# sourceMappingURL=KnowledgebaseService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KnowledgebaseService.js","sourceRoot":"","sources":["../../../../src/openapi/serviceManagement/services/KnowledgebaseService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,6BAAwB;AAExB,6DAA6D;AAC7D,iEAA8D;AAC9D,6CAG0B;AAC1B,wEAAqE;AACrE,gGAAgG;AAChG,MAAa,oBAAqB,SAAQ,qCAAiB;IAA3D;;QACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAuDG;QACH,gBAAW,GAAG,CAAC,EACb,KAAK,EACL,SAAS,EACT,KAAK,EACL,KAAK,GAmBN,EAA+B,EAAE;YAChC,OAAO,IAAI,CAAC,iBAAiB,EAAE;iBAC5B,OAAO,CAAC;gBACP,IAAI,EAAE,4CAA4C;gBAClD,MAAM,EAAE,KAAK;gBACb,KAAK,EAAE;oBACL,KAAK;oBACL,SAAS;oBACT,KAAK;oBACL,KAAK;iBACN;aACF,CAAC;iBACD,IAAI,CACH,IAAI,CAAC,iBAAiB,EAAE,CAAC,eAAe,CAAC;gBACvC,GAAG,EAAE;oBACH,kBAAkB,EAAE,MAAM;iBAC3B;aACF,CAAC,CACH;iBACA,IAAI,CACH,gBAAgB,CAAC,YAAY,EAIzB,CACL;iBACA,IAAI,CACH,iDAAuB,CAAC,SAAS,CAC/B,2CAA2C,CAC5C,CACF;iBACA,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC,CAAC;IAcJ,CAAC;IAbC,MAAM,CAAC,UAAU;QACf,iDAAuB,CAAC,kBAAkB,CACxC,2CAA2C,EAC3C,OAAC;aACE,MAAM,CAAC;YACN,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YACtB,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,iDAAuB,CAAC,IAAI,CAAC,oBAAoB,CAAC;SACzD,CAAC;aACD,QAAQ,CAAC,2CAA2C,CAAC,CACzD,CAAC;QACF,iDAAuB,CAAC,YAAY,CAAC,CAAC,wCAA+B,CAAC,CAAC,CAAC;IAC1E,CAAC;CACF;AA9HD,oDA8HC"}
|