confluence.js 1.5.2 → 1.5.3

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 (74) hide show
  1. package/CHANGELOG.md +7 -3
  2. package/out/api/audit.d.ts +24 -12
  3. package/out/api/audit.js.map +1 -1
  4. package/out/api/content.d.ts +18 -12
  5. package/out/api/content.js.map +1 -1
  6. package/out/api/contentAttachments.d.ts +14 -8
  7. package/out/api/contentAttachments.js.map +1 -1
  8. package/out/api/contentBody.js +2 -4
  9. package/out/api/contentBody.js.map +1 -1
  10. package/out/api/contentMacroBody.d.ts +4 -2
  11. package/out/api/contentMacroBody.js.map +1 -1
  12. package/out/api/contentRestrictions.d.ts +16 -8
  13. package/out/api/contentRestrictions.js.map +1 -1
  14. package/out/api/contentWatches.d.ts +16 -8
  15. package/out/api/contentWatches.js.map +1 -1
  16. package/out/api/parameters/convertContentBody.d.ts +16 -2
  17. package/out/api/relation.d.ts +8 -4
  18. package/out/api/relation.js.map +1 -1
  19. package/out/api/settings.d.ts +4 -2
  20. package/out/api/settings.js.map +1 -1
  21. package/out/api/space.d.ts +4 -2
  22. package/out/api/space.js.map +1 -1
  23. package/out/api/template.d.ts +16 -8
  24. package/out/api/template.js.map +1 -1
  25. package/out/clients/baseClient.js +3 -1
  26. package/out/clients/baseClient.js.map +1 -1
  27. package/out/clients/serverClient.js.map +1 -1
  28. package/out/server/audit.js +6 -6
  29. package/out/server/audit.js.map +1 -1
  30. package/out/server/content.d.ts +34 -262
  31. package/out/server/content.js +32 -32
  32. package/out/server/content.js.map +1 -1
  33. package/out/server/contentBody.d.ts +2 -12
  34. package/out/server/contentBody.js +2 -1
  35. package/out/server/contentBody.js.map +1 -1
  36. package/out/server/group.js +3 -3
  37. package/out/server/group.js.map +1 -1
  38. package/out/server/longTask.js +2 -2
  39. package/out/server/longTask.js.map +1 -1
  40. package/out/server/parameters/convertContentBody.d.ts +16 -0
  41. package/out/server/search.d.ts +2 -22
  42. package/out/server/search.js +1 -1
  43. package/out/server/search.js.map +1 -1
  44. package/out/server/space.d.ts +12 -94
  45. package/out/server/space.js +14 -14
  46. package/out/server/space.js.map +1 -1
  47. package/out/server/user.d.ts +8 -152
  48. package/out/server/user.js +10 -10
  49. package/out/server/user.js.map +1 -1
  50. package/package.json +10 -10
  51. package/src/api/audit.ts +24 -12
  52. package/src/api/content.ts +23 -17
  53. package/src/api/contentAttachments.ts +19 -13
  54. package/src/api/contentBody.ts +2 -0
  55. package/src/api/contentMacroBody.ts +4 -2
  56. package/src/api/contentRestrictions.ts +16 -8
  57. package/src/api/contentWatches.ts +16 -8
  58. package/src/api/parameters/convertContentBody.ts +39 -2
  59. package/src/api/relation.ts +8 -4
  60. package/src/api/settings.ts +4 -2
  61. package/src/api/space.ts +4 -2
  62. package/src/api/template.ts +16 -8
  63. package/src/clients/baseClient.ts +5 -10
  64. package/src/clients/client.ts +1 -5
  65. package/src/clients/serverClient.ts +1 -10
  66. package/src/server/audit.ts +6 -6
  67. package/src/server/content.ts +70 -295
  68. package/src/server/contentBody.ts +4 -13
  69. package/src/server/group.ts +3 -3
  70. package/src/server/longTask.ts +2 -2
  71. package/src/server/parameters/convertContentBody.ts +37 -0
  72. package/src/server/search.ts +3 -23
  73. package/src/server/space.ts +26 -108
  74. package/src/server/user.ts +18 -162
@@ -8,28 +8,12 @@ import { RequestConfig } from '../requestConfig';
8
8
  export class Content {
9
9
  constructor(private client: Client) {}
10
10
 
11
- /**
12
- * Returns a paginated list of Content.
13
- *
14
- * @example
15
- * Example request URI(s):
16
- *
17
- * - http://example.com/rest/api/content?spaceKey=TST&title=Cheese&expand=space,body.view,version,container
18
- * - http://example.com/rest/api/content?type=blogpost&spaceKey=TST&title=Bacon&postingDay=2014-02-13&expand=space,body.view,version,container
19
- */
11
+ /** Returns a paginated list of Content. */
20
12
  async getContent<T = Pagination<Models.Content>>(
21
13
  parameters: Parameters.GetContent | undefined,
22
14
  callback: Callback<T>
23
15
  ): Promise<void>;
24
- /**
25
- * Returns a paginated list of Content.
26
- *
27
- * @example
28
- * Example request URI(s):
29
- *
30
- * - http://example.com/rest/api/content?spaceKey=TST&title=Cheese&expand=space,body.view,version,container
31
- * - http://example.com/rest/api/content?type=blogpost&spaceKey=TST&title=Bacon&postingDay=2014-02-13&expand=space,body.view,version,container
32
- */
16
+ /** Returns a paginated list of Content. */
33
17
  async getContent<T = Pagination<Models.Content>>(parameters?: Parameters.GetContent, callback?: never): Promise<T>;
34
18
  async getContent<T = Pagination<Models.Content>>(
35
19
  parameters?: Parameters.GetContent,
@@ -50,12 +34,13 @@ export class Content {
50
34
  },
51
35
  };
52
36
 
53
- return this.client.sendRequest(config, callback, { methodName: 'server.getContent' });
37
+ return this.client.sendRequest(config, callback);
54
38
  }
55
39
 
56
40
  /**
57
41
  * Creates a new piece of Content or publishes the draft if the content id is present.For the case publishing draft, a
58
- * new piece of content will be created and all metadata from the draft will be transferred into the newly created content.
42
+ * new piece of content will be created and all metadata from the draft will be transferred into the newly created
43
+ * content.
59
44
  */
60
45
  async createContent<T = Models.Content>(
61
46
  parameters: Parameters.CreateContent | undefined,
@@ -63,7 +48,8 @@ export class Content {
63
48
  ): Promise<void>;
64
49
  /**
65
50
  * Creates a new piece of Content or publishes the draft if the content id is present.For the case publishing draft, a
66
- * new piece of content will be created and all metadata from the draft will be transferred into the newly created content.
51
+ * new piece of content will be created and all metadata from the draft will be transferred into the newly created
52
+ * content.
67
53
  */
68
54
  async createContent<T = Models.Content>(parameters?: Parameters.CreateContent, callback?: never): Promise<T>;
69
55
  async createContent<T = Models.Content>(
@@ -84,7 +70,7 @@ export class Content {
84
70
  },
85
71
  };
86
72
 
87
- return this.client.sendRequest(config, callback, { methodName: 'server.createContent' });
73
+ return this.client.sendRequest(config, callback);
88
74
  }
89
75
 
90
76
  /**
@@ -117,28 +103,12 @@ export class Content {
117
103
  },
118
104
  };
119
105
 
120
- return this.client.sendRequest(config, callback, { methodName: 'server.updateContent' });
106
+ return this.client.sendRequest(config, callback);
121
107
  }
122
108
 
123
- /**
124
- * Returns a piece of Content.
125
- *
126
- * @example
127
- * Example request URI(s):
128
- *
129
- * http://example.com/rest/api/content/1234?expand=space,body.view,version,container
130
- * http://example.com/rest/api/content/1234?status=any
131
- */
109
+ /** Returns a piece of Content. */
132
110
  async getContentById<T = Models.Content>(parameters: Parameters.GetContentById, callback: Callback<T>): Promise<void>;
133
- /**
134
- * Returns a piece of Content.
135
- *
136
- * @example
137
- * Example request URI(s):
138
- *
139
- * http://example.com/rest/api/content/1234?expand=space,body.view,version,container
140
- * http://example.com/rest/api/content/1234?status=any
141
- */
111
+ /** Returns a piece of Content. */
142
112
  async getContentById<T = Models.Content>(parameters: Parameters.GetContentById, callback?: never): Promise<T>;
143
113
  async getContentById<T = Models.Content>(
144
114
  parameters: Parameters.GetContentById,
@@ -154,7 +124,7 @@ export class Content {
154
124
  },
155
125
  };
156
126
 
157
- return this.client.sendRequest(config, callback, { methodName: 'server.getContentById' });
127
+ return this.client.sendRequest(config, callback);
158
128
  }
159
129
 
160
130
  /**
@@ -184,26 +154,12 @@ export class Content {
184
154
  },
185
155
  };
186
156
 
187
- return this.client.sendRequest(config, callback, { methodName: 'server.deleteContent' });
157
+ return this.client.sendRequest(config, callback);
188
158
  }
189
159
 
190
- /**
191
- * Returns the history of a particular piece of content
192
- *
193
- * @example
194
- * Example request URI(s):
195
- *
196
- * http://example.com/rest/api/content/1234/history
197
- */
160
+ /** Returns the history of a particular piece of content */
198
161
  async getHistory<T = Models.ContentHistory>(parameters: Parameters.GetHistory, callback: Callback<T>): Promise<void>;
199
- /**
200
- * Returns the history of a particular piece of content
201
- *
202
- * @example
203
- * Example request URI(s):
204
- *
205
- * http://example.com/rest/api/content/1234/history
206
- */
162
+ /** Returns the history of a particular piece of content */
207
163
  async getHistory<T = Models.ContentHistory>(parameters: Parameters.GetHistory, callback?: never): Promise<T>;
208
164
  async getHistory<T = Models.ContentHistory>(
209
165
  parameters: Parameters.GetHistory,
@@ -217,7 +173,7 @@ export class Content {
217
173
  },
218
174
  };
219
175
 
220
- return this.client.sendRequest(config, callback, { methodName: 'server.getHistory' });
176
+ return this.client.sendRequest(config, callback);
221
177
  }
222
178
 
223
179
  /**
@@ -229,7 +185,8 @@ export class Content {
229
185
  *
230
186
  * Collecting a macro by its hash should now be considered deprecated and will be replaced, transparently with
231
187
  * macroIds. This resource is currently only called from connect addons which will eventually all use the
232
- * {@link #getContentById(com.atlassian.confluence.api.model.content.id.ContentId, java.util.List, Integer, String)} resource.
188
+ * {@link #getContentById(com.atlassian.confluence.api.model.content.id.ContentId, java.util.List, Integer, String)}
189
+ * resource.
233
190
  *
234
191
  * To make the migration as seamless as possible, this resource will match macros against a generated hash or a stored
235
192
  * macroId. This will allow add ons to work during the migration period.
@@ -247,7 +204,8 @@ export class Content {
247
204
  *
248
205
  * Collecting a macro by its hash should now be considered deprecated and will be replaced, transparently with
249
206
  * macroIds. This resource is currently only called from connect addons which will eventually all use the
250
- * {@link #getContentById(com.atlassian.confluence.api.model.content.id.ContentId, java.util.List, Integer, String)} resource.
207
+ * {@link #getContentById(com.atlassian.confluence.api.model.content.id.ContentId, java.util.List, Integer, String)}
208
+ * resource.
251
209
  *
252
210
  * To make the migration as seamless as possible, this resource will match macros against a generated hash or a stored
253
211
  * macroId. This will allow add ons to work during the migration period.
@@ -265,7 +223,7 @@ export class Content {
265
223
  method: 'GET',
266
224
  };
267
225
 
268
- return this.client.sendRequest(config, callback, { methodName: 'server.getMacroBodyByHash' });
226
+ return this.client.sendRequest(config, callback);
269
227
  }
270
228
 
271
229
  /**
@@ -307,35 +265,15 @@ export class Content {
307
265
  method: 'GET',
308
266
  };
309
267
 
310
- return this.client.sendRequest(config, callback, { methodName: 'server.getMacroBodyByMacroId' });
268
+ return this.client.sendRequest(config, callback);
311
269
  }
312
270
 
313
- /**
314
- * Fetch a list of content using the Confluence Query Language (CQL). See: Advanced searching using CQL
315
- *
316
- * @example
317
- * For example :
318
- *
319
- * Example request URI(s):
320
- *
321
- * - http://localhost:8080/confluence/rest/api/content/search?cql=creator=currentUser()&cqlcontext={%22spaceKey%22:%22TST%22,%22contentId%22:%2255%22}
322
- * - http://localhost:8080/confluence/rest/api/content/search?cql=space=DEV%20AND%20label=docs&expand=space,metadata.labels&limit=10
323
- */
271
+ /** Fetch a list of content using the Confluence Query Language (CQL). See: Advanced searching using CQL */
324
272
  async searchContent<T = Pagination<Models.Content>>(
325
273
  parameters: Parameters.SearchContent | undefined,
326
274
  callback: Callback<T>
327
275
  ): Promise<void>;
328
- /**
329
- * Fetch a list of content using the Confluence Query Language (CQL). See: Advanced searching using CQL
330
- *
331
- * @example
332
- * For example :
333
- *
334
- * Example request URI(s):
335
- *
336
- * - http://localhost:8080/confluence/rest/api/content/search?cql=creator=currentUser()&cqlcontext={%22spaceKey%22:%22TST%22,%22contentId%22:%2255%22}
337
- * - http://localhost:8080/confluence/rest/api/content/search?cql=space=DEV%20AND%20label=docs&expand=space,metadata.labels&limit=10
338
- */
276
+ /** Fetch a list of content using the Confluence Query Language (CQL). See: Advanced searching using CQL */
339
277
  async searchContent<T = Pagination<Models.Content>>(
340
278
  parameters?: Parameters.SearchContent,
341
279
  callback?: never
@@ -356,7 +294,7 @@ export class Content {
356
294
  },
357
295
  };
358
296
 
359
- return this.client.sendRequest(config, callback, { methodName: 'server.searchContent' });
297
+ return this.client.sendRequest(config, callback);
360
298
  }
361
299
 
362
300
  /**
@@ -368,13 +306,6 @@ export class Content {
368
306
  *
369
307
  * If no types are included in the expand parameter, the map returned will just list the child types that are
370
308
  * available to be expanded for the Content referenced by the "id" path parameter.
371
- *
372
- * @example
373
- * Example request URI(s):
374
- *
375
- * - http://example.com/rest/api/content/1234/child
376
- * - http://example.com/rest/api/content/1234/child?expand=page.body.VIEW
377
- * - http://example.com/rest/api/content/1234/child?expand=page&start=20&limit=10
378
309
  */
379
310
  async getContentChildren<T = Models.ContentChildren>(
380
311
  parameters: Parameters.GetContentChildren,
@@ -389,15 +320,11 @@ export class Content {
389
320
  *
390
321
  * If no types are included in the expand parameter, the map returned will just list the child types that are
391
322
  * available to be expanded for the Content referenced by the "id" path parameter.
392
- *
393
- * @example
394
- * Example request URI(s):
395
- *
396
- * - http://example.com/rest/api/content/1234/child
397
- * - http://example.com/rest/api/content/1234/child?expand=page.body.VIEW
398
- * - http://example.com/rest/api/content/1234/child?expand=page&start=20&limit=10
399
323
  */
400
- async getContentChildren<T = Models.ContentChildren>(parameters: Parameters.GetContentChildren, callback?: never): Promise<T>;
324
+ async getContentChildren<T = Models.ContentChildren>(
325
+ parameters: Parameters.GetContentChildren,
326
+ callback?: never
327
+ ): Promise<T>;
401
328
  async getContentChildren<T = Models.ContentChildren>(
402
329
  parameters: Parameters.GetContentChildren,
403
330
  callback?: Callback<T>,
@@ -413,21 +340,13 @@ export class Content {
413
340
  },
414
341
  };
415
342
 
416
- return this.client.sendRequest(config, callback, { methodName: 'server.getContentChildren' });
343
+ return this.client.sendRequest(config, callback);
417
344
  }
418
345
 
419
346
  /**
420
347
  * Returns the direct children of a piece of Content, limited to a single child type.
421
348
  *
422
349
  * The ContentType(s) of the children returned is specified by the "type" path parameter in the request.
423
- *
424
- * @example
425
- * Example request URI(s):
426
- *
427
- * - http://example.com/rest/api/content/1234/child/page
428
- * - http://example.com/rest/api/content/1234/child/comment
429
- * - http://example.com/rest/api/content/1234/child/page?expand=body.view
430
- * - http://example.com/rest/api/content/1234/child/comment?start=20&limit=10
431
350
  */
432
351
  async getContentChildrenByType<T = Pagination<Models.Content>>(
433
352
  parameters: Parameters.GetContentChildrenByType,
@@ -437,14 +356,6 @@ export class Content {
437
356
  * Returns the direct children of a piece of Content, limited to a single child type.
438
357
  *
439
358
  * The ContentType(s) of the children returned is specified by the "type" path parameter in the request.
440
- *
441
- * @example
442
- * Example request URI(s):
443
- *
444
- * - http://example.com/rest/api/content/1234/child/page
445
- * - http://example.com/rest/api/content/1234/child/comment
446
- * - http://example.com/rest/api/content/1234/child/page?expand=body.view
447
- * - http://example.com/rest/api/content/1234/child/comment?start=20&limit=10
448
359
  */
449
360
  async getContentChildrenByType<T = Pagination<Models.Content>>(
450
361
  parameters: Parameters.GetContentChildrenByType,
@@ -465,37 +376,15 @@ export class Content {
465
376
  },
466
377
  };
467
378
 
468
- return this.client.sendRequest(config, callback, { methodName: 'server.getContentChildrenByType' });
379
+ return this.client.sendRequest(config, callback);
469
380
  }
470
381
 
471
- /**
472
- * Returns the comments of a content
473
- *
474
- * @example
475
- * Example request URI(s):
476
- *
477
- * - http://example.com/rest/api/content/1234/child/comment
478
- * - http://example.com/rest/api/content/1234/child/comment?expand=body.view
479
- * - http://example.com/rest/api/content/1234/child/comment?start=20&limit=10
480
- * - http://example.com/rest/api/content/1234/child/comment?location=footer&location=inline&location=resolved
481
- * - http://example.com/rest/api/content/1234/child/comment?expand=extensions.inlineProperties,extensions.resolution
482
- */
382
+ /** Returns the comments of a content */
483
383
  async getContentComments<T = Pagination<Models.Content>>(
484
384
  parameters: Parameters.GetContentComments,
485
385
  callback: Callback<T>
486
386
  ): Promise<void>;
487
- /**
488
- * Returns the comments of a content
489
- *
490
- * @example
491
- * Example request URI(s):
492
- *
493
- * - http://example.com/rest/api/content/1234/child/comment
494
- * - http://example.com/rest/api/content/1234/child/comment?expand=body.view
495
- * - http://example.com/rest/api/content/1234/child/comment?start=20&limit=10
496
- * - http://example.com/rest/api/content/1234/child/comment?location=footer&location=inline&location=resolved
497
- * - http://example.com/rest/api/content/1234/child/comment?expand=extensions.inlineProperties,extensions.resolution
498
- */
387
+ /** Returns the comments of a content */
499
388
  async getContentComments<T = Pagination<Models.Content>>(
500
389
  parameters: Parameters.GetContentComments,
501
390
  callback?: never
@@ -517,31 +406,15 @@ export class Content {
517
406
  },
518
407
  };
519
408
 
520
- return this.client.sendRequest(config, callback, { methodName: 'server.getContentComments' });
409
+ return this.client.sendRequest(config, callback);
521
410
  }
522
411
 
523
- /**
524
- * Returns a paginated list of attachment Content entities within a single container.
525
- *
526
- * @example
527
- * Example request URI(s):
528
- *
529
- * - http://example.com/rest/api/content/1234/child/attachment?start=0&limit=10
530
- * - http://example.com/rest/api/content/1234/child/attachment?filename=myfile.txt&expand=version,container
531
- */
412
+ /** Returns a paginated list of attachment Content entities within a single container. */
532
413
  async getAttachments<T = Pagination<Models.Content>>(
533
414
  parameters: Parameters.GetAttachments,
534
415
  callback: Callback<T>
535
416
  ): Promise<void>;
536
- /**
537
- * Returns a paginated list of attachment Content entities within a single container.
538
- *
539
- * @example
540
- * Example request URI(s):
541
- *
542
- * - http://example.com/rest/api/content/1234/child/attachment?start=0&limit=10
543
- * - http://example.com/rest/api/content/1234/child/attachment?filename=myfile.txt&expand=version,container
544
- */
417
+ /** Returns a paginated list of attachment Content entities within a single container. */
545
418
  async getAttachments<T = Pagination<Models.Content>>(
546
419
  parameters: Parameters.GetAttachments,
547
420
  callback?: never
@@ -562,7 +435,7 @@ export class Content {
562
435
  },
563
436
  };
564
437
 
565
- return this.client.sendRequest(config, callback, { methodName: 'server.getAttachments' });
438
+ return this.client.sendRequest(config, callback);
566
439
  }
567
440
 
568
441
  /**
@@ -576,7 +449,8 @@ export class Content {
576
449
  * Components library provides a MultiPartEntity that makes it simple to submit a multipart POST.
577
450
  *
578
451
  * In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection
579
- * on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked.
452
+ * on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be
453
+ * blocked.
580
454
  *
581
455
  * The name of the multipart/form-data parameter that contains attachments must be "file"
582
456
  *
@@ -588,11 +462,6 @@ export class Content {
588
462
  * http://myhost/rest/api/content/123/child/attachment An example to attach the same file, with no comment: curl -D-
589
463
  * -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt"
590
464
  * http://myhost/rest/api/content/123/child/attachment
591
- *
592
- * @example
593
- * Example request URI(s):
594
- *
595
- * - http://example.com/rest/api/content/1234/child/attachment
596
465
  */
597
466
  async createAttachments<T = Pagination<Models.Content>>(
598
467
  parameters: Parameters.CreateAttachments,
@@ -609,7 +478,8 @@ export class Content {
609
478
  * Components library provides a MultiPartEntity that makes it simple to submit a multipart POST.
610
479
  *
611
480
  * In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection
612
- * on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked.
481
+ * on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be
482
+ * blocked.
613
483
  *
614
484
  * The name of the multipart/form-data parameter that contains attachments must be "file"
615
485
  *
@@ -621,11 +491,6 @@ export class Content {
621
491
  * http://myhost/rest/api/content/123/child/attachment An example to attach the same file, with no comment: curl -D-
622
492
  * -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt"
623
493
  * http://myhost/rest/api/content/123/child/attachment
624
- *
625
- * @example
626
- * Example request URI(s):
627
- *
628
- * - http://example.com/rest/api/content/1234/child/attachment
629
494
  */
630
495
  async createAttachments<T = Pagination<Models.Content>>(
631
496
  parameters: Parameters.CreateAttachments,
@@ -652,18 +517,13 @@ export class Content {
652
517
  },
653
518
  };
654
519
 
655
- return this.client.sendRequest(config, callback, { methodName: 'server.createAttachments' });
520
+ return this.client.sendRequest(config, callback);
656
521
  }
657
522
 
658
523
  /**
659
524
  * Update the non-binary data of an Attachment.
660
525
  *
661
526
  * This resource can be used to update an attachment's filename, media-type, comment, and parent container.
662
- *
663
- * @example
664
- * Example request URI(s):
665
- *
666
- * - http://example.com/rest/api/content/1234/child/attachment/5678
667
527
  */
668
528
  async updateAttachmentProperties<T = Models.Content>(
669
529
  parameters: Parameters.UpdateAttachmentProperties,
@@ -673,11 +533,6 @@ export class Content {
673
533
  * Update the non-binary data of an Attachment.
674
534
  *
675
535
  * This resource can be used to update an attachment's filename, media-type, comment, and parent container.
676
- *
677
- * @example
678
- * Example request URI(s):
679
- *
680
- * - http://example.com/rest/api/content/1234/child/attachment/5678
681
536
  */
682
537
  async updateAttachmentProperties<T = Models.Content>(
683
538
  parameters: Parameters.UpdateAttachmentProperties,
@@ -697,7 +552,7 @@ export class Content {
697
552
  },
698
553
  };
699
554
 
700
- return this.client.sendRequest(config, callback, { methodName: 'server.updateAttachmentProperties' });
555
+ return this.client.sendRequest(config, callback);
701
556
  }
702
557
 
703
558
  /**
@@ -713,7 +568,8 @@ export class Content {
713
568
  * Components library provides a MultiPartEntity that makes it simple to submit a multipart POST.
714
569
  *
715
570
  * In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection
716
- * on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked.
571
+ * on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be
572
+ * blocked.
717
573
  *
718
574
  * The name of the multipart/form-data parameter that contains attachments must be "file"
719
575
  *
@@ -724,11 +580,6 @@ export class Content {
724
580
  *
725
581
  * An example to upload the same file, with no comment: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token:
726
582
  * nocheck" -F "file=@myfile.txt" http://myhost/rest/api/content/123/child/attachment/456/data
727
- *
728
- * @example
729
- * Example request URI(s):
730
- *
731
- * - http://example.com/rest/api/content/1234/child/attachment/5678/data
732
583
  */
733
584
  async updateAttachmentData<T = Models.Content>(
734
585
  parameters: Parameters.UpdateAttachmentData,
@@ -747,7 +598,8 @@ export class Content {
747
598
  * Components library provides a MultiPartEntity that makes it simple to submit a multipart POST.
748
599
  *
749
600
  * In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection
750
- * on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be blocked.
601
+ * on it. This means you must submit a header of X-Atlassian-Token: nocheck with the request, otherwise it will be
602
+ * blocked.
751
603
  *
752
604
  * The name of the multipart/form-data parameter that contains attachments must be "file"
753
605
  *
@@ -758,11 +610,6 @@ export class Content {
758
610
  *
759
611
  * An example to upload the same file, with no comment: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token:
760
612
  * nocheck" -F "file=@myfile.txt" http://myhost/rest/api/content/123/child/attachment/456/data
761
- *
762
- * @example
763
- * Example request URI(s):
764
- *
765
- * - http://example.com/rest/api/content/1234/child/attachment/5678/data
766
613
  */
767
614
  async updateAttachmentData<T = Models.Content>(
768
615
  parameters: Parameters.UpdateAttachmentData,
@@ -786,7 +633,7 @@ export class Content {
786
633
  },
787
634
  };
788
635
 
789
- return this.client.sendRequest(config, callback, { methodName: 'server.updateAttachmentData' });
636
+ return this.client.sendRequest(config, callback);
790
637
  }
791
638
 
792
639
  /**
@@ -800,13 +647,6 @@ export class Content {
800
647
  * available to be expanded for the Content referenced by the "id" path parameter.
801
648
  *
802
649
  * Currently the only supported descendants are comment descendants of non-comment Content.
803
- *
804
- * @example
805
- * Example request URI(s):
806
- *
807
- * - http://example.com/rest/api/content/1234/descendant
808
- * - http://example.com/rest/api/content/1234/descendant?expand=comment.body.VIEW
809
- * - http://example.com/rest/api/content/1234/descendant?expand=comment
810
650
  */
811
651
  async getContentDescendants<T = Models.ContentChildren>(
812
652
  parameters: Parameters.GetContentDescendants,
@@ -823,13 +663,6 @@ export class Content {
823
663
  * available to be expanded for the Content referenced by the "id" path parameter.
824
664
  *
825
665
  * Currently the only supported descendants are comment descendants of non-comment Content.
826
- *
827
- * @example
828
- * Example request URI(s):
829
- *
830
- * - http://example.com/rest/api/content/1234/descendant
831
- * - http://example.com/rest/api/content/1234/descendant?expand=comment.body.VIEW
832
- * - http://example.com/rest/api/content/1234/descendant?expand=comment
833
666
  */
834
667
  async getContentDescendants<T = Models.ContentChildren>(
835
668
  parameters: Parameters.GetContentDescendants,
@@ -847,7 +680,7 @@ export class Content {
847
680
  },
848
681
  };
849
682
 
850
- return this.client.sendRequest(config, callback, { methodName: 'server.getContentDescendants' });
683
+ return this.client.sendRequest(config, callback);
851
684
  }
852
685
 
853
686
  /**
@@ -856,13 +689,6 @@ export class Content {
856
689
  * The ContentType(s) of the descendants returned is specified by the "type" path parameter in the request.
857
690
  *
858
691
  * Currently the only supported descendants are comment descendants of non-comment Content.
859
- *
860
- * @example
861
- * Example request URI(s):
862
- *
863
- * - http://example.com/rest/api/content/1234/descendant/comment
864
- * - http://example.com/rest/api/content/1234/descendant/comment?expand=body.VIEW
865
- * - http://example.com/rest/api/content/1234/descendant/comment?start=20&limit=10
866
692
  */
867
693
  async getContentDescendantsOfType<T = Pagination<Models.Content>>(
868
694
  parameters: Parameters.GetContentDescendantsOfType,
@@ -874,13 +700,6 @@ export class Content {
874
700
  * The ContentType(s) of the descendants returned is specified by the "type" path parameter in the request.
875
701
  *
876
702
  * Currently the only supported descendants are comment descendants of non-comment Content.
877
- *
878
- * @example
879
- * Example request URI(s):
880
- *
881
- * - http://example.com/rest/api/content/1234/descendant/comment
882
- * - http://example.com/rest/api/content/1234/descendant/comment?expand=body.VIEW
883
- * - http://example.com/rest/api/content/1234/descendant/comment?start=20&limit=10
884
703
  */
885
704
  async getContentDescendantsOfType<T = Pagination<Models.Content>>(
886
705
  parameters: Parameters.GetContentDescendantsOfType,
@@ -900,31 +719,15 @@ export class Content {
900
719
  },
901
720
  };
902
721
 
903
- return this.client.sendRequest(config, callback, { methodName: 'server.getContentDescendantsOfType' });
722
+ return this.client.sendRequest(config, callback);
904
723
  }
905
724
 
906
- /**
907
- * Returns the list of labels on a piece of Content.
908
- *
909
- * @example
910
- * Example request URI(s):
911
- *
912
- * - http://example.com/rest/api/content/1234/label
913
- * - http://example.com/rest/api/content/1234/label?prefix=global&start=0&limit=200
914
- */
725
+ /** Returns the list of labels on a piece of Content. */
915
726
  async getContentLabels<T = Pagination<Models.Label>>(
916
727
  parameters: Parameters.GetContentLabels,
917
728
  callback: Callback<T>
918
729
  ): Promise<void>;
919
- /**
920
- * Returns the list of labels on a piece of Content.
921
- *
922
- * @example
923
- * Example request URI(s):
924
- *
925
- * - http://example.com/rest/api/content/1234/label
926
- * - http://example.com/rest/api/content/1234/label?prefix=global&start=0&limit=200
927
- */
730
+ /** Returns the list of labels on a piece of Content. */
928
731
  async getContentLabels<T = Pagination<Models.Label>>(
929
732
  parameters: Parameters.GetContentLabels,
930
733
  callback?: never
@@ -943,7 +746,7 @@ export class Content {
943
746
  },
944
747
  };
945
748
 
946
- return this.client.sendRequest(config, callback, { methodName: 'server.getContentLabels' });
749
+ return this.client.sendRequest(config, callback);
947
750
  }
948
751
 
949
752
  /** Adds a list of labels to the specified content. The body is the json representation of the list. */
@@ -966,7 +769,7 @@ export class Content {
966
769
  data: parameters.labels,
967
770
  };
968
771
 
969
- return this.client.sendRequest(config, callback, { methodName: 'server.addLabelsToContent' });
772
+ return this.client.sendRequest(config, callback);
970
773
  }
971
774
 
972
775
  /** Deletes a labels to the specified content. */
@@ -991,7 +794,7 @@ export class Content {
991
794
  },
992
795
  };
993
796
 
994
- return this.client.sendRequest(config, callback, { methodName: 'server.deleteLabelWithQueryParam' });
797
+ return this.client.sendRequest(config, callback);
995
798
  }
996
799
 
997
800
  /**
@@ -1012,29 +815,15 @@ export class Content {
1012
815
  method: 'DELETE',
1013
816
  };
1014
817
 
1015
- return this.client.sendRequest(config, callback, { methodName: 'server.deleteLabel' });
818
+ return this.client.sendRequest(config, callback);
1016
819
  }
1017
820
 
1018
- /**
1019
- * Returns a paginated list of content properties.
1020
- *
1021
- * @example
1022
- * Example request URI:
1023
- *
1024
- * - http://example.com/rest/api/content/1234/property?expand=content,version
1025
- */
821
+ /** Returns a paginated list of content properties. */
1026
822
  async getContentProperties<T = Pagination<Models.ContentProperty>>(
1027
823
  parameters: Parameters.GetContentProperties,
1028
824
  callback: Callback<T>
1029
825
  ): Promise<void>;
1030
- /**
1031
- * Returns a paginated list of content properties.
1032
- *
1033
- * @example
1034
- * Example request URI:
1035
- *
1036
- * - http://example.com/rest/api/content/1234/property?expand=content,version
1037
- */
826
+ /** Returns a paginated list of content properties. */
1038
827
  async getContentProperties<T = Pagination<Models.ContentProperty>>(
1039
828
  parameters: Parameters.GetContentProperties,
1040
829
  callback?: never
@@ -1053,7 +842,7 @@ export class Content {
1053
842
  },
1054
843
  };
1055
844
 
1056
- return this.client.sendRequest(config, callback, { methodName: 'server.getContentProperties' });
845
+ return this.client.sendRequest(config, callback);
1057
846
  }
1058
847
 
1059
848
  /** Creates a new content property. */
@@ -1079,29 +868,15 @@ export class Content {
1079
868
  },
1080
869
  };
1081
870
 
1082
- return this.client.sendRequest(config, callback, { methodName: 'server.createContentProperty' });
871
+ return this.client.sendRequest(config, callback);
1083
872
  }
1084
873
 
1085
- /**
1086
- * Returns a content property.
1087
- *
1088
- * @example
1089
- * Example request URI:
1090
- *
1091
- * - http://example.com/rest/api/content/1234/property/example-property-key?expand=content,version
1092
- */
874
+ /** Returns a content property. */
1093
875
  async getContentProperty<T = Models.ContentProperty>(
1094
876
  parameters: Parameters.GetContentProperty,
1095
877
  callback: Callback<T>
1096
878
  ): Promise<void>;
1097
- /**
1098
- * Returns a content property.
1099
- *
1100
- * @example
1101
- * Example request URI:
1102
- *
1103
- * - http://example.com/rest/api/content/1234/property/example-property-key?expand=content,version
1104
- */
879
+ /** Returns a content property. */
1105
880
  async getContentProperty<T = Models.ContentProperty>(
1106
881
  parameters: Parameters.GetContentProperty,
1107
882
  callback?: never
@@ -1118,7 +893,7 @@ export class Content {
1118
893
  },
1119
894
  };
1120
895
 
1121
- return this.client.sendRequest(config, callback, { methodName: 'server.getContentProperty' });
896
+ return this.client.sendRequest(config, callback);
1122
897
  }
1123
898
 
1124
899
  /** Creates a new content property. */
@@ -1143,7 +918,7 @@ export class Content {
1143
918
  },
1144
919
  };
1145
920
 
1146
- return this.client.sendRequest(config, callback, { methodName: 'server.createContentPropertyForKey' });
921
+ return this.client.sendRequest(config, callback);
1147
922
  }
1148
923
 
1149
924
  /**
@@ -1181,7 +956,7 @@ export class Content {
1181
956
  },
1182
957
  };
1183
958
 
1184
- return this.client.sendRequest(config, callback, { methodName: 'server.updateContentProperty' });
959
+ return this.client.sendRequest(config, callback);
1185
960
  }
1186
961
 
1187
962
  /** Deletes a content property. */
@@ -1200,7 +975,7 @@ export class Content {
1200
975
  method: 'DELETE',
1201
976
  };
1202
977
 
1203
- return this.client.sendRequest(config, callback, { methodName: 'server.deleteContentProperty' });
978
+ return this.client.sendRequest(config, callback);
1204
979
  }
1205
980
 
1206
981
  /** Returns info about all restrictions by operation */
@@ -1225,7 +1000,7 @@ export class Content {
1225
1000
  },
1226
1001
  };
1227
1002
 
1228
- return this.client.sendRequest(config, callback, { methodName: 'server.getRestrictionsByOperation' });
1003
+ return this.client.sendRequest(config, callback);
1229
1004
  }
1230
1005
 
1231
1006
  /** Returns info about all restrictions of given operation */
@@ -1252,7 +1027,7 @@ export class Content {
1252
1027
  },
1253
1028
  };
1254
1029
 
1255
- return this.client.sendRequest(config, callback, { methodName: 'server.getRestrictionsForOperation' });
1030
+ return this.client.sendRequest(config, callback);
1256
1031
  }
1257
1032
 
1258
1033
  /** Publishes a legacy draft of a Content created from a ContentBlueprint */
@@ -1275,7 +1050,7 @@ export class Content {
1275
1050
  },
1276
1051
  };
1277
1052
 
1278
- return this.client.sendRequest(config, callback, { methodName: 'server.publishLegacyDraft' });
1053
+ return this.client.sendRequest(config, callback);
1279
1054
  }
1280
1055
 
1281
1056
  /** Publishes a shared draft of a Content created from a ContentBlueprint */
@@ -1298,6 +1073,6 @@ export class Content {
1298
1073
  },
1299
1074
  };
1300
1075
 
1301
- return this.client.sendRequest(config, callback, { methodName: 'server.publishSharedDraft' });
1076
+ return this.client.sendRequest(config, callback);
1302
1077
  }
1303
1078
  }