@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,1510 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServicedeskService = 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 servicedesk_1 = require("../models/servicedesk");
|
|
12
|
+
const validationSchemaStorage_1 = require("../validationSchemaStorage");
|
|
13
|
+
/** @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk */
|
|
14
|
+
class ServicedeskService extends CommonHttpService_1.CommonHttpService {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
/**
|
|
18
|
+
* Adds one or more customers to a service desk. If any of the passed customers
|
|
19
|
+
* are associated with the service desk, no changes will be made for those
|
|
20
|
+
* customers and the resource returns a 204 success code.
|
|
21
|
+
*
|
|
22
|
+
* **[Permissions](#permissions) required**: Service desk administrator
|
|
23
|
+
*
|
|
24
|
+
* @path {POST} /rest/servicedeskapi/servicedesk/{serviceDeskId}/customer
|
|
25
|
+
* @scopes-current manage:servicedesk-customer
|
|
26
|
+
* @scopes-beta read:servicedesk.customer:jira-service-management,
|
|
27
|
+
* write:servicedesk.customer:jira-service-management
|
|
28
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-customer-post
|
|
29
|
+
*/
|
|
30
|
+
this.addCustomers = ({ serviceDeskId, serviceDeskCustomerDto, }) => {
|
|
31
|
+
return this.getClientInstance()
|
|
32
|
+
.request({
|
|
33
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer",
|
|
34
|
+
method: "POST",
|
|
35
|
+
pathParams: {
|
|
36
|
+
serviceDeskId,
|
|
37
|
+
},
|
|
38
|
+
headers: {
|
|
39
|
+
"Content-Type": "application/json",
|
|
40
|
+
},
|
|
41
|
+
body: serviceDeskCustomerDto,
|
|
42
|
+
})
|
|
43
|
+
.then(commonHttpClient.discardResult);
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* This method adds one or more temporary attachments to a service desk, which can
|
|
47
|
+
* then be permanently attached to a customer request using
|
|
48
|
+
* [servicedeskapi/request/\{issueIdOrKey\}/attachment](#api-request-issueIdOrKey-attachment-post).
|
|
49
|
+
*
|
|
50
|
+
* **Note**: It is possible for a service desk administrator to turn off the
|
|
51
|
+
* ability to add attachments to a service desk.
|
|
52
|
+
*
|
|
53
|
+
* This method expects a multipart request. The media-type multipart/form-data is
|
|
54
|
+
* defined in RFC 1867. Most client libraries have classes that make dealing with
|
|
55
|
+
* multipart posts simple. For instance, in Java the Apache HTTP Components
|
|
56
|
+
* library provides
|
|
57
|
+
* [MultiPartEntity](http://hc.apache.org/httpcomponents-client-ga/httpmime/apidocs/org/apache/http/entity/mime/MultipartEntity.html).
|
|
58
|
+
*
|
|
59
|
+
* Because this method accepts multipart/form-data, it has XSRF protection on it.
|
|
60
|
+
* This means you must submit a header of X-Atlassian-Token: no-check with the
|
|
61
|
+
* request or it will be blocked.
|
|
62
|
+
*
|
|
63
|
+
* The name of the multipart/form-data parameter that contains the attachments
|
|
64
|
+
* must be `file`.
|
|
65
|
+
*
|
|
66
|
+
* For example, to upload a file called `myfile.txt` in the Service Desk with ID
|
|
67
|
+
* 10001 use
|
|
68
|
+
*
|
|
69
|
+
* curl -D- -u customer:customer -X POST -H "X-ExperimentalApi: opt-in" -H
|
|
70
|
+
* "X-Atlassian-Token: no-check" -F "file=@myfile.txt"
|
|
71
|
+
* https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/10001/attachTemporaryFile
|
|
72
|
+
*
|
|
73
|
+
* **[Permissions](#permissions) required**: Permission to add attachments in this
|
|
74
|
+
* Service Desk.
|
|
75
|
+
*
|
|
76
|
+
* @returns Returns if the file(s) were attached.
|
|
77
|
+
*
|
|
78
|
+
* example: {
|
|
79
|
+
* "temporaryAttachments": [
|
|
80
|
+
* {
|
|
81
|
+
* "temporaryAttachmentId": "temp8186986881700442965",
|
|
82
|
+
* "fileName": "atlassian.png"
|
|
83
|
+
* },
|
|
84
|
+
* {
|
|
85
|
+
* "temporaryAttachmentId": "temp589064256337898328",
|
|
86
|
+
* "fileName": "readme.txt"
|
|
87
|
+
* }
|
|
88
|
+
* ]
|
|
89
|
+
* }
|
|
90
|
+
* @path {POST} /rest/servicedeskapi/servicedesk/{serviceDeskId}/attachTemporaryFile
|
|
91
|
+
* @scopes-current write:servicedesk-request
|
|
92
|
+
* @scopes-beta read:request.attachment:jira-service-management,
|
|
93
|
+
* write:request.attachment:jira-service-management
|
|
94
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-attachtemporaryfile-post
|
|
95
|
+
*/
|
|
96
|
+
this.attachTemporaryFile = ({ serviceDeskId, multipartFiles, }) => {
|
|
97
|
+
return this.getClientInstance()
|
|
98
|
+
.request({
|
|
99
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/attachTemporaryFile",
|
|
100
|
+
method: "POST",
|
|
101
|
+
pathParams: {
|
|
102
|
+
serviceDeskId,
|
|
103
|
+
},
|
|
104
|
+
headers: {
|
|
105
|
+
"Content-Type": "multipart/form-data",
|
|
106
|
+
},
|
|
107
|
+
body: multipartFiles,
|
|
108
|
+
})
|
|
109
|
+
.then(this.getClientInstance().responseHandler({
|
|
110
|
+
201: {
|
|
111
|
+
"application/json": "json",
|
|
112
|
+
},
|
|
113
|
+
}))
|
|
114
|
+
.then(commonHttpClient.castResponse())
|
|
115
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.attachTemporaryFile.response"))
|
|
116
|
+
.then(commonHttpClient.getBody);
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* This method enables a customer request type to be added to a service desk based
|
|
120
|
+
* on an issue type. Note that not all customer request type fields can be
|
|
121
|
+
* specified in the request and these fields are given the following default
|
|
122
|
+
* values:
|
|
123
|
+
*
|
|
124
|
+
* * Request type icon is given the headset icon.
|
|
125
|
+
* * Request type groups is left empty, which means this customer request type
|
|
126
|
+
* will not be visible on the [customer
|
|
127
|
+
* portal](https://confluence.atlassian.com/servicedeskcloud/configuring-the-customer-portal-732528918.html).
|
|
128
|
+
* * Request type status mapping is left empty, so the request type has no
|
|
129
|
+
* custom status mapping but inherits the status map from the issue type upon
|
|
130
|
+
* which it is based.
|
|
131
|
+
* * Request type field mapping is set to show the required fields as specified
|
|
132
|
+
* by the issue type used to create the customer request type.
|
|
133
|
+
*
|
|
134
|
+
*
|
|
135
|
+
* These fields can be updated by a service desk administrator using the **Request
|
|
136
|
+
* types** option in **Project settings**.
|
|
137
|
+
* Request Types are created in next-gen projects by creating Issue Types. Please
|
|
138
|
+
* use the Jira Cloud Platform Create issue type endpoint instead.
|
|
139
|
+
*
|
|
140
|
+
* **[Permissions](#permissions) required**: Service desk's administrator
|
|
141
|
+
*
|
|
142
|
+
* @returns Returns the customer request type created.
|
|
143
|
+
*
|
|
144
|
+
* example: {
|
|
145
|
+
* "_expands": [],
|
|
146
|
+
* "id": "11001",
|
|
147
|
+
* "_links": {
|
|
148
|
+
* "self":
|
|
149
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/28/requesttype/11001"
|
|
150
|
+
* },
|
|
151
|
+
* "name": "Get IT Help",
|
|
152
|
+
* "description": "Get IT Help",
|
|
153
|
+
* "helpText": "Please tell us clearly the problem you have within 100 words.",
|
|
154
|
+
* "issueTypeId": "12345",
|
|
155
|
+
* "serviceDeskId": "28",
|
|
156
|
+
* "portalId": "2",
|
|
157
|
+
* "groupIds": [
|
|
158
|
+
* "12"
|
|
159
|
+
* ],
|
|
160
|
+
* "icon": {
|
|
161
|
+
* "id": "12345",
|
|
162
|
+
* "_links": {
|
|
163
|
+
* "iconUrls": {
|
|
164
|
+
* "48x48":
|
|
165
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12345?size=large",
|
|
166
|
+
* "24x24":
|
|
167
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12345?size=small",
|
|
168
|
+
* "16x16":
|
|
169
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12345?size=xsmall",
|
|
170
|
+
* "32x32":
|
|
171
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12345?size=medium"
|
|
172
|
+
* }
|
|
173
|
+
* }
|
|
174
|
+
* }
|
|
175
|
+
* }
|
|
176
|
+
* @path {POST} /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype
|
|
177
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-requesttype-post
|
|
178
|
+
*/
|
|
179
|
+
this.createRequestType = ({ serviceDeskId, requestTypeCreateDto, }) => {
|
|
180
|
+
return this.getClientInstance()
|
|
181
|
+
.request({
|
|
182
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype",
|
|
183
|
+
method: "POST",
|
|
184
|
+
pathParams: {
|
|
185
|
+
serviceDeskId,
|
|
186
|
+
},
|
|
187
|
+
headers: {
|
|
188
|
+
"Content-Type": "application/json",
|
|
189
|
+
},
|
|
190
|
+
body: requestTypeCreateDto,
|
|
191
|
+
})
|
|
192
|
+
.then(this.getClientInstance().responseHandler({
|
|
193
|
+
200: {
|
|
194
|
+
"application/json": "json",
|
|
195
|
+
},
|
|
196
|
+
}))
|
|
197
|
+
.then(commonHttpClient.castResponse())
|
|
198
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.createRequestType.response"))
|
|
199
|
+
.then(commonHttpClient.getBody);
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Removes a property from a request type.
|
|
203
|
+
*
|
|
204
|
+
* Properties for a Request Type in next-gen are stored as Issue Type properties
|
|
205
|
+
* and therefore can also be deleted by calling the Jira Cloud Platform [Delete
|
|
206
|
+
* issue type
|
|
207
|
+
* property](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issuetype-issueTypeId-properties-propertyKey-delete)
|
|
208
|
+
* endpoint.
|
|
209
|
+
*
|
|
210
|
+
* **[Permissions](#permissions) required**: Jira project administrator with a
|
|
211
|
+
* Jira Service Management agent license.
|
|
212
|
+
*
|
|
213
|
+
* @path {DELETE}
|
|
214
|
+
* /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/property/{propertyKey}
|
|
215
|
+
* @scopes-current manage:jira-project
|
|
216
|
+
* @scopes-beta read:requesttype.property:jira-service-management,
|
|
217
|
+
* delete:requesttype.property:jira-service-management
|
|
218
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-requesttype-requesttypeid-property-propertykey-delete
|
|
219
|
+
*/
|
|
220
|
+
this.deleteProperty = ({ serviceDeskId, requestTypeId, propertyKey, }) => {
|
|
221
|
+
return this.getClientInstance()
|
|
222
|
+
.request({
|
|
223
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/property/{propertyKey}",
|
|
224
|
+
method: "DELETE",
|
|
225
|
+
pathParams: {
|
|
226
|
+
serviceDeskId,
|
|
227
|
+
requestTypeId,
|
|
228
|
+
propertyKey,
|
|
229
|
+
},
|
|
230
|
+
})
|
|
231
|
+
.then(commonHttpClient.discardResult);
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* This method deletes a customer request type from a service desk, and removes it
|
|
235
|
+
* from all customer requests.
|
|
236
|
+
* This only supports classic projects.
|
|
237
|
+
*
|
|
238
|
+
* **[Permissions](#permissions) required**: Service desk administrator.
|
|
239
|
+
*
|
|
240
|
+
* @path {DELETE}
|
|
241
|
+
* /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}
|
|
242
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-requesttype-requesttypeid-delete
|
|
243
|
+
*/
|
|
244
|
+
this.deleteRequestType = ({ serviceDeskId, requestTypeId, }) => {
|
|
245
|
+
return this.getClientInstance()
|
|
246
|
+
.request({
|
|
247
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}",
|
|
248
|
+
method: "DELETE",
|
|
249
|
+
pathParams: {
|
|
250
|
+
serviceDeskId,
|
|
251
|
+
requestTypeId,
|
|
252
|
+
},
|
|
253
|
+
})
|
|
254
|
+
.then(commonHttpClient.discardResult);
|
|
255
|
+
};
|
|
256
|
+
/**
|
|
257
|
+
* Returns articles which match the given query and belong to the knowledge base
|
|
258
|
+
* linked to the service desk.
|
|
259
|
+
*
|
|
260
|
+
* **[Permissions](#permissions) required**: Permission to access the service desk.
|
|
261
|
+
*
|
|
262
|
+
* @returns Returns the articles, on the specified page of the results.
|
|
263
|
+
*
|
|
264
|
+
* example: {
|
|
265
|
+
* "_expands": [],
|
|
266
|
+
* "size": 2,
|
|
267
|
+
* "start": 2,
|
|
268
|
+
* "limit": 2,
|
|
269
|
+
* "isLastPage": false,
|
|
270
|
+
* "_links": {
|
|
271
|
+
* "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
|
|
272
|
+
* "context": "context",
|
|
273
|
+
* "next":
|
|
274
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/%7BserviceDeskId%7D/knowledgebase/article?start=4&limit=2",
|
|
275
|
+
* "prev":
|
|
276
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/%7BserviceDeskId%7D/knowledgebase/article?start=0&limit=2"
|
|
277
|
+
* },
|
|
278
|
+
* "values": [
|
|
279
|
+
* {
|
|
280
|
+
* "title": "Stolen computer",
|
|
281
|
+
* "excerpt": "assuming your computer was stolen",
|
|
282
|
+
* "source": {
|
|
283
|
+
* "type": "confluence",
|
|
284
|
+
* "pageId": "8786177",
|
|
285
|
+
* "spaceKey": "IT"
|
|
286
|
+
* },
|
|
287
|
+
* "content": {
|
|
288
|
+
* "iframeSrc":
|
|
289
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/knowledgebase/article/view/8786177"
|
|
290
|
+
* }
|
|
291
|
+
* },
|
|
292
|
+
* {
|
|
293
|
+
* "title": "Upgrading computer",
|
|
294
|
+
* "excerpt": "each computer older then 3 years can be upgraded",
|
|
295
|
+
* "source": {
|
|
296
|
+
* "type": "confluence",
|
|
297
|
+
* "pageId": "8785228",
|
|
298
|
+
* "spaceKey": "IT"
|
|
299
|
+
* },
|
|
300
|
+
* "content": {
|
|
301
|
+
* "iframeSrc":
|
|
302
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/knowledgebase/article/view/8785228"
|
|
303
|
+
* }
|
|
304
|
+
* }
|
|
305
|
+
* ]
|
|
306
|
+
* }
|
|
307
|
+
* @path {GET} /rest/servicedeskapi/servicedesk/{serviceDeskId}/knowledgebase/article
|
|
308
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-knowledgebase-article-get
|
|
309
|
+
*/
|
|
310
|
+
this.getArticles = ({ serviceDeskId, query, highlight, start, limit, }) => {
|
|
311
|
+
return this.getClientInstance()
|
|
312
|
+
.request({
|
|
313
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/knowledgebase/article",
|
|
314
|
+
method: "GET",
|
|
315
|
+
pathParams: {
|
|
316
|
+
serviceDeskId,
|
|
317
|
+
},
|
|
318
|
+
query: {
|
|
319
|
+
query,
|
|
320
|
+
highlight,
|
|
321
|
+
start,
|
|
322
|
+
limit,
|
|
323
|
+
},
|
|
324
|
+
})
|
|
325
|
+
.then(this.getClientInstance().responseHandler({
|
|
326
|
+
200: {
|
|
327
|
+
"application/json": "json",
|
|
328
|
+
},
|
|
329
|
+
}))
|
|
330
|
+
.then(commonHttpClient.castResponse())
|
|
331
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.getArticles.response"))
|
|
332
|
+
.then(commonHttpClient.getBody);
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* This method returns a list of the customers on a service desk.
|
|
336
|
+
*
|
|
337
|
+
* The returned list of customers can be filtered using the `query` parameter. The
|
|
338
|
+
* parameter is matched against customers' `displayName`, `name`, or `email`. For
|
|
339
|
+
* example, searching for "John", "Jo", "Smi", or "Smith" will match a user with
|
|
340
|
+
* display name "John Smith".
|
|
341
|
+
*
|
|
342
|
+
* **[Permissions](#permissions) required**: Permission to view this Service
|
|
343
|
+
* Desk's customers.
|
|
344
|
+
*
|
|
345
|
+
* @returns Returns the service desk's customer list.
|
|
346
|
+
*
|
|
347
|
+
* example: {
|
|
348
|
+
* "_expands": [],
|
|
349
|
+
* "size": 1,
|
|
350
|
+
* "start": 1,
|
|
351
|
+
* "limit": 1,
|
|
352
|
+
* "isLastPage": false,
|
|
353
|
+
* "_links": {
|
|
354
|
+
* "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
|
|
355
|
+
* "context": "context",
|
|
356
|
+
* "next":
|
|
357
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/1/customer?start=2&limit=1",
|
|
358
|
+
* "prev":
|
|
359
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/1/customer?start=0&limit=1"
|
|
360
|
+
* },
|
|
361
|
+
* "values": [
|
|
362
|
+
* {
|
|
363
|
+
* "accountId":
|
|
364
|
+
* "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
365
|
+
* "name": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
366
|
+
* "key": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
367
|
+
* "emailAddress": "fred@example.com",
|
|
368
|
+
* "displayName": "Fred F. User",
|
|
369
|
+
* "active": true,
|
|
370
|
+
* "timeZone": "Australia/Sydney",
|
|
371
|
+
* "_links": {
|
|
372
|
+
* "jiraRest":
|
|
373
|
+
* "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
374
|
+
* "avatarUrls": {
|
|
375
|
+
* "16x16":
|
|
376
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
|
|
377
|
+
* "24x24":
|
|
378
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
|
|
379
|
+
* "32x32":
|
|
380
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue",
|
|
381
|
+
* "48x48":
|
|
382
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue"
|
|
383
|
+
* },
|
|
384
|
+
* "self":
|
|
385
|
+
* "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b"
|
|
386
|
+
* }
|
|
387
|
+
* }
|
|
388
|
+
* ]
|
|
389
|
+
* }
|
|
390
|
+
* @path {GET} /rest/servicedeskapi/servicedesk/{serviceDeskId}/customer
|
|
391
|
+
* @scopes-current manage:servicedesk-customer
|
|
392
|
+
* @scopes-beta read:servicedesk.customer:jira-service-management, read:user:jira
|
|
393
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-customer-get
|
|
394
|
+
*/
|
|
395
|
+
this.getCustomers = ({ serviceDeskId, query, start, limit, }) => {
|
|
396
|
+
return this.getClientInstance()
|
|
397
|
+
.request({
|
|
398
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer",
|
|
399
|
+
method: "GET",
|
|
400
|
+
pathParams: {
|
|
401
|
+
serviceDeskId,
|
|
402
|
+
},
|
|
403
|
+
query: {
|
|
404
|
+
query,
|
|
405
|
+
start,
|
|
406
|
+
limit,
|
|
407
|
+
},
|
|
408
|
+
})
|
|
409
|
+
.then(this.getClientInstance().responseHandler({
|
|
410
|
+
200: {
|
|
411
|
+
"application/json": "json",
|
|
412
|
+
},
|
|
413
|
+
}))
|
|
414
|
+
.then(commonHttpClient.castResponse())
|
|
415
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.getCustomers.response"))
|
|
416
|
+
.then(commonHttpClient.getBody);
|
|
417
|
+
};
|
|
418
|
+
/**
|
|
419
|
+
* This method returns the customer requests in a queue. Only fields that the
|
|
420
|
+
* queue is configured to show are returned. For example, if a queue is configured
|
|
421
|
+
* to show description and due date, then only those two fields are returned for
|
|
422
|
+
* each customer request in the queue.
|
|
423
|
+
*
|
|
424
|
+
* **[Permissions](#permissions) required**: Service desk's agent.
|
|
425
|
+
*
|
|
426
|
+
* @returns Returns the customer requests belonging to the queue, on the specified page of
|
|
427
|
+
* the results.
|
|
428
|
+
*
|
|
429
|
+
* example: {
|
|
430
|
+
* "_expands": [],
|
|
431
|
+
* "size": 1,
|
|
432
|
+
* "start": 1,
|
|
433
|
+
* "limit": 1,
|
|
434
|
+
* "isLastPage": false,
|
|
435
|
+
* "_links": {
|
|
436
|
+
* "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
|
|
437
|
+
* "context": "context",
|
|
438
|
+
* "next":
|
|
439
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/1/queue/10/issue?start=2&limit=1",
|
|
440
|
+
* "prev":
|
|
441
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/1/queue/10/issue?start=0&limit=1"
|
|
442
|
+
* },
|
|
443
|
+
* "values": [
|
|
444
|
+
* {
|
|
445
|
+
* "fields": {
|
|
446
|
+
* "summary": "My keyboard is broken",
|
|
447
|
+
* "issuetype": {
|
|
448
|
+
* "avatarId": 10002,
|
|
449
|
+
* "description": "For general IT problems and questions. Created by
|
|
450
|
+
* Jira Service Management.",
|
|
451
|
+
* "iconUrl":
|
|
452
|
+
* "https://your-domain.atlassian.net/servicedesk/issue-type-icons?icon=it-help",
|
|
453
|
+
* "id": "13",
|
|
454
|
+
* "name": "IT Help",
|
|
455
|
+
* "self": "https://your-domain.atlassian.net/rest/api/2/issuetype/13",
|
|
456
|
+
* "subtask": false
|
|
457
|
+
* },
|
|
458
|
+
* "duedate": "2015-11-11T14:17:13.000+0700",
|
|
459
|
+
* "created": "2015-11-09T14:17:13.000+0700",
|
|
460
|
+
* "reporter": {
|
|
461
|
+
* "accountId":
|
|
462
|
+
* "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
463
|
+
* "name":
|
|
464
|
+
* "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
465
|
+
* "key":
|
|
466
|
+
* "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
467
|
+
* "emailAddress": "fred@example.com",
|
|
468
|
+
* "displayName": "Fred F. User",
|
|
469
|
+
* "active": true,
|
|
470
|
+
* "timeZone": "Australia/Sydney",
|
|
471
|
+
* "_links": {
|
|
472
|
+
* "jiraRest":
|
|
473
|
+
* "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
474
|
+
* "avatarUrls": {
|
|
475
|
+
* "16x16":
|
|
476
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
|
|
477
|
+
* "24x24":
|
|
478
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
|
|
479
|
+
* "32x32":
|
|
480
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue",
|
|
481
|
+
* "48x48":
|
|
482
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue"
|
|
483
|
+
* },
|
|
484
|
+
* "self":
|
|
485
|
+
* "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b"
|
|
486
|
+
* }
|
|
487
|
+
* }
|
|
488
|
+
* },
|
|
489
|
+
* "id": "10001",
|
|
490
|
+
* "key": "SD-1",
|
|
491
|
+
* "self":
|
|
492
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/rest/api/2/issue/10001"
|
|
493
|
+
* }
|
|
494
|
+
* ]
|
|
495
|
+
* }
|
|
496
|
+
* @path {GET} /rest/servicedeskapi/servicedesk/{serviceDeskId}/queue/{queueId}/issue
|
|
497
|
+
* @scopes-current read:jira-work
|
|
498
|
+
* @scopes-beta read:queue:jira-service-management, read:user:jira, read:issue:jira
|
|
499
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-queue-queueid-issue-get
|
|
500
|
+
*/
|
|
501
|
+
this.getIssuesInQueue = ({ serviceDeskId, queueId, start, limit, }) => {
|
|
502
|
+
return this.getClientInstance()
|
|
503
|
+
.request({
|
|
504
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/queue/{queueId}/issue",
|
|
505
|
+
method: "GET",
|
|
506
|
+
pathParams: {
|
|
507
|
+
serviceDeskId,
|
|
508
|
+
queueId,
|
|
509
|
+
},
|
|
510
|
+
query: {
|
|
511
|
+
start,
|
|
512
|
+
limit,
|
|
513
|
+
},
|
|
514
|
+
})
|
|
515
|
+
.then(this.getClientInstance().responseHandler({
|
|
516
|
+
200: {
|
|
517
|
+
"application/json": "json",
|
|
518
|
+
},
|
|
519
|
+
}))
|
|
520
|
+
.then(commonHttpClient.castResponse())
|
|
521
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.getIssuesInQueue.response"))
|
|
522
|
+
.then(commonHttpClient.getBody);
|
|
523
|
+
};
|
|
524
|
+
/**
|
|
525
|
+
* Returns the keys of all properties for a request type.
|
|
526
|
+
*
|
|
527
|
+
* Properties for a Request Type in next-gen are stored as Issue Type properties
|
|
528
|
+
* and therefore the keys of all properties for a request type are also available
|
|
529
|
+
* by calling the Jira Cloud Platform [Get issue type property
|
|
530
|
+
* keys](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issuetype-issueTypeId-properties-get)
|
|
531
|
+
* endpoint.
|
|
532
|
+
*
|
|
533
|
+
* **[Permissions](#permissions) required**: The user must have permission to view
|
|
534
|
+
* the request type.
|
|
535
|
+
*
|
|
536
|
+
* @returns Returned if the request type was found.
|
|
537
|
+
*
|
|
538
|
+
* example: {
|
|
539
|
+
* "entityPropertyKeyBeans": [
|
|
540
|
+
* {
|
|
541
|
+
* "key": "requestType.attributes",
|
|
542
|
+
* "self":
|
|
543
|
+
* "/rest/servicedeskapi/servicedesk/1/requestType/2/property/propertyKey"
|
|
544
|
+
* }
|
|
545
|
+
* ]
|
|
546
|
+
* }
|
|
547
|
+
* @path {GET}
|
|
548
|
+
* /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/property
|
|
549
|
+
* @scopes-current read:servicedesk-request
|
|
550
|
+
* @scopes-beta read:requesttype.property:jira-service-management
|
|
551
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-requesttype-requesttypeid-property-get
|
|
552
|
+
*/
|
|
553
|
+
this.getPropertiesKeys = ({ requestTypeId, serviceDeskId, }) => {
|
|
554
|
+
return this.getClientInstance()
|
|
555
|
+
.request({
|
|
556
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/property",
|
|
557
|
+
method: "GET",
|
|
558
|
+
pathParams: {
|
|
559
|
+
requestTypeId,
|
|
560
|
+
serviceDeskId,
|
|
561
|
+
},
|
|
562
|
+
})
|
|
563
|
+
.then(this.getClientInstance().responseHandler({
|
|
564
|
+
200: {
|
|
565
|
+
"application/json": "json",
|
|
566
|
+
},
|
|
567
|
+
}))
|
|
568
|
+
.then(commonHttpClient.castResponse())
|
|
569
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.getPropertiesKeys.response"))
|
|
570
|
+
.then(commonHttpClient.getBody);
|
|
571
|
+
};
|
|
572
|
+
/**
|
|
573
|
+
* Returns the value of the property from a request type.
|
|
574
|
+
*
|
|
575
|
+
* Properties for a Request Type in next-gen are stored as Issue Type properties
|
|
576
|
+
* and therefore also available by calling the Jira Cloud Platform [Get issue type
|
|
577
|
+
* property](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issuetype-issueTypeId-properties-propertyKey-get)
|
|
578
|
+
* endpoint.
|
|
579
|
+
*
|
|
580
|
+
* **[Permissions](#permissions) required**: User must have permission to view the
|
|
581
|
+
* request type.
|
|
582
|
+
*
|
|
583
|
+
* @returns Returned if the request type property was returned.
|
|
584
|
+
*
|
|
585
|
+
* example: {
|
|
586
|
+
* "key": "organization.attributes",
|
|
587
|
+
* "value": {
|
|
588
|
+
* "color": "green",
|
|
589
|
+
* "priority": "high"
|
|
590
|
+
* }
|
|
591
|
+
* }
|
|
592
|
+
* @path {GET}
|
|
593
|
+
* /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/property/{propertyKey}
|
|
594
|
+
* @scopes-current read:servicedesk-request
|
|
595
|
+
* @scopes-beta read:requesttype.property:jira-service-management
|
|
596
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-requesttype-requesttypeid-property-propertykey-get
|
|
597
|
+
*/
|
|
598
|
+
this.getProperty = ({ serviceDeskId, requestTypeId, propertyKey, }) => {
|
|
599
|
+
return this.getClientInstance()
|
|
600
|
+
.request({
|
|
601
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/property/{propertyKey}",
|
|
602
|
+
method: "GET",
|
|
603
|
+
pathParams: {
|
|
604
|
+
serviceDeskId,
|
|
605
|
+
requestTypeId,
|
|
606
|
+
propertyKey,
|
|
607
|
+
},
|
|
608
|
+
})
|
|
609
|
+
.then(this.getClientInstance().responseHandler({
|
|
610
|
+
200: {
|
|
611
|
+
"application/json": "json",
|
|
612
|
+
},
|
|
613
|
+
}))
|
|
614
|
+
.then(commonHttpClient.castResponse())
|
|
615
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.getProperty.response"))
|
|
616
|
+
.then(commonHttpClient.getBody);
|
|
617
|
+
};
|
|
618
|
+
/**
|
|
619
|
+
* This method returns a specific queues in a service desk. To include a customer
|
|
620
|
+
* request count for the queue (in the `issueCount` field) in the response, set
|
|
621
|
+
* the query parameter `includeCount` to true (its default is false).
|
|
622
|
+
*
|
|
623
|
+
* **[Permissions](#permissions) required**: service desk's Agent.
|
|
624
|
+
*
|
|
625
|
+
* @returns Returns the specific queue of the service desk.
|
|
626
|
+
*
|
|
627
|
+
* example: {
|
|
628
|
+
* "id": "20",
|
|
629
|
+
* "name": "Assigned to me",
|
|
630
|
+
* "jql": "project = SD AND assignee = currentUser() AND resolution = Unresolved
|
|
631
|
+
* ORDER BY \"Time to resolution\" ASC",
|
|
632
|
+
* "fields": [
|
|
633
|
+
* "issuetype",
|
|
634
|
+
* "issuekey",
|
|
635
|
+
* "summary",
|
|
636
|
+
* "created",
|
|
637
|
+
* "reporter",
|
|
638
|
+
* "duedate"
|
|
639
|
+
* ],
|
|
640
|
+
* "issueCount": 10,
|
|
641
|
+
* "_links": {
|
|
642
|
+
* "self":
|
|
643
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/1/queue/20"
|
|
644
|
+
* }
|
|
645
|
+
* }
|
|
646
|
+
* @path {GET} /rest/servicedeskapi/servicedesk/{serviceDeskId}/queue/{queueId}
|
|
647
|
+
* @scopes-current read:jira-work
|
|
648
|
+
* @scopes-beta read:queue:jira-service-management, read:user:jira, read:jql:jira
|
|
649
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-queue-queueid-get
|
|
650
|
+
*/
|
|
651
|
+
this.getQueue = ({ serviceDeskId, queueId, includeCount, }) => {
|
|
652
|
+
return this.getClientInstance()
|
|
653
|
+
.request({
|
|
654
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/queue/{queueId}",
|
|
655
|
+
method: "GET",
|
|
656
|
+
pathParams: {
|
|
657
|
+
serviceDeskId,
|
|
658
|
+
queueId,
|
|
659
|
+
},
|
|
660
|
+
query: {
|
|
661
|
+
includeCount,
|
|
662
|
+
},
|
|
663
|
+
})
|
|
664
|
+
.then(this.getClientInstance().responseHandler({
|
|
665
|
+
200: {
|
|
666
|
+
"application/json": "json",
|
|
667
|
+
},
|
|
668
|
+
}))
|
|
669
|
+
.then(commonHttpClient.castResponse())
|
|
670
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.getQueue.response"))
|
|
671
|
+
.then(commonHttpClient.getBody);
|
|
672
|
+
};
|
|
673
|
+
/**
|
|
674
|
+
* This method returns the queues in a service desk. To include a customer request
|
|
675
|
+
* count for each queue (in the `issueCount` field) in the response, set the query
|
|
676
|
+
* parameter `includeCount` to true (its default is false).
|
|
677
|
+
*
|
|
678
|
+
* **[Permissions](#permissions) required**: service desk's Agent.
|
|
679
|
+
*
|
|
680
|
+
* @returns Returns the queues of the service desk, on the specified page of the results.
|
|
681
|
+
*
|
|
682
|
+
* example: {
|
|
683
|
+
* "_expands": [],
|
|
684
|
+
* "size": 2,
|
|
685
|
+
* "start": 2,
|
|
686
|
+
* "limit": 2,
|
|
687
|
+
* "isLastPage": false,
|
|
688
|
+
* "_links": {
|
|
689
|
+
* "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
|
|
690
|
+
* "context": "context",
|
|
691
|
+
* "next":
|
|
692
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/1/queue?start=4&limit=2",
|
|
693
|
+
* "prev":
|
|
694
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/1/queue?start=0&limit=2"
|
|
695
|
+
* },
|
|
696
|
+
* "values": [
|
|
697
|
+
* {
|
|
698
|
+
* "id": "10",
|
|
699
|
+
* "name": "Unassigned issues",
|
|
700
|
+
* "jql": "project = SD AND assignee is EMPTY AND resolution = Unresolved
|
|
701
|
+
* ORDER BY \"Time to resolution\" ASC",
|
|
702
|
+
* "fields": [
|
|
703
|
+
* "issuetype",
|
|
704
|
+
* "issuekey",
|
|
705
|
+
* "summary",
|
|
706
|
+
* "created",
|
|
707
|
+
* "reporter",
|
|
708
|
+
* "duedate"
|
|
709
|
+
* ],
|
|
710
|
+
* "issueCount": 10,
|
|
711
|
+
* "_links": {
|
|
712
|
+
* "self":
|
|
713
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/1/queue/10"
|
|
714
|
+
* }
|
|
715
|
+
* },
|
|
716
|
+
* {
|
|
717
|
+
* "id": "20",
|
|
718
|
+
* "name": "Assigned to me",
|
|
719
|
+
* "jql": "project = SD AND assignee = currentUser() AND resolution =
|
|
720
|
+
* Unresolved ORDER BY \"Time to resolution\" ASC",
|
|
721
|
+
* "fields": [
|
|
722
|
+
* "issuetype",
|
|
723
|
+
* "issuekey",
|
|
724
|
+
* "summary",
|
|
725
|
+
* "created",
|
|
726
|
+
* "reporter",
|
|
727
|
+
* "duedate"
|
|
728
|
+
* ],
|
|
729
|
+
* "issueCount": 10,
|
|
730
|
+
* "_links": {
|
|
731
|
+
* "self":
|
|
732
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/1/queue/20"
|
|
733
|
+
* }
|
|
734
|
+
* }
|
|
735
|
+
* ]
|
|
736
|
+
* }
|
|
737
|
+
* @path {GET} /rest/servicedeskapi/servicedesk/{serviceDeskId}/queue
|
|
738
|
+
* @scopes-current read:jira-work
|
|
739
|
+
* @scopes-beta read:queue:jira-service-management, read:user:jira, read:jql:jira
|
|
740
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-queue-get
|
|
741
|
+
*/
|
|
742
|
+
this.getQueues = ({ serviceDeskId, includeCount, start, limit, }) => {
|
|
743
|
+
return this.getClientInstance()
|
|
744
|
+
.request({
|
|
745
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/queue",
|
|
746
|
+
method: "GET",
|
|
747
|
+
pathParams: {
|
|
748
|
+
serviceDeskId,
|
|
749
|
+
},
|
|
750
|
+
query: {
|
|
751
|
+
includeCount,
|
|
752
|
+
start,
|
|
753
|
+
limit,
|
|
754
|
+
},
|
|
755
|
+
})
|
|
756
|
+
.then(this.getClientInstance().responseHandler({
|
|
757
|
+
200: {
|
|
758
|
+
"application/json": "json",
|
|
759
|
+
},
|
|
760
|
+
}))
|
|
761
|
+
.then(commonHttpClient.castResponse())
|
|
762
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.getQueues.response"))
|
|
763
|
+
.then(commonHttpClient.getBody);
|
|
764
|
+
};
|
|
765
|
+
/**
|
|
766
|
+
* This method returns a customer request type from a service desk.
|
|
767
|
+
*
|
|
768
|
+
* This operation can be accessed anonymously.
|
|
769
|
+
*
|
|
770
|
+
* **[Permissions](#permissions) required**: Permission to access the service desk.
|
|
771
|
+
*
|
|
772
|
+
* @returns Returns the customer request type item.
|
|
773
|
+
*
|
|
774
|
+
* example: {
|
|
775
|
+
* "_expands": [],
|
|
776
|
+
* "id": "11001",
|
|
777
|
+
* "_links": {
|
|
778
|
+
* "self":
|
|
779
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/28/requesttype/11001"
|
|
780
|
+
* },
|
|
781
|
+
* "name": "Get IT Help",
|
|
782
|
+
* "description": "Get IT Help",
|
|
783
|
+
* "helpText": "Please tell us clearly the problem you have within 100 words.",
|
|
784
|
+
* "issueTypeId": "12345",
|
|
785
|
+
* "serviceDeskId": "28",
|
|
786
|
+
* "portalId": "2",
|
|
787
|
+
* "groupIds": [
|
|
788
|
+
* "12"
|
|
789
|
+
* ],
|
|
790
|
+
* "icon": {
|
|
791
|
+
* "id": "12345",
|
|
792
|
+
* "_links": {
|
|
793
|
+
* "iconUrls": {
|
|
794
|
+
* "48x48":
|
|
795
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12345?size=large",
|
|
796
|
+
* "24x24":
|
|
797
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12345?size=small",
|
|
798
|
+
* "16x16":
|
|
799
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12345?size=xsmall",
|
|
800
|
+
* "32x32":
|
|
801
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12345?size=medium"
|
|
802
|
+
* }
|
|
803
|
+
* }
|
|
804
|
+
* }
|
|
805
|
+
* }
|
|
806
|
+
* @path {GET}
|
|
807
|
+
* /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}
|
|
808
|
+
* @scopes-current read:servicedesk-request
|
|
809
|
+
* @scopes-beta read:requesttype:jira-service-management
|
|
810
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-requesttype-requesttypeid-get
|
|
811
|
+
*/
|
|
812
|
+
this.getRequestTypeById = ({ serviceDeskId, requestTypeId, expand, }) => {
|
|
813
|
+
return this.getClientInstance()
|
|
814
|
+
.request({
|
|
815
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}",
|
|
816
|
+
method: "GET",
|
|
817
|
+
pathParams: {
|
|
818
|
+
serviceDeskId,
|
|
819
|
+
requestTypeId,
|
|
820
|
+
},
|
|
821
|
+
query: {
|
|
822
|
+
expand,
|
|
823
|
+
},
|
|
824
|
+
})
|
|
825
|
+
.then(this.getClientInstance().responseHandler({
|
|
826
|
+
200: {
|
|
827
|
+
"application/json": "json",
|
|
828
|
+
},
|
|
829
|
+
}))
|
|
830
|
+
.then(commonHttpClient.castResponse())
|
|
831
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.getRequestTypeById.response"))
|
|
832
|
+
.then(commonHttpClient.getBody);
|
|
833
|
+
};
|
|
834
|
+
/**
|
|
835
|
+
* This method returns the fields for a service desk's customer request type.
|
|
836
|
+
*
|
|
837
|
+
* Also, the following information about the user's permissions for the request
|
|
838
|
+
* type is returned:
|
|
839
|
+
*
|
|
840
|
+
* * `canRaiseOnBehalfOf` returns `true` if the user has permission to raise
|
|
841
|
+
* customer requests on behalf of other customers. Otherwise, returns `false`.
|
|
842
|
+
* * `canAddRequestParticipants` returns `true` if the user can add customer
|
|
843
|
+
* request participants. Otherwise, returns `false`.
|
|
844
|
+
*
|
|
845
|
+
* **[Permissions](#permissions) required**: Permission to view the Service Desk.
|
|
846
|
+
* However, hidden fields would be visible to only Service desk's Administrator.
|
|
847
|
+
*
|
|
848
|
+
* @returns Returns the request type's fields and user permission details, on the specified
|
|
849
|
+
* page of the results.
|
|
850
|
+
*
|
|
851
|
+
* example: {
|
|
852
|
+
* "canAddRequestParticipants": true,
|
|
853
|
+
* "canRaiseOnBehalfOf": true,
|
|
854
|
+
* "requestTypeFields": [
|
|
855
|
+
* {
|
|
856
|
+
* "fieldId": "summary",
|
|
857
|
+
* "jiraSchema": {
|
|
858
|
+
* "system": "summary",
|
|
859
|
+
* "type": "string"
|
|
860
|
+
* },
|
|
861
|
+
* "name": "What do you need?",
|
|
862
|
+
* "required": true,
|
|
863
|
+
* "validValues": [],
|
|
864
|
+
* "visible": true
|
|
865
|
+
* },
|
|
866
|
+
* {
|
|
867
|
+
* "fieldId": "customfield_10000",
|
|
868
|
+
* "jiraSchema": {
|
|
869
|
+
* "custom":
|
|
870
|
+
* "com.atlassian.jira.plugin.system.customfieldtypes:userpicker",
|
|
871
|
+
* "customId": 10000,
|
|
872
|
+
* "type": "user"
|
|
873
|
+
* },
|
|
874
|
+
* "name": "Nominee",
|
|
875
|
+
* "required": true,
|
|
876
|
+
* "validValues": [],
|
|
877
|
+
* "visible": true
|
|
878
|
+
* },
|
|
879
|
+
* {
|
|
880
|
+
* "fieldId": "customfield_10001",
|
|
881
|
+
* "jiraSchema": {
|
|
882
|
+
* "custom":
|
|
883
|
+
* "com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons",
|
|
884
|
+
* "customId": 10001,
|
|
885
|
+
* "type": "string"
|
|
886
|
+
* },
|
|
887
|
+
* "name": "Gifts",
|
|
888
|
+
* "required": true,
|
|
889
|
+
* "validValues": [
|
|
890
|
+
* {
|
|
891
|
+
* "children": [],
|
|
892
|
+
* "label": "Bottle of Wine",
|
|
893
|
+
* "value": "10000"
|
|
894
|
+
* },
|
|
895
|
+
* {
|
|
896
|
+
* "children": [],
|
|
897
|
+
* "label": "Threadless Voucher",
|
|
898
|
+
* "value": "10001"
|
|
899
|
+
* },
|
|
900
|
+
* {
|
|
901
|
+
* "children": [],
|
|
902
|
+
* "label": "2 Movie Tickets",
|
|
903
|
+
* "value": "10002"
|
|
904
|
+
* }
|
|
905
|
+
* ],
|
|
906
|
+
* "visible": false
|
|
907
|
+
* }
|
|
908
|
+
* ]
|
|
909
|
+
* }
|
|
910
|
+
* @path {GET}
|
|
911
|
+
* /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/field
|
|
912
|
+
* @scopes-current read:servicedesk-request
|
|
913
|
+
* @scopes-beta read:requesttype:jira-service-management
|
|
914
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-requesttype-requesttypeid-field-get
|
|
915
|
+
*/
|
|
916
|
+
this.getRequestTypeFields = ({ serviceDeskId, requestTypeId, expand, }) => {
|
|
917
|
+
return this.getClientInstance()
|
|
918
|
+
.request({
|
|
919
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/field",
|
|
920
|
+
method: "GET",
|
|
921
|
+
pathParams: {
|
|
922
|
+
serviceDeskId,
|
|
923
|
+
requestTypeId,
|
|
924
|
+
},
|
|
925
|
+
query: {
|
|
926
|
+
expand,
|
|
927
|
+
},
|
|
928
|
+
})
|
|
929
|
+
.then(this.getClientInstance().responseHandler({
|
|
930
|
+
200: {
|
|
931
|
+
"application/json": "json",
|
|
932
|
+
},
|
|
933
|
+
}))
|
|
934
|
+
.then(commonHttpClient.castResponse())
|
|
935
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.getRequestTypeFields.response"))
|
|
936
|
+
.then(commonHttpClient.getBody);
|
|
937
|
+
};
|
|
938
|
+
/**
|
|
939
|
+
* This method returns a service desk's customer request type groups. Jira Service
|
|
940
|
+
* Management administrators can arrange the customer request type groups in an
|
|
941
|
+
* arbitrary order for display on the customer portal; the groups are returned in
|
|
942
|
+
* this order.
|
|
943
|
+
*
|
|
944
|
+
* **[Permissions](#permissions) required**: Permission to view the service desk.
|
|
945
|
+
*
|
|
946
|
+
* @returns Returns the service desk's customer request type groups, on the specified page
|
|
947
|
+
* of the results.
|
|
948
|
+
*
|
|
949
|
+
* example: {
|
|
950
|
+
* "_expands": [],
|
|
951
|
+
* "size": 3,
|
|
952
|
+
* "start": 3,
|
|
953
|
+
* "limit": 3,
|
|
954
|
+
* "isLastPage": false,
|
|
955
|
+
* "_links": {
|
|
956
|
+
* "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
|
|
957
|
+
* "context": "context",
|
|
958
|
+
* "next":
|
|
959
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/%7BserviceDeskId%7D/requesttypegroup?start=6&limit=3",
|
|
960
|
+
* "prev":
|
|
961
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/%7BserviceDeskId%7D/requesttypegroup?start=0&limit=3"
|
|
962
|
+
* },
|
|
963
|
+
* "values": [
|
|
964
|
+
* {
|
|
965
|
+
* "id": "12",
|
|
966
|
+
* "name": "Common Requests"
|
|
967
|
+
* },
|
|
968
|
+
* {
|
|
969
|
+
* "id": "13",
|
|
970
|
+
* "name": "Logins and Accounts"
|
|
971
|
+
* },
|
|
972
|
+
* {
|
|
973
|
+
* "id": "14",
|
|
974
|
+
* "name": "Servers and Infrastructure"
|
|
975
|
+
* }
|
|
976
|
+
* ]
|
|
977
|
+
* }
|
|
978
|
+
* @path {GET} /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttypegroup
|
|
979
|
+
* @scopes-current read:servicedesk-request
|
|
980
|
+
* @scopes-beta read:requesttype:jira-service-management
|
|
981
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-requesttypegroup-get
|
|
982
|
+
*/
|
|
983
|
+
this.getRequestTypeGroups = ({ serviceDeskId, start, limit, }) => {
|
|
984
|
+
return this.getClientInstance()
|
|
985
|
+
.request({
|
|
986
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttypegroup",
|
|
987
|
+
method: "GET",
|
|
988
|
+
pathParams: {
|
|
989
|
+
serviceDeskId,
|
|
990
|
+
},
|
|
991
|
+
query: {
|
|
992
|
+
start,
|
|
993
|
+
limit,
|
|
994
|
+
},
|
|
995
|
+
})
|
|
996
|
+
.then(this.getClientInstance().responseHandler({
|
|
997
|
+
200: {
|
|
998
|
+
"application/json": "json",
|
|
999
|
+
},
|
|
1000
|
+
}))
|
|
1001
|
+
.then(commonHttpClient.castResponse())
|
|
1002
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.getRequestTypeGroups.response"))
|
|
1003
|
+
.then(commonHttpClient.getBody);
|
|
1004
|
+
};
|
|
1005
|
+
/**
|
|
1006
|
+
* This method returns all customer request types from a service desk. There are
|
|
1007
|
+
* two parameters for filtering the returned list:
|
|
1008
|
+
*
|
|
1009
|
+
* * `groupId` which filters the results to items in the customer request type
|
|
1010
|
+
* group.
|
|
1011
|
+
* * `searchQuery` which is matched against request types' `name` or
|
|
1012
|
+
* `description`. For example, the strings "Install", "Inst", "Equi", or
|
|
1013
|
+
* "Equipment" will match a request type with the *name* "Equipment Installation
|
|
1014
|
+
* Request".
|
|
1015
|
+
*
|
|
1016
|
+
* **Note:** This API by default will filter out hidden request types (aka.request
|
|
1017
|
+
* types without groups) when `searchQuery` is provided, unless
|
|
1018
|
+
* `includeHiddenRequestTypesInSearch` is set to true.
|
|
1019
|
+
*
|
|
1020
|
+
* **[Permissions](#permissions) required**: Permission to access the service desk.
|
|
1021
|
+
*
|
|
1022
|
+
* @returns Returns the requested customer request types, on the specified page of the
|
|
1023
|
+
* results.
|
|
1024
|
+
*
|
|
1025
|
+
* example: {
|
|
1026
|
+
* "_expands": [],
|
|
1027
|
+
* "size": 3,
|
|
1028
|
+
* "start": 3,
|
|
1029
|
+
* "limit": 3,
|
|
1030
|
+
* "isLastPage": false,
|
|
1031
|
+
* "_links": {
|
|
1032
|
+
* "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
|
|
1033
|
+
* "context": "context",
|
|
1034
|
+
* "next":
|
|
1035
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/28/requesttype?start=6&limit=3",
|
|
1036
|
+
* "prev":
|
|
1037
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/28/requesttype?start=0&limit=3"
|
|
1038
|
+
* },
|
|
1039
|
+
* "values": [
|
|
1040
|
+
* {
|
|
1041
|
+
* "_expands": [],
|
|
1042
|
+
* "id": "11001",
|
|
1043
|
+
* "_links": {
|
|
1044
|
+
* "self":
|
|
1045
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/28/requesttype/11001"
|
|
1046
|
+
* },
|
|
1047
|
+
* "name": "Get IT Help",
|
|
1048
|
+
* "description": "Get IT Help",
|
|
1049
|
+
* "helpText": "Please tell us clearly the problem you have within 100
|
|
1050
|
+
* words.",
|
|
1051
|
+
* "issueTypeId": "12345",
|
|
1052
|
+
* "serviceDeskId": "28",
|
|
1053
|
+
* "portalId": "2",
|
|
1054
|
+
* "groupIds": [
|
|
1055
|
+
* "12"
|
|
1056
|
+
* ],
|
|
1057
|
+
* "icon": {
|
|
1058
|
+
* "id": "12345",
|
|
1059
|
+
* "_links": {
|
|
1060
|
+
* "iconUrls": {
|
|
1061
|
+
* "48x48":
|
|
1062
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12345?size=large",
|
|
1063
|
+
* "24x24":
|
|
1064
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12345?size=small",
|
|
1065
|
+
* "16x16":
|
|
1066
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12345?size=xsmall",
|
|
1067
|
+
* "32x32":
|
|
1068
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12345?size=medium"
|
|
1069
|
+
* }
|
|
1070
|
+
* }
|
|
1071
|
+
* }
|
|
1072
|
+
* },
|
|
1073
|
+
* {
|
|
1074
|
+
* "_expands": [],
|
|
1075
|
+
* "id": "11002",
|
|
1076
|
+
* "_links": {
|
|
1077
|
+
* "self":
|
|
1078
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/28/requesttype/11002"
|
|
1079
|
+
* },
|
|
1080
|
+
* "name": "Request a new account",
|
|
1081
|
+
* "description": "Request a new account",
|
|
1082
|
+
* "issueTypeId": "12345",
|
|
1083
|
+
* "serviceDeskId": "28",
|
|
1084
|
+
* "portalId": "2",
|
|
1085
|
+
* "groupIds": [
|
|
1086
|
+
* "13",
|
|
1087
|
+
* "14"
|
|
1088
|
+
* ],
|
|
1089
|
+
* "icon": {
|
|
1090
|
+
* "id": "12346",
|
|
1091
|
+
* "_links": {
|
|
1092
|
+
* "iconUrls": {
|
|
1093
|
+
* "48x48":
|
|
1094
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12346?size=large",
|
|
1095
|
+
* "24x24":
|
|
1096
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12346?size=small",
|
|
1097
|
+
* "16x16":
|
|
1098
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12346?size=xsmall",
|
|
1099
|
+
* "32x32":
|
|
1100
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12346?size=medium"
|
|
1101
|
+
* }
|
|
1102
|
+
* }
|
|
1103
|
+
* }
|
|
1104
|
+
* },
|
|
1105
|
+
* {
|
|
1106
|
+
* "_expands": [],
|
|
1107
|
+
* "id": "11003",
|
|
1108
|
+
* "_links": {
|
|
1109
|
+
* "self":
|
|
1110
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/28/requesttype/11003"
|
|
1111
|
+
* },
|
|
1112
|
+
* "name": "Hardware request",
|
|
1113
|
+
* "description": "Request a hardware support",
|
|
1114
|
+
* "issueTypeId": "12345",
|
|
1115
|
+
* "serviceDeskId": "28",
|
|
1116
|
+
* "portalId": "2",
|
|
1117
|
+
* "groupIds": [
|
|
1118
|
+
* "13"
|
|
1119
|
+
* ],
|
|
1120
|
+
* "icon": {
|
|
1121
|
+
* "id": "12347",
|
|
1122
|
+
* "_links": {
|
|
1123
|
+
* "iconUrls": {
|
|
1124
|
+
* "48x48":
|
|
1125
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12347?size=large",
|
|
1126
|
+
* "24x24":
|
|
1127
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12347?size=small",
|
|
1128
|
+
* "16x16":
|
|
1129
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12347?size=xsmall",
|
|
1130
|
+
* "32x32":
|
|
1131
|
+
* "https://your-domain.atlassian.net/rest/api/2/universal_avatar/view/type/SD_REQTYPE/avatar/12347?size=medium"
|
|
1132
|
+
* }
|
|
1133
|
+
* }
|
|
1134
|
+
* }
|
|
1135
|
+
* }
|
|
1136
|
+
* ]
|
|
1137
|
+
* }
|
|
1138
|
+
* @path {GET} /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype
|
|
1139
|
+
* @scopes-current read:servicedesk-request
|
|
1140
|
+
* @scopes-beta read:requesttype:jira-service-management
|
|
1141
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-requesttype-get
|
|
1142
|
+
*/
|
|
1143
|
+
this.getRequestTypes = ({ serviceDeskId, groupId, expand, searchQuery, start, limit, includeHiddenRequestTypesInSearch, }) => {
|
|
1144
|
+
return this.getClientInstance()
|
|
1145
|
+
.request({
|
|
1146
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype",
|
|
1147
|
+
method: "GET",
|
|
1148
|
+
pathParams: {
|
|
1149
|
+
serviceDeskId,
|
|
1150
|
+
},
|
|
1151
|
+
query: {
|
|
1152
|
+
groupId,
|
|
1153
|
+
expand,
|
|
1154
|
+
searchQuery,
|
|
1155
|
+
start,
|
|
1156
|
+
limit,
|
|
1157
|
+
includeHiddenRequestTypesInSearch,
|
|
1158
|
+
},
|
|
1159
|
+
})
|
|
1160
|
+
.then(this.getClientInstance().responseHandler({
|
|
1161
|
+
200: {
|
|
1162
|
+
"application/json": "json",
|
|
1163
|
+
},
|
|
1164
|
+
}))
|
|
1165
|
+
.then(commonHttpClient.castResponse())
|
|
1166
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.getRequestTypes.response"))
|
|
1167
|
+
.then(commonHttpClient.getBody);
|
|
1168
|
+
};
|
|
1169
|
+
/**
|
|
1170
|
+
* This method returns a service desk. Use this method to get service desk details
|
|
1171
|
+
* whenever your application component is passed a service desk ID but needs to
|
|
1172
|
+
* display other service desk details.
|
|
1173
|
+
*
|
|
1174
|
+
* **[Permissions](#permissions) required**: Permission to access the Service
|
|
1175
|
+
* Desk. For example, being the Service Desk's Administrator or one of its Agents
|
|
1176
|
+
* or Users.
|
|
1177
|
+
*
|
|
1178
|
+
* @returns Returns the requested service desk.
|
|
1179
|
+
*
|
|
1180
|
+
* example: {
|
|
1181
|
+
* "id": "10001",
|
|
1182
|
+
* "projectId": "11001",
|
|
1183
|
+
* "projectName": "IT Help Desk",
|
|
1184
|
+
* "projectKey": "ITH",
|
|
1185
|
+
* "_links": {
|
|
1186
|
+
* "self":
|
|
1187
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/10001"
|
|
1188
|
+
* }
|
|
1189
|
+
* }
|
|
1190
|
+
* @path {GET} /rest/servicedeskapi/servicedesk/{serviceDeskId}
|
|
1191
|
+
* @scopes-current read:servicedesk-request
|
|
1192
|
+
* @scopes-beta read:servicedesk:jira-service-management
|
|
1193
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-get
|
|
1194
|
+
*/
|
|
1195
|
+
this.getServiceDeskById = ({ serviceDeskId, }) => {
|
|
1196
|
+
return this.getClientInstance()
|
|
1197
|
+
.request({
|
|
1198
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}",
|
|
1199
|
+
method: "GET",
|
|
1200
|
+
pathParams: {
|
|
1201
|
+
serviceDeskId,
|
|
1202
|
+
},
|
|
1203
|
+
})
|
|
1204
|
+
.then(this.getClientInstance().responseHandler({
|
|
1205
|
+
200: {
|
|
1206
|
+
"application/json": "json",
|
|
1207
|
+
},
|
|
1208
|
+
}))
|
|
1209
|
+
.then(commonHttpClient.castResponse())
|
|
1210
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.getServiceDeskById.response"))
|
|
1211
|
+
.then(commonHttpClient.getBody);
|
|
1212
|
+
};
|
|
1213
|
+
/**
|
|
1214
|
+
* This method returns all the service desks in the Jira Service Management
|
|
1215
|
+
* instance that the user has permission to access. Use this method where you need
|
|
1216
|
+
* a list of service desks or need to locate a service desk by name or keyword.
|
|
1217
|
+
*
|
|
1218
|
+
* **Note:** This method will be slow if the instance has hundreds of service
|
|
1219
|
+
* desks. If you want to fetch a single service desk by its ID, use
|
|
1220
|
+
* [/rest/servicedeskapi/servicedesk/\{serviceDeskId\}](./#api-rest-servicedeskapi-servicedesk-servicedeskid-get)
|
|
1221
|
+
* instead.
|
|
1222
|
+
*
|
|
1223
|
+
* **[Permissions](#permissions) required**: Any
|
|
1224
|
+
*
|
|
1225
|
+
* @returns Returns the service desks, on the specified page of the results.
|
|
1226
|
+
*
|
|
1227
|
+
* example: {
|
|
1228
|
+
* "_expands": [],
|
|
1229
|
+
* "size": 3,
|
|
1230
|
+
* "start": 3,
|
|
1231
|
+
* "limit": 3,
|
|
1232
|
+
* "isLastPage": false,
|
|
1233
|
+
* "_links": {
|
|
1234
|
+
* "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
|
|
1235
|
+
* "context": "context",
|
|
1236
|
+
* "next":
|
|
1237
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk?start=6&limit=3",
|
|
1238
|
+
* "prev":
|
|
1239
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk?start=0&limit=3"
|
|
1240
|
+
* },
|
|
1241
|
+
* "values": [
|
|
1242
|
+
* {
|
|
1243
|
+
* "id": "10001",
|
|
1244
|
+
* "projectId": "11001",
|
|
1245
|
+
* "projectName": "IT Help Desk",
|
|
1246
|
+
* "projectKey": "ITH",
|
|
1247
|
+
* "_links": {
|
|
1248
|
+
* "self":
|
|
1249
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/10001"
|
|
1250
|
+
* }
|
|
1251
|
+
* },
|
|
1252
|
+
* {
|
|
1253
|
+
* "id": "10002",
|
|
1254
|
+
* "projectId": "11002",
|
|
1255
|
+
* "projectName": "HR Self Serve Desk",
|
|
1256
|
+
* "projectKey": "HR",
|
|
1257
|
+
* "_links": {
|
|
1258
|
+
* "self":
|
|
1259
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/10002"
|
|
1260
|
+
* }
|
|
1261
|
+
* },
|
|
1262
|
+
* {
|
|
1263
|
+
* "id": "10003",
|
|
1264
|
+
* "projectId": "11003",
|
|
1265
|
+
* "projectName": "Foundation Leave",
|
|
1266
|
+
* "projectKey": "FL",
|
|
1267
|
+
* "_links": {
|
|
1268
|
+
* "self":
|
|
1269
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/10003"
|
|
1270
|
+
* }
|
|
1271
|
+
* }
|
|
1272
|
+
* ]
|
|
1273
|
+
* }
|
|
1274
|
+
* @path {GET} /rest/servicedeskapi/servicedesk
|
|
1275
|
+
* @scopes-current read:servicedesk-request
|
|
1276
|
+
* @scopes-beta read:servicedesk:jira-service-management
|
|
1277
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-get
|
|
1278
|
+
*/
|
|
1279
|
+
this.getServiceDesks = ({ start, limit, } = {}) => {
|
|
1280
|
+
return this.getClientInstance()
|
|
1281
|
+
.request({
|
|
1282
|
+
path: "/rest/servicedeskapi/servicedesk",
|
|
1283
|
+
method: "GET",
|
|
1284
|
+
query: {
|
|
1285
|
+
start,
|
|
1286
|
+
limit,
|
|
1287
|
+
},
|
|
1288
|
+
})
|
|
1289
|
+
.then(this.getClientInstance().responseHandler({
|
|
1290
|
+
200: {
|
|
1291
|
+
"application/json": "json",
|
|
1292
|
+
},
|
|
1293
|
+
}))
|
|
1294
|
+
.then(commonHttpClient.castResponse())
|
|
1295
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.getServiceDesks.response"))
|
|
1296
|
+
.then(commonHttpClient.getBody);
|
|
1297
|
+
};
|
|
1298
|
+
/**
|
|
1299
|
+
* This method removes one or more customers from a service desk. The service desk
|
|
1300
|
+
* must have closed access. If any of the passed customers are not associated with
|
|
1301
|
+
* the service desk, no changes will be made for those customers and the resource
|
|
1302
|
+
* returns a 204 success code.
|
|
1303
|
+
*
|
|
1304
|
+
* **[Permissions](#permissions) required**: Services desk administrator
|
|
1305
|
+
*
|
|
1306
|
+
* @path {DELETE} /rest/servicedeskapi/servicedesk/{serviceDeskId}/customer
|
|
1307
|
+
* @scopes-current manage:servicedesk-customer
|
|
1308
|
+
* @scopes-beta read:servicedesk.customer:jira-service-management,
|
|
1309
|
+
* delete:servicedesk.customer:jira-service-management
|
|
1310
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-customer-delete
|
|
1311
|
+
*/
|
|
1312
|
+
this.removeCustomers = ({ serviceDeskId, serviceDeskCustomerDto, }) => {
|
|
1313
|
+
return this.getClientInstance()
|
|
1314
|
+
.request({
|
|
1315
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/customer",
|
|
1316
|
+
method: "DELETE",
|
|
1317
|
+
pathParams: {
|
|
1318
|
+
serviceDeskId,
|
|
1319
|
+
},
|
|
1320
|
+
headers: {
|
|
1321
|
+
"Content-Type": "application/json",
|
|
1322
|
+
},
|
|
1323
|
+
body: serviceDeskCustomerDto,
|
|
1324
|
+
})
|
|
1325
|
+
.then(commonHttpClient.discardResult);
|
|
1326
|
+
};
|
|
1327
|
+
/**
|
|
1328
|
+
* Sets the value of a request type property. Use this resource to store custom
|
|
1329
|
+
* data against a request type.
|
|
1330
|
+
*
|
|
1331
|
+
* Properties for a Request Type in next-gen are stored as Issue Type properties
|
|
1332
|
+
* and therefore can also be set by calling the Jira Cloud Platform [Set issue
|
|
1333
|
+
* type
|
|
1334
|
+
* property](https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-issuetype-issueTypeId-properties-propertyKey-put)
|
|
1335
|
+
* endpoint.
|
|
1336
|
+
*
|
|
1337
|
+
* **[Permissions](#permissions) required**: Jira project administrator with a
|
|
1338
|
+
* Jira Service Management agent license.
|
|
1339
|
+
*
|
|
1340
|
+
* @returns * status: 200, mediaType: application/json
|
|
1341
|
+
*
|
|
1342
|
+
* Returned if the request type property is updated.
|
|
1343
|
+
*
|
|
1344
|
+
* * status: 201, mediaType: application/json
|
|
1345
|
+
*
|
|
1346
|
+
* Returned if the request type property is created.
|
|
1347
|
+
* @path {PUT}
|
|
1348
|
+
* /rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/property/{propertyKey}
|
|
1349
|
+
* @scopes-current manage:jira-project
|
|
1350
|
+
* @scopes-beta read:requesttype.property:jira-service-management,
|
|
1351
|
+
* write:requesttype.property:jira-service-management
|
|
1352
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-servicedesk#api-rest-servicedeskapi-servicedesk-servicedeskid-requesttype-requesttypeid-property-propertykey-put
|
|
1353
|
+
*/
|
|
1354
|
+
this.setProperty = ({ serviceDeskId, requestTypeId, propertyKey, }) => {
|
|
1355
|
+
return this.getClientInstance()
|
|
1356
|
+
.request({
|
|
1357
|
+
path: "/rest/servicedeskapi/servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/property/{propertyKey}",
|
|
1358
|
+
method: "PUT",
|
|
1359
|
+
pathParams: {
|
|
1360
|
+
serviceDeskId,
|
|
1361
|
+
requestTypeId,
|
|
1362
|
+
propertyKey,
|
|
1363
|
+
},
|
|
1364
|
+
})
|
|
1365
|
+
.then(this.getClientInstance().responseHandler({
|
|
1366
|
+
200: {
|
|
1367
|
+
"application/json": "json",
|
|
1368
|
+
},
|
|
1369
|
+
201: {
|
|
1370
|
+
"application/json": "json",
|
|
1371
|
+
},
|
|
1372
|
+
}))
|
|
1373
|
+
.then(commonHttpClient.castResponse())
|
|
1374
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("ServicedeskService.setProperty.response"))
|
|
1375
|
+
.then(commonHttpClient.asCreatedResponse("body"));
|
|
1376
|
+
};
|
|
1377
|
+
}
|
|
1378
|
+
static initialize() {
|
|
1379
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.getServiceDesks.response", zod_1.z
|
|
1380
|
+
.object({
|
|
1381
|
+
status: zod_1.z.literal(200),
|
|
1382
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1383
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("PagedDtoServiceDeskDto"),
|
|
1384
|
+
})
|
|
1385
|
+
.describe("ServicedeskService.getServiceDesks.response"));
|
|
1386
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.getServiceDeskById.response", zod_1.z
|
|
1387
|
+
.object({
|
|
1388
|
+
status: zod_1.z.literal(200),
|
|
1389
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1390
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("ServiceDeskDto"),
|
|
1391
|
+
})
|
|
1392
|
+
.describe("ServicedeskService.getServiceDeskById.response"));
|
|
1393
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.attachTemporaryFile.response", zod_1.z
|
|
1394
|
+
.object({
|
|
1395
|
+
status: zod_1.z.literal(201),
|
|
1396
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1397
|
+
body: zod_1.z.unknown(),
|
|
1398
|
+
})
|
|
1399
|
+
.describe("ServicedeskService.attachTemporaryFile.response"));
|
|
1400
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.getCustomers.response", zod_1.z
|
|
1401
|
+
.object({
|
|
1402
|
+
status: zod_1.z.literal(200),
|
|
1403
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1404
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("PagedDtoUserDto"),
|
|
1405
|
+
})
|
|
1406
|
+
.describe("ServicedeskService.getCustomers.response"));
|
|
1407
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.getArticles.response", zod_1.z
|
|
1408
|
+
.object({
|
|
1409
|
+
status: zod_1.z.literal(200),
|
|
1410
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1411
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("PagedDtoArticleDto"),
|
|
1412
|
+
})
|
|
1413
|
+
.describe("ServicedeskService.getArticles.response"));
|
|
1414
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.getQueues.response", zod_1.z
|
|
1415
|
+
.object({
|
|
1416
|
+
status: zod_1.z.literal(200),
|
|
1417
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1418
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("PagedDtoQueueDto"),
|
|
1419
|
+
})
|
|
1420
|
+
.describe("ServicedeskService.getQueues.response"));
|
|
1421
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.getQueue.response", zod_1.z
|
|
1422
|
+
.object({
|
|
1423
|
+
status: zod_1.z.literal(200),
|
|
1424
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1425
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("QueueDto"),
|
|
1426
|
+
})
|
|
1427
|
+
.describe("ServicedeskService.getQueue.response"));
|
|
1428
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.getIssuesInQueue.response", zod_1.z
|
|
1429
|
+
.object({
|
|
1430
|
+
status: zod_1.z.literal(200),
|
|
1431
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1432
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("PagedDtoIssueBean"),
|
|
1433
|
+
})
|
|
1434
|
+
.describe("ServicedeskService.getIssuesInQueue.response"));
|
|
1435
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.getRequestTypes.response", zod_1.z
|
|
1436
|
+
.object({
|
|
1437
|
+
status: zod_1.z.literal(200),
|
|
1438
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1439
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("PagedDtoRequestTypeDto"),
|
|
1440
|
+
})
|
|
1441
|
+
.describe("ServicedeskService.getRequestTypes.response"));
|
|
1442
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.createRequestType.response", zod_1.z
|
|
1443
|
+
.object({
|
|
1444
|
+
status: zod_1.z.literal(200),
|
|
1445
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1446
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("RequestTypeDto"),
|
|
1447
|
+
})
|
|
1448
|
+
.describe("ServicedeskService.createRequestType.response"));
|
|
1449
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.getRequestTypeById.response", zod_1.z
|
|
1450
|
+
.object({
|
|
1451
|
+
status: zod_1.z.literal(200),
|
|
1452
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1453
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("RequestTypeDto"),
|
|
1454
|
+
})
|
|
1455
|
+
.describe("ServicedeskService.getRequestTypeById.response"));
|
|
1456
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.getRequestTypeFields.response", zod_1.z
|
|
1457
|
+
.object({
|
|
1458
|
+
status: zod_1.z.literal(200),
|
|
1459
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1460
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("CustomerRequestCreateMetaDto"),
|
|
1461
|
+
})
|
|
1462
|
+
.describe("ServicedeskService.getRequestTypeFields.response"));
|
|
1463
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.getPropertiesKeys.response", zod_1.z
|
|
1464
|
+
.object({
|
|
1465
|
+
status: zod_1.z.literal(200),
|
|
1466
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1467
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("PropertyKeys"),
|
|
1468
|
+
})
|
|
1469
|
+
.describe("ServicedeskService.getPropertiesKeys.response"));
|
|
1470
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.getProperty.response", zod_1.z
|
|
1471
|
+
.object({
|
|
1472
|
+
status: zod_1.z.literal(200),
|
|
1473
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1474
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("EntityProperty"),
|
|
1475
|
+
})
|
|
1476
|
+
.describe("ServicedeskService.getProperty.response"));
|
|
1477
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.setProperty.response", zod_1.z
|
|
1478
|
+
.object({
|
|
1479
|
+
status: zod_1.z.number(),
|
|
1480
|
+
mediaType: zod_1.z.string(),
|
|
1481
|
+
body: zod_1.z.unknown(),
|
|
1482
|
+
})
|
|
1483
|
+
.superRefine(({ status: status, body: body }, ctx) => {
|
|
1484
|
+
if (status === 200 || status === 201) {
|
|
1485
|
+
zod_1.z.unknown().parse(body);
|
|
1486
|
+
}
|
|
1487
|
+
else {
|
|
1488
|
+
ctx.addIssue({
|
|
1489
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
1490
|
+
path: ["status"],
|
|
1491
|
+
message: `Unexpected status code: ${status}`,
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
})
|
|
1495
|
+
.describe("ServicedeskService.setProperty.response"));
|
|
1496
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ServicedeskService.getRequestTypeGroups.response", zod_1.z
|
|
1497
|
+
.object({
|
|
1498
|
+
status: zod_1.z.literal(200),
|
|
1499
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
1500
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("PagedDtoRequestTypeGroupDto"),
|
|
1501
|
+
})
|
|
1502
|
+
.describe("ServicedeskService.getRequestTypeGroups.response"));
|
|
1503
|
+
validationSchemaStorage_1.validationSchemaStorage.registerOnce([
|
|
1504
|
+
servicedesk_1.registerServicedeskValidationSchemas,
|
|
1505
|
+
common_1.registerCommonValidationSchemas,
|
|
1506
|
+
]);
|
|
1507
|
+
}
|
|
1508
|
+
}
|
|
1509
|
+
exports.ServicedeskService = ServicedeskService;
|
|
1510
|
+
//# sourceMappingURL=ServicedeskService.js.map
|