@ecubelabs/atlassian-mcp 1.4.0-next.1 → 1.4.0-next.2

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.
@@ -274,4 +274,81 @@ export class ConfluenceService extends BaseApiService {
274
274
  status: ['current'], // 현재 상태인 페이지만
275
275
  });
276
276
  }
277
+ /**
278
+ * 페이지 생성
279
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-wiki-api-v2-pages-post
280
+ */
281
+ async createPage(options) {
282
+ const { spaceId, title, body, status = 'current', parentId } = options;
283
+ const requestBody = {
284
+ spaceId,
285
+ title,
286
+ body,
287
+ status,
288
+ };
289
+ if (parentId) {
290
+ requestBody.parentId = parentId;
291
+ }
292
+ return this.makeRequest(() => this.client.post('/pages', requestBody, {
293
+ headers: {
294
+ 'Content-Type': 'application/json',
295
+ },
296
+ }));
297
+ }
298
+ /**
299
+ * 페이지 수정
300
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-wiki-api-v2-pages-id-put
301
+ */
302
+ async updatePage(pageId, options) {
303
+ const { title, body, version, status = 'current' } = options;
304
+ const requestBody = {
305
+ id: pageId,
306
+ status,
307
+ title,
308
+ body,
309
+ version,
310
+ };
311
+ return this.makeRequest(() => this.client.put(`/pages/${pageId}`, requestBody, {
312
+ headers: {
313
+ 'Content-Type': 'application/json',
314
+ },
315
+ }));
316
+ }
317
+ /**
318
+ * 페이지 삭제
319
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-wiki-api-v2-pages-id-delete
320
+ */
321
+ async deletePage(pageId, options) {
322
+ const params = {};
323
+ if (options?.purge !== undefined) {
324
+ params.purge = options.purge;
325
+ }
326
+ if (options?.draft !== undefined) {
327
+ params.draft = options.draft;
328
+ }
329
+ return this.makeRequest(() => this.client.delete(`/pages/${pageId}`, { params }));
330
+ }
331
+ /**
332
+ * 페이지에 라벨 추가
333
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-labels/#api-wiki-rest-api-content-id-label-post
334
+ * 참고: 라벨 관리는 v1 API를 사용 (/wiki/rest/api/content)
335
+ */
336
+ async addLabelsToPage(pageId, labels) {
337
+ return this.makeRequest(() => this.client.post(`/wiki/rest/api/content/${pageId}/label`, labels, {
338
+ headers: {
339
+ 'Content-Type': 'application/json',
340
+ },
341
+ }));
342
+ }
343
+ /**
344
+ * 페이지에서 라벨 제거
345
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-labels/#api-wiki-rest-api-content-id-label-delete
346
+ * 참고: 라벨 관리는 v1 API를 사용 (/wiki/rest/api/content)
347
+ */
348
+ async removeLabelFromPage(pageId, labelName) {
349
+ const params = {
350
+ name: labelName,
351
+ };
352
+ return this.makeRequest(() => this.client.delete(`/wiki/rest/api/content/${pageId}/label`, { params }));
353
+ }
277
354
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecubelabs/atlassian-mcp",
3
- "version": "1.4.0-next.1",
3
+ "version": "1.4.0-next.2",
4
4
  "bin": "./dist/index.js",
5
5
  "repository": {
6
6
  "url": "https://github.com/Ecube-Labs/skynet.git"