@resolution/confluence-api-client 0.4.4 → 0.4.6

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.
Files changed (183) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +60 -1
  3. package/lib/openapi/v1/BaseConfluenceApiV1Client.d.ts +32 -33
  4. package/lib/openapi/v1/BaseConfluenceApiV1Client.js +151 -88
  5. package/lib/openapi/v1/BaseConfluenceApiV1Client.js.map +1 -1
  6. package/lib/openapi/v1/core/CommonHttpService.d.ts +2 -0
  7. package/lib/openapi/v1/core/CommonHttpService.js +9 -0
  8. package/lib/openapi/v1/core/CommonHttpService.js.map +1 -1
  9. package/lib/openapi/v1/services/AnalyticsService.d.ts +10 -10
  10. package/lib/openapi/v1/services/AnalyticsService.js +62 -59
  11. package/lib/openapi/v1/services/AnalyticsService.js.map +1 -1
  12. package/lib/openapi/v1/services/AuditService.d.ts +25 -25
  13. package/lib/openapi/v1/services/AuditService.js +205 -202
  14. package/lib/openapi/v1/services/AuditService.js.map +1 -1
  15. package/lib/openapi/v1/services/ContentAttachmentsService.d.ts +20 -20
  16. package/lib/openapi/v1/services/ContentAttachmentsService.js +317 -314
  17. package/lib/openapi/v1/services/ContentAttachmentsService.js.map +1 -1
  18. package/lib/openapi/v1/services/ContentBodyService.d.ts +15 -15
  19. package/lib/openapi/v1/services/ContentBodyService.js +140 -137
  20. package/lib/openapi/v1/services/ContentBodyService.js.map +1 -1
  21. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.d.ts +27 -27
  22. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js +391 -388
  23. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js.map +1 -1
  24. package/lib/openapi/v1/services/ContentCommentsService.d.ts +8 -8
  25. package/lib/openapi/v1/services/ContentCommentsService.js +49 -46
  26. package/lib/openapi/v1/services/ContentCommentsService.js.map +1 -1
  27. package/lib/openapi/v1/services/ContentLabelsService.d.ts +11 -11
  28. package/lib/openapi/v1/services/ContentLabelsService.js +150 -147
  29. package/lib/openapi/v1/services/ContentLabelsService.js.map +1 -1
  30. package/lib/openapi/v1/services/ContentMacroBodyService.d.ts +13 -13
  31. package/lib/openapi/v1/services/ContentMacroBodyService.js +155 -152
  32. package/lib/openapi/v1/services/ContentMacroBodyService.js.map +1 -1
  33. package/lib/openapi/v1/services/ContentPermissionsService.d.ts +2 -2
  34. package/lib/openapi/v1/services/ContentPermissionsService.js +48 -45
  35. package/lib/openapi/v1/services/ContentPermissionsService.js.map +1 -1
  36. package/lib/openapi/v1/services/ContentPropertiesService.d.ts +18 -18
  37. package/lib/openapi/v1/services/ContentPropertiesService.js +237 -234
  38. package/lib/openapi/v1/services/ContentPropertiesService.js.map +1 -1
  39. package/lib/openapi/v1/services/ContentRestrictionsService.d.ts +49 -49
  40. package/lib/openapi/v1/services/ContentRestrictionsService.js +505 -502
  41. package/lib/openapi/v1/services/ContentRestrictionsService.js.map +1 -1
  42. package/lib/openapi/v1/services/ContentService.d.ts +50 -50
  43. package/lib/openapi/v1/services/ContentService.js +475 -472
  44. package/lib/openapi/v1/services/ContentService.js.map +1 -1
  45. package/lib/openapi/v1/services/ContentStatesService.d.ts +25 -25
  46. package/lib/openapi/v1/services/ContentStatesService.js +359 -356
  47. package/lib/openapi/v1/services/ContentStatesService.js.map +1 -1
  48. package/lib/openapi/v1/services/ContentVersionsService.d.ts +13 -13
  49. package/lib/openapi/v1/services/ContentVersionsService.js +144 -141
  50. package/lib/openapi/v1/services/ContentVersionsService.js.map +1 -1
  51. package/lib/openapi/v1/services/ContentWatchesService.d.ts +57 -57
  52. package/lib/openapi/v1/services/ContentWatchesService.js +454 -451
  53. package/lib/openapi/v1/services/ContentWatchesService.js.map +1 -1
  54. package/lib/openapi/v1/services/DynamicModulesService.d.ts +5 -5
  55. package/lib/openapi/v1/services/DynamicModulesService.js +70 -67
  56. package/lib/openapi/v1/services/DynamicModulesService.js.map +1 -1
  57. package/lib/openapi/v1/services/ExperimentalService.d.ts +12 -12
  58. package/lib/openapi/v1/services/ExperimentalService.js +151 -148
  59. package/lib/openapi/v1/services/ExperimentalService.js.map +1 -1
  60. package/lib/openapi/v1/services/GroupService.d.ts +52 -52
  61. package/lib/openapi/v1/services/GroupService.js +445 -442
  62. package/lib/openapi/v1/services/GroupService.js.map +1 -1
  63. package/lib/openapi/v1/services/InlineTasksService.d.ts +20 -20
  64. package/lib/openapi/v1/services/InlineTasksService.js +118 -115
  65. package/lib/openapi/v1/services/InlineTasksService.js.map +1 -1
  66. package/lib/openapi/v1/services/LabelInfoService.d.ts +5 -5
  67. package/lib/openapi/v1/services/LabelInfoService.js +37 -34
  68. package/lib/openapi/v1/services/LabelInfoService.js.map +1 -1
  69. package/lib/openapi/v1/services/LongRunningTaskService.d.ts +8 -6
  70. package/lib/openapi/v1/services/LongRunningTaskService.js +67 -63
  71. package/lib/openapi/v1/services/LongRunningTaskService.js.map +1 -1
  72. package/lib/openapi/v1/services/RelationService.d.ts +37 -37
  73. package/lib/openapi/v1/services/RelationService.js +231 -228
  74. package/lib/openapi/v1/services/RelationService.js.map +1 -1
  75. package/lib/openapi/v1/services/SearchService.d.ts +20 -20
  76. package/lib/openapi/v1/services/SearchService.js +136 -133
  77. package/lib/openapi/v1/services/SearchService.js.map +1 -1
  78. package/lib/openapi/v1/services/SettingsService.d.ts +15 -15
  79. package/lib/openapi/v1/services/SettingsService.js +204 -201
  80. package/lib/openapi/v1/services/SettingsService.js.map +1 -1
  81. package/lib/openapi/v1/services/SpacePermissionsService.d.ts +6 -6
  82. package/lib/openapi/v1/services/SpacePermissionsService.js +99 -96
  83. package/lib/openapi/v1/services/SpacePermissionsService.js.map +1 -1
  84. package/lib/openapi/v1/services/SpacePropertiesService.d.ts +16 -16
  85. package/lib/openapi/v1/services/SpacePropertiesService.js +227 -224
  86. package/lib/openapi/v1/services/SpacePropertiesService.js.map +1 -1
  87. package/lib/openapi/v1/services/SpaceService.d.ts +38 -38
  88. package/lib/openapi/v1/services/SpaceService.js +320 -317
  89. package/lib/openapi/v1/services/SpaceService.js.map +1 -1
  90. package/lib/openapi/v1/services/SpaceSettingsService.d.ts +4 -4
  91. package/lib/openapi/v1/services/SpaceSettingsService.js +68 -65
  92. package/lib/openapi/v1/services/SpaceSettingsService.js.map +1 -1
  93. package/lib/openapi/v1/services/TemplateService.d.ts +20 -20
  94. package/lib/openapi/v1/services/TemplateService.js +214 -211
  95. package/lib/openapi/v1/services/TemplateService.js.map +1 -1
  96. package/lib/openapi/v1/services/ThemesService.d.ts +13 -13
  97. package/lib/openapi/v1/services/ThemesService.js +179 -176
  98. package/lib/openapi/v1/services/ThemesService.js.map +1 -1
  99. package/lib/openapi/v1/services/UserPropertiesService.d.ts +12 -12
  100. package/lib/openapi/v1/services/UserPropertiesService.js +165 -162
  101. package/lib/openapi/v1/services/UserPropertiesService.js.map +1 -1
  102. package/lib/openapi/v1/services/UsersService.d.ts +21 -21
  103. package/lib/openapi/v1/services/UsersService.js +229 -226
  104. package/lib/openapi/v1/services/UsersService.js.map +1 -1
  105. package/lib/openapi/v2/BaseConfluenceApiV2Client.d.ts +23 -24
  106. package/lib/openapi/v2/BaseConfluenceApiV2Client.js +92 -47
  107. package/lib/openapi/v2/BaseConfluenceApiV2Client.js.map +1 -1
  108. package/lib/openapi/v2/core/CommonHttpService.d.ts +2 -0
  109. package/lib/openapi/v2/core/CommonHttpService.js +9 -0
  110. package/lib/openapi/v2/core/CommonHttpService.js.map +1 -1
  111. package/lib/openapi/v2/models/user.d.ts +0 -2
  112. package/lib/openapi/v2/models/user.js +0 -2
  113. package/lib/openapi/v2/models/user.js.map +1 -1
  114. package/lib/openapi/v2/services/AncestorsService.d.ts +17 -17
  115. package/lib/openapi/v2/services/AncestorsService.js +174 -171
  116. package/lib/openapi/v2/services/AncestorsService.js.map +1 -1
  117. package/lib/openapi/v2/services/AttachmentService.d.ts +62 -62
  118. package/lib/openapi/v2/services/AttachmentService.js +261 -258
  119. package/lib/openapi/v2/services/AttachmentService.js.map +1 -1
  120. package/lib/openapi/v2/services/BlogPostService.d.ts +70 -70
  121. package/lib/openapi/v2/services/BlogPostService.js +270 -267
  122. package/lib/openapi/v2/services/BlogPostService.js.map +1 -1
  123. package/lib/openapi/v2/services/ChildrenService.d.ts +14 -14
  124. package/lib/openapi/v2/services/ChildrenService.js +77 -74
  125. package/lib/openapi/v2/services/ChildrenService.js.map +1 -1
  126. package/lib/openapi/v2/services/ClassificationLevelService.d.ts +21 -21
  127. package/lib/openapi/v2/services/ClassificationLevelService.js +304 -301
  128. package/lib/openapi/v2/services/ClassificationLevelService.js.map +1 -1
  129. package/lib/openapi/v2/services/CommentService.d.ts +136 -136
  130. package/lib/openapi/v2/services/CommentService.js +635 -632
  131. package/lib/openapi/v2/services/CommentService.js.map +1 -1
  132. package/lib/openapi/v2/services/ContentPropertiesService.d.ts +128 -128
  133. package/lib/openapi/v2/services/ContentPropertiesService.js +1242 -1239
  134. package/lib/openapi/v2/services/ContentPropertiesService.js.map +1 -1
  135. package/lib/openapi/v2/services/ContentService.d.ts +2 -2
  136. package/lib/openapi/v2/services/ContentService.js +40 -37
  137. package/lib/openapi/v2/services/ContentService.js.map +1 -1
  138. package/lib/openapi/v2/services/CustomContentService.d.ts +72 -72
  139. package/lib/openapi/v2/services/CustomContentService.js +299 -296
  140. package/lib/openapi/v2/services/CustomContentService.js.map +1 -1
  141. package/lib/openapi/v2/services/DataPoliciesService.d.ts +10 -10
  142. package/lib/openapi/v2/services/DataPoliciesService.js +67 -64
  143. package/lib/openapi/v2/services/DataPoliciesService.js.map +1 -1
  144. package/lib/openapi/v2/services/DatabaseService.d.ts +17 -17
  145. package/lib/openapi/v2/services/DatabaseService.js +90 -87
  146. package/lib/openapi/v2/services/DatabaseService.js.map +1 -1
  147. package/lib/openapi/v2/services/LabelService.d.ts +57 -57
  148. package/lib/openapi/v2/services/LabelService.js +263 -260
  149. package/lib/openapi/v2/services/LabelService.js.map +1 -1
  150. package/lib/openapi/v2/services/LikeService.d.ts +36 -36
  151. package/lib/openapi/v2/services/LikeService.js +250 -247
  152. package/lib/openapi/v2/services/LikeService.js.map +1 -1
  153. package/lib/openapi/v2/services/OperationService.d.ts +20 -20
  154. package/lib/openapi/v2/services/OperationService.js +298 -295
  155. package/lib/openapi/v2/services/OperationService.js.map +1 -1
  156. package/lib/openapi/v2/services/PageService.d.ts +73 -73
  157. package/lib/openapi/v2/services/PageService.js +272 -269
  158. package/lib/openapi/v2/services/PageService.js.map +1 -1
  159. package/lib/openapi/v2/services/SmartLinkService.d.ts +19 -17
  160. package/lib/openapi/v2/services/SmartLinkService.js +92 -89
  161. package/lib/openapi/v2/services/SmartLinkService.js.map +1 -1
  162. package/lib/openapi/v2/services/SpacePermissionsService.d.ts +6 -6
  163. package/lib/openapi/v2/services/SpacePermissionsService.js +35 -32
  164. package/lib/openapi/v2/services/SpacePermissionsService.js.map +1 -1
  165. package/lib/openapi/v2/services/SpacePropertiesService.d.ts +15 -15
  166. package/lib/openapi/v2/services/SpacePropertiesService.js +165 -162
  167. package/lib/openapi/v2/services/SpacePropertiesService.js.map +1 -1
  168. package/lib/openapi/v2/services/SpaceService.d.ts +28 -28
  169. package/lib/openapi/v2/services/SpaceService.js +83 -80
  170. package/lib/openapi/v2/services/SpaceService.js.map +1 -1
  171. package/lib/openapi/v2/services/TaskService.d.ts +40 -40
  172. package/lib/openapi/v2/services/TaskService.js +120 -117
  173. package/lib/openapi/v2/services/TaskService.js.map +1 -1
  174. package/lib/openapi/v2/services/UserService.d.ts +11 -11
  175. package/lib/openapi/v2/services/UserService.js +91 -88
  176. package/lib/openapi/v2/services/UserService.js.map +1 -1
  177. package/lib/openapi/v2/services/VersionService.d.ts +59 -59
  178. package/lib/openapi/v2/services/VersionService.js +395 -392
  179. package/lib/openapi/v2/services/VersionService.js.map +1 -1
  180. package/lib/openapi/v2/services/WhiteboardService.d.ts +17 -17
  181. package/lib/openapi/v2/services/WhiteboardService.js +90 -87
  182. package/lib/openapi/v2/services/WhiteboardService.js.map +1 -1
  183. package/package.json +4 -3
@@ -18,448 +18,451 @@ const validationSchemaStorage_1 = require("../validationSchemaStorage");
18
18
  * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group
19
19
  */
20
20
  class GroupService extends CommonHttpService_1.CommonHttpService {
21
- /**
22
- * Adds a user as a member in a group.
23
- *
24
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
25
- * User must be a site admin.
26
- *
27
- * @deprecated
28
- * @path {POST} /wiki/rest/api/group/user
29
- * @scopes-current write:confluence-groups
30
- * @scopes-beta write:group:confluence
31
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-user-post
32
- */
33
- addUserToGroup({ name, accountId, }) {
34
- return this.getClientInstance()
35
- .request({
36
- path: "/wiki/rest/api/group/user",
37
- method: "POST",
38
- query: {
39
- name,
40
- },
41
- headers: {
42
- "Content-Type": "application/json",
43
- },
44
- body: accountId,
45
- })
46
- .then(commonHttpClient.discardResult);
47
- }
48
- /**
49
- * Adds a user as a member in a group represented by its groupId
50
- *
51
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
52
- * User must be a site admin.
53
- *
54
- * @path {POST} /wiki/rest/api/group/userByGroupId
55
- * @scopes-current write:confluence-groups
56
- * @scopes-beta write:group:confluence
57
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-userbygroupid-post
58
- */
59
- addUserToGroupByGroupId({ groupId, accountId, }) {
60
- return this.getClientInstance()
61
- .request({
62
- path: "/wiki/rest/api/group/userByGroupId",
63
- method: "POST",
64
- query: {
65
- groupId,
66
- },
67
- headers: {
68
- "Content-Type": "application/json",
69
- },
70
- body: accountId,
71
- })
72
- .then(commonHttpClient.discardResult);
73
- }
74
- /**
75
- * Creates a new user group.
76
- *
77
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
78
- * User must be a site admin.
79
- *
80
- * @returns Returned if the group was created successfully.
81
- * @path {POST} /wiki/rest/api/group
82
- * @scopes-current write:confluence-groups
83
- * @scopes-beta read:group:confluence, write:group:confluence
84
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-post
85
- */
86
- createGroup({ groupName, }) {
87
- return this.getClientInstance()
88
- .request({
89
- path: "/wiki/rest/api/group",
90
- method: "POST",
91
- headers: {
92
- "Content-Type": "application/json",
93
- },
94
- body: groupName,
95
- })
96
- .then(this.getClientInstance().responseHandler({
97
- 201: {
98
- "application/json": "json",
99
- },
100
- }))
101
- .then(commonHttpClient.castResponse())
102
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.createGroup.response"))
103
- .then(commonHttpClient.getBody);
104
- }
105
- /**
106
- * Returns a user group for a given group id.
107
- *
108
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
109
- * Permission to access the Confluence site ('Can use' global permission).
110
- *
111
- * @returns Returned if the requested group is returned.
112
- * @path {GET} /wiki/rest/api/group/by-id
113
- * @scopes-current read:confluence-groups
114
- * @scopes-beta read:group:confluence
115
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-by-id-get
116
- */
117
- getGroupByGroupId({ id, }) {
118
- return this.getClientInstance()
119
- .request({
120
- path: "/wiki/rest/api/group/by-id",
121
- method: "GET",
122
- query: {
123
- id,
124
- },
125
- })
126
- .then(this.getClientInstance().responseHandler({
127
- 200: {
128
- "application/json": "json",
129
- },
130
- }))
131
- .then(commonHttpClient.castResponse())
132
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.getGroupByGroupId.response"))
133
- .then(commonHttpClient.getBody);
134
- }
135
- /**
136
- * Returns a user group for a given group name.
137
- *
138
- * Use updated Get group API
139
- *
140
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
141
- * Permission to access the Confluence site ('Can use' global permission).
142
- *
143
- * @deprecated
144
- * @returns Returned if the requested group is returned.
145
- * @path {GET} /wiki/rest/api/group/{groupName}
146
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-groupname-get
147
- */
148
- getGroupByName({ groupName, }) {
149
- return this.getClientInstance()
150
- .request({
151
- path: "/wiki/rest/api/group/{groupName}",
152
- method: "GET",
153
- pathParams: {
154
- groupName,
155
- },
156
- })
157
- .then(this.getClientInstance().responseHandler({
158
- 200: {
159
- "application/json": "json",
160
- },
161
- }))
162
- .then(commonHttpClient.castResponse())
163
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.getGroupByName.response"))
164
- .then(commonHttpClient.getBody);
165
- }
166
- /**
167
- * Returns a user group for a given group name.
168
- *
169
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
170
- * Permission to access the Confluence site ('Can use' global permission).
171
- *
172
- * @deprecated
173
- * @returns Returned if the requested group is returned.
174
- * @path {GET} /wiki/rest/api/group/by-name
175
- * @scopes-current read:confluence-groups
176
- * @scopes-beta read:group:confluence
177
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-by-name-get
178
- */
179
- getGroupByQueryParam({ name, }) {
180
- return this.getClientInstance()
181
- .request({
182
- path: "/wiki/rest/api/group/by-name",
183
- method: "GET",
184
- query: {
185
- name,
186
- },
187
- })
188
- .then(this.getClientInstance().responseHandler({
189
- 200: {
190
- "application/json": "json",
191
- },
192
- }))
193
- .then(commonHttpClient.castResponse())
194
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.getGroupByQueryParam.response"))
195
- .then(commonHttpClient.getBody);
196
- }
197
- /**
198
- * Returns the users that are members of a group.
199
- *
200
- * Use updated Get group API
201
- *
202
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
203
- * Permission to access the Confluence site ('Can use' global permission).
204
- *
205
- * @deprecated
206
- * @returns Returned if the requested users are returned.
207
- * @path {GET} /wiki/rest/api/group/{groupName}/member
208
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-groupname-member-get
209
- */
210
- getGroupMembers({ groupName, start, limit, }) {
211
- return this.getClientInstance()
212
- .request({
213
- path: "/wiki/rest/api/group/{groupName}/member",
214
- method: "GET",
215
- pathParams: {
216
- groupName,
217
- },
218
- query: {
219
- start,
220
- limit,
221
- },
222
- })
223
- .then(this.getClientInstance().responseHandler({
224
- 200: {
225
- "application/json": "json",
226
- },
227
- }))
228
- .then(commonHttpClient.castResponse())
229
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.getGroupMembers.response"))
230
- .then(commonHttpClient.getBody);
231
- }
232
- /**
233
- * Returns the users that are members of a group.
234
- *
235
- * Use updated Get group API
236
- *
237
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
238
- * Permission to access the Confluence site ('Can use' global permission).
239
- *
240
- * @returns Returned if the requested users are returned.
241
- * @path {GET} /wiki/rest/api/group/{groupId}/membersByGroupId
242
- * @scopes-current read:confluence-groups
243
- * @scopes-beta read:group:confluence, read:user:confluence
244
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-groupid-membersbygroupid-get
245
- */
246
- getGroupMembersByGroupId({ groupId, start, limit, shouldReturnTotalSize, expand, }) {
247
- return this.getClientInstance()
248
- .request({
249
- path: "/wiki/rest/api/group/{groupId}/membersByGroupId",
250
- method: "GET",
251
- pathParams: {
252
- groupId,
253
- },
254
- query: {
255
- start,
256
- limit,
257
- shouldReturnTotalSize,
258
- expand,
259
- },
260
- })
261
- .then(this.getClientInstance().responseHandler({
262
- 200: {
263
- "application/json": "json",
264
- },
265
- }))
266
- .then(commonHttpClient.castResponse())
267
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.getGroupMembersByGroupId.response"))
268
- .then(commonHttpClient.getBody);
269
- }
270
- /**
271
- * Returns all user groups. The returned groups are ordered alphabetically in
272
- * ascending order by group name.
273
- *
274
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
275
- * Permission to access the Confluence site ('Can use' global permission).
276
- *
277
- * @returns Returned if the requested groups are returned.
278
- * @path {GET} /wiki/rest/api/group
279
- * @scopes-current read:confluence-groups
280
- * @scopes-beta read:group:confluence
281
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-get
282
- */
283
- getGroups({ start, limit, accessType, } = {}) {
284
- return this.getClientInstance()
285
- .request({
286
- path: "/wiki/rest/api/group",
287
- method: "GET",
288
- query: {
289
- start,
290
- limit,
291
- accessType,
292
- },
293
- })
294
- .then(this.getClientInstance().responseHandler({
295
- 200: {
296
- "application/json": "json",
297
- },
298
- }))
299
- .then(commonHttpClient.castResponse())
300
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.getGroups.response"))
301
- .then(commonHttpClient.getBody);
302
- }
303
- /**
304
- * Returns the users that are members of a group.
305
- *
306
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
307
- * Permission to access the Confluence site ('Can use' global permission).
308
- *
309
- * @deprecated
310
- * @returns Returned if the requested users are returned.
311
- * @path {GET} /wiki/rest/api/group/member
312
- * @scopes-current read:confluence-groups
313
- * @scopes-beta read:group:confluence, read:user:confluence
314
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-member-get
315
- */
316
- getMembersByQueryParam({ name, start, limit, shouldReturnTotalSize, expand, }) {
317
- return this.getClientInstance()
318
- .request({
319
- path: "/wiki/rest/api/group/member",
320
- method: "GET",
321
- query: {
322
- name,
323
- start,
324
- limit,
325
- shouldReturnTotalSize,
326
- expand,
327
- },
328
- })
329
- .then(this.getClientInstance().responseHandler({
330
- 200: {
331
- "application/json": "json",
332
- },
333
- }))
334
- .then(commonHttpClient.castResponse())
335
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.getMembersByQueryParam.response"))
336
- .then(commonHttpClient.getBody);
337
- }
338
- /**
339
- * Delete user group.
340
- *
341
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
342
- * User must be a site admin.
343
- *
344
- * @deprecated
345
- * @path {DELETE} /wiki/rest/api/group
346
- * @scopes-current write:confluence-groups
347
- * @scopes-beta write:group:confluence
348
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-delete
349
- */
350
- removeGroup({ name, }) {
351
- return this.getClientInstance()
352
- .request({
353
- path: "/wiki/rest/api/group",
354
- method: "DELETE",
355
- query: {
356
- name,
357
- },
358
- })
359
- .then(commonHttpClient.discardResult);
360
- }
361
- /**
362
- * Delete user group.
363
- *
364
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
365
- * User must be a site admin.
366
- *
367
- * @path {DELETE} /wiki/rest/api/group/by-id
368
- * @scopes-current write:confluence-groups
369
- * @scopes-beta write:group:confluence
370
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-by-id-delete
371
- */
372
- removeGroupById({ id, }) {
373
- return this.getClientInstance()
374
- .request({
375
- path: "/wiki/rest/api/group/by-id",
376
- method: "DELETE",
377
- query: {
378
- id,
379
- },
380
- })
381
- .then(commonHttpClient.discardResult);
382
- }
383
- /**
384
- * Remove user as a member from a group.
385
- *
386
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
387
- * User must be a site admin.
388
- *
389
- * @deprecated
390
- * @path {DELETE} /wiki/rest/api/group/user
391
- * @scopes-current write:confluence-groups
392
- * @scopes-beta write:group:confluence
393
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-user-delete
394
- */
395
- removeMemberFromGroup({ name, key, username, accountId, }) {
396
- return this.getClientInstance()
397
- .request({
398
- path: "/wiki/rest/api/group/user",
399
- method: "DELETE",
400
- query: {
401
- name,
402
- key,
403
- username,
404
- accountId,
405
- },
406
- })
407
- .then(commonHttpClient.discardResult);
408
- }
409
- /**
410
- * Remove user as a member from a group.
411
- *
412
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
413
- * User must be a site admin.
414
- *
415
- * @path {DELETE} /wiki/rest/api/group/userByGroupId
416
- * @scopes-current write:confluence-groups
417
- * @scopes-beta write:group:confluence
418
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-userbygroupid-delete
419
- */
420
- removeMemberFromGroupByGroupId({ groupId, key, username, accountId, }) {
421
- return this.getClientInstance()
422
- .request({
423
- path: "/wiki/rest/api/group/userByGroupId",
424
- method: "DELETE",
425
- query: {
426
- groupId,
427
- key,
428
- username,
429
- accountId,
430
- },
431
- })
432
- .then(commonHttpClient.discardResult);
433
- }
434
- /**
435
- * Get search results of groups by partial query provided.
436
- *
437
- * @returns Returns a full JSON representation of group collection.
438
- * @path {GET} /wiki/rest/api/group/picker
439
- * @scopes-current read:confluence-groups
440
- * @scopes-beta read:group:confluence
441
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-picker-get
442
- */
443
- searchGroups({ query, start, limit, shouldReturnTotalSize, }) {
444
- return this.getClientInstance()
445
- .request({
446
- path: "/wiki/rest/api/group/picker",
447
- method: "GET",
448
- query: {
449
- query,
450
- start,
451
- limit,
452
- shouldReturnTotalSize,
453
- },
454
- })
455
- .then(this.getClientInstance().responseHandler({
456
- 200: {
457
- "application/json": "json",
458
- },
459
- }))
460
- .then(commonHttpClient.castResponse())
461
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.searchGroups.response"))
462
- .then(commonHttpClient.getBody);
21
+ constructor() {
22
+ super(...arguments);
23
+ /**
24
+ * Adds a user as a member in a group.
25
+ *
26
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
27
+ * User must be a site admin.
28
+ *
29
+ * @deprecated
30
+ * @path {POST} /wiki/rest/api/group/user
31
+ * @scopes-current write:confluence-groups
32
+ * @scopes-beta write:group:confluence
33
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-user-post
34
+ */
35
+ this.addUserToGroup = ({ name, accountId, }) => {
36
+ return this.getClientInstance()
37
+ .request({
38
+ path: "/wiki/rest/api/group/user",
39
+ method: "POST",
40
+ query: {
41
+ name,
42
+ },
43
+ headers: {
44
+ "Content-Type": "application/json",
45
+ },
46
+ body: accountId,
47
+ })
48
+ .then(commonHttpClient.discardResult);
49
+ };
50
+ /**
51
+ * Adds a user as a member in a group represented by its groupId
52
+ *
53
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
54
+ * User must be a site admin.
55
+ *
56
+ * @path {POST} /wiki/rest/api/group/userByGroupId
57
+ * @scopes-current write:confluence-groups
58
+ * @scopes-beta write:group:confluence
59
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-userbygroupid-post
60
+ */
61
+ this.addUserToGroupByGroupId = ({ groupId, accountId, }) => {
62
+ return this.getClientInstance()
63
+ .request({
64
+ path: "/wiki/rest/api/group/userByGroupId",
65
+ method: "POST",
66
+ query: {
67
+ groupId,
68
+ },
69
+ headers: {
70
+ "Content-Type": "application/json",
71
+ },
72
+ body: accountId,
73
+ })
74
+ .then(commonHttpClient.discardResult);
75
+ };
76
+ /**
77
+ * Creates a new user group.
78
+ *
79
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
80
+ * User must be a site admin.
81
+ *
82
+ * @returns Returned if the group was created successfully.
83
+ * @path {POST} /wiki/rest/api/group
84
+ * @scopes-current write:confluence-groups
85
+ * @scopes-beta read:group:confluence, write:group:confluence
86
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-post
87
+ */
88
+ this.createGroup = ({ groupName, }) => {
89
+ return this.getClientInstance()
90
+ .request({
91
+ path: "/wiki/rest/api/group",
92
+ method: "POST",
93
+ headers: {
94
+ "Content-Type": "application/json",
95
+ },
96
+ body: groupName,
97
+ })
98
+ .then(this.getClientInstance().responseHandler({
99
+ 201: {
100
+ "application/json": "json",
101
+ },
102
+ }))
103
+ .then(commonHttpClient.castResponse())
104
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.createGroup.response"))
105
+ .then(commonHttpClient.getBody);
106
+ };
107
+ /**
108
+ * Returns a user group for a given group id.
109
+ *
110
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
111
+ * Permission to access the Confluence site ('Can use' global permission).
112
+ *
113
+ * @returns Returned if the requested group is returned.
114
+ * @path {GET} /wiki/rest/api/group/by-id
115
+ * @scopes-current read:confluence-groups
116
+ * @scopes-beta read:group:confluence
117
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-by-id-get
118
+ */
119
+ this.getGroupByGroupId = ({ id, }) => {
120
+ return this.getClientInstance()
121
+ .request({
122
+ path: "/wiki/rest/api/group/by-id",
123
+ method: "GET",
124
+ query: {
125
+ id,
126
+ },
127
+ })
128
+ .then(this.getClientInstance().responseHandler({
129
+ 200: {
130
+ "application/json": "json",
131
+ },
132
+ }))
133
+ .then(commonHttpClient.castResponse())
134
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.getGroupByGroupId.response"))
135
+ .then(commonHttpClient.getBody);
136
+ };
137
+ /**
138
+ * Returns a user group for a given group name.
139
+ *
140
+ * Use updated Get group API
141
+ *
142
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
143
+ * Permission to access the Confluence site ('Can use' global permission).
144
+ *
145
+ * @deprecated
146
+ * @returns Returned if the requested group is returned.
147
+ * @path {GET} /wiki/rest/api/group/{groupName}
148
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-groupname-get
149
+ */
150
+ this.getGroupByName = ({ groupName, }) => {
151
+ return this.getClientInstance()
152
+ .request({
153
+ path: "/wiki/rest/api/group/{groupName}",
154
+ method: "GET",
155
+ pathParams: {
156
+ groupName,
157
+ },
158
+ })
159
+ .then(this.getClientInstance().responseHandler({
160
+ 200: {
161
+ "application/json": "json",
162
+ },
163
+ }))
164
+ .then(commonHttpClient.castResponse())
165
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.getGroupByName.response"))
166
+ .then(commonHttpClient.getBody);
167
+ };
168
+ /**
169
+ * Returns a user group for a given group name.
170
+ *
171
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
172
+ * Permission to access the Confluence site ('Can use' global permission).
173
+ *
174
+ * @deprecated
175
+ * @returns Returned if the requested group is returned.
176
+ * @path {GET} /wiki/rest/api/group/by-name
177
+ * @scopes-current read:confluence-groups
178
+ * @scopes-beta read:group:confluence
179
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-by-name-get
180
+ */
181
+ this.getGroupByQueryParam = ({ name, }) => {
182
+ return this.getClientInstance()
183
+ .request({
184
+ path: "/wiki/rest/api/group/by-name",
185
+ method: "GET",
186
+ query: {
187
+ name,
188
+ },
189
+ })
190
+ .then(this.getClientInstance().responseHandler({
191
+ 200: {
192
+ "application/json": "json",
193
+ },
194
+ }))
195
+ .then(commonHttpClient.castResponse())
196
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.getGroupByQueryParam.response"))
197
+ .then(commonHttpClient.getBody);
198
+ };
199
+ /**
200
+ * Returns the users that are members of a group.
201
+ *
202
+ * Use updated Get group API
203
+ *
204
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
205
+ * Permission to access the Confluence site ('Can use' global permission).
206
+ *
207
+ * @deprecated
208
+ * @returns Returned if the requested users are returned.
209
+ * @path {GET} /wiki/rest/api/group/{groupName}/member
210
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-groupname-member-get
211
+ */
212
+ this.getGroupMembers = ({ groupName, start, limit, }) => {
213
+ return this.getClientInstance()
214
+ .request({
215
+ path: "/wiki/rest/api/group/{groupName}/member",
216
+ method: "GET",
217
+ pathParams: {
218
+ groupName,
219
+ },
220
+ query: {
221
+ start,
222
+ limit,
223
+ },
224
+ })
225
+ .then(this.getClientInstance().responseHandler({
226
+ 200: {
227
+ "application/json": "json",
228
+ },
229
+ }))
230
+ .then(commonHttpClient.castResponse())
231
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.getGroupMembers.response"))
232
+ .then(commonHttpClient.getBody);
233
+ };
234
+ /**
235
+ * Returns the users that are members of a group.
236
+ *
237
+ * Use updated Get group API
238
+ *
239
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
240
+ * Permission to access the Confluence site ('Can use' global permission).
241
+ *
242
+ * @returns Returned if the requested users are returned.
243
+ * @path {GET} /wiki/rest/api/group/{groupId}/membersByGroupId
244
+ * @scopes-current read:confluence-groups
245
+ * @scopes-beta read:group:confluence, read:user:confluence
246
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-groupid-membersbygroupid-get
247
+ */
248
+ this.getGroupMembersByGroupId = ({ groupId, start, limit, shouldReturnTotalSize, expand, }) => {
249
+ return this.getClientInstance()
250
+ .request({
251
+ path: "/wiki/rest/api/group/{groupId}/membersByGroupId",
252
+ method: "GET",
253
+ pathParams: {
254
+ groupId,
255
+ },
256
+ query: {
257
+ start,
258
+ limit,
259
+ shouldReturnTotalSize,
260
+ expand,
261
+ },
262
+ })
263
+ .then(this.getClientInstance().responseHandler({
264
+ 200: {
265
+ "application/json": "json",
266
+ },
267
+ }))
268
+ .then(commonHttpClient.castResponse())
269
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.getGroupMembersByGroupId.response"))
270
+ .then(commonHttpClient.getBody);
271
+ };
272
+ /**
273
+ * Returns all user groups. The returned groups are ordered alphabetically in
274
+ * ascending order by group name.
275
+ *
276
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
277
+ * Permission to access the Confluence site ('Can use' global permission).
278
+ *
279
+ * @returns Returned if the requested groups are returned.
280
+ * @path {GET} /wiki/rest/api/group
281
+ * @scopes-current read:confluence-groups
282
+ * @scopes-beta read:group:confluence
283
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-get
284
+ */
285
+ this.getGroups = ({ start, limit, accessType, } = {}) => {
286
+ return this.getClientInstance()
287
+ .request({
288
+ path: "/wiki/rest/api/group",
289
+ method: "GET",
290
+ query: {
291
+ start,
292
+ limit,
293
+ accessType,
294
+ },
295
+ })
296
+ .then(this.getClientInstance().responseHandler({
297
+ 200: {
298
+ "application/json": "json",
299
+ },
300
+ }))
301
+ .then(commonHttpClient.castResponse())
302
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.getGroups.response"))
303
+ .then(commonHttpClient.getBody);
304
+ };
305
+ /**
306
+ * Returns the users that are members of a group.
307
+ *
308
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
309
+ * Permission to access the Confluence site ('Can use' global permission).
310
+ *
311
+ * @deprecated
312
+ * @returns Returned if the requested users are returned.
313
+ * @path {GET} /wiki/rest/api/group/member
314
+ * @scopes-current read:confluence-groups
315
+ * @scopes-beta read:group:confluence, read:user:confluence
316
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-member-get
317
+ */
318
+ this.getMembersByQueryParam = ({ name, start, limit, shouldReturnTotalSize, expand, }) => {
319
+ return this.getClientInstance()
320
+ .request({
321
+ path: "/wiki/rest/api/group/member",
322
+ method: "GET",
323
+ query: {
324
+ name,
325
+ start,
326
+ limit,
327
+ shouldReturnTotalSize,
328
+ expand,
329
+ },
330
+ })
331
+ .then(this.getClientInstance().responseHandler({
332
+ 200: {
333
+ "application/json": "json",
334
+ },
335
+ }))
336
+ .then(commonHttpClient.castResponse())
337
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.getMembersByQueryParam.response"))
338
+ .then(commonHttpClient.getBody);
339
+ };
340
+ /**
341
+ * Delete user group.
342
+ *
343
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
344
+ * User must be a site admin.
345
+ *
346
+ * @deprecated
347
+ * @path {DELETE} /wiki/rest/api/group
348
+ * @scopes-current write:confluence-groups
349
+ * @scopes-beta write:group:confluence
350
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-delete
351
+ */
352
+ this.removeGroup = ({ name, }) => {
353
+ return this.getClientInstance()
354
+ .request({
355
+ path: "/wiki/rest/api/group",
356
+ method: "DELETE",
357
+ query: {
358
+ name,
359
+ },
360
+ })
361
+ .then(commonHttpClient.discardResult);
362
+ };
363
+ /**
364
+ * Delete user group.
365
+ *
366
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
367
+ * User must be a site admin.
368
+ *
369
+ * @path {DELETE} /wiki/rest/api/group/by-id
370
+ * @scopes-current write:confluence-groups
371
+ * @scopes-beta write:group:confluence
372
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-by-id-delete
373
+ */
374
+ this.removeGroupById = ({ id, }) => {
375
+ return this.getClientInstance()
376
+ .request({
377
+ path: "/wiki/rest/api/group/by-id",
378
+ method: "DELETE",
379
+ query: {
380
+ id,
381
+ },
382
+ })
383
+ .then(commonHttpClient.discardResult);
384
+ };
385
+ /**
386
+ * Remove user as a member from a group.
387
+ *
388
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
389
+ * User must be a site admin.
390
+ *
391
+ * @deprecated
392
+ * @path {DELETE} /wiki/rest/api/group/user
393
+ * @scopes-current write:confluence-groups
394
+ * @scopes-beta write:group:confluence
395
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-user-delete
396
+ */
397
+ this.removeMemberFromGroup = ({ name, key, username, accountId, }) => {
398
+ return this.getClientInstance()
399
+ .request({
400
+ path: "/wiki/rest/api/group/user",
401
+ method: "DELETE",
402
+ query: {
403
+ name,
404
+ key,
405
+ username,
406
+ accountId,
407
+ },
408
+ })
409
+ .then(commonHttpClient.discardResult);
410
+ };
411
+ /**
412
+ * Remove user as a member from a group.
413
+ *
414
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
415
+ * User must be a site admin.
416
+ *
417
+ * @path {DELETE} /wiki/rest/api/group/userByGroupId
418
+ * @scopes-current write:confluence-groups
419
+ * @scopes-beta write:group:confluence
420
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-userbygroupid-delete
421
+ */
422
+ this.removeMemberFromGroupByGroupId = ({ groupId, key, username, accountId, }) => {
423
+ return this.getClientInstance()
424
+ .request({
425
+ path: "/wiki/rest/api/group/userByGroupId",
426
+ method: "DELETE",
427
+ query: {
428
+ groupId,
429
+ key,
430
+ username,
431
+ accountId,
432
+ },
433
+ })
434
+ .then(commonHttpClient.discardResult);
435
+ };
436
+ /**
437
+ * Get search results of groups by partial query provided.
438
+ *
439
+ * @returns Returns a full JSON representation of group collection.
440
+ * @path {GET} /wiki/rest/api/group/picker
441
+ * @scopes-current read:confluence-groups
442
+ * @scopes-beta read:group:confluence
443
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group#api-wiki-rest-api-group-picker-get
444
+ */
445
+ this.searchGroups = ({ query, start, limit, shouldReturnTotalSize, }) => {
446
+ return this.getClientInstance()
447
+ .request({
448
+ path: "/wiki/rest/api/group/picker",
449
+ method: "GET",
450
+ query: {
451
+ query,
452
+ start,
453
+ limit,
454
+ shouldReturnTotalSize,
455
+ },
456
+ })
457
+ .then(this.getClientInstance().responseHandler({
458
+ 200: {
459
+ "application/json": "json",
460
+ },
461
+ }))
462
+ .then(commonHttpClient.castResponse())
463
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("GroupService.searchGroups.response"))
464
+ .then(commonHttpClient.getBody);
465
+ };
463
466
  }
464
467
  static initialize() {
465
468
  validationSchemaStorage_1.validationSchemaStorage.registerExtensible("GroupService.getGroups.response", zod_1.z