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
@@ -16,7 +16,7 @@ class ContentWatches {
16
16
  limit: parameters.limit,
17
17
  },
18
18
  };
19
- return this.client.sendRequest(config, callback, { methodName: 'getWatchesForPage' });
19
+ return this.client.sendRequest(config, callback);
20
20
  });
21
21
  }
22
22
  getWatchesForSpace(parameters, callback) {
@@ -29,7 +29,7 @@ class ContentWatches {
29
29
  limit: parameters.limit,
30
30
  },
31
31
  };
32
- return this.client.sendRequest(config, callback, { methodName: 'getWatchesForSpace' });
32
+ return this.client.sendRequest(config, callback);
33
33
  });
34
34
  }
35
35
  getWatchersForSpace(parameters, callback) {
@@ -42,7 +42,7 @@ class ContentWatches {
42
42
  limit: parameters.limit,
43
43
  },
44
44
  };
45
- return this.client.sendRequest(config, callback, { methodName: 'getWatchersForSpace' });
45
+ return this.client.sendRequest(config, callback);
46
46
  });
47
47
  }
48
48
  getContentWatchStatus(parameters, callback) {
@@ -56,7 +56,7 @@ class ContentWatches {
56
56
  accountId: parameters.accountId,
57
57
  },
58
58
  };
59
- return this.client.sendRequest(config, callback, { methodName: 'getContentWatchStatus' });
59
+ return this.client.sendRequest(config, callback);
60
60
  });
61
61
  }
62
62
  addContentWatcher(parameters, callback) {
@@ -70,7 +70,7 @@ class ContentWatches {
70
70
  accountId: parameters.accountId,
71
71
  },
72
72
  };
73
- return this.client.sendRequest(config, callback, { methodName: 'addContentWatcher' });
73
+ return this.client.sendRequest(config, callback);
74
74
  });
75
75
  }
76
76
  removeContentWatcher(parameters, callback) {
@@ -87,7 +87,7 @@ class ContentWatches {
87
87
  accountId: parameters.accountId,
88
88
  },
89
89
  };
90
- return this.client.sendRequest(config, callback, { methodName: 'removeContentWatcher' });
90
+ return this.client.sendRequest(config, callback);
91
91
  });
92
92
  }
93
93
  isWatchingLabel(parameters, callback) {
@@ -101,7 +101,7 @@ class ContentWatches {
101
101
  accountId: parameters.accountId,
102
102
  },
103
103
  };
104
- return this.client.sendRequest(config, callback, { methodName: 'isWatchingLabel' });
104
+ return this.client.sendRequest(config, callback);
105
105
  });
106
106
  }
107
107
  addLabelWatcher(parameters, callback) {
@@ -118,7 +118,7 @@ class ContentWatches {
118
118
  accountId: parameters.accountId,
119
119
  },
120
120
  };
121
- return this.client.sendRequest(config, callback, { methodName: 'addLabelWatcher' });
121
+ return this.client.sendRequest(config, callback);
122
122
  });
123
123
  }
124
124
  removeLabelWatcher(parameters, callback) {
@@ -132,7 +132,7 @@ class ContentWatches {
132
132
  accountId: parameters.accountId,
133
133
  },
134
134
  };
135
- return this.client.sendRequest(config, callback, { methodName: 'removeLabelWatcher' });
135
+ return this.client.sendRequest(config, callback);
136
136
  });
137
137
  }
138
138
  isWatchingSpace(parameters, callback) {
@@ -146,7 +146,7 @@ class ContentWatches {
146
146
  accountId: parameters.accountId,
147
147
  },
148
148
  };
149
- return this.client.sendRequest(config, callback, { methodName: 'isWatchingSpace' });
149
+ return this.client.sendRequest(config, callback);
150
150
  });
151
151
  }
152
152
  addSpaceWatcher(parameters, callback) {
@@ -163,7 +163,7 @@ class ContentWatches {
163
163
  accountId: parameters.accountId,
164
164
  },
165
165
  };
166
- return this.client.sendRequest(config, callback, { methodName: 'addSpaceWatcher' });
166
+ return this.client.sendRequest(config, callback);
167
167
  });
168
168
  }
169
169
  removeSpaceWatch(parameters, callback) {
@@ -177,7 +177,7 @@ class ContentWatches {
177
177
  accountId: parameters.accountId,
178
178
  },
179
179
  };
180
- return this.client.sendRequest(config, callback, { methodName: 'removeSpaceWatch' });
180
+ return this.client.sendRequest(config, callback);
181
181
  });
182
182
  }
183
183
  }
@@ -12,7 +12,7 @@ class DynamicModules {
12
12
  url: '/atlassian-connect/1/app/module/dynamic',
13
13
  method: 'GET',
14
14
  };
15
- return this.client.sendRequest(config, callback, { methodName: 'getModules' });
15
+ return this.client.sendRequest(config, callback);
16
16
  });
17
17
  }
18
18
  registerModules(parameters, callback) {
@@ -21,7 +21,7 @@ class DynamicModules {
21
21
  url: '/atlassian-connect/1/app/module/dynamic',
22
22
  method: 'POST',
23
23
  };
24
- return this.client.sendRequest(config, callback, { methodName: 'registerModules' });
24
+ return this.client.sendRequest(config, callback);
25
25
  });
26
26
  }
27
27
  removeModules(parameters, callback) {
@@ -33,7 +33,7 @@ class DynamicModules {
33
33
  moduleKey: parameters.moduleKey,
34
34
  },
35
35
  };
36
- return this.client.sendRequest(config, callback, { methodName: 'removeModules' });
36
+ return this.client.sendRequest(config, callback);
37
37
  });
38
38
  }
39
39
  }
@@ -5,6 +5,42 @@ import { Callback } from '../callback';
5
5
  export declare class Experimental {
6
6
  private client;
7
7
  constructor(client: Client);
8
+ /**
9
+ * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different
10
+ * types of labels.
11
+ */
12
+ getLabelsForSpace<T = Models.LabelArray>(parameters: Parameters.GetLabelsForSpace, callback: Callback<T>): Promise<void>;
13
+ /**
14
+ * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different
15
+ * types of labels.
16
+ */
17
+ getLabelsForSpace<T = Models.LabelArray>(parameters: Parameters.GetLabelsForSpace, callback?: never): Promise<T>;
18
+ /**
19
+ * Adds labels to a piece of content. Does not modify the existing labels.
20
+ *
21
+ * Notes:
22
+ *
23
+ * - Labels can also be added when creating content ([Create content](#api-content-post)).
24
+ * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing
25
+ * labels and replace them with the labels in the request.
26
+ *
27
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
28
+ */
29
+ addLabelsToSpace<T = Models.LabelArray>(parameters: Parameters.AddLabelsToSpace, callback: Callback<T>): Promise<void>;
30
+ /**
31
+ * Adds labels to a piece of content. Does not modify the existing labels.
32
+ *
33
+ * Notes:
34
+ *
35
+ * - Labels can also be added when creating content ([Create content](#api-content-post)).
36
+ * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing
37
+ * labels and replace them with the labels in the request.
38
+ *
39
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.
40
+ */
41
+ addLabelsToSpace<T = Models.LabelArray>(parameters: Parameters.AddLabelsToSpace, callback?: never): Promise<T>;
42
+ deleteLabelFromSpace<T = void>(parameters: Parameters.DeleteLabelFromSpace, callback: Callback<T>): Promise<void>;
43
+ deleteLabelFromSpace<T = void>(parameters: Parameters.DeleteLabelFromSpace, callback?: never): Promise<T>;
8
44
  /** Get the total number of views a piece of content has. */
9
45
  getViews<T = Models.GetViews>(parameters: Parameters.GetViews, callback: Callback<T>): Promise<void>;
10
46
  /** Get the total number of views a piece of content has. */
@@ -6,6 +6,42 @@ class Experimental {
6
6
  constructor(client) {
7
7
  this.client = client;
8
8
  }
9
+ getLabelsForSpace(parameters, callback) {
10
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
11
+ const config = {
12
+ url: `/api/space/${parameters.spaceKey}/label`,
13
+ method: 'GET',
14
+ params: {
15
+ prefix: parameters.prefix,
16
+ start: parameters.start,
17
+ limit: parameters.limit,
18
+ },
19
+ };
20
+ return this.client.sendRequest(config, callback);
21
+ });
22
+ }
23
+ addLabelsToSpace(parameters, callback) {
24
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
25
+ const config = {
26
+ url: `/api/space/${parameters.spaceKey}/label`,
27
+ method: 'POST',
28
+ };
29
+ return this.client.sendRequest(config, callback);
30
+ });
31
+ }
32
+ deleteLabelFromSpace(parameters, callback) {
33
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
34
+ const config = {
35
+ url: `/api/space/${parameters.spaceKey}/label`,
36
+ method: 'DELETE',
37
+ params: {
38
+ name: parameters.name,
39
+ prefix: parameters.prefix,
40
+ },
41
+ };
42
+ return this.client.sendRequest(config, callback);
43
+ });
44
+ }
9
45
  getViews(parameters, callback) {
10
46
  return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
11
47
  const config = {
@@ -15,7 +51,7 @@ class Experimental {
15
51
  fromDate: parameters.fromDate,
16
52
  },
17
53
  };
18
- return this.client.sendRequest(config, callback, { methodName: 'getViews' });
54
+ return this.client.sendRequest(config, callback);
19
55
  });
20
56
  }
21
57
  getViewers(parameters, callback) {
@@ -27,7 +63,7 @@ class Experimental {
27
63
  fromDate: parameters.fromDate,
28
64
  },
29
65
  };
30
- return this.client.sendRequest(config, callback, { methodName: 'getViewers' });
66
+ return this.client.sendRequest(config, callback);
31
67
  });
32
68
  }
33
69
  }
package/out/api/group.js CHANGED
@@ -17,7 +17,7 @@ class Group {
17
17
  accessType: parameters === null || parameters === void 0 ? void 0 : parameters.accessType,
18
18
  },
19
19
  };
20
- return this.client.sendRequest(config, callback, { methodName: 'getGroups' });
20
+ return this.client.sendRequest(config, callback);
21
21
  });
22
22
  }
23
23
  createGroup(parameters, callback) {
@@ -29,7 +29,7 @@ class Group {
29
29
  name: parameters === null || parameters === void 0 ? void 0 : parameters.name,
30
30
  },
31
31
  };
32
- return this.client.sendRequest(config, callback, { methodName: 'createGroup' });
32
+ return this.client.sendRequest(config, callback);
33
33
  });
34
34
  }
35
35
  removeGroup(parameters, callback) {
@@ -41,7 +41,7 @@ class Group {
41
41
  name: parameters.name,
42
42
  },
43
43
  };
44
- return this.client.sendRequest(config, callback, { methodName: 'removeGroup' });
44
+ return this.client.sendRequest(config, callback);
45
45
  });
46
46
  }
47
47
  getGroupByQueryParam(parameters, callback) {
@@ -53,7 +53,7 @@ class Group {
53
53
  name: parameters.name,
54
54
  },
55
55
  };
56
- return this.client.sendRequest(config, callback, { methodName: 'getGroupByQueryParam' });
56
+ return this.client.sendRequest(config, callback);
57
57
  });
58
58
  }
59
59
  getGroupByGroupId(parameters, callback) {
@@ -65,7 +65,7 @@ class Group {
65
65
  id: parameters.id,
66
66
  },
67
67
  };
68
- return this.client.sendRequest(config, callback, { methodName: 'getGroupByGroupId' });
68
+ return this.client.sendRequest(config, callback);
69
69
  });
70
70
  }
71
71
  removeGroupById(parameters, callback) {
@@ -77,7 +77,7 @@ class Group {
77
77
  id: parameters.id,
78
78
  },
79
79
  };
80
- return this.client.sendRequest(config, callback, { methodName: 'removeGroupById' });
80
+ return this.client.sendRequest(config, callback);
81
81
  });
82
82
  }
83
83
  getGroup(parameters, callback) {
@@ -91,7 +91,7 @@ class Group {
91
91
  url: `/api/group/${parameters.groupName}`,
92
92
  method: 'GET',
93
93
  };
94
- return this.client.sendRequest(config, callback, { methodName: 'getGroupByName' });
94
+ return this.client.sendRequest(config, callback);
95
95
  });
96
96
  }
97
97
  getMembersByQueryParam(parameters, callback) {
@@ -105,7 +105,7 @@ class Group {
105
105
  limit: parameters.limit,
106
106
  },
107
107
  };
108
- return this.client.sendRequest(config, callback, { methodName: 'getMembersByQueryParam' });
108
+ return this.client.sendRequest(config, callback);
109
109
  });
110
110
  }
111
111
  getGroupMembers(parameters, callback) {
@@ -118,7 +118,7 @@ class Group {
118
118
  limit: parameters.limit,
119
119
  },
120
120
  };
121
- return this.client.sendRequest(config, callback, { methodName: 'getGroupMembers' });
121
+ return this.client.sendRequest(config, callback);
122
122
  });
123
123
  }
124
124
  getGroupsSearch(parameters, callback) {
@@ -137,7 +137,7 @@ class Group {
137
137
  limit: parameters.limit,
138
138
  },
139
139
  };
140
- return this.client.sendRequest(config, callback, { methodName: 'searchGroups' });
140
+ return this.client.sendRequest(config, callback);
141
141
  });
142
142
  }
143
143
  addUserToGroupByGroupId(parameters, callback) {
@@ -152,7 +152,7 @@ class Group {
152
152
  accountId: parameters.accountId,
153
153
  },
154
154
  };
155
- return this.client.sendRequest(config, callback, { methodName: 'addUserToGroupByGroupId' });
155
+ return this.client.sendRequest(config, callback);
156
156
  });
157
157
  }
158
158
  removeMemberFromGroupByGroupId(parameters, callback) {
@@ -165,7 +165,7 @@ class Group {
165
165
  accountId: parameters.accountId,
166
166
  },
167
167
  };
168
- return this.client.sendRequest(config, callback, { methodName: 'removeMemberFromGroupByGroupId' });
168
+ return this.client.sendRequest(config, callback);
169
169
  });
170
170
  }
171
171
  getGroupMembersByGroupId(parameters, callback) {
@@ -178,7 +178,7 @@ class Group {
178
178
  limit: parameters.limit,
179
179
  },
180
180
  };
181
- return this.client.sendRequest(config, callback, { methodName: 'getGroupMembersByGroupId' });
181
+ return this.client.sendRequest(config, callback);
182
182
  });
183
183
  }
184
184
  addUserToGroup(parameters, callback) {
@@ -193,7 +193,7 @@ class Group {
193
193
  accountId: parameters.accountId,
194
194
  },
195
195
  };
196
- return this.client.sendRequest(config, callback, { methodName: 'addUserToGroup' });
196
+ return this.client.sendRequest(config, callback);
197
197
  });
198
198
  }
199
199
  removeMemberFromGroup(parameters, callback) {
@@ -206,7 +206,7 @@ class Group {
206
206
  accountId: parameters.accountId,
207
207
  },
208
208
  };
209
- return this.client.sendRequest(config, callback, { methodName: 'removeMemberFromGroup' });
209
+ return this.client.sendRequest(config, callback);
210
210
  });
211
211
  }
212
212
  }
@@ -28,7 +28,7 @@ class InlineTasks {
28
28
  status: parameters === null || parameters === void 0 ? void 0 : parameters.status,
29
29
  },
30
30
  };
31
- return this.client.sendRequest(config, callback, { methodName: 'searchTasks' });
31
+ return this.client.sendRequest(config, callback);
32
32
  });
33
33
  }
34
34
  getTaskById(parameters, callback) {
@@ -37,7 +37,7 @@ class InlineTasks {
37
37
  url: `/api/inlinetasks/${parameters.inlineTaskId}`,
38
38
  method: 'GET',
39
39
  };
40
- return this.client.sendRequest(config, callback, { methodName: 'getTaskById' });
40
+ return this.client.sendRequest(config, callback);
41
41
  });
42
42
  }
43
43
  updateTaskById(parameters, callback) {
@@ -49,7 +49,7 @@ class InlineTasks {
49
49
  status: parameters.status,
50
50
  },
51
51
  };
52
- return this.client.sendRequest(config, callback, { methodName: 'updateTaskById' });
52
+ return this.client.sendRequest(config, callback);
53
53
  });
54
54
  }
55
55
  }
@@ -18,7 +18,7 @@ class LabelInfo {
18
18
  limit: parameters.limit,
19
19
  },
20
20
  };
21
- return this.client.sendRequest(config, callback, { methodName: 'getAllLabelContent' });
21
+ return this.client.sendRequest(config, callback);
22
22
  });
23
23
  }
24
24
  }
@@ -16,7 +16,7 @@ class LongRunningTask {
16
16
  limit: parameters === null || parameters === void 0 ? void 0 : parameters.limit,
17
17
  },
18
18
  };
19
- return this.client.sendRequest(config, callback, { methodName: 'getTasks' });
19
+ return this.client.sendRequest(config, callback);
20
20
  });
21
21
  }
22
22
  getTask(parameters, callback) {
@@ -25,7 +25,7 @@ class LongRunningTask {
25
25
  url: `/api/longtask/${parameters.id}`,
26
26
  method: 'GET',
27
27
  };
28
- return this.client.sendRequest(config, callback, { methodName: 'getTask' });
28
+ return this.client.sendRequest(config, callback);
29
29
  });
30
30
  }
31
31
  }
@@ -0,0 +1,4 @@
1
+ export interface AddLabelsToSpace {
2
+ /** The key of the space to add labels to. */
3
+ spaceKey: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface DeleteLabelFromSpace {
2
+ /** The key of the space to remove a labels from. */
3
+ spaceKey: string;
4
+ /** The name of the label to remove */
5
+ name: string;
6
+ /** The prefix of the label to remove. If not provided defaults to global. */
7
+ prefix?: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,12 +5,6 @@ export interface GetBulkUserLookup {
5
5
  * A multi-value parameter indicating which properties of the user to expand.
6
6
  *
7
7
  * - `operations` returns the operations that the user is allowed to do.
8
- * - `details.personal` returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'. Note that
9
- * these fields have been deprecated due to privacy changes. See the [migration
10
- * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details.
11
- * - `details.business` returns the 'Company' details in the user's profile, like the 'Position' and 'Department'. Note
12
- * that these fields have been deprecated due to privacy changes. See the [migration
13
- * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details.
14
8
  * - PersonalSpace returns the user's personal space, if it exists.
15
9
  */
16
10
  expand?: string[];
@@ -19,10 +19,94 @@ export interface GetContentById {
19
19
  */
20
20
  embeddedContentRender?: string;
21
21
  /** A multi-value parameter indicating which properties of the content to expand. */
22
- expand?: string[];
22
+ expand?: string | string[] | GetContentById.Expand | GetContentById.Expand[];
23
23
  /**
24
24
  * If set to `viewed`, the request will trigger a 'viewed' event for the content. When this event is triggered, the
25
25
  * page/blogpost will appear on the 'Recently visited' tab of the user's Confluence dashboard.
26
26
  */
27
27
  trigger?: string;
28
28
  }
29
+ export declare namespace GetContentById {
30
+ enum Expand {
31
+ /**
32
+ * Returns whether the content has attachments, comments, or child pages. Use this if you only need to check whether
33
+ * the content has children of a particular type.
34
+ */
35
+ AllChildTypes = "childTypes.all",
36
+ /** Returns whether the content has attachments. */
37
+ AttachmentChildType = "childTypes.attachment",
38
+ /** Returns whether the content has comments. */
39
+ CommentChildType = "childTypes.comment",
40
+ /** Returns whether the content has child pages. */
41
+ PageChildType = "childTypes.page",
42
+ /**
43
+ * Returns the space that the content is in. This is the same as the information returned by [Get
44
+ * space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
45
+ */
46
+ Container = "container",
47
+ /**
48
+ * Returns information about the current user in relation to the content, including when they last viewed it,
49
+ * modified it, contributed to it, or added it as a favorite.
50
+ */
51
+ CurrentUserMetadata = "metadata.currentuser",
52
+ /** Returns content properties that have been set via the Confluence REST API. */
53
+ PropertiesMetadata = "metadata.properties",
54
+ /** Returns the labels that have been added to the content. */
55
+ LabelsMetadata = "metadata.labels",
56
+ /** This property is only used by Atlassian. */
57
+ FrontendMetadata = "metadata.frontend",
58
+ /** Returns the operations for the content, which are used when setting permissions. */
59
+ Operations = "operations",
60
+ /** Returns pages that are descendants at the level immediately below the content. */
61
+ PageChildren = "children.page",
62
+ /** Returns all attachments for the content. */
63
+ AttachmentChildren = "children.attachment",
64
+ /** Returns all comments on the content. */
65
+ CommentChildren = "children.comment",
66
+ /** Returns the users that have permission to read the content. */
67
+ ReadUserRestriction = "restrictions.read.restrictions.user",
68
+ /**
69
+ * Returns the groups that have permission to read the content. Note that this may return deleted groups, because
70
+ * deleting a group doesn't remove associated restrictions.
71
+ */
72
+ ReadGroupRestriction = "restrictions.read.restrictions.group",
73
+ /** Returns the users that have permission to update the content. */
74
+ UpdateUserRestriction = "restrictions.update.restrictions.user",
75
+ /**
76
+ * Returns the groups that have permission to update the content. Note that this may return deleted groups because
77
+ * deleting a group doesn't remove associated restrictions.
78
+ */
79
+ UpdateGroupRestriction = "restrictions.update.restrictions.group",
80
+ /** Returns the history of the content, including the date it was created. */
81
+ History = "history",
82
+ /** Returns information about the most recent update of the content, including who updated it and when it was updated. */
83
+ LastUpdated = "history.lastUpdated",
84
+ /** Returns information about the update prior to the current content update. */
85
+ PreviousVersion = "history.previousVersion",
86
+ /** Returns all of the users who have contributed to the content. */
87
+ Contributors = "history.contributors",
88
+ /** Returns information about the update after to the current content update. */
89
+ NextVersion = "history.nextVersion",
90
+ /** Returns the parent page, if the content is a page. */
91
+ Ancestors = "ancestors",
92
+ /** Returns the body of the content in different formats, including the editor format, view format, and export format. */
93
+ Body = "body",
94
+ /** Returns information about the most recent update of the content, including who updated it and when it was updated. */
95
+ Version = "version",
96
+ /** Returns pages that are descendants at any level below the content. */
97
+ PageDescendant = "descendants.page",
98
+ /** Returns all attachments for the content, same as `children.attachment`. */
99
+ AttachmentDescendant = "descendants.attachment",
100
+ /** Returns all comments on the content, same as `children.comment`. */
101
+ CommentDescendant = "descendants.comment",
102
+ /**
103
+ * Returns the space that the content is in. This is the same as the information returned by [Get
104
+ * space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
105
+ */
106
+ Space = "space",
107
+ /** Returns inline comment-specific properties. */
108
+ InlineProperties = "extensions.inlineProperties",
109
+ /** Returns the resolution status of each comment. */
110
+ Resolution = "extensions.resolution"
111
+ }
112
+ }
@@ -1,2 +1,89 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetContentById = void 0;
4
+ var GetContentById;
5
+ (function (GetContentById) {
6
+ let Expand;
7
+ (function (Expand) {
8
+ /**
9
+ * Returns whether the content has attachments, comments, or child pages. Use this if you only need to check whether
10
+ * the content has children of a particular type.
11
+ */
12
+ Expand["AllChildTypes"] = "childTypes.all";
13
+ /** Returns whether the content has attachments. */
14
+ Expand["AttachmentChildType"] = "childTypes.attachment";
15
+ /** Returns whether the content has comments. */
16
+ Expand["CommentChildType"] = "childTypes.comment";
17
+ /** Returns whether the content has child pages. */
18
+ Expand["PageChildType"] = "childTypes.page";
19
+ /**
20
+ * Returns the space that the content is in. This is the same as the information returned by [Get
21
+ * space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
22
+ */
23
+ Expand["Container"] = "container";
24
+ /**
25
+ * Returns information about the current user in relation to the content, including when they last viewed it,
26
+ * modified it, contributed to it, or added it as a favorite.
27
+ */
28
+ Expand["CurrentUserMetadata"] = "metadata.currentuser";
29
+ /** Returns content properties that have been set via the Confluence REST API. */
30
+ Expand["PropertiesMetadata"] = "metadata.properties";
31
+ /** Returns the labels that have been added to the content. */
32
+ Expand["LabelsMetadata"] = "metadata.labels";
33
+ /** This property is only used by Atlassian. */
34
+ Expand["FrontendMetadata"] = "metadata.frontend";
35
+ /** Returns the operations for the content, which are used when setting permissions. */
36
+ Expand["Operations"] = "operations";
37
+ /** Returns pages that are descendants at the level immediately below the content. */
38
+ Expand["PageChildren"] = "children.page";
39
+ /** Returns all attachments for the content. */
40
+ Expand["AttachmentChildren"] = "children.attachment";
41
+ /** Returns all comments on the content. */
42
+ Expand["CommentChildren"] = "children.comment";
43
+ /** Returns the users that have permission to read the content. */
44
+ Expand["ReadUserRestriction"] = "restrictions.read.restrictions.user";
45
+ /**
46
+ * Returns the groups that have permission to read the content. Note that this may return deleted groups, because
47
+ * deleting a group doesn't remove associated restrictions.
48
+ */
49
+ Expand["ReadGroupRestriction"] = "restrictions.read.restrictions.group";
50
+ /** Returns the users that have permission to update the content. */
51
+ Expand["UpdateUserRestriction"] = "restrictions.update.restrictions.user";
52
+ /**
53
+ * Returns the groups that have permission to update the content. Note that this may return deleted groups because
54
+ * deleting a group doesn't remove associated restrictions.
55
+ */
56
+ Expand["UpdateGroupRestriction"] = "restrictions.update.restrictions.group";
57
+ /** Returns the history of the content, including the date it was created. */
58
+ Expand["History"] = "history";
59
+ /** Returns information about the most recent update of the content, including who updated it and when it was updated. */
60
+ Expand["LastUpdated"] = "history.lastUpdated";
61
+ /** Returns information about the update prior to the current content update. */
62
+ Expand["PreviousVersion"] = "history.previousVersion";
63
+ /** Returns all of the users who have contributed to the content. */
64
+ Expand["Contributors"] = "history.contributors";
65
+ /** Returns information about the update after to the current content update. */
66
+ Expand["NextVersion"] = "history.nextVersion";
67
+ /** Returns the parent page, if the content is a page. */
68
+ Expand["Ancestors"] = "ancestors";
69
+ /** Returns the body of the content in different formats, including the editor format, view format, and export format. */
70
+ Expand["Body"] = "body";
71
+ /** Returns information about the most recent update of the content, including who updated it and when it was updated. */
72
+ Expand["Version"] = "version";
73
+ /** Returns pages that are descendants at any level below the content. */
74
+ Expand["PageDescendant"] = "descendants.page";
75
+ /** Returns all attachments for the content, same as `children.attachment`. */
76
+ Expand["AttachmentDescendant"] = "descendants.attachment";
77
+ /** Returns all comments on the content, same as `children.comment`. */
78
+ Expand["CommentDescendant"] = "descendants.comment";
79
+ /**
80
+ * Returns the space that the content is in. This is the same as the information returned by [Get
81
+ * space](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/).
82
+ */
83
+ Expand["Space"] = "space";
84
+ /** Returns inline comment-specific properties. */
85
+ Expand["InlineProperties"] = "extensions.inlineProperties";
86
+ /** Returns the resolution status of each comment. */
87
+ Expand["Resolution"] = "extensions.resolution";
88
+ })(Expand = GetContentById.Expand || (GetContentById.Expand = {}));
89
+ })(GetContentById = exports.GetContentById || (exports.GetContentById = {}));
@@ -7,6 +7,7 @@ export interface GetContentChildren {
7
7
  * - `attachment` returns all attachments for the content.
8
8
  * - `comments` returns all comments for the content.
9
9
  * - `page` returns all child pages of the content.
10
+ * - Custom content types that are provided by apps are also supported.
10
11
  */
11
12
  expand?: string[];
12
13
  /** The version of the parent content to retrieve children for. Currently, this only works for the latest version. */