@resolution/confluence-api-client 0.4.4 → 0.4.5

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 (170) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/lib/openapi/v1/services/AnalyticsService.d.ts +10 -10
  3. package/lib/openapi/v1/services/AnalyticsService.js +62 -59
  4. package/lib/openapi/v1/services/AnalyticsService.js.map +1 -1
  5. package/lib/openapi/v1/services/AuditService.d.ts +25 -25
  6. package/lib/openapi/v1/services/AuditService.js +205 -202
  7. package/lib/openapi/v1/services/AuditService.js.map +1 -1
  8. package/lib/openapi/v1/services/ContentAttachmentsService.d.ts +20 -20
  9. package/lib/openapi/v1/services/ContentAttachmentsService.js +317 -314
  10. package/lib/openapi/v1/services/ContentAttachmentsService.js.map +1 -1
  11. package/lib/openapi/v1/services/ContentBodyService.d.ts +15 -15
  12. package/lib/openapi/v1/services/ContentBodyService.js +140 -137
  13. package/lib/openapi/v1/services/ContentBodyService.js.map +1 -1
  14. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.d.ts +27 -27
  15. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js +391 -388
  16. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js.map +1 -1
  17. package/lib/openapi/v1/services/ContentCommentsService.d.ts +8 -8
  18. package/lib/openapi/v1/services/ContentCommentsService.js +49 -46
  19. package/lib/openapi/v1/services/ContentCommentsService.js.map +1 -1
  20. package/lib/openapi/v1/services/ContentLabelsService.d.ts +11 -11
  21. package/lib/openapi/v1/services/ContentLabelsService.js +150 -147
  22. package/lib/openapi/v1/services/ContentLabelsService.js.map +1 -1
  23. package/lib/openapi/v1/services/ContentMacroBodyService.d.ts +13 -13
  24. package/lib/openapi/v1/services/ContentMacroBodyService.js +155 -152
  25. package/lib/openapi/v1/services/ContentMacroBodyService.js.map +1 -1
  26. package/lib/openapi/v1/services/ContentPermissionsService.d.ts +2 -2
  27. package/lib/openapi/v1/services/ContentPermissionsService.js +48 -45
  28. package/lib/openapi/v1/services/ContentPermissionsService.js.map +1 -1
  29. package/lib/openapi/v1/services/ContentPropertiesService.d.ts +18 -18
  30. package/lib/openapi/v1/services/ContentPropertiesService.js +237 -234
  31. package/lib/openapi/v1/services/ContentPropertiesService.js.map +1 -1
  32. package/lib/openapi/v1/services/ContentRestrictionsService.d.ts +49 -49
  33. package/lib/openapi/v1/services/ContentRestrictionsService.js +505 -502
  34. package/lib/openapi/v1/services/ContentRestrictionsService.js.map +1 -1
  35. package/lib/openapi/v1/services/ContentService.d.ts +50 -50
  36. package/lib/openapi/v1/services/ContentService.js +475 -472
  37. package/lib/openapi/v1/services/ContentService.js.map +1 -1
  38. package/lib/openapi/v1/services/ContentStatesService.d.ts +25 -25
  39. package/lib/openapi/v1/services/ContentStatesService.js +359 -356
  40. package/lib/openapi/v1/services/ContentStatesService.js.map +1 -1
  41. package/lib/openapi/v1/services/ContentVersionsService.d.ts +13 -13
  42. package/lib/openapi/v1/services/ContentVersionsService.js +144 -141
  43. package/lib/openapi/v1/services/ContentVersionsService.js.map +1 -1
  44. package/lib/openapi/v1/services/ContentWatchesService.d.ts +57 -57
  45. package/lib/openapi/v1/services/ContentWatchesService.js +454 -451
  46. package/lib/openapi/v1/services/ContentWatchesService.js.map +1 -1
  47. package/lib/openapi/v1/services/DynamicModulesService.d.ts +5 -5
  48. package/lib/openapi/v1/services/DynamicModulesService.js +70 -67
  49. package/lib/openapi/v1/services/DynamicModulesService.js.map +1 -1
  50. package/lib/openapi/v1/services/ExperimentalService.d.ts +12 -12
  51. package/lib/openapi/v1/services/ExperimentalService.js +151 -148
  52. package/lib/openapi/v1/services/ExperimentalService.js.map +1 -1
  53. package/lib/openapi/v1/services/GroupService.d.ts +52 -52
  54. package/lib/openapi/v1/services/GroupService.js +445 -442
  55. package/lib/openapi/v1/services/GroupService.js.map +1 -1
  56. package/lib/openapi/v1/services/InlineTasksService.d.ts +20 -20
  57. package/lib/openapi/v1/services/InlineTasksService.js +118 -115
  58. package/lib/openapi/v1/services/InlineTasksService.js.map +1 -1
  59. package/lib/openapi/v1/services/LabelInfoService.d.ts +5 -5
  60. package/lib/openapi/v1/services/LabelInfoService.js +37 -34
  61. package/lib/openapi/v1/services/LabelInfoService.js.map +1 -1
  62. package/lib/openapi/v1/services/LongRunningTaskService.d.ts +8 -6
  63. package/lib/openapi/v1/services/LongRunningTaskService.js +67 -63
  64. package/lib/openapi/v1/services/LongRunningTaskService.js.map +1 -1
  65. package/lib/openapi/v1/services/RelationService.d.ts +37 -37
  66. package/lib/openapi/v1/services/RelationService.js +231 -228
  67. package/lib/openapi/v1/services/RelationService.js.map +1 -1
  68. package/lib/openapi/v1/services/SearchService.d.ts +20 -20
  69. package/lib/openapi/v1/services/SearchService.js +136 -133
  70. package/lib/openapi/v1/services/SearchService.js.map +1 -1
  71. package/lib/openapi/v1/services/SettingsService.d.ts +15 -15
  72. package/lib/openapi/v1/services/SettingsService.js +204 -201
  73. package/lib/openapi/v1/services/SettingsService.js.map +1 -1
  74. package/lib/openapi/v1/services/SpacePermissionsService.d.ts +6 -6
  75. package/lib/openapi/v1/services/SpacePermissionsService.js +99 -96
  76. package/lib/openapi/v1/services/SpacePermissionsService.js.map +1 -1
  77. package/lib/openapi/v1/services/SpacePropertiesService.d.ts +16 -16
  78. package/lib/openapi/v1/services/SpacePropertiesService.js +227 -224
  79. package/lib/openapi/v1/services/SpacePropertiesService.js.map +1 -1
  80. package/lib/openapi/v1/services/SpaceService.d.ts +38 -38
  81. package/lib/openapi/v1/services/SpaceService.js +320 -317
  82. package/lib/openapi/v1/services/SpaceService.js.map +1 -1
  83. package/lib/openapi/v1/services/SpaceSettingsService.d.ts +4 -4
  84. package/lib/openapi/v1/services/SpaceSettingsService.js +68 -65
  85. package/lib/openapi/v1/services/SpaceSettingsService.js.map +1 -1
  86. package/lib/openapi/v1/services/TemplateService.d.ts +20 -20
  87. package/lib/openapi/v1/services/TemplateService.js +214 -211
  88. package/lib/openapi/v1/services/TemplateService.js.map +1 -1
  89. package/lib/openapi/v1/services/ThemesService.d.ts +13 -13
  90. package/lib/openapi/v1/services/ThemesService.js +179 -176
  91. package/lib/openapi/v1/services/ThemesService.js.map +1 -1
  92. package/lib/openapi/v1/services/UserPropertiesService.d.ts +12 -12
  93. package/lib/openapi/v1/services/UserPropertiesService.js +165 -162
  94. package/lib/openapi/v1/services/UserPropertiesService.js.map +1 -1
  95. package/lib/openapi/v1/services/UsersService.d.ts +21 -21
  96. package/lib/openapi/v1/services/UsersService.js +229 -226
  97. package/lib/openapi/v1/services/UsersService.js.map +1 -1
  98. package/lib/openapi/v2/models/user.d.ts +0 -2
  99. package/lib/openapi/v2/models/user.js +0 -2
  100. package/lib/openapi/v2/models/user.js.map +1 -1
  101. package/lib/openapi/v2/services/AncestorsService.d.ts +17 -17
  102. package/lib/openapi/v2/services/AncestorsService.js +174 -171
  103. package/lib/openapi/v2/services/AncestorsService.js.map +1 -1
  104. package/lib/openapi/v2/services/AttachmentService.d.ts +62 -62
  105. package/lib/openapi/v2/services/AttachmentService.js +261 -258
  106. package/lib/openapi/v2/services/AttachmentService.js.map +1 -1
  107. package/lib/openapi/v2/services/BlogPostService.d.ts +70 -70
  108. package/lib/openapi/v2/services/BlogPostService.js +270 -267
  109. package/lib/openapi/v2/services/BlogPostService.js.map +1 -1
  110. package/lib/openapi/v2/services/ChildrenService.d.ts +14 -14
  111. package/lib/openapi/v2/services/ChildrenService.js +77 -74
  112. package/lib/openapi/v2/services/ChildrenService.js.map +1 -1
  113. package/lib/openapi/v2/services/ClassificationLevelService.d.ts +21 -21
  114. package/lib/openapi/v2/services/ClassificationLevelService.js +304 -301
  115. package/lib/openapi/v2/services/ClassificationLevelService.js.map +1 -1
  116. package/lib/openapi/v2/services/CommentService.d.ts +136 -136
  117. package/lib/openapi/v2/services/CommentService.js +635 -632
  118. package/lib/openapi/v2/services/CommentService.js.map +1 -1
  119. package/lib/openapi/v2/services/ContentPropertiesService.d.ts +128 -128
  120. package/lib/openapi/v2/services/ContentPropertiesService.js +1242 -1239
  121. package/lib/openapi/v2/services/ContentPropertiesService.js.map +1 -1
  122. package/lib/openapi/v2/services/ContentService.d.ts +2 -2
  123. package/lib/openapi/v2/services/ContentService.js +40 -37
  124. package/lib/openapi/v2/services/ContentService.js.map +1 -1
  125. package/lib/openapi/v2/services/CustomContentService.d.ts +72 -72
  126. package/lib/openapi/v2/services/CustomContentService.js +299 -296
  127. package/lib/openapi/v2/services/CustomContentService.js.map +1 -1
  128. package/lib/openapi/v2/services/DataPoliciesService.d.ts +10 -10
  129. package/lib/openapi/v2/services/DataPoliciesService.js +67 -64
  130. package/lib/openapi/v2/services/DataPoliciesService.js.map +1 -1
  131. package/lib/openapi/v2/services/DatabaseService.d.ts +17 -17
  132. package/lib/openapi/v2/services/DatabaseService.js +90 -87
  133. package/lib/openapi/v2/services/DatabaseService.js.map +1 -1
  134. package/lib/openapi/v2/services/LabelService.d.ts +57 -57
  135. package/lib/openapi/v2/services/LabelService.js +263 -260
  136. package/lib/openapi/v2/services/LabelService.js.map +1 -1
  137. package/lib/openapi/v2/services/LikeService.d.ts +36 -36
  138. package/lib/openapi/v2/services/LikeService.js +250 -247
  139. package/lib/openapi/v2/services/LikeService.js.map +1 -1
  140. package/lib/openapi/v2/services/OperationService.d.ts +20 -20
  141. package/lib/openapi/v2/services/OperationService.js +298 -295
  142. package/lib/openapi/v2/services/OperationService.js.map +1 -1
  143. package/lib/openapi/v2/services/PageService.d.ts +73 -73
  144. package/lib/openapi/v2/services/PageService.js +272 -269
  145. package/lib/openapi/v2/services/PageService.js.map +1 -1
  146. package/lib/openapi/v2/services/SmartLinkService.d.ts +19 -17
  147. package/lib/openapi/v2/services/SmartLinkService.js +92 -89
  148. package/lib/openapi/v2/services/SmartLinkService.js.map +1 -1
  149. package/lib/openapi/v2/services/SpacePermissionsService.d.ts +6 -6
  150. package/lib/openapi/v2/services/SpacePermissionsService.js +35 -32
  151. package/lib/openapi/v2/services/SpacePermissionsService.js.map +1 -1
  152. package/lib/openapi/v2/services/SpacePropertiesService.d.ts +15 -15
  153. package/lib/openapi/v2/services/SpacePropertiesService.js +165 -162
  154. package/lib/openapi/v2/services/SpacePropertiesService.js.map +1 -1
  155. package/lib/openapi/v2/services/SpaceService.d.ts +28 -28
  156. package/lib/openapi/v2/services/SpaceService.js +83 -80
  157. package/lib/openapi/v2/services/SpaceService.js.map +1 -1
  158. package/lib/openapi/v2/services/TaskService.d.ts +40 -40
  159. package/lib/openapi/v2/services/TaskService.js +120 -117
  160. package/lib/openapi/v2/services/TaskService.js.map +1 -1
  161. package/lib/openapi/v2/services/UserService.d.ts +11 -11
  162. package/lib/openapi/v2/services/UserService.js +91 -88
  163. package/lib/openapi/v2/services/UserService.js.map +1 -1
  164. package/lib/openapi/v2/services/VersionService.d.ts +59 -59
  165. package/lib/openapi/v2/services/VersionService.js +395 -392
  166. package/lib/openapi/v2/services/VersionService.js.map +1 -1
  167. package/lib/openapi/v2/services/WhiteboardService.d.ts +17 -17
  168. package/lib/openapi/v2/services/WhiteboardService.js +90 -87
  169. package/lib/openapi/v2/services/WhiteboardService.js.map +1 -1
  170. package/package.json +4 -3
@@ -12,323 +12,326 @@ const space_1 = require("../models/space");
12
12
  const validationSchemaStorage_1 = require("../validationSchemaStorage");
13
13
  /** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space */
14
14
  class SpaceService extends CommonHttpService_1.CommonHttpService {
15
- /**
16
- * Creates a new space that is only visible to the creator. This method is
17
- * the same as the [Create space](#api-space-post) method with permissions
18
- * set to the current user only. Note, currently you cannot set space
19
- * labels when creating a space.
20
- *
21
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
22
- * 'Create Space(s)' global permission.
23
- *
24
- * @returns Returned if the space is created.
25
- * @path {POST} /wiki/rest/api/space/_private
26
- * @scopes-current write:confluence-space
27
- * @scopes-beta read:space-details:confluence, write:space:confluence,
28
- * write:space.permission:confluence
29
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-private-post
30
- */
31
- createPrivateSpace({ spaceCreate, }) {
32
- return this.getClientInstance()
33
- .request({
34
- path: "/wiki/rest/api/space/_private",
35
- method: "POST",
36
- headers: {
37
- "Content-Type": "application/json",
38
- },
39
- body: spaceCreate,
40
- })
41
- .then(this.getClientInstance().responseHandler({
42
- 200: {
43
- "application/json": "json",
44
- },
45
- }))
46
- .then(commonHttpClient.castResponse())
47
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.createPrivateSpace.response"))
48
- .then(commonHttpClient.getBody);
49
- }
50
- /**
51
- * Creates a new space. Note, currently you cannot set space labels when
52
- * creating a space.
53
- *
54
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
55
- * 'Create Space(s)' global permission.
56
- *
57
- * @returns Returned if the space is created.
58
- * @path {POST} /wiki/rest/api/space
59
- * @scopes-current write:confluence-space
60
- * @scopes-beta read:space-details:confluence, write:space:confluence,
61
- * write:space.permission:confluence
62
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-post
63
- */
64
- createSpace({ spaceCreate, }) {
65
- return this.getClientInstance()
66
- .request({
67
- path: "/wiki/rest/api/space",
68
- method: "POST",
69
- headers: {
70
- "Content-Type": "application/json",
71
- },
72
- body: spaceCreate,
73
- })
74
- .then(this.getClientInstance().responseHandler({
75
- 200: {
76
- "application/json": "json",
77
- },
78
- }))
79
- .then(commonHttpClient.castResponse())
80
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.createSpace.response"))
81
- .then(commonHttpClient.getBody);
82
- }
83
- /**
84
- * Permanently deletes a space without sending it to the trash. Note, the space
85
- * will be deleted in a long running task.
86
- * Therefore, the space may not be deleted yet when this method has
87
- * returned. Clients should poll the status link that is returned in the
88
- * response until the task completes.
89
- *
90
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
91
- * 'Admin' permission for the space.
92
- *
93
- * @returns Returns a pointer to the status of the space deletion task.
94
- * @path {DELETE} /wiki/rest/api/space/{spaceKey}
95
- * @scopes-current write:confluence-space
96
- * @scopes-beta read:content.metadata:confluence, delete:space:confluence
97
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-delete
98
- */
99
- deleteSpace({ spaceKey, }) {
100
- return this.getClientInstance()
101
- .request({
102
- path: "/wiki/rest/api/space/{spaceKey}",
103
- method: "DELETE",
104
- pathParams: {
105
- spaceKey,
106
- },
107
- })
108
- .then(this.getClientInstance().responseHandler({
109
- 202: {
110
- "application/json": "json",
111
- },
112
- }))
113
- .then(commonHttpClient.castResponse())
114
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.deleteSpace.response"))
115
- .then(commonHttpClient.getBody);
116
- }
117
- /**
118
- * Deprecated, use [Confluence's v2
119
- * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
120
- *
121
- * Returns all content of a given type, in a space. The returned content is
122
- * ordered by content ID in ascending order.
123
- *
124
- * Starting on Dec 10, 2024, if the expand query parameter is used with the
125
- * `body.export_view` and/or `body.styled_view` properties, then the query limit
126
- * parameter will be restricted to a maximum value of 25.
127
- *
128
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
129
- * 'View' permission for the space. Note, the returned list will only
130
- * contain content that the current user has permission to view.
131
- *
132
- * @deprecated
133
- * @returns Returned if the requested content is returned.
134
- * @path {GET} /wiki/rest/api/space/{spaceKey}/content/{type}
135
- * @scopes-current read:confluence-content.summary
136
- * @scopes-beta read:content-details:confluence
137
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-content-type-get
138
- */
139
- getContentByTypeForSpace({ spaceKey, type, depth, expand, start, limit, }) {
140
- return this.getClientInstance()
141
- .request({
142
- path: "/wiki/rest/api/space/{spaceKey}/content/{type}",
143
- method: "GET",
144
- pathParams: {
145
- spaceKey,
146
- type,
147
- },
148
- query: {
149
- depth,
150
- expand,
151
- start,
152
- limit,
153
- },
154
- })
155
- .then(this.getClientInstance().responseHandler({
156
- 200: {
157
- "application/json": "json",
158
- },
159
- }))
160
- .then(commonHttpClient.castResponse())
161
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.getContentByTypeForSpace.response"))
162
- .then(commonHttpClient.getBody);
163
- }
164
- /**
165
- * Deprecated, use [Confluence's v2
166
- * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
167
- *
168
- * Returns all content in a space. The returned content is grouped by type
169
- * (pages then blogposts), then ordered by content ID in ascending order.
170
- *
171
- * Starting on Dec 10, 2024, if the expand query parameter is used with the
172
- * `body.export_view` and/or `body.styled_view` properties, then the query limit
173
- * parameter will be restricted to a maximum value of 25.
174
- *
175
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
176
- * 'View' permission for the space. Note, the returned list will only
177
- * contain content that the current user has permission to view.
178
- *
179
- * @deprecated
180
- * @returns Returned if the requested content is returned.
181
- * @path {GET} /wiki/rest/api/space/{spaceKey}/content
182
- * @scopes-current read:confluence-content.summary
183
- * @scopes-beta read:content-details:confluence
184
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-content-get
185
- */
186
- getContentForSpace({ spaceKey, depth, expand, start, limit, }) {
187
- return this.getClientInstance()
188
- .request({
189
- path: "/wiki/rest/api/space/{spaceKey}/content",
190
- method: "GET",
191
- pathParams: {
192
- spaceKey,
193
- },
194
- query: {
195
- depth,
196
- expand,
197
- start,
198
- limit,
199
- },
200
- })
201
- .then(this.getClientInstance().responseHandler({
202
- 200: {
203
- "application/json": "json",
204
- },
205
- }))
206
- .then(commonHttpClient.castResponse())
207
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.getContentForSpace.response"))
208
- .then(commonHttpClient.getBody);
209
- }
210
- /**
211
- * Deprecated, use [Confluence's v2
212
- * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
213
- *
214
- * Returns a space. This includes information like the name, description,
215
- * and permissions, but not the content in the space.
216
- *
217
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
218
- * 'View' permission for the space.
219
- *
220
- * @deprecated
221
- * @returns Returned if the requested space is returned.
222
- * @path {GET} /wiki/rest/api/space/{spaceKey}
223
- * @scopes-current read:confluence-space.summary
224
- * @scopes-beta read:content-details:confluence
225
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-get
226
- */
227
- getSpace({ spaceKey, expand, }) {
228
- return this.getClientInstance()
229
- .request({
230
- path: "/wiki/rest/api/space/{spaceKey}",
231
- method: "GET",
232
- pathParams: {
233
- spaceKey,
234
- },
235
- query: {
236
- expand,
237
- },
238
- })
239
- .then(this.getClientInstance().responseHandler({
240
- 200: {
241
- "application/json": "json",
242
- },
243
- }))
244
- .then(commonHttpClient.castResponse())
245
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.getSpace.response"))
246
- .then(commonHttpClient.getBody);
247
- }
248
- /**
249
- * Deprecated, use [Confluence's v2
250
- * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
251
- *
252
- * Returns all spaces. The returned spaces are ordered alphabetically in
253
- * ascending order by space key.
254
- *
255
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
256
- * Permission to access the Confluence site ('Can use' global permission).
257
- * Note, the returned list will only contain spaces that the current user
258
- * has permission to view.
259
- *
260
- * @deprecated
261
- * @returns Returned if the requested spaces are returned.
262
- * @path {GET} /wiki/rest/api/space
263
- * @scopes-current read:confluence-space.summary
264
- * @scopes-beta read:content-details:confluence
265
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-get
266
- */
267
- getSpaces({ spaceKey, spaceId, type, status, label, favourite, favouriteUserKey, expand, start, limit, } = {}) {
268
- return this.getClientInstance()
269
- .request({
270
- path: "/wiki/rest/api/space",
271
- method: "GET",
272
- query: {
273
- spaceKey,
274
- spaceId,
275
- type,
276
- status,
277
- label,
278
- favourite,
279
- favouriteUserKey,
280
- expand,
281
- start,
282
- limit,
283
- },
284
- })
285
- .then(this.getClientInstance().responseHandler({
286
- 200: {
287
- "application/json": "json",
288
- },
289
- }))
290
- .then(commonHttpClient.castResponse())
291
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.getSpaces.response"))
292
- .then(commonHttpClient.getBody);
293
- }
294
- /**
295
- * Updates the name, description, or homepage of a space.
296
- *
297
- * - For security reasons, permissions cannot be updated via the API and
298
- * must be changed via the user interface instead.
299
- * - Currently you cannot set space labels when updating a space.
300
- *
301
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
302
- * 'Admin' permission for the space.
303
- *
304
- * @returns Returned if the space is updated.
305
- * @path {PUT} /wiki/rest/api/space/{spaceKey}
306
- * @scopes-current write:confluence-space
307
- * @scopes-beta read:space-details:confluence, write:space:confluence,
308
- * write:space.permission:confluence
309
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-put
310
- */
311
- updateSpace({ spaceKey, spaceUpdate, }) {
312
- return this.getClientInstance()
313
- .request({
314
- path: "/wiki/rest/api/space/{spaceKey}",
315
- method: "PUT",
316
- pathParams: {
317
- spaceKey,
318
- },
319
- headers: {
320
- "Content-Type": "application/json",
321
- },
322
- body: spaceUpdate,
323
- })
324
- .then(this.getClientInstance().responseHandler({
325
- 200: {
326
- "application/json": "json",
327
- },
328
- }))
329
- .then(commonHttpClient.castResponse())
330
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.updateSpace.response"))
331
- .then(commonHttpClient.getBody);
15
+ constructor() {
16
+ super(...arguments);
17
+ /**
18
+ * Creates a new space that is only visible to the creator. This method is
19
+ * the same as the [Create space](#api-space-post) method with permissions
20
+ * set to the current user only. Note, currently you cannot set space
21
+ * labels when creating a space.
22
+ *
23
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
24
+ * 'Create Space(s)' global permission.
25
+ *
26
+ * @returns Returned if the space is created.
27
+ * @path {POST} /wiki/rest/api/space/_private
28
+ * @scopes-current write:confluence-space
29
+ * @scopes-beta read:space-details:confluence, write:space:confluence,
30
+ * write:space.permission:confluence
31
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-private-post
32
+ */
33
+ this.createPrivateSpace = ({ spaceCreate, }) => {
34
+ return this.getClientInstance()
35
+ .request({
36
+ path: "/wiki/rest/api/space/_private",
37
+ method: "POST",
38
+ headers: {
39
+ "Content-Type": "application/json",
40
+ },
41
+ body: spaceCreate,
42
+ })
43
+ .then(this.getClientInstance().responseHandler({
44
+ 200: {
45
+ "application/json": "json",
46
+ },
47
+ }))
48
+ .then(commonHttpClient.castResponse())
49
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.createPrivateSpace.response"))
50
+ .then(commonHttpClient.getBody);
51
+ };
52
+ /**
53
+ * Creates a new space. Note, currently you cannot set space labels when
54
+ * creating a space.
55
+ *
56
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
57
+ * 'Create Space(s)' global permission.
58
+ *
59
+ * @returns Returned if the space is created.
60
+ * @path {POST} /wiki/rest/api/space
61
+ * @scopes-current write:confluence-space
62
+ * @scopes-beta read:space-details:confluence, write:space:confluence,
63
+ * write:space.permission:confluence
64
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-post
65
+ */
66
+ this.createSpace = ({ spaceCreate, }) => {
67
+ return this.getClientInstance()
68
+ .request({
69
+ path: "/wiki/rest/api/space",
70
+ method: "POST",
71
+ headers: {
72
+ "Content-Type": "application/json",
73
+ },
74
+ body: spaceCreate,
75
+ })
76
+ .then(this.getClientInstance().responseHandler({
77
+ 200: {
78
+ "application/json": "json",
79
+ },
80
+ }))
81
+ .then(commonHttpClient.castResponse())
82
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.createSpace.response"))
83
+ .then(commonHttpClient.getBody);
84
+ };
85
+ /**
86
+ * Permanently deletes a space without sending it to the trash. Note, the space
87
+ * will be deleted in a long running task.
88
+ * Therefore, the space may not be deleted yet when this method has
89
+ * returned. Clients should poll the status link that is returned in the
90
+ * response until the task completes.
91
+ *
92
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
93
+ * 'Admin' permission for the space.
94
+ *
95
+ * @returns Returns a pointer to the status of the space deletion task.
96
+ * @path {DELETE} /wiki/rest/api/space/{spaceKey}
97
+ * @scopes-current write:confluence-space
98
+ * @scopes-beta read:content.metadata:confluence, delete:space:confluence
99
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-delete
100
+ */
101
+ this.deleteSpace = ({ spaceKey, }) => {
102
+ return this.getClientInstance()
103
+ .request({
104
+ path: "/wiki/rest/api/space/{spaceKey}",
105
+ method: "DELETE",
106
+ pathParams: {
107
+ spaceKey,
108
+ },
109
+ })
110
+ .then(this.getClientInstance().responseHandler({
111
+ 202: {
112
+ "application/json": "json",
113
+ },
114
+ }))
115
+ .then(commonHttpClient.castResponse())
116
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.deleteSpace.response"))
117
+ .then(commonHttpClient.getBody);
118
+ };
119
+ /**
120
+ * Deprecated, use [Confluence's v2
121
+ * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
122
+ *
123
+ * Returns all content of a given type, in a space. The returned content is
124
+ * ordered by content ID in ascending order.
125
+ *
126
+ * Starting on Dec 10, 2024, if the expand query parameter is used with the
127
+ * `body.export_view` and/or `body.styled_view` properties, then the query limit
128
+ * parameter will be restricted to a maximum value of 25.
129
+ *
130
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
131
+ * 'View' permission for the space. Note, the returned list will only
132
+ * contain content that the current user has permission to view.
133
+ *
134
+ * @deprecated
135
+ * @returns Returned if the requested content is returned.
136
+ * @path {GET} /wiki/rest/api/space/{spaceKey}/content/{type}
137
+ * @scopes-current read:confluence-content.summary
138
+ * @scopes-beta read:content-details:confluence
139
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-content-type-get
140
+ */
141
+ this.getContentByTypeForSpace = ({ spaceKey, type, depth, expand, start, limit, }) => {
142
+ return this.getClientInstance()
143
+ .request({
144
+ path: "/wiki/rest/api/space/{spaceKey}/content/{type}",
145
+ method: "GET",
146
+ pathParams: {
147
+ spaceKey,
148
+ type,
149
+ },
150
+ query: {
151
+ depth,
152
+ expand,
153
+ start,
154
+ limit,
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("SpaceService.getContentByTypeForSpace.response"))
164
+ .then(commonHttpClient.getBody);
165
+ };
166
+ /**
167
+ * Deprecated, use [Confluence's v2
168
+ * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
169
+ *
170
+ * Returns all content in a space. The returned content is grouped by type
171
+ * (pages then blogposts), then ordered by content ID in ascending order.
172
+ *
173
+ * Starting on Dec 10, 2024, if the expand query parameter is used with the
174
+ * `body.export_view` and/or `body.styled_view` properties, then the query limit
175
+ * parameter will be restricted to a maximum value of 25.
176
+ *
177
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
178
+ * 'View' permission for the space. Note, the returned list will only
179
+ * contain content that the current user has permission to view.
180
+ *
181
+ * @deprecated
182
+ * @returns Returned if the requested content is returned.
183
+ * @path {GET} /wiki/rest/api/space/{spaceKey}/content
184
+ * @scopes-current read:confluence-content.summary
185
+ * @scopes-beta read:content-details:confluence
186
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-content-get
187
+ */
188
+ this.getContentForSpace = ({ spaceKey, depth, expand, start, limit, }) => {
189
+ return this.getClientInstance()
190
+ .request({
191
+ path: "/wiki/rest/api/space/{spaceKey}/content",
192
+ method: "GET",
193
+ pathParams: {
194
+ spaceKey,
195
+ },
196
+ query: {
197
+ depth,
198
+ expand,
199
+ start,
200
+ limit,
201
+ },
202
+ })
203
+ .then(this.getClientInstance().responseHandler({
204
+ 200: {
205
+ "application/json": "json",
206
+ },
207
+ }))
208
+ .then(commonHttpClient.castResponse())
209
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.getContentForSpace.response"))
210
+ .then(commonHttpClient.getBody);
211
+ };
212
+ /**
213
+ * Deprecated, use [Confluence's v2
214
+ * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
215
+ *
216
+ * Returns a space. This includes information like the name, description,
217
+ * and permissions, but not the content in the space.
218
+ *
219
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
220
+ * 'View' permission for the space.
221
+ *
222
+ * @deprecated
223
+ * @returns Returned if the requested space is returned.
224
+ * @path {GET} /wiki/rest/api/space/{spaceKey}
225
+ * @scopes-current read:confluence-space.summary
226
+ * @scopes-beta read:content-details:confluence
227
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-get
228
+ */
229
+ this.getSpace = ({ spaceKey, expand, }) => {
230
+ return this.getClientInstance()
231
+ .request({
232
+ path: "/wiki/rest/api/space/{spaceKey}",
233
+ method: "GET",
234
+ pathParams: {
235
+ spaceKey,
236
+ },
237
+ query: {
238
+ expand,
239
+ },
240
+ })
241
+ .then(this.getClientInstance().responseHandler({
242
+ 200: {
243
+ "application/json": "json",
244
+ },
245
+ }))
246
+ .then(commonHttpClient.castResponse())
247
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.getSpace.response"))
248
+ .then(commonHttpClient.getBody);
249
+ };
250
+ /**
251
+ * Deprecated, use [Confluence's v2
252
+ * API](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/).
253
+ *
254
+ * Returns all spaces. The returned spaces are ordered alphabetically in
255
+ * ascending order by space key.
256
+ *
257
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
258
+ * Permission to access the Confluence site ('Can use' global permission).
259
+ * Note, the returned list will only contain spaces that the current user
260
+ * has permission to view.
261
+ *
262
+ * @deprecated
263
+ * @returns Returned if the requested spaces are returned.
264
+ * @path {GET} /wiki/rest/api/space
265
+ * @scopes-current read:confluence-space.summary
266
+ * @scopes-beta read:content-details:confluence
267
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-get
268
+ */
269
+ this.getSpaces = ({ spaceKey, spaceId, type, status, label, favourite, favouriteUserKey, expand, start, limit, } = {}) => {
270
+ return this.getClientInstance()
271
+ .request({
272
+ path: "/wiki/rest/api/space",
273
+ method: "GET",
274
+ query: {
275
+ spaceKey,
276
+ spaceId,
277
+ type,
278
+ status,
279
+ label,
280
+ favourite,
281
+ favouriteUserKey,
282
+ expand,
283
+ start,
284
+ limit,
285
+ },
286
+ })
287
+ .then(this.getClientInstance().responseHandler({
288
+ 200: {
289
+ "application/json": "json",
290
+ },
291
+ }))
292
+ .then(commonHttpClient.castResponse())
293
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.getSpaces.response"))
294
+ .then(commonHttpClient.getBody);
295
+ };
296
+ /**
297
+ * Updates the name, description, or homepage of a space.
298
+ *
299
+ * - For security reasons, permissions cannot be updated via the API and
300
+ * must be changed via the user interface instead.
301
+ * - Currently you cannot set space labels when updating a space.
302
+ *
303
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
304
+ * 'Admin' permission for the space.
305
+ *
306
+ * @returns Returned if the space is updated.
307
+ * @path {PUT} /wiki/rest/api/space/{spaceKey}
308
+ * @scopes-current write:confluence-space
309
+ * @scopes-beta read:space-details:confluence, write:space:confluence,
310
+ * write:space.permission:confluence
311
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space#api-wiki-rest-api-space-spacekey-put
312
+ */
313
+ this.updateSpace = ({ spaceKey, spaceUpdate, }) => {
314
+ return this.getClientInstance()
315
+ .request({
316
+ path: "/wiki/rest/api/space/{spaceKey}",
317
+ method: "PUT",
318
+ pathParams: {
319
+ spaceKey,
320
+ },
321
+ headers: {
322
+ "Content-Type": "application/json",
323
+ },
324
+ body: spaceUpdate,
325
+ })
326
+ .then(this.getClientInstance().responseHandler({
327
+ 200: {
328
+ "application/json": "json",
329
+ },
330
+ }))
331
+ .then(commonHttpClient.castResponse())
332
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("SpaceService.updateSpace.response"))
333
+ .then(commonHttpClient.getBody);
334
+ };
332
335
  }
333
336
  static initialize() {
334
337
  validationSchemaStorage_1.validationSchemaStorage.registerExtensible("SpaceService.getSpaces.response", zod_1.z