@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
@@ -11,457 +11,460 @@ const contentWatches_1 = require("../models/contentWatches");
11
11
  const validationSchemaStorage_1 = require("../validationSchemaStorage");
12
12
  /** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches */
13
13
  class ContentWatchesService extends CommonHttpService_1.CommonHttpService {
14
- /**
15
- * Adds a user as a watcher to a piece of content. Choose the user by doing
16
- * one of the following:
17
- *
18
- * - Specify a user via a query parameter: Use the `accountId` to identify the
19
- * user.
20
- * - Do not specify a user: The currently logged-in user will be used.
21
- *
22
- * Note, you must add the `X-Atlassian-Token: no-check` header when making a
23
- * request, as this operation has XSRF protection.
24
- *
25
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
26
- * 'Confluence Administrator' global permission if specifying a user, otherwise
27
- * permission to access the Confluence site ('Can use' global permission).
28
- *
29
- * @path {POST} /wiki/rest/api/user/watch/content/{contentId}
30
- * @scopes-current write:confluence-content
31
- * @scopes-beta write:watcher:confluence
32
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-content-contentid-post
33
- */
34
- addContentWatcher({ contentId, key, username, accountId, }) {
35
- return this.getClientInstance()
36
- .request({
37
- path: "/wiki/rest/api/user/watch/content/{contentId}",
38
- method: "POST",
39
- pathParams: {
40
- contentId,
41
- },
42
- query: {
43
- key,
44
- username,
45
- accountId,
46
- },
47
- })
48
- .then(commonHttpClient.discardResult);
49
- }
50
- /**
51
- * Adds a user as a watcher to a label. Choose the user by doing one of the
52
- * following:
53
- *
54
- * - Specify a user via a query parameter: Use the `accountId` to identify the
55
- * user.
56
- * - Do not specify a user: The currently logged-in user will be used.
57
- *
58
- * Note, you must add the `X-Atlassian-Token: no-check` header when making a
59
- * request, as this operation has XSRF protection.
60
- *
61
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
62
- * 'Confluence Administrator' global permission if specifying a user, otherwise
63
- * permission to access the Confluence site ('Can use' global permission).
64
- *
65
- * @path {POST} /wiki/rest/api/user/watch/label/{labelName}
66
- * @scopes-current write:confluence-content
67
- * @scopes-beta write:watcher:confluence
68
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-label-labelname-post
69
- */
70
- addLabelWatcher({ labelName, key, username, accountId, xAtlassianToken, }) {
71
- return this.getClientInstance()
72
- .request({
73
- path: "/wiki/rest/api/user/watch/label/{labelName}",
74
- method: "POST",
75
- pathParams: {
76
- labelName,
77
- },
78
- query: {
79
- key,
80
- username,
81
- accountId,
82
- },
83
- headers: {
84
- "X-Atlassian-Token": xAtlassianToken,
85
- },
86
- })
87
- .then(commonHttpClient.discardResult);
88
- }
89
- /**
90
- * Adds a user as a watcher to a space. Choose the user by doing one of the
91
- * following:
92
- *
93
- * - Specify a user via a query parameter: Use the `accountId` to identify the
94
- * user.
95
- * - Do not specify a user: The currently logged-in user will be used.
96
- *
97
- * Note, you must add the `X-Atlassian-Token: no-check` header when making a
98
- * request, as this operation has XSRF protection.
99
- *
100
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
101
- * 'Confluence Administrator' global permission if specifying a user, otherwise
102
- * permission to access the Confluence site ('Can use' global permission).
103
- *
104
- * @path {POST} /wiki/rest/api/user/watch/space/{spaceKey}
105
- * @scopes-current write:confluence-content
106
- * @scopes-beta write:watcher:confluence
107
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-space-spacekey-post
108
- */
109
- addSpaceWatcher({ spaceKey, key, username, accountId, xAtlassianToken, }) {
110
- return this.getClientInstance()
111
- .request({
112
- path: "/wiki/rest/api/user/watch/space/{spaceKey}",
113
- method: "POST",
114
- pathParams: {
115
- spaceKey,
116
- },
117
- query: {
118
- key,
119
- username,
120
- accountId,
121
- },
122
- headers: {
123
- "X-Atlassian-Token": xAtlassianToken,
124
- },
125
- })
126
- .then(commonHttpClient.discardResult);
127
- }
128
- /**
129
- * Returns whether a user is watching a piece of content. Choose the user by
130
- * doing one of the following:
131
- *
132
- * - Specify a user via a query parameter: Use the `accountId` to identify the
133
- * user.
134
- * - Do not specify a user: The currently logged-in user will be used.
135
- *
136
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
137
- * 'Confluence Administrator' global permission if specifying a user, otherwise
138
- * permission to access the Confluence site ('Can use' global permission).
139
- *
140
- * @returns Returned if the requested watch status is returned.
141
- * @path {GET} /wiki/rest/api/user/watch/content/{contentId}
142
- * @scopes-current read:confluence-content.summary
143
- * @scopes-beta read:watcher:confluence
144
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-content-contentid-get
145
- */
146
- getContentWatchStatus({ contentId, key, username, accountId, }) {
147
- return this.getClientInstance()
148
- .request({
149
- path: "/wiki/rest/api/user/watch/content/{contentId}",
150
- method: "GET",
151
- pathParams: {
152
- contentId,
153
- },
154
- query: {
155
- key,
156
- username,
157
- accountId,
158
- },
159
- })
160
- .then(this.getClientInstance().responseHandler({
161
- 200: {
162
- "application/json": "json",
163
- },
164
- }))
165
- .then(commonHttpClient.castResponse())
166
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentWatchesService.getContentWatchStatus.response"))
167
- .then(commonHttpClient.getBody);
168
- }
169
- /**
170
- * Returns a list of watchers of a space
171
- *
172
- * @returns Returned if watchers list is returned.
173
- * @path {GET} /wiki/rest/api/space/{spaceKey}/watch
174
- * @scopes-current read:watcher:confluence, read:user:confluence
175
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-space-spacekey-watch-get
176
- */
177
- getWatchersForSpace({ spaceKey, start, limit, }) {
178
- return this.getClientInstance()
179
- .request({
180
- path: "/wiki/rest/api/space/{spaceKey}/watch",
181
- method: "GET",
182
- pathParams: {
183
- spaceKey,
184
- },
185
- query: {
186
- start,
187
- limit,
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("ContentWatchesService.getWatchersForSpace.response"))
197
- .then(commonHttpClient.getBody);
198
- }
199
- /**
200
- * Returns the watches for a page. A user that watches a page will receive
201
- * receive notifications when the page is updated.
202
- *
203
- * If you want to manage watches for a page, use the following `user` methods:
204
- *
205
- * - [Get content watch status for user](#api-user-watch-content-contentId-get)
206
- * - [Add content watch](#api-user-watch-content-contentId-post)
207
- * - [Remove content watch](#api-user-watch-content-contentId-delete)
208
- *
209
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
210
- * Permission to access the Confluence site ('Can use' global permission).
211
- *
212
- * @returns Returned if the requested watches are returned.
213
- * @path {GET} /wiki/rest/api/content/{id}/notification/child-created
214
- * @scopes-current read:confluence-content.summary
215
- * @scopes-beta read:watcher:confluence, read:user:confluence
216
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-content-id-notification-child-created-get
217
- */
218
- getWatchesForPage({ id, start, limit, }) {
219
- return this.getClientInstance()
220
- .request({
221
- path: "/wiki/rest/api/content/{id}/notification/child-created",
222
- method: "GET",
223
- pathParams: {
224
- id,
225
- },
226
- query: {
227
- start,
228
- limit,
229
- },
230
- })
231
- .then(this.getClientInstance().responseHandler({
232
- 200: {
233
- "application/json": "json",
234
- },
235
- }))
236
- .then(commonHttpClient.castResponse())
237
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentWatchesService.getWatchesForPage.response"))
238
- .then(commonHttpClient.getBody);
239
- }
240
- /**
241
- * Returns all space watches for the space that the content is in. A user that
242
- * watches a space will receive receive notifications when any content in the
243
- * space is updated.
244
- *
245
- * If you want to manage watches for a space, use the following `user` methods:
246
- *
247
- * - [Get space watch status for user](#api-user-watch-space-spaceKey-get)
248
- * - [Add space watch](#api-user-watch-space-spaceKey-post)
249
- * - [Remove space watch](#api-user-watch-space-spaceKey-delete)
250
- *
251
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
252
- * Permission to access the Confluence site ('Can use' global permission).
253
- *
254
- * @returns Returned if the requested watches are returned.
255
- * @path {GET} /wiki/rest/api/content/{id}/notification/created
256
- * @scopes-current read:confluence-content.summary
257
- * @scopes-beta read:watcher:confluence, read:user:confluence
258
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-content-id-notification-created-get
259
- */
260
- getWatchesForSpace({ id, start, limit, }) {
261
- return this.getClientInstance()
262
- .request({
263
- path: "/wiki/rest/api/content/{id}/notification/created",
264
- method: "GET",
265
- pathParams: {
266
- id,
267
- },
268
- query: {
269
- start,
270
- limit,
271
- },
272
- })
273
- .then(this.getClientInstance().responseHandler({
274
- 200: {
275
- "application/json": "json",
276
- },
277
- }))
278
- .then(commonHttpClient.castResponse())
279
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentWatchesService.getWatchesForSpace.response"))
280
- .then(commonHttpClient.getBody);
281
- }
282
- /**
283
- * Returns whether a user is watching a label. Choose the user by doing one
284
- * of the following:
285
- *
286
- * - Specify a user via a query parameter: Use the `accountId` to identify the
287
- * user.
288
- * - Do not specify a user: The currently logged-in user will be used.
289
- *
290
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
291
- * 'Confluence Administrator' global permission if specifying a user, otherwise
292
- * permission to access the Confluence site ('Can use' global permission).
293
- *
294
- * @returns Returned if the requested watch status is returned.
295
- * @path {GET} /wiki/rest/api/user/watch/label/{labelName}
296
- * @scopes-current read:confluence-content.summary
297
- * @scopes-beta read:watcher:confluence
298
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-label-labelname-get
299
- */
300
- isWatchingLabel({ labelName, key, username, accountId, }) {
301
- return this.getClientInstance()
302
- .request({
303
- path: "/wiki/rest/api/user/watch/label/{labelName}",
304
- method: "GET",
305
- pathParams: {
306
- labelName,
307
- },
308
- query: {
309
- key,
310
- username,
311
- accountId,
312
- },
313
- })
314
- .then(this.getClientInstance().responseHandler({
315
- 200: {
316
- "application/json": "json",
317
- },
318
- }))
319
- .then(commonHttpClient.castResponse())
320
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentWatchesService.isWatchingLabel.response"))
321
- .then(commonHttpClient.getBody);
322
- }
323
- /**
324
- * Returns whether a user is watching a space. Choose the user by
325
- * doing one of the following:
326
- *
327
- * - Specify a user via a query parameter: Use the `accountId` to identify the
328
- * user.
329
- * - Do not specify a user: The currently logged-in user will be used.
330
- *
331
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
332
- * 'Confluence Administrator' global permission if specifying a user, otherwise
333
- * permission to access the Confluence site ('Can use' global permission).
334
- *
335
- * @returns Returned if the requested watch status is returned.
336
- * @path {GET} /wiki/rest/api/user/watch/space/{spaceKey}
337
- * @scopes-current read:confluence-content.summary
338
- * @scopes-beta read:watcher:confluence
339
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-space-spacekey-get
340
- */
341
- isWatchingSpace({ spaceKey, key, username, accountId, }) {
342
- return this.getClientInstance()
343
- .request({
344
- path: "/wiki/rest/api/user/watch/space/{spaceKey}",
345
- method: "GET",
346
- pathParams: {
347
- spaceKey,
348
- },
349
- query: {
350
- key,
351
- username,
352
- accountId,
353
- },
354
- })
355
- .then(this.getClientInstance().responseHandler({
356
- 200: {
357
- "application/json": "json",
358
- },
359
- }))
360
- .then(commonHttpClient.castResponse())
361
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentWatchesService.isWatchingSpace.response"))
362
- .then(commonHttpClient.getBody);
363
- }
364
- /**
365
- * Removes a user as a watcher from a piece of content. Choose the user by
366
- * doing one of the following:
367
- *
368
- * - Specify a user via a query parameter: Use the `accountId` to identify the
369
- * user.
370
- * - Do not specify a user: The currently logged-in user will be used.
371
- *
372
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
373
- * 'Confluence Administrator' global permission if specifying a user, otherwise
374
- * permission to access the Confluence site ('Can use' global permission).
375
- *
376
- * @path {DELETE} /wiki/rest/api/user/watch/content/{contentId}
377
- * @scopes-current write:confluence-content
378
- * @scopes-beta write:watcher:confluence
379
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-content-contentid-delete
380
- */
381
- removeContentWatcher({ contentId, key, username, accountId, xAtlassianToken, }) {
382
- return this.getClientInstance()
383
- .request({
384
- path: "/wiki/rest/api/user/watch/content/{contentId}",
385
- method: "DELETE",
386
- pathParams: {
387
- contentId,
388
- },
389
- query: {
390
- key,
391
- username,
392
- accountId,
393
- },
394
- headers: {
395
- "X-Atlassian-Token": xAtlassianToken,
396
- },
397
- })
398
- .then(commonHttpClient.discardResult);
399
- }
400
- /**
401
- * Removes a user as a watcher from a label. Choose the user by doing one of
402
- * the following:
403
- *
404
- * - Specify a user via a query parameter: Use the `accountId` to identify the
405
- * user.
406
- * - Do not specify a user: The currently logged-in user will be used.
407
- *
408
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
409
- * 'Confluence Administrator' global permission if specifying a user, otherwise
410
- * permission to access the Confluence site ('Can use' global permission).
411
- *
412
- * @path {DELETE} /wiki/rest/api/user/watch/label/{labelName}
413
- * @scopes-current write:confluence-content
414
- * @scopes-beta write:watcher:confluence
415
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-label-labelname-delete
416
- */
417
- removeLabelWatcher({ labelName, key, username, accountId, }) {
418
- return this.getClientInstance()
419
- .request({
420
- path: "/wiki/rest/api/user/watch/label/{labelName}",
421
- method: "DELETE",
422
- pathParams: {
423
- labelName,
424
- },
425
- query: {
426
- key,
427
- username,
428
- accountId,
429
- },
430
- })
431
- .then(commonHttpClient.discardResult);
432
- }
433
- /**
434
- * Removes a user as a watcher from a space. Choose the user by doing one of
435
- * the following:
436
- *
437
- * - Specify a user via a query parameter: Use the `accountId` to identify the
438
- * user.
439
- * - Do not specify a user: The currently logged-in user will be used.
440
- *
441
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
442
- * 'Confluence Administrator' global permission if specifying a user, otherwise
443
- * permission to access the Confluence site ('Can use' global permission).
444
- *
445
- * @path {DELETE} /wiki/rest/api/user/watch/space/{spaceKey}
446
- * @scopes-current write:confluence-content
447
- * @scopes-beta write:watcher:confluence
448
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-space-spacekey-delete
449
- */
450
- removeSpaceWatch({ spaceKey, key, username, accountId, }) {
451
- return this.getClientInstance()
452
- .request({
453
- path: "/wiki/rest/api/user/watch/space/{spaceKey}",
454
- method: "DELETE",
455
- pathParams: {
456
- spaceKey,
457
- },
458
- query: {
459
- key,
460
- username,
461
- accountId,
462
- },
463
- })
464
- .then(commonHttpClient.discardResult);
14
+ constructor() {
15
+ super(...arguments);
16
+ /**
17
+ * Adds a user as a watcher to a piece of content. Choose the user by doing
18
+ * one of the following:
19
+ *
20
+ * - Specify a user via a query parameter: Use the `accountId` to identify the
21
+ * user.
22
+ * - Do not specify a user: The currently logged-in user will be used.
23
+ *
24
+ * Note, you must add the `X-Atlassian-Token: no-check` header when making a
25
+ * request, as this operation has XSRF protection.
26
+ *
27
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
28
+ * 'Confluence Administrator' global permission if specifying a user, otherwise
29
+ * permission to access the Confluence site ('Can use' global permission).
30
+ *
31
+ * @path {POST} /wiki/rest/api/user/watch/content/{contentId}
32
+ * @scopes-current write:confluence-content
33
+ * @scopes-beta write:watcher:confluence
34
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-content-contentid-post
35
+ */
36
+ this.addContentWatcher = ({ contentId, key, username, accountId, }) => {
37
+ return this.getClientInstance()
38
+ .request({
39
+ path: "/wiki/rest/api/user/watch/content/{contentId}",
40
+ method: "POST",
41
+ pathParams: {
42
+ contentId,
43
+ },
44
+ query: {
45
+ key,
46
+ username,
47
+ accountId,
48
+ },
49
+ })
50
+ .then(commonHttpClient.discardResult);
51
+ };
52
+ /**
53
+ * Adds a user as a watcher to a label. Choose the user by doing one of the
54
+ * following:
55
+ *
56
+ * - Specify a user via a query parameter: Use the `accountId` to identify the
57
+ * user.
58
+ * - Do not specify a user: The currently logged-in user will be used.
59
+ *
60
+ * Note, you must add the `X-Atlassian-Token: no-check` header when making a
61
+ * request, as this operation has XSRF protection.
62
+ *
63
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
64
+ * 'Confluence Administrator' global permission if specifying a user, otherwise
65
+ * permission to access the Confluence site ('Can use' global permission).
66
+ *
67
+ * @path {POST} /wiki/rest/api/user/watch/label/{labelName}
68
+ * @scopes-current write:confluence-content
69
+ * @scopes-beta write:watcher:confluence
70
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-label-labelname-post
71
+ */
72
+ this.addLabelWatcher = ({ labelName, key, username, accountId, xAtlassianToken, }) => {
73
+ return this.getClientInstance()
74
+ .request({
75
+ path: "/wiki/rest/api/user/watch/label/{labelName}",
76
+ method: "POST",
77
+ pathParams: {
78
+ labelName,
79
+ },
80
+ query: {
81
+ key,
82
+ username,
83
+ accountId,
84
+ },
85
+ headers: {
86
+ "X-Atlassian-Token": xAtlassianToken,
87
+ },
88
+ })
89
+ .then(commonHttpClient.discardResult);
90
+ };
91
+ /**
92
+ * Adds a user as a watcher to a space. Choose the user by doing one of the
93
+ * following:
94
+ *
95
+ * - Specify a user via a query parameter: Use the `accountId` to identify the
96
+ * user.
97
+ * - Do not specify a user: The currently logged-in user will be used.
98
+ *
99
+ * Note, you must add the `X-Atlassian-Token: no-check` header when making a
100
+ * request, as this operation has XSRF protection.
101
+ *
102
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
103
+ * 'Confluence Administrator' global permission if specifying a user, otherwise
104
+ * permission to access the Confluence site ('Can use' global permission).
105
+ *
106
+ * @path {POST} /wiki/rest/api/user/watch/space/{spaceKey}
107
+ * @scopes-current write:confluence-content
108
+ * @scopes-beta write:watcher:confluence
109
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-space-spacekey-post
110
+ */
111
+ this.addSpaceWatcher = ({ spaceKey, key, username, accountId, xAtlassianToken, }) => {
112
+ return this.getClientInstance()
113
+ .request({
114
+ path: "/wiki/rest/api/user/watch/space/{spaceKey}",
115
+ method: "POST",
116
+ pathParams: {
117
+ spaceKey,
118
+ },
119
+ query: {
120
+ key,
121
+ username,
122
+ accountId,
123
+ },
124
+ headers: {
125
+ "X-Atlassian-Token": xAtlassianToken,
126
+ },
127
+ })
128
+ .then(commonHttpClient.discardResult);
129
+ };
130
+ /**
131
+ * Returns whether a user is watching a piece of content. Choose the user by
132
+ * doing one of the following:
133
+ *
134
+ * - Specify a user via a query parameter: Use the `accountId` to identify the
135
+ * user.
136
+ * - Do not specify a user: The currently logged-in user will be used.
137
+ *
138
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
139
+ * 'Confluence Administrator' global permission if specifying a user, otherwise
140
+ * permission to access the Confluence site ('Can use' global permission).
141
+ *
142
+ * @returns Returned if the requested watch status is returned.
143
+ * @path {GET} /wiki/rest/api/user/watch/content/{contentId}
144
+ * @scopes-current read:confluence-content.summary
145
+ * @scopes-beta read:watcher:confluence
146
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-content-contentid-get
147
+ */
148
+ this.getContentWatchStatus = ({ contentId, key, username, accountId, }) => {
149
+ return this.getClientInstance()
150
+ .request({
151
+ path: "/wiki/rest/api/user/watch/content/{contentId}",
152
+ method: "GET",
153
+ pathParams: {
154
+ contentId,
155
+ },
156
+ query: {
157
+ key,
158
+ username,
159
+ accountId,
160
+ },
161
+ })
162
+ .then(this.getClientInstance().responseHandler({
163
+ 200: {
164
+ "application/json": "json",
165
+ },
166
+ }))
167
+ .then(commonHttpClient.castResponse())
168
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentWatchesService.getContentWatchStatus.response"))
169
+ .then(commonHttpClient.getBody);
170
+ };
171
+ /**
172
+ * Returns a list of watchers of a space
173
+ *
174
+ * @returns Returned if watchers list is returned.
175
+ * @path {GET} /wiki/rest/api/space/{spaceKey}/watch
176
+ * @scopes-current read:watcher:confluence, read:user:confluence
177
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-space-spacekey-watch-get
178
+ */
179
+ this.getWatchersForSpace = ({ spaceKey, start, limit, }) => {
180
+ return this.getClientInstance()
181
+ .request({
182
+ path: "/wiki/rest/api/space/{spaceKey}/watch",
183
+ method: "GET",
184
+ pathParams: {
185
+ spaceKey,
186
+ },
187
+ query: {
188
+ start,
189
+ limit,
190
+ },
191
+ })
192
+ .then(this.getClientInstance().responseHandler({
193
+ 200: {
194
+ "application/json": "json",
195
+ },
196
+ }))
197
+ .then(commonHttpClient.castResponse())
198
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentWatchesService.getWatchersForSpace.response"))
199
+ .then(commonHttpClient.getBody);
200
+ };
201
+ /**
202
+ * Returns the watches for a page. A user that watches a page will receive
203
+ * receive notifications when the page is updated.
204
+ *
205
+ * If you want to manage watches for a page, use the following `user` methods:
206
+ *
207
+ * - [Get content watch status for user](#api-user-watch-content-contentId-get)
208
+ * - [Add content watch](#api-user-watch-content-contentId-post)
209
+ * - [Remove content watch](#api-user-watch-content-contentId-delete)
210
+ *
211
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
212
+ * Permission to access the Confluence site ('Can use' global permission).
213
+ *
214
+ * @returns Returned if the requested watches are returned.
215
+ * @path {GET} /wiki/rest/api/content/{id}/notification/child-created
216
+ * @scopes-current read:confluence-content.summary
217
+ * @scopes-beta read:watcher:confluence, read:user:confluence
218
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-content-id-notification-child-created-get
219
+ */
220
+ this.getWatchesForPage = ({ id, start, limit, }) => {
221
+ return this.getClientInstance()
222
+ .request({
223
+ path: "/wiki/rest/api/content/{id}/notification/child-created",
224
+ method: "GET",
225
+ pathParams: {
226
+ id,
227
+ },
228
+ query: {
229
+ start,
230
+ limit,
231
+ },
232
+ })
233
+ .then(this.getClientInstance().responseHandler({
234
+ 200: {
235
+ "application/json": "json",
236
+ },
237
+ }))
238
+ .then(commonHttpClient.castResponse())
239
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentWatchesService.getWatchesForPage.response"))
240
+ .then(commonHttpClient.getBody);
241
+ };
242
+ /**
243
+ * Returns all space watches for the space that the content is in. A user that
244
+ * watches a space will receive receive notifications when any content in the
245
+ * space is updated.
246
+ *
247
+ * If you want to manage watches for a space, use the following `user` methods:
248
+ *
249
+ * - [Get space watch status for user](#api-user-watch-space-spaceKey-get)
250
+ * - [Add space watch](#api-user-watch-space-spaceKey-post)
251
+ * - [Remove space watch](#api-user-watch-space-spaceKey-delete)
252
+ *
253
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
254
+ * Permission to access the Confluence site ('Can use' global permission).
255
+ *
256
+ * @returns Returned if the requested watches are returned.
257
+ * @path {GET} /wiki/rest/api/content/{id}/notification/created
258
+ * @scopes-current read:confluence-content.summary
259
+ * @scopes-beta read:watcher:confluence, read:user:confluence
260
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-content-id-notification-created-get
261
+ */
262
+ this.getWatchesForSpace = ({ id, start, limit, }) => {
263
+ return this.getClientInstance()
264
+ .request({
265
+ path: "/wiki/rest/api/content/{id}/notification/created",
266
+ method: "GET",
267
+ pathParams: {
268
+ id,
269
+ },
270
+ query: {
271
+ start,
272
+ limit,
273
+ },
274
+ })
275
+ .then(this.getClientInstance().responseHandler({
276
+ 200: {
277
+ "application/json": "json",
278
+ },
279
+ }))
280
+ .then(commonHttpClient.castResponse())
281
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentWatchesService.getWatchesForSpace.response"))
282
+ .then(commonHttpClient.getBody);
283
+ };
284
+ /**
285
+ * Returns whether a user is watching a label. Choose the user by doing one
286
+ * of the following:
287
+ *
288
+ * - Specify a user via a query parameter: Use the `accountId` to identify the
289
+ * user.
290
+ * - Do not specify a user: The currently logged-in user will be used.
291
+ *
292
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
293
+ * 'Confluence Administrator' global permission if specifying a user, otherwise
294
+ * permission to access the Confluence site ('Can use' global permission).
295
+ *
296
+ * @returns Returned if the requested watch status is returned.
297
+ * @path {GET} /wiki/rest/api/user/watch/label/{labelName}
298
+ * @scopes-current read:confluence-content.summary
299
+ * @scopes-beta read:watcher:confluence
300
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-label-labelname-get
301
+ */
302
+ this.isWatchingLabel = ({ labelName, key, username, accountId, }) => {
303
+ return this.getClientInstance()
304
+ .request({
305
+ path: "/wiki/rest/api/user/watch/label/{labelName}",
306
+ method: "GET",
307
+ pathParams: {
308
+ labelName,
309
+ },
310
+ query: {
311
+ key,
312
+ username,
313
+ accountId,
314
+ },
315
+ })
316
+ .then(this.getClientInstance().responseHandler({
317
+ 200: {
318
+ "application/json": "json",
319
+ },
320
+ }))
321
+ .then(commonHttpClient.castResponse())
322
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentWatchesService.isWatchingLabel.response"))
323
+ .then(commonHttpClient.getBody);
324
+ };
325
+ /**
326
+ * Returns whether a user is watching a space. Choose the user by
327
+ * doing one of the following:
328
+ *
329
+ * - Specify a user via a query parameter: Use the `accountId` to identify the
330
+ * user.
331
+ * - Do not specify a user: The currently logged-in user will be used.
332
+ *
333
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
334
+ * 'Confluence Administrator' global permission if specifying a user, otherwise
335
+ * permission to access the Confluence site ('Can use' global permission).
336
+ *
337
+ * @returns Returned if the requested watch status is returned.
338
+ * @path {GET} /wiki/rest/api/user/watch/space/{spaceKey}
339
+ * @scopes-current read:confluence-content.summary
340
+ * @scopes-beta read:watcher:confluence
341
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-space-spacekey-get
342
+ */
343
+ this.isWatchingSpace = ({ spaceKey, key, username, accountId, }) => {
344
+ return this.getClientInstance()
345
+ .request({
346
+ path: "/wiki/rest/api/user/watch/space/{spaceKey}",
347
+ method: "GET",
348
+ pathParams: {
349
+ spaceKey,
350
+ },
351
+ query: {
352
+ key,
353
+ username,
354
+ accountId,
355
+ },
356
+ })
357
+ .then(this.getClientInstance().responseHandler({
358
+ 200: {
359
+ "application/json": "json",
360
+ },
361
+ }))
362
+ .then(commonHttpClient.castResponse())
363
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentWatchesService.isWatchingSpace.response"))
364
+ .then(commonHttpClient.getBody);
365
+ };
366
+ /**
367
+ * Removes a user as a watcher from a piece of content. Choose the user by
368
+ * doing one of the following:
369
+ *
370
+ * - Specify a user via a query parameter: Use the `accountId` to identify the
371
+ * user.
372
+ * - Do not specify a user: The currently logged-in user will be used.
373
+ *
374
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
375
+ * 'Confluence Administrator' global permission if specifying a user, otherwise
376
+ * permission to access the Confluence site ('Can use' global permission).
377
+ *
378
+ * @path {DELETE} /wiki/rest/api/user/watch/content/{contentId}
379
+ * @scopes-current write:confluence-content
380
+ * @scopes-beta write:watcher:confluence
381
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-content-contentid-delete
382
+ */
383
+ this.removeContentWatcher = ({ contentId, key, username, accountId, xAtlassianToken, }) => {
384
+ return this.getClientInstance()
385
+ .request({
386
+ path: "/wiki/rest/api/user/watch/content/{contentId}",
387
+ method: "DELETE",
388
+ pathParams: {
389
+ contentId,
390
+ },
391
+ query: {
392
+ key,
393
+ username,
394
+ accountId,
395
+ },
396
+ headers: {
397
+ "X-Atlassian-Token": xAtlassianToken,
398
+ },
399
+ })
400
+ .then(commonHttpClient.discardResult);
401
+ };
402
+ /**
403
+ * Removes a user as a watcher from a label. Choose the user by doing one of
404
+ * the following:
405
+ *
406
+ * - Specify a user via a query parameter: Use the `accountId` to identify the
407
+ * user.
408
+ * - Do not specify a user: The currently logged-in user will be used.
409
+ *
410
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
411
+ * 'Confluence Administrator' global permission if specifying a user, otherwise
412
+ * permission to access the Confluence site ('Can use' global permission).
413
+ *
414
+ * @path {DELETE} /wiki/rest/api/user/watch/label/{labelName}
415
+ * @scopes-current write:confluence-content
416
+ * @scopes-beta write:watcher:confluence
417
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-label-labelname-delete
418
+ */
419
+ this.removeLabelWatcher = ({ labelName, key, username, accountId, }) => {
420
+ return this.getClientInstance()
421
+ .request({
422
+ path: "/wiki/rest/api/user/watch/label/{labelName}",
423
+ method: "DELETE",
424
+ pathParams: {
425
+ labelName,
426
+ },
427
+ query: {
428
+ key,
429
+ username,
430
+ accountId,
431
+ },
432
+ })
433
+ .then(commonHttpClient.discardResult);
434
+ };
435
+ /**
436
+ * Removes a user as a watcher from a space. Choose the user by doing one of
437
+ * the following:
438
+ *
439
+ * - Specify a user via a query parameter: Use the `accountId` to identify the
440
+ * user.
441
+ * - Do not specify a user: The currently logged-in user will be used.
442
+ *
443
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
444
+ * 'Confluence Administrator' global permission if specifying a user, otherwise
445
+ * permission to access the Confluence site ('Can use' global permission).
446
+ *
447
+ * @path {DELETE} /wiki/rest/api/user/watch/space/{spaceKey}
448
+ * @scopes-current write:confluence-content
449
+ * @scopes-beta write:watcher:confluence
450
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches#api-wiki-rest-api-user-watch-space-spacekey-delete
451
+ */
452
+ this.removeSpaceWatch = ({ spaceKey, key, username, accountId, }) => {
453
+ return this.getClientInstance()
454
+ .request({
455
+ path: "/wiki/rest/api/user/watch/space/{spaceKey}",
456
+ method: "DELETE",
457
+ pathParams: {
458
+ spaceKey,
459
+ },
460
+ query: {
461
+ key,
462
+ username,
463
+ accountId,
464
+ },
465
+ })
466
+ .then(commonHttpClient.discardResult);
467
+ };
465
468
  }
466
469
  static initialize() {
467
470
  validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentWatchesService.getWatchesForPage.response", zod_1.z