@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.
- package/CHANGELOG.md +22 -0
- package/README.md +60 -1
- package/lib/openapi/v1/BaseConfluenceApiV1Client.d.ts +32 -33
- package/lib/openapi/v1/BaseConfluenceApiV1Client.js +151 -88
- package/lib/openapi/v1/BaseConfluenceApiV1Client.js.map +1 -1
- package/lib/openapi/v1/core/CommonHttpService.d.ts +2 -0
- package/lib/openapi/v1/core/CommonHttpService.js +9 -0
- package/lib/openapi/v1/core/CommonHttpService.js.map +1 -1
- package/lib/openapi/v1/services/AnalyticsService.d.ts +10 -10
- package/lib/openapi/v1/services/AnalyticsService.js +62 -59
- package/lib/openapi/v1/services/AnalyticsService.js.map +1 -1
- package/lib/openapi/v1/services/AuditService.d.ts +25 -25
- package/lib/openapi/v1/services/AuditService.js +205 -202
- package/lib/openapi/v1/services/AuditService.js.map +1 -1
- package/lib/openapi/v1/services/ContentAttachmentsService.d.ts +20 -20
- package/lib/openapi/v1/services/ContentAttachmentsService.js +317 -314
- package/lib/openapi/v1/services/ContentAttachmentsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentBodyService.d.ts +15 -15
- package/lib/openapi/v1/services/ContentBodyService.js +140 -137
- package/lib/openapi/v1/services/ContentBodyService.js.map +1 -1
- package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.d.ts +27 -27
- package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js +391 -388
- package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentCommentsService.d.ts +8 -8
- package/lib/openapi/v1/services/ContentCommentsService.js +49 -46
- package/lib/openapi/v1/services/ContentCommentsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentLabelsService.d.ts +11 -11
- package/lib/openapi/v1/services/ContentLabelsService.js +150 -147
- package/lib/openapi/v1/services/ContentLabelsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentMacroBodyService.d.ts +13 -13
- package/lib/openapi/v1/services/ContentMacroBodyService.js +155 -152
- package/lib/openapi/v1/services/ContentMacroBodyService.js.map +1 -1
- package/lib/openapi/v1/services/ContentPermissionsService.d.ts +2 -2
- package/lib/openapi/v1/services/ContentPermissionsService.js +48 -45
- package/lib/openapi/v1/services/ContentPermissionsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentPropertiesService.d.ts +18 -18
- package/lib/openapi/v1/services/ContentPropertiesService.js +237 -234
- package/lib/openapi/v1/services/ContentPropertiesService.js.map +1 -1
- package/lib/openapi/v1/services/ContentRestrictionsService.d.ts +49 -49
- package/lib/openapi/v1/services/ContentRestrictionsService.js +505 -502
- package/lib/openapi/v1/services/ContentRestrictionsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentService.d.ts +50 -50
- package/lib/openapi/v1/services/ContentService.js +475 -472
- package/lib/openapi/v1/services/ContentService.js.map +1 -1
- package/lib/openapi/v1/services/ContentStatesService.d.ts +25 -25
- package/lib/openapi/v1/services/ContentStatesService.js +359 -356
- package/lib/openapi/v1/services/ContentStatesService.js.map +1 -1
- package/lib/openapi/v1/services/ContentVersionsService.d.ts +13 -13
- package/lib/openapi/v1/services/ContentVersionsService.js +144 -141
- package/lib/openapi/v1/services/ContentVersionsService.js.map +1 -1
- package/lib/openapi/v1/services/ContentWatchesService.d.ts +57 -57
- package/lib/openapi/v1/services/ContentWatchesService.js +454 -451
- package/lib/openapi/v1/services/ContentWatchesService.js.map +1 -1
- package/lib/openapi/v1/services/DynamicModulesService.d.ts +5 -5
- package/lib/openapi/v1/services/DynamicModulesService.js +70 -67
- package/lib/openapi/v1/services/DynamicModulesService.js.map +1 -1
- package/lib/openapi/v1/services/ExperimentalService.d.ts +12 -12
- package/lib/openapi/v1/services/ExperimentalService.js +151 -148
- package/lib/openapi/v1/services/ExperimentalService.js.map +1 -1
- package/lib/openapi/v1/services/GroupService.d.ts +52 -52
- package/lib/openapi/v1/services/GroupService.js +445 -442
- package/lib/openapi/v1/services/GroupService.js.map +1 -1
- package/lib/openapi/v1/services/InlineTasksService.d.ts +20 -20
- package/lib/openapi/v1/services/InlineTasksService.js +118 -115
- package/lib/openapi/v1/services/InlineTasksService.js.map +1 -1
- package/lib/openapi/v1/services/LabelInfoService.d.ts +5 -5
- package/lib/openapi/v1/services/LabelInfoService.js +37 -34
- package/lib/openapi/v1/services/LabelInfoService.js.map +1 -1
- package/lib/openapi/v1/services/LongRunningTaskService.d.ts +8 -6
- package/lib/openapi/v1/services/LongRunningTaskService.js +67 -63
- package/lib/openapi/v1/services/LongRunningTaskService.js.map +1 -1
- package/lib/openapi/v1/services/RelationService.d.ts +37 -37
- package/lib/openapi/v1/services/RelationService.js +231 -228
- package/lib/openapi/v1/services/RelationService.js.map +1 -1
- package/lib/openapi/v1/services/SearchService.d.ts +20 -20
- package/lib/openapi/v1/services/SearchService.js +136 -133
- package/lib/openapi/v1/services/SearchService.js.map +1 -1
- package/lib/openapi/v1/services/SettingsService.d.ts +15 -15
- package/lib/openapi/v1/services/SettingsService.js +204 -201
- package/lib/openapi/v1/services/SettingsService.js.map +1 -1
- package/lib/openapi/v1/services/SpacePermissionsService.d.ts +6 -6
- package/lib/openapi/v1/services/SpacePermissionsService.js +99 -96
- package/lib/openapi/v1/services/SpacePermissionsService.js.map +1 -1
- package/lib/openapi/v1/services/SpacePropertiesService.d.ts +16 -16
- package/lib/openapi/v1/services/SpacePropertiesService.js +227 -224
- package/lib/openapi/v1/services/SpacePropertiesService.js.map +1 -1
- package/lib/openapi/v1/services/SpaceService.d.ts +38 -38
- package/lib/openapi/v1/services/SpaceService.js +320 -317
- package/lib/openapi/v1/services/SpaceService.js.map +1 -1
- package/lib/openapi/v1/services/SpaceSettingsService.d.ts +4 -4
- package/lib/openapi/v1/services/SpaceSettingsService.js +68 -65
- package/lib/openapi/v1/services/SpaceSettingsService.js.map +1 -1
- package/lib/openapi/v1/services/TemplateService.d.ts +20 -20
- package/lib/openapi/v1/services/TemplateService.js +214 -211
- package/lib/openapi/v1/services/TemplateService.js.map +1 -1
- package/lib/openapi/v1/services/ThemesService.d.ts +13 -13
- package/lib/openapi/v1/services/ThemesService.js +179 -176
- package/lib/openapi/v1/services/ThemesService.js.map +1 -1
- package/lib/openapi/v1/services/UserPropertiesService.d.ts +12 -12
- package/lib/openapi/v1/services/UserPropertiesService.js +165 -162
- package/lib/openapi/v1/services/UserPropertiesService.js.map +1 -1
- package/lib/openapi/v1/services/UsersService.d.ts +21 -21
- package/lib/openapi/v1/services/UsersService.js +229 -226
- package/lib/openapi/v1/services/UsersService.js.map +1 -1
- package/lib/openapi/v2/BaseConfluenceApiV2Client.d.ts +23 -24
- package/lib/openapi/v2/BaseConfluenceApiV2Client.js +92 -47
- package/lib/openapi/v2/BaseConfluenceApiV2Client.js.map +1 -1
- package/lib/openapi/v2/core/CommonHttpService.d.ts +2 -0
- package/lib/openapi/v2/core/CommonHttpService.js +9 -0
- package/lib/openapi/v2/core/CommonHttpService.js.map +1 -1
- package/lib/openapi/v2/models/user.d.ts +0 -2
- package/lib/openapi/v2/models/user.js +0 -2
- package/lib/openapi/v2/models/user.js.map +1 -1
- package/lib/openapi/v2/services/AncestorsService.d.ts +17 -17
- package/lib/openapi/v2/services/AncestorsService.js +174 -171
- package/lib/openapi/v2/services/AncestorsService.js.map +1 -1
- package/lib/openapi/v2/services/AttachmentService.d.ts +62 -62
- package/lib/openapi/v2/services/AttachmentService.js +261 -258
- package/lib/openapi/v2/services/AttachmentService.js.map +1 -1
- package/lib/openapi/v2/services/BlogPostService.d.ts +70 -70
- package/lib/openapi/v2/services/BlogPostService.js +270 -267
- package/lib/openapi/v2/services/BlogPostService.js.map +1 -1
- package/lib/openapi/v2/services/ChildrenService.d.ts +14 -14
- package/lib/openapi/v2/services/ChildrenService.js +77 -74
- package/lib/openapi/v2/services/ChildrenService.js.map +1 -1
- package/lib/openapi/v2/services/ClassificationLevelService.d.ts +21 -21
- package/lib/openapi/v2/services/ClassificationLevelService.js +304 -301
- package/lib/openapi/v2/services/ClassificationLevelService.js.map +1 -1
- package/lib/openapi/v2/services/CommentService.d.ts +136 -136
- package/lib/openapi/v2/services/CommentService.js +635 -632
- package/lib/openapi/v2/services/CommentService.js.map +1 -1
- package/lib/openapi/v2/services/ContentPropertiesService.d.ts +128 -128
- package/lib/openapi/v2/services/ContentPropertiesService.js +1242 -1239
- package/lib/openapi/v2/services/ContentPropertiesService.js.map +1 -1
- package/lib/openapi/v2/services/ContentService.d.ts +2 -2
- package/lib/openapi/v2/services/ContentService.js +40 -37
- package/lib/openapi/v2/services/ContentService.js.map +1 -1
- package/lib/openapi/v2/services/CustomContentService.d.ts +72 -72
- package/lib/openapi/v2/services/CustomContentService.js +299 -296
- package/lib/openapi/v2/services/CustomContentService.js.map +1 -1
- package/lib/openapi/v2/services/DataPoliciesService.d.ts +10 -10
- package/lib/openapi/v2/services/DataPoliciesService.js +67 -64
- package/lib/openapi/v2/services/DataPoliciesService.js.map +1 -1
- package/lib/openapi/v2/services/DatabaseService.d.ts +17 -17
- package/lib/openapi/v2/services/DatabaseService.js +90 -87
- package/lib/openapi/v2/services/DatabaseService.js.map +1 -1
- package/lib/openapi/v2/services/LabelService.d.ts +57 -57
- package/lib/openapi/v2/services/LabelService.js +263 -260
- package/lib/openapi/v2/services/LabelService.js.map +1 -1
- package/lib/openapi/v2/services/LikeService.d.ts +36 -36
- package/lib/openapi/v2/services/LikeService.js +250 -247
- package/lib/openapi/v2/services/LikeService.js.map +1 -1
- package/lib/openapi/v2/services/OperationService.d.ts +20 -20
- package/lib/openapi/v2/services/OperationService.js +298 -295
- package/lib/openapi/v2/services/OperationService.js.map +1 -1
- package/lib/openapi/v2/services/PageService.d.ts +73 -73
- package/lib/openapi/v2/services/PageService.js +272 -269
- package/lib/openapi/v2/services/PageService.js.map +1 -1
- package/lib/openapi/v2/services/SmartLinkService.d.ts +19 -17
- package/lib/openapi/v2/services/SmartLinkService.js +92 -89
- package/lib/openapi/v2/services/SmartLinkService.js.map +1 -1
- package/lib/openapi/v2/services/SpacePermissionsService.d.ts +6 -6
- package/lib/openapi/v2/services/SpacePermissionsService.js +35 -32
- package/lib/openapi/v2/services/SpacePermissionsService.js.map +1 -1
- package/lib/openapi/v2/services/SpacePropertiesService.d.ts +15 -15
- package/lib/openapi/v2/services/SpacePropertiesService.js +165 -162
- package/lib/openapi/v2/services/SpacePropertiesService.js.map +1 -1
- package/lib/openapi/v2/services/SpaceService.d.ts +28 -28
- package/lib/openapi/v2/services/SpaceService.js +83 -80
- package/lib/openapi/v2/services/SpaceService.js.map +1 -1
- package/lib/openapi/v2/services/TaskService.d.ts +40 -40
- package/lib/openapi/v2/services/TaskService.js +120 -117
- package/lib/openapi/v2/services/TaskService.js.map +1 -1
- package/lib/openapi/v2/services/UserService.d.ts +11 -11
- package/lib/openapi/v2/services/UserService.js +91 -88
- package/lib/openapi/v2/services/UserService.js.map +1 -1
- package/lib/openapi/v2/services/VersionService.d.ts +59 -59
- package/lib/openapi/v2/services/VersionService.js +395 -392
- package/lib/openapi/v2/services/VersionService.js.map +1 -1
- package/lib/openapi/v2/services/WhiteboardService.d.ts +17 -17
- package/lib/openapi/v2/services/WhiteboardService.js +90 -87
- package/lib/openapi/v2/services/WhiteboardService.js.map +1 -1
- package/package.json +4 -3
|
@@ -11,217 +11,220 @@ const template_1 = require("../models/template");
|
|
|
11
11
|
const validationSchemaStorage_1 = require("../validationSchemaStorage");
|
|
12
12
|
/** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template */
|
|
13
13
|
class TemplateService extends CommonHttpService_1.CommonHttpService {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
/**
|
|
17
|
+
* Creates a new content template. Note, blueprint templates cannot be created via
|
|
18
|
+
* the REST API.
|
|
19
|
+
*
|
|
20
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
21
|
+
* 'Admin' permission for the space to create a space template or 'Confluence
|
|
22
|
+
* Administrator'
|
|
23
|
+
* global permission to create a global template.
|
|
24
|
+
*
|
|
25
|
+
* @returns Returned if the template is created.
|
|
26
|
+
* @path {POST} /wiki/rest/api/template
|
|
27
|
+
* @scopes-current write:confluence-content
|
|
28
|
+
* @scopes-beta read:template:confluence, read:content-details:confluence,
|
|
29
|
+
* write:template:confluence
|
|
30
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template#api-wiki-rest-api-template-post
|
|
31
|
+
*/
|
|
32
|
+
this.createContentTemplate = ({ contentTemplateCreate, }) => {
|
|
33
|
+
return this.getClientInstance()
|
|
34
|
+
.request({
|
|
35
|
+
path: "/wiki/rest/api/template",
|
|
36
|
+
method: "POST",
|
|
37
|
+
headers: {
|
|
38
|
+
"Content-Type": "application/json",
|
|
39
|
+
},
|
|
40
|
+
body: contentTemplateCreate,
|
|
41
|
+
})
|
|
42
|
+
.then(this.getClientInstance().responseHandler({
|
|
43
|
+
200: {
|
|
44
|
+
"application/json": "json",
|
|
45
|
+
},
|
|
46
|
+
}))
|
|
47
|
+
.then(commonHttpClient.castResponse())
|
|
48
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("TemplateService.createContentTemplate.response"))
|
|
49
|
+
.then(commonHttpClient.getBody);
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Returns all templates provided by blueprints. Use this method to retrieve
|
|
53
|
+
* all global blueprint templates or all blueprint templates in a space.
|
|
54
|
+
*
|
|
55
|
+
* Note, all global blueprints are inherited by each space. Space blueprints
|
|
56
|
+
* can be customised without affecting the global blueprints.
|
|
57
|
+
*
|
|
58
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
59
|
+
* 'View' permission for the space to view blueprints for the space and permission
|
|
60
|
+
* to access the Confluence site ('Can use' global permission) to view global
|
|
61
|
+
* blueprints.
|
|
62
|
+
*
|
|
63
|
+
* @returns Returned if the requested templates are returned.
|
|
64
|
+
* @path {GET} /wiki/rest/api/template/blueprint
|
|
65
|
+
* @scopes-current read:confluence-content.summary
|
|
66
|
+
* @scopes-beta read:template:confluence, read:content-details:confluence
|
|
67
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template#api-wiki-rest-api-template-blueprint-get
|
|
68
|
+
*/
|
|
69
|
+
this.getBlueprintTemplates = ({ spaceKey, start, limit, expand, } = {}) => {
|
|
70
|
+
return this.getClientInstance()
|
|
71
|
+
.request({
|
|
72
|
+
path: "/wiki/rest/api/template/blueprint",
|
|
73
|
+
method: "GET",
|
|
74
|
+
query: {
|
|
75
|
+
spaceKey,
|
|
76
|
+
start,
|
|
77
|
+
limit,
|
|
78
|
+
expand,
|
|
79
|
+
},
|
|
80
|
+
})
|
|
81
|
+
.then(this.getClientInstance().responseHandler({
|
|
82
|
+
200: {
|
|
83
|
+
"application/json": "json",
|
|
84
|
+
},
|
|
85
|
+
}))
|
|
86
|
+
.then(commonHttpClient.castResponse())
|
|
87
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("TemplateService.getBlueprintTemplates.response"))
|
|
88
|
+
.then(commonHttpClient.getBody);
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Returns a content template. This includes information about template,
|
|
92
|
+
* like the name, the space or blueprint that the template is in, the body
|
|
93
|
+
* of the template, and more.
|
|
94
|
+
*
|
|
95
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
96
|
+
* 'View' permission for the space to view space templates and permission to
|
|
97
|
+
* access the Confluence site ('Can use' global permission) to view global
|
|
98
|
+
* templates.
|
|
99
|
+
*
|
|
100
|
+
* @returns Returned if the requested template is returned.
|
|
101
|
+
* @path {GET} /wiki/rest/api/template/{contentTemplateId}
|
|
102
|
+
* @scopes-current read:confluence-content.summary
|
|
103
|
+
* @scopes-beta read:template:confluence, read:content-details:confluence
|
|
104
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template#api-wiki-rest-api-template-contenttemplateid-get
|
|
105
|
+
*/
|
|
106
|
+
this.getContentTemplate = ({ contentTemplateId, }) => {
|
|
107
|
+
return this.getClientInstance()
|
|
108
|
+
.request({
|
|
109
|
+
path: "/wiki/rest/api/template/{contentTemplateId}",
|
|
110
|
+
method: "GET",
|
|
111
|
+
pathParams: {
|
|
112
|
+
contentTemplateId,
|
|
113
|
+
},
|
|
114
|
+
})
|
|
115
|
+
.then(this.getClientInstance().responseHandler({
|
|
116
|
+
200: {
|
|
117
|
+
"application/json": "json",
|
|
118
|
+
},
|
|
119
|
+
}))
|
|
120
|
+
.then(commonHttpClient.castResponse())
|
|
121
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("TemplateService.getContentTemplate.response"))
|
|
122
|
+
.then(commonHttpClient.getBody);
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* Returns all content templates. Use this method to retrieve all global
|
|
126
|
+
* content templates or all content templates in a space.
|
|
127
|
+
*
|
|
128
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
129
|
+
* 'View' permission for the space to view space templates and permission to
|
|
130
|
+
* access the Confluence site ('Can use' global permission) to view global
|
|
131
|
+
* templates.
|
|
132
|
+
*
|
|
133
|
+
* @returns Returned if the requested templates are returned.
|
|
134
|
+
* @path {GET} /wiki/rest/api/template/page
|
|
135
|
+
* @scopes-current read:confluence-content.summary
|
|
136
|
+
* @scopes-beta read:template:confluence, read:content-details:confluence
|
|
137
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template#api-wiki-rest-api-template-page-get
|
|
138
|
+
*/
|
|
139
|
+
this.getContentTemplates = ({ spaceKey, start, limit, expand, } = {}) => {
|
|
140
|
+
return this.getClientInstance()
|
|
141
|
+
.request({
|
|
142
|
+
path: "/wiki/rest/api/template/page",
|
|
143
|
+
method: "GET",
|
|
144
|
+
query: {
|
|
145
|
+
spaceKey,
|
|
146
|
+
start,
|
|
147
|
+
limit,
|
|
148
|
+
expand,
|
|
149
|
+
},
|
|
150
|
+
})
|
|
151
|
+
.then(this.getClientInstance().responseHandler({
|
|
152
|
+
200: {
|
|
153
|
+
"application/json": "json",
|
|
154
|
+
},
|
|
155
|
+
}))
|
|
156
|
+
.then(commonHttpClient.castResponse())
|
|
157
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("TemplateService.getContentTemplates.response"))
|
|
158
|
+
.then(commonHttpClient.getBody);
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Deletes a template. This results in different actions depending on the
|
|
162
|
+
* type of template:
|
|
163
|
+
*
|
|
164
|
+
* - If the template is a content template, it is deleted.
|
|
165
|
+
* - If the template is a modified space-level blueprint template, it reverts
|
|
166
|
+
* to the template inherited from the global-level blueprint template.
|
|
167
|
+
* - If the template is a modified global-level blueprint template, it reverts
|
|
168
|
+
* to the default global-level blueprint template.
|
|
169
|
+
*
|
|
170
|
+
* Note, unmodified blueprint templates cannot be deleted.
|
|
171
|
+
*
|
|
172
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
173
|
+
* 'Admin' permission for the space to delete a space template or
|
|
174
|
+
* 'Confluence Administrator'
|
|
175
|
+
* global permission to delete a global template.
|
|
176
|
+
*
|
|
177
|
+
* @path {DELETE} /wiki/rest/api/template/{contentTemplateId}
|
|
178
|
+
* @scopes-current write:confluence-content
|
|
179
|
+
* @scopes-beta write:template:confluence
|
|
180
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template#api-wiki-rest-api-template-contenttemplateid-delete
|
|
181
|
+
*/
|
|
182
|
+
this.removeTemplate = ({ contentTemplateId, }) => {
|
|
183
|
+
return this.getClientInstance()
|
|
184
|
+
.request({
|
|
185
|
+
path: "/wiki/rest/api/template/{contentTemplateId}",
|
|
186
|
+
method: "DELETE",
|
|
187
|
+
pathParams: {
|
|
188
|
+
contentTemplateId,
|
|
189
|
+
},
|
|
190
|
+
})
|
|
191
|
+
.then(commonHttpClient.discardResult);
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Updates a content template. Note, blueprint templates cannot be updated
|
|
195
|
+
* via the REST API.
|
|
196
|
+
*
|
|
197
|
+
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
|
|
198
|
+
* 'Admin' permission for the space to update a space template or 'Confluence
|
|
199
|
+
* Administrator'
|
|
200
|
+
* global permission to update a global template.
|
|
201
|
+
*
|
|
202
|
+
* @returns Returned if the template is updated.
|
|
203
|
+
* @path {PUT} /wiki/rest/api/template
|
|
204
|
+
* @scopes-current write:confluence-content
|
|
205
|
+
* @scopes-beta read:template:confluence, read:content-details:confluence,
|
|
206
|
+
* write:template:confluence
|
|
207
|
+
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template#api-wiki-rest-api-template-put
|
|
208
|
+
*/
|
|
209
|
+
this.updateContentTemplate = ({ contentTemplateUpdate, }) => {
|
|
210
|
+
return this.getClientInstance()
|
|
211
|
+
.request({
|
|
212
|
+
path: "/wiki/rest/api/template",
|
|
213
|
+
method: "PUT",
|
|
214
|
+
headers: {
|
|
215
|
+
"Content-Type": "application/json",
|
|
216
|
+
},
|
|
217
|
+
body: contentTemplateUpdate,
|
|
218
|
+
})
|
|
219
|
+
.then(this.getClientInstance().responseHandler({
|
|
220
|
+
200: {
|
|
221
|
+
"application/json": "json",
|
|
222
|
+
},
|
|
223
|
+
}))
|
|
224
|
+
.then(commonHttpClient.castResponse())
|
|
225
|
+
.then(validationSchemaStorage_1.validationSchemaStorage.validator("TemplateService.updateContentTemplate.response"))
|
|
226
|
+
.then(commonHttpClient.getBody);
|
|
227
|
+
};
|
|
225
228
|
}
|
|
226
229
|
static initialize() {
|
|
227
230
|
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("TemplateService.updateContentTemplate.response", zod_1.z
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateService.js","sourceRoot":"","sources":["../../../../src/openapi/v1/services/TemplateService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,6BAAwB;AAExB,6DAA6D;AAC7D,iEAA8D;AAC9D,iDAO4B;AAC5B,wEAAqE;AACrE,uFAAuF;AACvF,MAAa,eAAgB,SAAQ,qCAAiB;
|
|
1
|
+
{"version":3,"file":"TemplateService.js","sourceRoot":"","sources":["../../../../src/openapi/v1/services/TemplateService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,6BAAwB;AAExB,6DAA6D;AAC7D,iEAA8D;AAC9D,iDAO4B;AAC5B,wEAAqE;AACrE,uFAAuF;AACvF,MAAa,eAAgB,SAAQ,qCAAiB;IAAtD;;QACE;;;;;;;;;;;;;;;WAeG;QACH,0BAAqB,GAAG,CAAC,EACvB,qBAAqB,GAOtB,EAA4B,EAAE;YAC7B,OAAO,IAAI,CAAC,iBAAiB,EAAE;iBAC5B,OAAO,CAAC;gBACP,IAAI,EAAE,yBAAyB;gBAC/B,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,qBAAqB;aAC5B,CAAC;iBACD,IAAI,CACH,IAAI,CAAC,iBAAiB,EAAE,CAAC,eAAe,CAAC;gBACvC,GAAG,EAAE;oBACH,kBAAkB,EAAE,MAAM;iBAC3B;aACF,CAAC,CACH;iBACA,IAAI,CACH,gBAAgB,CAAC,YAAY,EAIzB,CACL;iBACA,IAAI,CACH,iDAAuB,CAAC,SAAS,CAC/B,gDAAgD,CACjD,CACF;iBACA,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC,CAAC;QACF;;;;;;;;;;;;;;;;;WAiBG;QACH,0BAAqB,GAAG,CAAC,EACvB,QAAQ,EACR,KAAK,EACL,KAAK,EACL,MAAM,MAqBJ,EAAE,EAAmC,EAAE;YACzC,OAAO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AAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,iDAAuB,CAAC,IAAI,CAAC,wBAAwB,CAAC;SAC7D,CAAC;aACD,QAAQ,CAAC,gDAAgD,CAAC,CAC9D,CAAC;QACF,iDAAuB,CAAC,kBAAkB,CACxC,8CAA8C,EAC9C,OAAC;aACE,MAAM,CAAC;YACN,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YACtB,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,iDAAuB,CAAC,IAAI,CAAC,sBAAsB,CAAC;SAC3D,CAAC;aACD,QAAQ,CAAC,8CAA8C,CAAC,CAC5D,CAAC;QACF,iDAAuB,CAAC,YAAY,CAAC,CAAC,4CAAiC,CAAC,CAAC,CAAC;IAC5E,CAAC;CACF;AA/YD,0CA+YC"}
|
|
@@ -14,7 +14,7 @@ export declare class ThemesService extends CommonHttpService {
|
|
|
14
14
|
* @scopes-beta read:configuration:confluence
|
|
15
15
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-themes#api-wiki-rest-api-settings-theme-selected-get
|
|
16
16
|
*/
|
|
17
|
-
getGlobalTheme()
|
|
17
|
+
getGlobalTheme: () => Promise<Theme>;
|
|
18
18
|
/**
|
|
19
19
|
* Returns the theme selected for a space, if one is set. If no space
|
|
20
20
|
* theme is set, this means that the space is inheriting the global look
|
|
@@ -29,10 +29,10 @@ export declare class ThemesService extends CommonHttpService {
|
|
|
29
29
|
* @scopes-beta read:space.setting:confluence
|
|
30
30
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-themes#api-wiki-rest-api-space-spacekey-theme-get
|
|
31
31
|
*/
|
|
32
|
-
getSpaceTheme({ spaceKey, }: {
|
|
32
|
+
getSpaceTheme: ({ spaceKey, }: {
|
|
33
33
|
/** The key of the space to be queried for its theme. */
|
|
34
34
|
spaceKey: string;
|
|
35
|
-
})
|
|
35
|
+
}) => Promise<Theme>;
|
|
36
36
|
/**
|
|
37
37
|
* Returns a theme. This includes information about the theme name,
|
|
38
38
|
* description, and icon.
|
|
@@ -45,10 +45,10 @@ export declare class ThemesService extends CommonHttpService {
|
|
|
45
45
|
* @scopes-beta read:configuration:confluence
|
|
46
46
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-themes#api-wiki-rest-api-settings-theme-themekey-get
|
|
47
47
|
*/
|
|
48
|
-
getTheme({ themeKey, }: {
|
|
48
|
+
getTheme: ({ themeKey, }: {
|
|
49
49
|
/** The key of the theme to be returned. */
|
|
50
50
|
themeKey: string;
|
|
51
|
-
})
|
|
51
|
+
}) => Promise<Theme>;
|
|
52
52
|
/**
|
|
53
53
|
* Returns all themes, not including the default theme.
|
|
54
54
|
*
|
|
@@ -60,15 +60,15 @@ export declare class ThemesService extends CommonHttpService {
|
|
|
60
60
|
* @scopes-beta read:configuration:confluence
|
|
61
61
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-themes#api-wiki-rest-api-settings-theme-get
|
|
62
62
|
*/
|
|
63
|
-
getThemes({ start, limit, }?: {
|
|
63
|
+
getThemes: ({ start, limit, }?: {
|
|
64
64
|
/** The starting index of the returned themes. */
|
|
65
|
-
start?: number;
|
|
65
|
+
start?: number | undefined;
|
|
66
66
|
/**
|
|
67
67
|
* The maximum number of themes to return per page.
|
|
68
68
|
* Note, this may be restricted by fixed system limits.
|
|
69
69
|
*/
|
|
70
|
-
limit?: number;
|
|
71
|
-
})
|
|
70
|
+
limit?: number | undefined;
|
|
71
|
+
}) => Promise<ThemeArray>;
|
|
72
72
|
/**
|
|
73
73
|
* Resets the space theme. This means that the space will inherit the
|
|
74
74
|
* global look and feel settings
|
|
@@ -81,10 +81,10 @@ export declare class ThemesService extends CommonHttpService {
|
|
|
81
81
|
* @scopes-beta write:space.setting:confluence
|
|
82
82
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-themes#api-wiki-rest-api-space-spacekey-theme-delete
|
|
83
83
|
*/
|
|
84
|
-
resetSpaceTheme({ spaceKey, }: {
|
|
84
|
+
resetSpaceTheme: ({ spaceKey, }: {
|
|
85
85
|
/** The key of the space to reset the theme for. */
|
|
86
86
|
spaceKey: string;
|
|
87
|
-
})
|
|
87
|
+
}) => Promise<void>;
|
|
88
88
|
/**
|
|
89
89
|
* Sets the theme for a space. Note, if you want to reset the space theme to
|
|
90
90
|
* the default Confluence theme, use the 'Reset space theme' method instead
|
|
@@ -99,10 +99,10 @@ export declare class ThemesService extends CommonHttpService {
|
|
|
99
99
|
* @scopes-beta read:space.setting:confluence, write:space.setting:confluence
|
|
100
100
|
* @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-themes#api-wiki-rest-api-space-spacekey-theme-put
|
|
101
101
|
*/
|
|
102
|
-
setSpaceTheme({ spaceKey, themeUpdate, }: {
|
|
102
|
+
setSpaceTheme: ({ spaceKey, themeUpdate, }: {
|
|
103
103
|
/** The key of the space to set the theme for. */
|
|
104
104
|
spaceKey: string;
|
|
105
105
|
themeUpdate: ThemeUpdate;
|
|
106
|
-
})
|
|
106
|
+
}) => Promise<Theme>;
|
|
107
107
|
static initialize(): void;
|
|
108
108
|
}
|