@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,589 @@
|
|
|
1
|
+
import { CommonHttpService } from "../core/CommonHttpService";
|
|
2
|
+
import { type EntityProperty, type PagedDtoUserDto, type PropertyKeys } from "../models/common";
|
|
3
|
+
import { type OrganizationCreateDto, type OrganizationDto, type OrganizationServiceDeskUpdateDto, type PagedDtoOrganizationDto, type UsersOrganizationUpdateDto } from "../models/organization";
|
|
4
|
+
/** @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization */
|
|
5
|
+
export declare class OrganizationService extends CommonHttpService {
|
|
6
|
+
/**
|
|
7
|
+
* This method adds an organization to a service desk. If the organization ID is
|
|
8
|
+
* already associated with the service desk, no change is made and the resource
|
|
9
|
+
* returns a 204 success code.
|
|
10
|
+
*
|
|
11
|
+
* **[Permissions](#permissions) required**: Service desk's agent.
|
|
12
|
+
*
|
|
13
|
+
* @path {POST} /rest/servicedeskapi/servicedesk/{serviceDeskId}/organization
|
|
14
|
+
* @scopes-current manage:servicedesk-customer
|
|
15
|
+
* @scopes-beta read:servicedesk.organization:jira-service-management,
|
|
16
|
+
* write:servicedesk.organization:jira-service-management
|
|
17
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization#api-rest-servicedeskapi-servicedesk-servicedeskid-organization-post
|
|
18
|
+
*/
|
|
19
|
+
addOrganization: ({ serviceDeskId, organizationServiceDeskUpdateDto, }: {
|
|
20
|
+
/**
|
|
21
|
+
* The ID of the service desk to which the organization will be added. This can
|
|
22
|
+
* alternatively be a [project identifier.](#project-identifiers)
|
|
23
|
+
*/
|
|
24
|
+
serviceDeskId: string;
|
|
25
|
+
/**
|
|
26
|
+
* @example {
|
|
27
|
+
* "organizationId": 1
|
|
28
|
+
* }
|
|
29
|
+
*/
|
|
30
|
+
organizationServiceDeskUpdateDto: OrganizationServiceDeskUpdateDto;
|
|
31
|
+
}) => Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* This method adds users to an organization.
|
|
34
|
+
*
|
|
35
|
+
* **[Permissions](#permissions) required**: Service desk administrator or agent.
|
|
36
|
+
* Note: Permission to add users to an organization can be switched to users with
|
|
37
|
+
* the Jira administrator permission, using the **[Organization
|
|
38
|
+
* management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)**
|
|
39
|
+
* feature.
|
|
40
|
+
*
|
|
41
|
+
* @path {POST} /rest/servicedeskapi/organization/{organizationId}/user
|
|
42
|
+
* @scopes-current manage:servicedesk-customer
|
|
43
|
+
* @scopes-beta read:organization.user:jira-service-management,
|
|
44
|
+
* write:organization.user:jira-service-management, read:user:jira
|
|
45
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization#api-rest-servicedeskapi-organization-organizationid-user-post
|
|
46
|
+
*/
|
|
47
|
+
addUsersToOrganization: ({ organizationId, usersOrganizationUpdateDto, }: {
|
|
48
|
+
/** The ID of the organization. */
|
|
49
|
+
organizationId: number;
|
|
50
|
+
/**
|
|
51
|
+
* @example {
|
|
52
|
+
* "accountIds": [
|
|
53
|
+
* "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
54
|
+
* "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3a01db05e2a66fa80bd"
|
|
55
|
+
* ],
|
|
56
|
+
* "usernames": []
|
|
57
|
+
* }
|
|
58
|
+
*/
|
|
59
|
+
usersOrganizationUpdateDto: UsersOrganizationUpdateDto;
|
|
60
|
+
}) => Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* This method creates an organization by passing the name of the organization.
|
|
63
|
+
*
|
|
64
|
+
* **[Permissions](#permissions) required**: Service desk administrator or agent.
|
|
65
|
+
* Note: Permission to create organizations can be switched to users with the Jira
|
|
66
|
+
* administrator permission, using the **[Organization
|
|
67
|
+
* management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)**
|
|
68
|
+
* feature.
|
|
69
|
+
*
|
|
70
|
+
* @returns Returns the created organization or the existing organization if name already
|
|
71
|
+
* exists.
|
|
72
|
+
*
|
|
73
|
+
* example: {
|
|
74
|
+
* "id": "1",
|
|
75
|
+
* "name": "Charlie Cakes Franchises",
|
|
76
|
+
* "_links": {
|
|
77
|
+
* "self":
|
|
78
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/organization/1"
|
|
79
|
+
* }
|
|
80
|
+
* }
|
|
81
|
+
* @path {POST} /rest/servicedeskapi/organization
|
|
82
|
+
* @scopes-current manage:servicedesk-customer
|
|
83
|
+
* @scopes-beta read:organization:jira-service-management,
|
|
84
|
+
* write:organization:jira-service-management
|
|
85
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization#api-rest-servicedeskapi-organization-post
|
|
86
|
+
*/
|
|
87
|
+
createOrganization: ({ organizationCreateDto, }: {
|
|
88
|
+
/**
|
|
89
|
+
* @example {
|
|
90
|
+
* "name": "Charlie Cakes Franchises"
|
|
91
|
+
* }
|
|
92
|
+
*/
|
|
93
|
+
organizationCreateDto: OrganizationCreateDto;
|
|
94
|
+
}) => Promise<OrganizationDto>;
|
|
95
|
+
/**
|
|
96
|
+
* This method deletes an organization. Note that the organization is deleted
|
|
97
|
+
* regardless of other associations it may have. For example, associations with
|
|
98
|
+
* service desks.
|
|
99
|
+
*
|
|
100
|
+
* **[Permissions](#permissions) required**: Jira administrator.
|
|
101
|
+
*
|
|
102
|
+
* @path {DELETE} /rest/servicedeskapi/organization/{organizationId}
|
|
103
|
+
* @scopes-current manage:servicedesk-customer
|
|
104
|
+
* @scopes-beta read:organization:jira-service-management,
|
|
105
|
+
* delete:organization:jira-service-management
|
|
106
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization#api-rest-servicedeskapi-organization-organizationid-delete
|
|
107
|
+
*/
|
|
108
|
+
deleteOrganization: ({ organizationId, }: {
|
|
109
|
+
/** The ID of the organization. */
|
|
110
|
+
organizationId: number;
|
|
111
|
+
}) => Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Removes an organization property. Organization properties are a type of entity
|
|
114
|
+
* property which are available to the API only, and not shown in Jira Service
|
|
115
|
+
* Management. [Learn
|
|
116
|
+
* more](https://developer.atlassian.com/cloud/jira/platform/jira-entity-properties/).
|
|
117
|
+
*
|
|
118
|
+
* For operations relating to organization detail field values which are visible
|
|
119
|
+
* in Jira Service Management, see the [Customer Service Management REST
|
|
120
|
+
* API](https://developer.atlassian.com/cloud/customer-service-management/rest/v1/api-group-organization/#api-group-organization).
|
|
121
|
+
*
|
|
122
|
+
* **[Permissions](#permissions) required**: Service Desk Administrator or Agent.
|
|
123
|
+
*
|
|
124
|
+
* Note: Permission to manage organizations can be switched to users with the Jira
|
|
125
|
+
* administrator permission, using the **[Organization
|
|
126
|
+
* management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)**
|
|
127
|
+
* feature.
|
|
128
|
+
*
|
|
129
|
+
* @path {DELETE}
|
|
130
|
+
* /rest/servicedeskapi/organization/{organizationId}/property/{propertyKey}
|
|
131
|
+
* @scopes-current manage:servicedesk-customer
|
|
132
|
+
* @scopes-beta read:organization.property:jira-service-management,
|
|
133
|
+
* delete:organization.property:jira-service-management
|
|
134
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization#api-rest-servicedeskapi-organization-organizationid-property-propertykey-delete
|
|
135
|
+
*/
|
|
136
|
+
deleteProperty: ({ organizationId, propertyKey, }: {
|
|
137
|
+
/** The ID of the organization from which the property will be removed. */
|
|
138
|
+
organizationId: string;
|
|
139
|
+
/** The key of the property to remove. */
|
|
140
|
+
propertyKey: string;
|
|
141
|
+
}) => Promise<void>;
|
|
142
|
+
/**
|
|
143
|
+
* This method returns details of an organization. Use this method to get
|
|
144
|
+
* organization details whenever your application component is passed an
|
|
145
|
+
* organization ID but needs to display other organization details.
|
|
146
|
+
*
|
|
147
|
+
* To get organization detail field values which are visible in Jira Service
|
|
148
|
+
* Management, see the [Customer Service Management REST
|
|
149
|
+
* API](https://developer.atlassian.com/cloud/customer-service-management/rest/v1/api-group-organization/#api-group-organization).
|
|
150
|
+
*
|
|
151
|
+
* **[Permissions](#permissions) required**: Any
|
|
152
|
+
*
|
|
153
|
+
* **Response limitations**: Customers can only retrieve organization of which
|
|
154
|
+
* they are members.
|
|
155
|
+
*
|
|
156
|
+
* @returns Returns the requested organization.
|
|
157
|
+
*
|
|
158
|
+
* example: {
|
|
159
|
+
* "id": "1",
|
|
160
|
+
* "name": "Charlie Cakes Franchises",
|
|
161
|
+
* "_links": {
|
|
162
|
+
* "self":
|
|
163
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/organization/1"
|
|
164
|
+
* }
|
|
165
|
+
* }
|
|
166
|
+
* @path {GET} /rest/servicedeskapi/organization/{organizationId}
|
|
167
|
+
* @scopes-current manage:servicedesk-customer
|
|
168
|
+
* @scopes-beta read:organization:jira-service-management
|
|
169
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization#api-rest-servicedeskapi-organization-organizationid-get
|
|
170
|
+
*/
|
|
171
|
+
getOrganization: ({ organizationId, }: {
|
|
172
|
+
/** The ID of the organization. */
|
|
173
|
+
organizationId: number;
|
|
174
|
+
}) => Promise<OrganizationDto>;
|
|
175
|
+
/**
|
|
176
|
+
* This method returns a list of organizations in the Jira Service Management
|
|
177
|
+
* instance. Use this method when you want to present a list of organizations or
|
|
178
|
+
* want to locate an organization by name.
|
|
179
|
+
*
|
|
180
|
+
* **[Permissions](#permissions) required**: Any. However, to fetch organizations
|
|
181
|
+
* based on `accountId` the user must have a Service Desk agent license.
|
|
182
|
+
*
|
|
183
|
+
* **Response limitations**: If the user is a customer, only those organizations
|
|
184
|
+
* of which the customer is a member are listed.
|
|
185
|
+
*
|
|
186
|
+
* @returns Returns paginated list of organizations.
|
|
187
|
+
*
|
|
188
|
+
* example: {
|
|
189
|
+
* "_expands": [],
|
|
190
|
+
* "size": 1,
|
|
191
|
+
* "start": 1,
|
|
192
|
+
* "limit": 1,
|
|
193
|
+
* "isLastPage": false,
|
|
194
|
+
* "_links": {
|
|
195
|
+
* "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
|
|
196
|
+
* "context": "context",
|
|
197
|
+
* "next":
|
|
198
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/organization?start=2&limit=1",
|
|
199
|
+
* "prev":
|
|
200
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/organization?start=0&limit=1"
|
|
201
|
+
* },
|
|
202
|
+
* "values": [
|
|
203
|
+
* {
|
|
204
|
+
* "id": "1",
|
|
205
|
+
* "name": "Charlie Cakes Franchises",
|
|
206
|
+
* "_links": {
|
|
207
|
+
* "self":
|
|
208
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/organization/1"
|
|
209
|
+
* }
|
|
210
|
+
* }
|
|
211
|
+
* ]
|
|
212
|
+
* }
|
|
213
|
+
* @path {GET} /rest/servicedeskapi/organization
|
|
214
|
+
* @scopes-current manage:servicedesk-customer
|
|
215
|
+
* @scopes-beta read:organization:jira-service-management
|
|
216
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization#api-rest-servicedeskapi-organization-get
|
|
217
|
+
*/
|
|
218
|
+
getOrganizations: ({ start, limit, accountId, }?: {
|
|
219
|
+
/**
|
|
220
|
+
* The starting index of the returned objects. Base index: 0. See the
|
|
221
|
+
* [Pagination](#pagination) section for more details.
|
|
222
|
+
*/
|
|
223
|
+
start?: number | undefined;
|
|
224
|
+
/**
|
|
225
|
+
* The maximum number of organizations to return per page. Default: 50. See the
|
|
226
|
+
* [Pagination](#pagination) section for more details.
|
|
227
|
+
*/
|
|
228
|
+
limit?: number | undefined;
|
|
229
|
+
/**
|
|
230
|
+
* The account ID of the user, which uniquely identifies the user across all
|
|
231
|
+
* Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
|
|
232
|
+
*/
|
|
233
|
+
accountId?: string | undefined;
|
|
234
|
+
}) => Promise<PagedDtoOrganizationDto>;
|
|
235
|
+
/**
|
|
236
|
+
* Returns the keys of all organization properties. Organization properties are a
|
|
237
|
+
* type of entity property which are available to the API only, and not shown in
|
|
238
|
+
* Jira Service Management. [Learn
|
|
239
|
+
* more](https://developer.atlassian.com/cloud/jira/platform/jira-entity-properties/).
|
|
240
|
+
*
|
|
241
|
+
* To get organization detail field values which are visible in Jira Service
|
|
242
|
+
* Management, see the [Customer Service Management REST
|
|
243
|
+
* API](https://developer.atlassian.com/cloud/customer-service-management/rest/v1/api-group-organization/#api-group-organization).
|
|
244
|
+
*
|
|
245
|
+
* **[Permissions](#permissions) required**: Any
|
|
246
|
+
*
|
|
247
|
+
* **Response limitations**: Customers can only access properties of organizations
|
|
248
|
+
* of which they are members.
|
|
249
|
+
*
|
|
250
|
+
* @returns Returned if the organization was found.
|
|
251
|
+
*
|
|
252
|
+
* example: {
|
|
253
|
+
* "entityPropertyKeyBeans": [
|
|
254
|
+
* {
|
|
255
|
+
* "key": "organization.attributes",
|
|
256
|
+
* "self": "/rest/servicedeskapi/organization/1/property/propertyKey"
|
|
257
|
+
* }
|
|
258
|
+
* ]
|
|
259
|
+
* }
|
|
260
|
+
* @path {GET} /rest/servicedeskapi/organization/{organizationId}/property
|
|
261
|
+
* @scopes-current manage:servicedesk-customer
|
|
262
|
+
* @scopes-beta read:organization.property:jira-service-management
|
|
263
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization#api-rest-servicedeskapi-organization-organizationid-property-get
|
|
264
|
+
*/
|
|
265
|
+
getPropertiesKeys: ({ organizationId, }: {
|
|
266
|
+
/** The ID of the organization from which keys will be returned. */
|
|
267
|
+
organizationId: string;
|
|
268
|
+
}) => Promise<PropertyKeys>;
|
|
269
|
+
/**
|
|
270
|
+
* Returns the value of an organization property. Use this method to obtain the
|
|
271
|
+
* JSON content for an organization's property. Organization properties are a type
|
|
272
|
+
* of entity property which are available to the API only, and not shown in Jira
|
|
273
|
+
* Service Management. [Learn
|
|
274
|
+
* more](https://developer.atlassian.com/cloud/jira/platform/jira-entity-properties/).
|
|
275
|
+
*
|
|
276
|
+
* To get organization detail field values which are visible in Jira Service
|
|
277
|
+
* Management, see the [Customer Service Management REST
|
|
278
|
+
* API](https://developer.atlassian.com/cloud/customer-service-management/rest/v1/api-group-organization/#api-group-organization).
|
|
279
|
+
*
|
|
280
|
+
* **[Permissions](#permissions) required**: Any
|
|
281
|
+
*
|
|
282
|
+
* **Response limitations**: Customers can only access properties of organizations
|
|
283
|
+
* of which they are members.
|
|
284
|
+
*
|
|
285
|
+
* @returns Returns the organization's property.
|
|
286
|
+
*
|
|
287
|
+
* example: {
|
|
288
|
+
* "key": "organization.attributes",
|
|
289
|
+
* "value": {
|
|
290
|
+
* "mail": "charlie@example.com",
|
|
291
|
+
* "phone": "0800-1233456789"
|
|
292
|
+
* }
|
|
293
|
+
* }
|
|
294
|
+
* @path {GET} /rest/servicedeskapi/organization/{organizationId}/property/{propertyKey}
|
|
295
|
+
* @scopes-current manage:servicedesk-customer
|
|
296
|
+
* @scopes-beta read:organization.property:jira-service-management
|
|
297
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization#api-rest-servicedeskapi-organization-organizationid-property-propertykey-get
|
|
298
|
+
*/
|
|
299
|
+
getProperty: ({ organizationId, propertyKey, }: {
|
|
300
|
+
/** The ID of the organization from which the property will be returned. */
|
|
301
|
+
organizationId: string;
|
|
302
|
+
/** The key of the property to return. */
|
|
303
|
+
propertyKey: string;
|
|
304
|
+
}) => Promise<EntityProperty>;
|
|
305
|
+
/**
|
|
306
|
+
* This method returns a list of all organizations associated with a service desk.
|
|
307
|
+
*
|
|
308
|
+
* **[Permissions](#permissions) required**: Service desk's agent.
|
|
309
|
+
*
|
|
310
|
+
* @returns Returns the requested organizations list.
|
|
311
|
+
*
|
|
312
|
+
* example: {
|
|
313
|
+
* "_expands": [],
|
|
314
|
+
* "size": 3,
|
|
315
|
+
* "start": 3,
|
|
316
|
+
* "limit": 3,
|
|
317
|
+
* "isLastPage": false,
|
|
318
|
+
* "_links": {
|
|
319
|
+
* "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
|
|
320
|
+
* "context": "context",
|
|
321
|
+
* "next":
|
|
322
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/10001/organization?start=6&limit=3",
|
|
323
|
+
* "prev":
|
|
324
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/10001/organization?start=0&limit=3"
|
|
325
|
+
* },
|
|
326
|
+
* "values": [
|
|
327
|
+
* {
|
|
328
|
+
* "id": "1",
|
|
329
|
+
* "name": "Charlie Cakes Franchises",
|
|
330
|
+
* "_links": {
|
|
331
|
+
* "self":
|
|
332
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/organization/1"
|
|
333
|
+
* }
|
|
334
|
+
* },
|
|
335
|
+
* {
|
|
336
|
+
* "id": "2",
|
|
337
|
+
* "name": "Atlas Coffee Co",
|
|
338
|
+
* "_links": {
|
|
339
|
+
* "self":
|
|
340
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/organization/2"
|
|
341
|
+
* }
|
|
342
|
+
* },
|
|
343
|
+
* {
|
|
344
|
+
* "id": "3",
|
|
345
|
+
* "name": "The Adjustment Bureau",
|
|
346
|
+
* "_links": {
|
|
347
|
+
* "self":
|
|
348
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/organization/3"
|
|
349
|
+
* }
|
|
350
|
+
* }
|
|
351
|
+
* ]
|
|
352
|
+
* }
|
|
353
|
+
* @path {GET} /rest/servicedeskapi/servicedesk/{serviceDeskId}/organization
|
|
354
|
+
* @scopes-current manage:servicedesk-customer
|
|
355
|
+
* @scopes-beta read:servicedesk.organization:jira-service-management
|
|
356
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization#api-rest-servicedeskapi-servicedesk-servicedeskid-organization-get
|
|
357
|
+
*/
|
|
358
|
+
getServiceDeskOrganizations: ({ serviceDeskId, start, limit, accountId, }: {
|
|
359
|
+
/**
|
|
360
|
+
* The ID of the service desk from which the organization list will be returned.
|
|
361
|
+
* This can alternatively be a [project identifier.](#project-identifiers)
|
|
362
|
+
*/
|
|
363
|
+
serviceDeskId: string;
|
|
364
|
+
/**
|
|
365
|
+
* The starting index of the returned objects. Base index: 0. See the
|
|
366
|
+
* [Pagination](#pagination) section for more details.
|
|
367
|
+
*/
|
|
368
|
+
start?: number | undefined;
|
|
369
|
+
/**
|
|
370
|
+
* The maximum number of items to return per page. Default: 50. See the
|
|
371
|
+
* [Pagination](#pagination) section for more details.
|
|
372
|
+
*/
|
|
373
|
+
limit?: number | undefined;
|
|
374
|
+
/**
|
|
375
|
+
* The account ID of the user, which uniquely identifies the user across all
|
|
376
|
+
* Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
|
|
377
|
+
*/
|
|
378
|
+
accountId?: string | undefined;
|
|
379
|
+
}) => Promise<PagedDtoOrganizationDto>;
|
|
380
|
+
/**
|
|
381
|
+
* This method returns all the users associated with an organization. Use this
|
|
382
|
+
* method where you want to provide a list of users for an organization or
|
|
383
|
+
* determine if a user is associated with an organization.
|
|
384
|
+
*
|
|
385
|
+
* **[Permissions](#permissions) required**: Service desk administrator or agent.
|
|
386
|
+
*
|
|
387
|
+
* @returns Returns a paged list of users associated with the organization, ordered by
|
|
388
|
+
* their accountId.
|
|
389
|
+
*
|
|
390
|
+
* example: {
|
|
391
|
+
* "_expands": [],
|
|
392
|
+
* "size": 1,
|
|
393
|
+
* "start": 1,
|
|
394
|
+
* "limit": 1,
|
|
395
|
+
* "isLastPage": false,
|
|
396
|
+
* "_links": {
|
|
397
|
+
* "base": "https://your-domain.atlassian.net/rest/servicedeskapi",
|
|
398
|
+
* "context": "context",
|
|
399
|
+
* "next":
|
|
400
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/organization/1/user?start=2&limit=1",
|
|
401
|
+
* "prev":
|
|
402
|
+
* "https://your-domain.atlassian.net/rest/servicedeskapi/organization/1/user?start=0&limit=1"
|
|
403
|
+
* },
|
|
404
|
+
* "values": [
|
|
405
|
+
* {
|
|
406
|
+
* "accountId":
|
|
407
|
+
* "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
408
|
+
* "name": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
409
|
+
* "key": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
410
|
+
* "emailAddress": "fred@example.com",
|
|
411
|
+
* "displayName": "Fred F. User",
|
|
412
|
+
* "active": true,
|
|
413
|
+
* "timeZone": "Australia/Sydney",
|
|
414
|
+
* "_links": {
|
|
415
|
+
* "jiraRest":
|
|
416
|
+
* "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
417
|
+
* "avatarUrls": {
|
|
418
|
+
* "16x16":
|
|
419
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
|
|
420
|
+
* "24x24":
|
|
421
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
|
|
422
|
+
* "32x32":
|
|
423
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue",
|
|
424
|
+
* "48x48":
|
|
425
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue"
|
|
426
|
+
* },
|
|
427
|
+
* "self":
|
|
428
|
+
* "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b"
|
|
429
|
+
* }
|
|
430
|
+
* },
|
|
431
|
+
* {
|
|
432
|
+
* "accountId":
|
|
433
|
+
* "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3a01db05e2a66fa80bd",
|
|
434
|
+
* "name":
|
|
435
|
+
* "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3a01db05e2a66fa80bd",
|
|
436
|
+
* "key": "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3a01db05e2a66fa80bd",
|
|
437
|
+
* "emailAddress": "bob@example.com",
|
|
438
|
+
* "displayName": "Bob D. Builder",
|
|
439
|
+
* "active": true,
|
|
440
|
+
* "timeZone": "Australia/Sydney",
|
|
441
|
+
* "_links": {
|
|
442
|
+
* "jiraRest":
|
|
443
|
+
* "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3a01db05e2a66fa80bd",
|
|
444
|
+
* "avatarUrls": {
|
|
445
|
+
* "16x16":
|
|
446
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=16&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D16%26noRedirect%3Dtrue",
|
|
447
|
+
* "24x24":
|
|
448
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=24&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D24%26noRedirect%3Dtrue",
|
|
449
|
+
* "32x32":
|
|
450
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=32&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D32%26noRedirect%3Dtrue",
|
|
451
|
+
* "48x48":
|
|
452
|
+
* "https://avatar-cdn.atlassian.com/9bc3b5bcb0db050c6d7660b28a5b86c9?s=48&d=https%3A%2F%2Fsecure.gravatar.com%2Favatar%2F9bc3b5bcb0db050c6d7660b28a5b86c9%3Fd%3Dmm%26s%3D48%26noRedirect%3Dtrue"
|
|
453
|
+
* },
|
|
454
|
+
* "self":
|
|
455
|
+
* "https://your-domain.atlassian.net/rest/api/2/user?username=qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3a01db05e2a66fa80bd"
|
|
456
|
+
* }
|
|
457
|
+
* }
|
|
458
|
+
* ]
|
|
459
|
+
* }
|
|
460
|
+
* @path {GET} /rest/servicedeskapi/organization/{organizationId}/user
|
|
461
|
+
* @scopes-current manage:servicedesk-customer
|
|
462
|
+
* @scopes-beta read:organization.user:jira-service-management, read:user:jira
|
|
463
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization#api-rest-servicedeskapi-organization-organizationid-user-get
|
|
464
|
+
*/
|
|
465
|
+
getUsersInOrganization: ({ organizationId, start, limit, }: {
|
|
466
|
+
/** The ID of the organization. */
|
|
467
|
+
organizationId: number;
|
|
468
|
+
/**
|
|
469
|
+
* The starting index of the returned objects. Base index: 0. See the
|
|
470
|
+
* [Pagination](#pagination) section for more details.
|
|
471
|
+
*/
|
|
472
|
+
start?: number | undefined;
|
|
473
|
+
/**
|
|
474
|
+
* The maximum number of users to return per page. Default: 50. See the
|
|
475
|
+
* [Pagination](#pagination) section for more details.
|
|
476
|
+
*/
|
|
477
|
+
limit?: number | undefined;
|
|
478
|
+
}) => Promise<PagedDtoUserDto>;
|
|
479
|
+
/**
|
|
480
|
+
* This method removes an organization from a service desk. If the organization ID
|
|
481
|
+
* does not match an organization associated with the service desk, no change is
|
|
482
|
+
* made and the resource returns a 204 success code.
|
|
483
|
+
*
|
|
484
|
+
* **[Permissions](#permissions) required**: Service desk's agent.
|
|
485
|
+
*
|
|
486
|
+
* @path {DELETE} /rest/servicedeskapi/servicedesk/{serviceDeskId}/organization
|
|
487
|
+
* @scopes-current manage:servicedesk-customer
|
|
488
|
+
* @scopes-beta read:servicedesk.organization:jira-service-management,
|
|
489
|
+
* delete:servicedesk.organization:jira-service-management
|
|
490
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization#api-rest-servicedeskapi-servicedesk-servicedeskid-organization-delete
|
|
491
|
+
*/
|
|
492
|
+
removeOrganization: ({ serviceDeskId, organizationServiceDeskUpdateDto, }: {
|
|
493
|
+
/**
|
|
494
|
+
* The ID of the service desk from which the organization will be removed. This
|
|
495
|
+
* can alternatively be a [project identifier.](#project-identifiers)
|
|
496
|
+
*/
|
|
497
|
+
serviceDeskId: string;
|
|
498
|
+
/**
|
|
499
|
+
* @example {
|
|
500
|
+
* "organizationId": 1
|
|
501
|
+
* }
|
|
502
|
+
*/
|
|
503
|
+
organizationServiceDeskUpdateDto: OrganizationServiceDeskUpdateDto;
|
|
504
|
+
}) => Promise<void>;
|
|
505
|
+
/**
|
|
506
|
+
* This method removes users from an organization.
|
|
507
|
+
*
|
|
508
|
+
* **[Permissions](#permissions) required**: Service desk administrator or agent.
|
|
509
|
+
* Note: Permission to delete users from an organization can be switched to users
|
|
510
|
+
* with the Jira administrator permission, using the **[Organization
|
|
511
|
+
* management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)**
|
|
512
|
+
* feature.
|
|
513
|
+
*
|
|
514
|
+
* @path {DELETE} /rest/servicedeskapi/organization/{organizationId}/user
|
|
515
|
+
* @scopes-current manage:servicedesk-customer
|
|
516
|
+
* @scopes-beta read:organization.user:jira-service-management,
|
|
517
|
+
* delete:organization.user:jira-service-management, read:user:jira
|
|
518
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization#api-rest-servicedeskapi-organization-organizationid-user-delete
|
|
519
|
+
*/
|
|
520
|
+
removeUsersFromOrganization: ({ organizationId, usersOrganizationUpdateDto, }: {
|
|
521
|
+
/** The ID of the organization. */
|
|
522
|
+
organizationId: number;
|
|
523
|
+
/**
|
|
524
|
+
* @example {
|
|
525
|
+
* "accountIds": [
|
|
526
|
+
* "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3581db05e2a66fa80b",
|
|
527
|
+
* "qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d3a01db05e2a66fa80bd"
|
|
528
|
+
* ],
|
|
529
|
+
* "usernames": []
|
|
530
|
+
* }
|
|
531
|
+
*/
|
|
532
|
+
usersOrganizationUpdateDto: UsersOrganizationUpdateDto;
|
|
533
|
+
}) => Promise<void>;
|
|
534
|
+
/**
|
|
535
|
+
* Sets the value of an organization property. Use this resource to store custom
|
|
536
|
+
* data against an organization. Organization properties are a type of entity
|
|
537
|
+
* property which are available to the API only, and not shown in Jira Service
|
|
538
|
+
* Management. [Learn
|
|
539
|
+
* more](https://developer.atlassian.com/cloud/jira/platform/jira-entity-properties/).
|
|
540
|
+
*
|
|
541
|
+
* To store organization detail field values which are visible in Jira Service
|
|
542
|
+
* Management, see the [Customer Service Management REST
|
|
543
|
+
* API](https://developer.atlassian.com/cloud/customer-service-management/rest/v1/api-group-organization/#api-group-organization).
|
|
544
|
+
*
|
|
545
|
+
* **[Permissions](#permissions) required**: Service Desk Administrator or Agent.
|
|
546
|
+
*
|
|
547
|
+
* Note: Permission to manage organizations can be switched to users with the Jira
|
|
548
|
+
* administrator permission, using the **[Organization
|
|
549
|
+
* management](https://confluence.atlassian.com/servicedeskcloud/setting-up-service-desk-users-732528877.html#Settingupservicedeskusers-manageorgsManageorganizations)**
|
|
550
|
+
* feature.
|
|
551
|
+
*
|
|
552
|
+
* @returns * status: 200, mediaType: application/json
|
|
553
|
+
*
|
|
554
|
+
* Returned if the organization property was updated.
|
|
555
|
+
*
|
|
556
|
+
* * status: 201, mediaType: application/json
|
|
557
|
+
*
|
|
558
|
+
* Returned if the organization property was created.
|
|
559
|
+
* @path {PUT} /rest/servicedeskapi/organization/{organizationId}/property/{propertyKey}
|
|
560
|
+
* @scopes-current manage:servicedesk-customer
|
|
561
|
+
* @scopes-beta read:organization.property:jira-service-management,
|
|
562
|
+
* write:organization.property:jira-service-management
|
|
563
|
+
* @see https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization#api-rest-servicedeskapi-organization-organizationid-property-propertykey-put
|
|
564
|
+
*/
|
|
565
|
+
setProperty: ({ organizationId, propertyKey, requestBody, }: {
|
|
566
|
+
/** The ID of the organization on which the property will be set. */
|
|
567
|
+
organizationId: string;
|
|
568
|
+
/**
|
|
569
|
+
* The key of the organization's property. The maximum length of the key is 255
|
|
570
|
+
* bytes.
|
|
571
|
+
*/
|
|
572
|
+
propertyKey: string;
|
|
573
|
+
/**
|
|
574
|
+
* The value of the property. The value has to be a valid, non-empty
|
|
575
|
+
* [JSON](https://tools.ietf.org/html/rfc4627) value. The maximum length of the
|
|
576
|
+
* property value is 32768 bytes.
|
|
577
|
+
*
|
|
578
|
+
* @example {
|
|
579
|
+
* "mail": "charlie@example.com",
|
|
580
|
+
* "phone": "0800-1233456789"
|
|
581
|
+
* }
|
|
582
|
+
*/
|
|
583
|
+
requestBody: unknown;
|
|
584
|
+
}) => Promise<{
|
|
585
|
+
created: boolean;
|
|
586
|
+
body: unknown;
|
|
587
|
+
}>;
|
|
588
|
+
static initialize(): void;
|
|
589
|
+
}
|