confluence.js 1.2.0 → 1.3.1

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 (109) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +0 -57
  3. package/out/api/audit.js +6 -6
  4. package/out/api/content.js +11 -10
  5. package/out/api/contentAttachments.d.ts +2 -2
  6. package/out/api/contentAttachments.js +7 -6
  7. package/out/api/contentBody.js +1 -1
  8. package/out/api/contentChildrenAndDescendants.js +7 -7
  9. package/out/api/contentComments.js +1 -1
  10. package/out/api/contentLabels.js +4 -4
  11. package/out/api/contentMacroBody.js +1 -1
  12. package/out/api/contentPermissions.js +1 -1
  13. package/out/api/contentProperties.js +7 -6
  14. package/out/api/contentRestrictions.js +15 -15
  15. package/out/api/contentVersions.js +4 -4
  16. package/out/api/contentWatches.js +12 -12
  17. package/out/api/dynamicModules.js +3 -3
  18. package/out/api/experimental.d.ts +36 -0
  19. package/out/api/experimental.js +38 -2
  20. package/out/api/group.js +15 -15
  21. package/out/api/inlineTasks.js +3 -3
  22. package/out/api/labelInfo.js +1 -1
  23. package/out/api/longRunningTask.js +2 -2
  24. package/out/api/parameters/addLabelsToSpace.d.ts +4 -0
  25. package/out/api/parameters/addLabelsToSpace.js +2 -0
  26. package/out/api/parameters/deleteLabelFromSpace.d.ts +8 -0
  27. package/out/api/parameters/deleteLabelFromSpace.js +2 -0
  28. package/out/api/parameters/getBulkUserLookup.d.ts +0 -6
  29. package/out/api/parameters/getContentById.d.ts +85 -1
  30. package/out/api/parameters/getContentById.js +87 -0
  31. package/out/api/parameters/getContentChildren.d.ts +1 -0
  32. package/out/api/parameters/getContentProperties.d.ts +1 -1
  33. package/out/api/parameters/getContentProperty.d.ts +12 -0
  34. package/out/api/parameters/getContentVersions.d.ts +1 -1
  35. package/out/api/parameters/getCurrentUser.d.ts +1 -6
  36. package/out/api/parameters/getHistoryForContent.d.ts +1 -1
  37. package/out/api/parameters/getLabelsForSpace.d.ts +18 -0
  38. package/out/api/parameters/getLabelsForSpace.js +2 -0
  39. package/out/api/parameters/index.d.ts +3 -0
  40. package/out/api/parameters/index.js +3 -0
  41. package/out/api/parameters/restoreContentVersion.d.ts +1 -1
  42. package/out/api/parameters/searchUser.d.ts +7 -0
  43. package/out/api/relation.js +5 -5
  44. package/out/api/search.d.ts +2 -2
  45. package/out/api/search.js +3 -2
  46. package/out/api/settings.js +6 -6
  47. package/out/api/space.js +9 -9
  48. package/out/api/spacePermissions.js +3 -3
  49. package/out/api/spaceProperties.js +6 -6
  50. package/out/api/spaceSettings.js +2 -2
  51. package/out/api/template.d.ts +24 -16
  52. package/out/api/template.js +6 -6
  53. package/out/api/themes.js +6 -6
  54. package/out/api/users.js +8 -8
  55. package/out/clients/baseClient.d.ts +2 -5
  56. package/out/clients/baseClient.js +10 -32
  57. package/out/clients/client.d.ts +2 -3
  58. package/out/config.d.ts +3 -2
  59. package/out/index.d.ts +1 -0
  60. package/out/index.js +2 -1
  61. package/package.json +24 -24
  62. package/src/api/audit.ts +6 -6
  63. package/src/api/content.ts +11 -10
  64. package/src/api/contentAttachments.ts +10 -9
  65. package/src/api/contentBody.ts +1 -1
  66. package/src/api/contentChildrenAndDescendants.ts +7 -7
  67. package/src/api/contentComments.ts +1 -1
  68. package/src/api/contentLabels.ts +4 -4
  69. package/src/api/contentMacroBody.ts +1 -1
  70. package/src/api/contentPermissions.ts +1 -1
  71. package/src/api/contentProperties.ts +7 -6
  72. package/src/api/contentRestrictions.ts +15 -15
  73. package/src/api/contentVersions.ts +4 -4
  74. package/src/api/contentWatches.ts +12 -12
  75. package/src/api/dynamicModules.ts +3 -3
  76. package/src/api/experimental.ts +95 -2
  77. package/src/api/group.ts +16 -15
  78. package/src/api/inlineTasks.ts +3 -3
  79. package/src/api/labelInfo.ts +1 -1
  80. package/src/api/longRunningTask.ts +2 -2
  81. package/src/api/parameters/addLabelsToSpace.ts +4 -0
  82. package/src/api/parameters/deleteLabelFromSpace.ts +8 -0
  83. package/src/api/parameters/getBulkUserLookup.ts +0 -6
  84. package/src/api/parameters/getContentById.ts +86 -1
  85. package/src/api/parameters/getContentChildren.ts +1 -0
  86. package/src/api/parameters/getContentProperties.ts +1 -1
  87. package/src/api/parameters/getContentProperty.ts +12 -0
  88. package/src/api/parameters/getContentVersions.ts +1 -1
  89. package/src/api/parameters/getCurrentUser.ts +1 -6
  90. package/src/api/parameters/getHistoryForContent.ts +1 -1
  91. package/src/api/parameters/getLabelsForSpace.ts +18 -0
  92. package/src/api/parameters/index.ts +3 -0
  93. package/src/api/parameters/restoreContentVersion.ts +1 -1
  94. package/src/api/parameters/searchUser.ts +7 -0
  95. package/src/api/relation.ts +5 -5
  96. package/src/api/search.ts +6 -4
  97. package/src/api/settings.ts +6 -6
  98. package/src/api/space.ts +9 -9
  99. package/src/api/spacePermissions.ts +3 -3
  100. package/src/api/spaceProperties.ts +6 -6
  101. package/src/api/spaceSettings.ts +2 -2
  102. package/src/api/template.ts +30 -22
  103. package/src/api/themes.ts +6 -6
  104. package/src/api/users.ts +8 -8
  105. package/src/clients/baseClient.ts +10 -62
  106. package/src/clients/client.ts +2 -3
  107. package/src/config.ts +3 -2
  108. package/src/index.ts +1 -0
  109. package/tsconfig.json +2 -1
@@ -43,6 +43,6 @@ export class ContentComments {
43
43
  },
44
44
  };
45
45
 
46
- return this.client.sendRequest(config, callback, { methodName: 'getContentComments' });
46
+ return this.client.sendRequest(config, callback);
47
47
  }
48
48
  }
@@ -41,7 +41,7 @@ export class ContentLabels {
41
41
  },
42
42
  };
43
43
 
44
- return this.client.sendRequest(config, callback, { methodName: 'getLabelsForContent' });
44
+ return this.client.sendRequest(config, callback);
45
45
  }
46
46
 
47
47
  /**
@@ -87,7 +87,7 @@ export class ContentLabels {
87
87
  data: parameters.body,
88
88
  };
89
89
 
90
- return this.client.sendRequest(config, callback, { methodName: 'addLabelsToContent' });
90
+ return this.client.sendRequest(config, callback);
91
91
  }
92
92
 
93
93
  /**
@@ -128,7 +128,7 @@ export class ContentLabels {
128
128
  },
129
129
  };
130
130
 
131
- return this.client.sendRequest(config, callback, { methodName: 'removeLabelFromContentUsingQueryParameter' });
131
+ return this.client.sendRequest(config, callback);
132
132
  }
133
133
 
134
134
  /**
@@ -165,6 +165,6 @@ export class ContentLabels {
165
165
  method: 'DELETE',
166
166
  };
167
167
 
168
- return this.client.sendRequest(config, callback, { methodName: 'removeLabelFromContent' });
168
+ return this.client.sendRequest(config, callback);
169
169
  }
170
170
  }
@@ -54,6 +54,6 @@ export class ContentMacroBody {
54
54
  method: 'GET',
55
55
  };
56
56
 
57
- return this.client.sendRequest(config, callback, { methodName: 'getMacroBodyByMacroId' });
57
+ return this.client.sendRequest(config, callback);
58
58
  }
59
59
  }
@@ -73,6 +73,6 @@ export class ContentPermissions {
73
73
  },
74
74
  };
75
75
 
76
- return this.client.sendRequest(config, callback, { methodName: 'checkContentPermission' });
76
+ return this.client.sendRequest(config, callback);
77
77
  }
78
78
  }
@@ -44,7 +44,7 @@ export class ContentProperties {
44
44
  },
45
45
  };
46
46
 
47
- return this.client.sendRequest(config, callback, { methodName: 'getContentProperties' });
47
+ return this.client.sendRequest(config, callback);
48
48
  }
49
49
 
50
50
  /**
@@ -92,7 +92,7 @@ export class ContentProperties {
92
92
  },
93
93
  };
94
94
 
95
- return this.client.sendRequest(config, callback, { methodName: 'createContentProperty' });
95
+ return this.client.sendRequest(config, callback);
96
96
  }
97
97
 
98
98
  /**
@@ -126,10 +126,11 @@ export class ContentProperties {
126
126
  method: 'GET',
127
127
  params: {
128
128
  expand: parameters.expand,
129
+ status: parameters.status,
129
130
  },
130
131
  };
131
132
 
132
- return this.client.sendRequest(config, callback, { methodName: 'getContentProperty' });
133
+ return this.client.sendRequest(config, callback);
133
134
  }
134
135
 
135
136
  /**
@@ -176,7 +177,7 @@ export class ContentProperties {
176
177
  },
177
178
  };
178
179
 
179
- return this.client.sendRequest(config, callback, { methodName: 'createContentPropertyForKey' });
180
+ return this.client.sendRequest(config, callback);
180
181
  }
181
182
 
182
183
  /**
@@ -214,7 +215,7 @@ export class ContentProperties {
214
215
  },
215
216
  };
216
217
 
217
- return this.client.sendRequest(config, callback, { methodName: 'updateContentProperty' });
218
+ return this.client.sendRequest(config, callback);
218
219
  }
219
220
 
220
221
  /**
@@ -243,6 +244,6 @@ export class ContentProperties {
243
244
  method: 'DELETE',
244
245
  };
245
246
 
246
- return this.client.sendRequest(config, callback, { methodName: 'deleteContentProperty' });
247
+ return this.client.sendRequest(config, callback);
247
248
  }
248
249
  }
@@ -39,7 +39,7 @@ export class ContentRestrictions {
39
39
  },
40
40
  };
41
41
 
42
- return this.client.sendRequest(config, callback, { methodName: 'getRestrictions' });
42
+ return this.client.sendRequest(config, callback);
43
43
  }
44
44
 
45
45
  /**
@@ -73,7 +73,7 @@ export class ContentRestrictions {
73
73
  data: parameters.body,
74
74
  };
75
75
 
76
- return this.client.sendRequest(config, callback, { methodName: 'addRestrictions' });
76
+ return this.client.sendRequest(config, callback);
77
77
  }
78
78
 
79
79
  /**
@@ -109,7 +109,7 @@ export class ContentRestrictions {
109
109
  data: parameters.body,
110
110
  };
111
111
 
112
- return this.client.sendRequest(config, callback, { methodName: 'updateRestrictions' });
112
+ return this.client.sendRequest(config, callback);
113
113
  }
114
114
 
115
115
  /**
@@ -142,7 +142,7 @@ export class ContentRestrictions {
142
142
  },
143
143
  };
144
144
 
145
- return this.client.sendRequest(config, callback, { methodName: 'deleteRestrictions' });
145
+ return this.client.sendRequest(config, callback);
146
146
  }
147
147
 
148
148
  /**
@@ -179,7 +179,7 @@ export class ContentRestrictions {
179
179
  },
180
180
  };
181
181
 
182
- return this.client.sendRequest(config, callback, { methodName: 'getRestrictionsByOperation' });
182
+ return this.client.sendRequest(config, callback);
183
183
  }
184
184
 
185
185
  /**
@@ -214,7 +214,7 @@ export class ContentRestrictions {
214
214
  },
215
215
  };
216
216
 
217
- return this.client.sendRequest(config, callback, { methodName: 'getRestrictionsForOperation' });
217
+ return this.client.sendRequest(config, callback);
218
218
  }
219
219
 
220
220
  /**
@@ -258,7 +258,7 @@ export class ContentRestrictions {
258
258
  method: 'GET',
259
259
  };
260
260
 
261
- return this.client.sendRequest(config, callback, { methodName: 'getContentRestrictionStatusForGroup' });
261
+ return this.client.sendRequest(config, callback);
262
262
  }
263
263
 
264
264
  /**
@@ -288,7 +288,7 @@ export class ContentRestrictions {
288
288
  method: 'PUT',
289
289
  };
290
290
 
291
- return this.client.sendRequest(config, callback, { methodName: 'addGroupToContentRestriction' });
291
+ return this.client.sendRequest(config, callback);
292
292
  }
293
293
 
294
294
  /**
@@ -312,7 +312,7 @@ export class ContentRestrictions {
312
312
  method: 'DELETE',
313
313
  };
314
314
 
315
- return this.client.sendRequest(config, callback, { methodName: 'removeGroupByName' });
315
+ return this.client.sendRequest(config, callback);
316
316
  }
317
317
 
318
318
  /**
@@ -356,7 +356,7 @@ export class ContentRestrictions {
356
356
  method: 'GET',
357
357
  };
358
358
 
359
- return this.client.sendRequest(config, callback, { methodName: 'getIndividualGroupRestrictionStatusByGroupId' });
359
+ return this.client.sendRequest(config, callback);
360
360
  }
361
361
 
362
362
  /**
@@ -388,7 +388,7 @@ export class ContentRestrictions {
388
388
  method: 'PUT',
389
389
  };
390
390
 
391
- return this.client.sendRequest(config, callback, { methodName: 'addGroupToContentRestrictionByGroupId' });
391
+ return this.client.sendRequest(config, callback);
392
392
  }
393
393
 
394
394
  /**
@@ -412,7 +412,7 @@ export class ContentRestrictions {
412
412
  method: 'DELETE',
413
413
  };
414
414
 
415
- return this.client.sendRequest(config, callback, { methodName: 'removeGroupById' });
415
+ return this.client.sendRequest(config, callback);
416
416
  }
417
417
 
418
418
  /**
@@ -463,7 +463,7 @@ export class ContentRestrictions {
463
463
  },
464
464
  };
465
465
 
466
- return this.client.sendRequest(config, callback, { methodName: 'getContentRestrictionStatusForUser' });
466
+ return this.client.sendRequest(config, callback);
467
467
  }
468
468
 
469
469
  /**
@@ -498,7 +498,7 @@ export class ContentRestrictions {
498
498
  },
499
499
  };
500
500
 
501
- return this.client.sendRequest(config, callback, { methodName: 'addUserToContentRestriction' });
501
+ return this.client.sendRequest(config, callback);
502
502
  }
503
503
 
504
504
  /**
@@ -533,6 +533,6 @@ export class ContentRestrictions {
533
533
  },
534
534
  };
535
535
 
536
- return this.client.sendRequest(config, callback, { methodName: 'removeUserFromContentRestriction' });
536
+ return this.client.sendRequest(config, callback);
537
537
  }
538
538
  }
@@ -41,7 +41,7 @@ export class ContentVersions {
41
41
  },
42
42
  };
43
43
 
44
- return this.client.sendRequest(config, callback, { methodName: 'getContentVersions' });
44
+ return this.client.sendRequest(config, callback);
45
45
  }
46
46
 
47
47
  /**
@@ -80,7 +80,7 @@ export class ContentVersions {
80
80
  },
81
81
  };
82
82
 
83
- return this.client.sendRequest(config, callback, { methodName: 'restoreContentVersion' });
83
+ return this.client.sendRequest(config, callback);
84
84
  }
85
85
 
86
86
  /**
@@ -112,7 +112,7 @@ export class ContentVersions {
112
112
  },
113
113
  };
114
114
 
115
- return this.client.sendRequest(config, callback, { methodName: 'getContentVersion' });
115
+ return this.client.sendRequest(config, callback);
116
116
  }
117
117
 
118
118
  /**
@@ -141,6 +141,6 @@ export class ContentVersions {
141
141
  method: 'DELETE',
142
142
  };
143
143
 
144
- return this.client.sendRequest(config, callback, { methodName: 'deleteContentVersion' });
144
+ return this.client.sendRequest(config, callback);
145
145
  }
146
146
  }
@@ -52,7 +52,7 @@ export class ContentWatches {
52
52
  },
53
53
  };
54
54
 
55
- return this.client.sendRequest(config, callback, { methodName: 'getWatchesForPage' });
55
+ return this.client.sendRequest(config, callback);
56
56
  }
57
57
 
58
58
  /**
@@ -102,7 +102,7 @@ export class ContentWatches {
102
102
  },
103
103
  };
104
104
 
105
- return this.client.sendRequest(config, callback, { methodName: 'getWatchesForSpace' });
105
+ return this.client.sendRequest(config, callback);
106
106
  }
107
107
 
108
108
  /** Returns a list of watchers of a space */
@@ -128,7 +128,7 @@ export class ContentWatches {
128
128
  },
129
129
  };
130
130
 
131
- return this.client.sendRequest(config, callback, { methodName: 'getWatchersForSpace' });
131
+ return this.client.sendRequest(config, callback);
132
132
  }
133
133
 
134
134
  /**
@@ -171,7 +171,7 @@ export class ContentWatches {
171
171
  },
172
172
  };
173
173
 
174
- return this.client.sendRequest(config, callback, { methodName: 'getContentWatchStatus' });
174
+ return this.client.sendRequest(config, callback);
175
175
  }
176
176
 
177
177
  /**
@@ -212,7 +212,7 @@ export class ContentWatches {
212
212
  },
213
213
  };
214
214
 
215
- return this.client.sendRequest(config, callback, { methodName: 'addContentWatcher' });
215
+ return this.client.sendRequest(config, callback);
216
216
  }
217
217
 
218
218
  /**
@@ -255,7 +255,7 @@ export class ContentWatches {
255
255
  },
256
256
  };
257
257
 
258
- return this.client.sendRequest(config, callback, { methodName: 'removeContentWatcher' });
258
+ return this.client.sendRequest(config, callback);
259
259
  }
260
260
 
261
261
  /**
@@ -295,7 +295,7 @@ export class ContentWatches {
295
295
  },
296
296
  };
297
297
 
298
- return this.client.sendRequest(config, callback, { methodName: 'isWatchingLabel' });
298
+ return this.client.sendRequest(config, callback);
299
299
  }
300
300
 
301
301
  /**
@@ -336,7 +336,7 @@ export class ContentWatches {
336
336
  },
337
337
  };
338
338
 
339
- return this.client.sendRequest(config, callback, { methodName: 'addLabelWatcher' });
339
+ return this.client.sendRequest(config, callback);
340
340
  }
341
341
 
342
342
  /**
@@ -373,7 +373,7 @@ export class ContentWatches {
373
373
  },
374
374
  };
375
375
 
376
- return this.client.sendRequest(config, callback, { methodName: 'removeLabelWatcher' });
376
+ return this.client.sendRequest(config, callback);
377
377
  }
378
378
 
379
379
  /**
@@ -413,7 +413,7 @@ export class ContentWatches {
413
413
  },
414
414
  };
415
415
 
416
- return this.client.sendRequest(config, callback, { methodName: 'isWatchingSpace' });
416
+ return this.client.sendRequest(config, callback);
417
417
  }
418
418
 
419
419
  /**
@@ -454,7 +454,7 @@ export class ContentWatches {
454
454
  },
455
455
  };
456
456
 
457
- return this.client.sendRequest(config, callback, { methodName: 'addSpaceWatcher' });
457
+ return this.client.sendRequest(config, callback);
458
458
  }
459
459
 
460
460
  /**
@@ -488,6 +488,6 @@ export class ContentWatches {
488
488
  },
489
489
  };
490
490
 
491
- return this.client.sendRequest(config, callback, { methodName: 'removeSpaceWatch' });
491
+ return this.client.sendRequest(config, callback);
492
492
  }
493
493
  }
@@ -24,7 +24,7 @@ export class DynamicModules {
24
24
  method: 'GET',
25
25
  };
26
26
 
27
- return this.client.sendRequest(config, callback, { methodName: 'getModules' });
27
+ return this.client.sendRequest(config, callback);
28
28
  }
29
29
 
30
30
  /**
@@ -53,7 +53,7 @@ export class DynamicModules {
53
53
  method: 'POST',
54
54
  };
55
55
 
56
- return this.client.sendRequest(config, callback, { methodName: 'registerModules' });
56
+ return this.client.sendRequest(config, callback);
57
57
  }
58
58
 
59
59
  /**
@@ -77,6 +77,6 @@ export class DynamicModules {
77
77
  },
78
78
  };
79
79
 
80
- return this.client.sendRequest(config, callback, { methodName: 'removeModules' });
80
+ return this.client.sendRequest(config, callback);
81
81
  }
82
82
  }
@@ -7,6 +7,99 @@ import { RequestConfig } from '../requestConfig';
7
7
  export class Experimental {
8
8
  constructor(private client: Client) {}
9
9
 
10
+ /**
11
+ * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different
12
+ * types of labels.
13
+ */
14
+ async getLabelsForSpace<T = Models.LabelArray>(
15
+ parameters: Parameters.GetLabelsForSpace,
16
+ callback: Callback<T>
17
+ ): Promise<void>;
18
+ /**
19
+ * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different
20
+ * types of labels.
21
+ */
22
+ async getLabelsForSpace<T = Models.LabelArray>(
23
+ parameters: Parameters.GetLabelsForSpace,
24
+ callback?: never
25
+ ): Promise<T>;
26
+ async getLabelsForSpace<T = Models.LabelArray>(
27
+ parameters: Parameters.GetLabelsForSpace,
28
+ callback?: Callback<T>,
29
+ ): Promise<void | T> {
30
+ const config: RequestConfig = {
31
+ url: `/api/space/${parameters.spaceKey}/label`,
32
+ method: 'GET',
33
+ params: {
34
+ prefix: parameters.prefix,
35
+ start: parameters.start,
36
+ limit: parameters.limit,
37
+ },
38
+ };
39
+
40
+ return this.client.sendRequest(config, callback);
41
+ }
42
+
43
+ /**
44
+ * Adds labels to a piece of content. Does not modify the existing labels.
45
+ *
46
+ * Notes:
47
+ *
48
+ * - Labels can also be added when creating content ([Create content](#api-content-post)).
49
+ * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing
50
+ * labels and replace them with the labels in the request.
51
+ *
52
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
53
+ */
54
+ async addLabelsToSpace<T = Models.LabelArray>(
55
+ parameters: Parameters.AddLabelsToSpace,
56
+ callback: Callback<T>
57
+ ): Promise<void>;
58
+ /**
59
+ * Adds labels to a piece of content. Does not modify the existing labels.
60
+ *
61
+ * Notes:
62
+ *
63
+ * - Labels can also be added when creating content ([Create content](#api-content-post)).
64
+ * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing
65
+ * labels and replace them with the labels in the request.
66
+ *
67
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
68
+ */
69
+ async addLabelsToSpace<T = Models.LabelArray>(parameters: Parameters.AddLabelsToSpace, callback?: never): Promise<T>;
70
+ async addLabelsToSpace<T = Models.LabelArray>(
71
+ parameters: Parameters.AddLabelsToSpace,
72
+ callback?: Callback<T>,
73
+ ): Promise<void | T> {
74
+ const config: RequestConfig = {
75
+ url: `/api/space/${parameters.spaceKey}/label`,
76
+ method: 'POST',
77
+ };
78
+
79
+ return this.client.sendRequest(config, callback);
80
+ }
81
+
82
+ async deleteLabelFromSpace<T = void>(
83
+ parameters: Parameters.DeleteLabelFromSpace,
84
+ callback: Callback<T>
85
+ ): Promise<void>;
86
+ async deleteLabelFromSpace<T = void>(parameters: Parameters.DeleteLabelFromSpace, callback?: never): Promise<T>;
87
+ async deleteLabelFromSpace<T = void>(
88
+ parameters: Parameters.DeleteLabelFromSpace,
89
+ callback?: Callback<T>,
90
+ ): Promise<void | T> {
91
+ const config: RequestConfig = {
92
+ url: `/api/space/${parameters.spaceKey}/label`,
93
+ method: 'DELETE',
94
+ params: {
95
+ name: parameters.name,
96
+ prefix: parameters.prefix,
97
+ },
98
+ };
99
+
100
+ return this.client.sendRequest(config, callback);
101
+ }
102
+
10
103
  /** Get the total number of views a piece of content has. */
11
104
  async getViews<T = Models.GetViews>(parameters: Parameters.GetViews, callback: Callback<T>): Promise<void>;
12
105
  /** Get the total number of views a piece of content has. */
@@ -20,7 +113,7 @@ export class Experimental {
20
113
  },
21
114
  };
22
115
 
23
- return this.client.sendRequest(config, callback, { methodName: 'getViews' });
116
+ return this.client.sendRequest(config, callback);
24
117
  }
25
118
 
26
119
  /** Get the total number of distinct viewers a piece of content has. */
@@ -39,6 +132,6 @@ export class Experimental {
39
132
  },
40
133
  };
41
134
 
42
- return this.client.sendRequest(config, callback, { methodName: 'getViewers' });
135
+ return this.client.sendRequest(config, callback);
43
136
  }
44
137
  }
package/src/api/group.ts CHANGED
@@ -38,7 +38,7 @@ export class Group {
38
38
  },
39
39
  };
40
40
 
41
- return this.client.sendRequest(config, callback, { methodName: 'getGroups' });
41
+ return this.client.sendRequest(config, callback);
42
42
  }
43
43
 
44
44
  /**
@@ -65,7 +65,7 @@ export class Group {
65
65
  },
66
66
  };
67
67
 
68
- return this.client.sendRequest(config, callback, { methodName: 'createGroup' });
68
+ return this.client.sendRequest(config, callback);
69
69
  }
70
70
 
71
71
  /**
@@ -89,7 +89,7 @@ export class Group {
89
89
  },
90
90
  };
91
91
 
92
- return this.client.sendRequest(config, callback, { methodName: 'removeGroup' });
92
+ return this.client.sendRequest(config, callback);
93
93
  }
94
94
 
95
95
  /**
@@ -124,7 +124,7 @@ export class Group {
124
124
  },
125
125
  };
126
126
 
127
- return this.client.sendRequest(config, callback, { methodName: 'getGroupByQueryParam' });
127
+ return this.client.sendRequest(config, callback);
128
128
  }
129
129
 
130
130
  /**
@@ -156,7 +156,7 @@ export class Group {
156
156
  },
157
157
  };
158
158
 
159
- return this.client.sendRequest(config, callback, { methodName: 'getGroupByGroupId' });
159
+ return this.client.sendRequest(config, callback);
160
160
  }
161
161
 
162
162
  /**
@@ -180,7 +180,7 @@ export class Group {
180
180
  },
181
181
  };
182
182
 
183
- return this.client.sendRequest(config, callback, { methodName: 'removeGroupById' });
183
+ return this.client.sendRequest(config, callback);
184
184
  }
185
185
 
186
186
  /** @deprecated Will be removed in the next major version. Use `getGroupByName` instead. */
@@ -190,6 +190,7 @@ export class Group {
190
190
  async getGroup<T = Models.Group>(parameters: Parameters.GetGroup, callback?: Callback<T>): Promise<void | T> {
191
191
  return this.getGroupByName(parameters, callback!);
192
192
  }
193
+
193
194
  /**
194
195
  * Returns a user group for a given group name.
195
196
  *
@@ -217,7 +218,7 @@ export class Group {
217
218
  method: 'GET',
218
219
  };
219
220
 
220
- return this.client.sendRequest(config, callback, { methodName: 'getGroupByName' });
221
+ return this.client.sendRequest(config, callback);
221
222
  }
222
223
 
223
224
  /**
@@ -254,7 +255,7 @@ export class Group {
254
255
  },
255
256
  };
256
257
 
257
- return this.client.sendRequest(config, callback, { methodName: 'getMembersByQueryParam' });
258
+ return this.client.sendRequest(config, callback);
258
259
  }
259
260
 
260
261
  /**
@@ -291,7 +292,7 @@ export class Group {
291
292
  },
292
293
  };
293
294
 
294
- return this.client.sendRequest(config, callback, { methodName: 'getGroupMembers' });
295
+ return this.client.sendRequest(config, callback);
295
296
  }
296
297
 
297
298
  /** @deprecated Will be removed in the next major version. Use `searchGroups` instead. */
@@ -332,7 +333,7 @@ export class Group {
332
333
  },
333
334
  };
334
335
 
335
- return this.client.sendRequest(config, callback, { methodName: 'searchGroups' });
336
+ return this.client.sendRequest(config, callback);
336
337
  }
337
338
 
338
339
  /**
@@ -368,7 +369,7 @@ export class Group {
368
369
  },
369
370
  };
370
371
 
371
- return this.client.sendRequest(config, callback, { methodName: 'addUserToGroupByGroupId' });
372
+ return this.client.sendRequest(config, callback);
372
373
  }
373
374
 
374
375
  /**
@@ -402,7 +403,7 @@ export class Group {
402
403
  },
403
404
  };
404
405
 
405
- return this.client.sendRequest(config, callback, { methodName: 'removeMemberFromGroupByGroupId' });
406
+ return this.client.sendRequest(config, callback);
406
407
  }
407
408
 
408
409
  /**
@@ -442,7 +443,7 @@ export class Group {
442
443
  },
443
444
  };
444
445
 
445
- return this.client.sendRequest(config, callback, { methodName: 'getGroupMembersByGroupId' });
446
+ return this.client.sendRequest(config, callback);
446
447
  }
447
448
 
448
449
  /**
@@ -469,7 +470,7 @@ export class Group {
469
470
  },
470
471
  };
471
472
 
472
- return this.client.sendRequest(config, callback, { methodName: 'addUserToGroup' });
473
+ return this.client.sendRequest(config, callback);
473
474
  }
474
475
 
475
476
  /**
@@ -500,6 +501,6 @@ export class Group {
500
501
  },
501
502
  };
502
503
 
503
- return this.client.sendRequest(config, callback, { methodName: 'removeMemberFromGroup' });
504
+ return this.client.sendRequest(config, callback);
504
505
  }
505
506
  }
@@ -49,7 +49,7 @@ export class InlineTasks {
49
49
  },
50
50
  };
51
51
 
52
- return this.client.sendRequest(config, callback, { methodName: 'searchTasks' });
52
+ return this.client.sendRequest(config, callback);
53
53
  }
54
54
 
55
55
  /**
@@ -72,7 +72,7 @@ export class InlineTasks {
72
72
  method: 'GET',
73
73
  };
74
74
 
75
- return this.client.sendRequest(config, callback, { methodName: 'getTaskById' });
75
+ return this.client.sendRequest(config, callback);
76
76
  }
77
77
 
78
78
  /**
@@ -101,6 +101,6 @@ export class InlineTasks {
101
101
  },
102
102
  };
103
103
 
104
- return this.client.sendRequest(config, callback, { methodName: 'updateTaskById' });
104
+ return this.client.sendRequest(config, callback);
105
105
  }
106
106
  }
@@ -42,6 +42,6 @@ export class LabelInfo {
42
42
  },
43
43
  };
44
44
 
45
- return this.client.sendRequest(config, callback, { methodName: 'getAllLabelContent' });
45
+ return this.client.sendRequest(config, callback);
46
46
  }
47
47
  }