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.
- package/CHANGELOG.md +7 -3
- package/out/api/audit.d.ts +24 -12
- package/out/api/audit.js.map +1 -1
- package/out/api/content.d.ts +18 -12
- package/out/api/content.js.map +1 -1
- package/out/api/contentAttachments.d.ts +14 -8
- package/out/api/contentAttachments.js.map +1 -1
- package/out/api/contentBody.js +2 -4
- package/out/api/contentBody.js.map +1 -1
- package/out/api/contentMacroBody.d.ts +4 -2
- package/out/api/contentMacroBody.js.map +1 -1
- package/out/api/contentRestrictions.d.ts +16 -8
- package/out/api/contentRestrictions.js.map +1 -1
- package/out/api/contentWatches.d.ts +16 -8
- package/out/api/contentWatches.js.map +1 -1
- package/out/api/parameters/convertContentBody.d.ts +16 -2
- package/out/api/relation.d.ts +8 -4
- package/out/api/relation.js.map +1 -1
- package/out/api/settings.d.ts +4 -2
- package/out/api/settings.js.map +1 -1
- package/out/api/space.d.ts +4 -2
- package/out/api/space.js.map +1 -1
- package/out/api/template.d.ts +16 -8
- package/out/api/template.js.map +1 -1
- package/out/clients/baseClient.js +3 -1
- package/out/clients/baseClient.js.map +1 -1
- package/out/clients/serverClient.js.map +1 -1
- package/out/server/audit.js +6 -6
- package/out/server/audit.js.map +1 -1
- package/out/server/content.d.ts +34 -262
- package/out/server/content.js +32 -32
- package/out/server/content.js.map +1 -1
- package/out/server/contentBody.d.ts +2 -12
- package/out/server/contentBody.js +2 -1
- package/out/server/contentBody.js.map +1 -1
- package/out/server/group.js +3 -3
- package/out/server/group.js.map +1 -1
- package/out/server/longTask.js +2 -2
- package/out/server/longTask.js.map +1 -1
- package/out/server/parameters/convertContentBody.d.ts +16 -0
- package/out/server/search.d.ts +2 -22
- package/out/server/search.js +1 -1
- package/out/server/search.js.map +1 -1
- package/out/server/space.d.ts +12 -94
- package/out/server/space.js +14 -14
- package/out/server/space.js.map +1 -1
- package/out/server/user.d.ts +8 -152
- package/out/server/user.js +10 -10
- package/out/server/user.js.map +1 -1
- package/package.json +10 -10
- package/src/api/audit.ts +24 -12
- package/src/api/content.ts +23 -17
- package/src/api/contentAttachments.ts +19 -13
- package/src/api/contentBody.ts +2 -0
- package/src/api/contentMacroBody.ts +4 -2
- package/src/api/contentRestrictions.ts +16 -8
- package/src/api/contentWatches.ts +16 -8
- package/src/api/parameters/convertContentBody.ts +39 -2
- package/src/api/relation.ts +8 -4
- package/src/api/settings.ts +4 -2
- package/src/api/space.ts +4 -2
- package/src/api/template.ts +16 -8
- package/src/clients/baseClient.ts +5 -10
- package/src/clients/client.ts +1 -5
- package/src/clients/serverClient.ts +1 -10
- package/src/server/audit.ts +6 -6
- package/src/server/content.ts +70 -295
- package/src/server/contentBody.ts +4 -13
- package/src/server/group.ts +3 -3
- package/src/server/longTask.ts +2 -2
- package/src/server/parameters/convertContentBody.ts +37 -0
- package/src/server/search.ts +3 -23
- package/src/server/space.ts +26 -108
- package/src/server/user.ts +18 -162
package/src/api/space.ts
CHANGED
|
@@ -115,13 +115,15 @@ export class Space {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
|
-
* Returns a space. This includes information like the name, description, and permissions, but not the content in the
|
|
118
|
+
* Returns a space. This includes information like the name, description, and permissions, but not the content in the
|
|
119
|
+
* space.
|
|
119
120
|
*
|
|
120
121
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.
|
|
121
122
|
*/
|
|
122
123
|
async getSpace<T = Models.Space>(parameters: Parameters.GetSpace, callback: Callback<T>): Promise<void>;
|
|
123
124
|
/**
|
|
124
|
-
* Returns a space. This includes information like the name, description, and permissions, but not the content in the
|
|
125
|
+
* Returns a space. This includes information like the name, description, and permissions, but not the content in the
|
|
126
|
+
* space.
|
|
125
127
|
*
|
|
126
128
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.
|
|
127
129
|
*/
|
package/src/api/template.ts
CHANGED
|
@@ -137,20 +137,24 @@ export class Template {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
/**
|
|
140
|
-
* Returns all content templates. Use this method to retrieve all global content templates or all content templates in
|
|
140
|
+
* Returns all content templates. Use this method to retrieve all global content templates or all content templates in
|
|
141
|
+
* a space.
|
|
141
142
|
*
|
|
142
143
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view
|
|
143
|
-
* space templates and permission to access the Confluence site ('Can use' global permission) to view global
|
|
144
|
+
* space templates and permission to access the Confluence site ('Can use' global permission) to view global
|
|
145
|
+
* templates.
|
|
144
146
|
*/
|
|
145
147
|
async getContentTemplates<T = Models.ContentTemplateArray>(
|
|
146
148
|
parameters: Parameters.GetContentTemplates | undefined,
|
|
147
149
|
callback: Callback<T>
|
|
148
150
|
): Promise<void>;
|
|
149
151
|
/**
|
|
150
|
-
* Returns all content templates. Use this method to retrieve all global content templates or all content templates in
|
|
152
|
+
* Returns all content templates. Use this method to retrieve all global content templates or all content templates in
|
|
153
|
+
* a space.
|
|
151
154
|
*
|
|
152
155
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view
|
|
153
|
-
* space templates and permission to access the Confluence site ('Can use' global permission) to view global
|
|
156
|
+
* space templates and permission to access the Confluence site ('Can use' global permission) to view global
|
|
157
|
+
* templates.
|
|
154
158
|
*/
|
|
155
159
|
async getContentTemplates<T = Models.ContentTemplateArray>(
|
|
156
160
|
parameters?: Parameters.GetContentTemplates,
|
|
@@ -179,7 +183,8 @@ export class Template {
|
|
|
179
183
|
* the template is in, the body of the template, and more.
|
|
180
184
|
*
|
|
181
185
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view
|
|
182
|
-
* space templates and permission to access the Confluence site ('Can use' global permission) to view global
|
|
186
|
+
* space templates and permission to access the Confluence site ('Can use' global permission) to view global
|
|
187
|
+
* templates.
|
|
183
188
|
*/
|
|
184
189
|
async getContentTemplate<T = Models.ContentTemplate>(
|
|
185
190
|
parameters: Parameters.GetContentTemplate,
|
|
@@ -190,7 +195,8 @@ export class Template {
|
|
|
190
195
|
* the template is in, the body of the template, and more.
|
|
191
196
|
*
|
|
192
197
|
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view
|
|
193
|
-
* space templates and permission to access the Confluence site ('Can use' global permission) to view global
|
|
198
|
+
* space templates and permission to access the Confluence site ('Can use' global permission) to view global
|
|
199
|
+
* templates.
|
|
194
200
|
*/
|
|
195
201
|
async getContentTemplate<T = Models.ContentTemplate>(
|
|
196
202
|
parameters: Parameters.GetContentTemplate,
|
|
@@ -214,7 +220,8 @@ export class Template {
|
|
|
214
220
|
* - If the template is a content template, it is deleted.
|
|
215
221
|
* - If the template is a modified space-level blueprint template, it reverts to the template inherited from the
|
|
216
222
|
* global-level blueprint template.
|
|
217
|
-
* - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint
|
|
223
|
+
* - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint
|
|
224
|
+
* template.
|
|
218
225
|
*
|
|
219
226
|
* Note, unmodified blueprint templates cannot be deleted.
|
|
220
227
|
*
|
|
@@ -228,7 +235,8 @@ export class Template {
|
|
|
228
235
|
* - If the template is a content template, it is deleted.
|
|
229
236
|
* - If the template is a modified space-level blueprint template, it reverts to the template inherited from the
|
|
230
237
|
* global-level blueprint template.
|
|
231
|
-
* - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint
|
|
238
|
+
* - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint
|
|
239
|
+
* template.
|
|
232
240
|
*
|
|
233
241
|
* Note, unmodified blueprint templates cannot be deleted.
|
|
234
242
|
*
|
|
@@ -74,7 +74,9 @@ export class BaseClient implements Client {
|
|
|
74
74
|
...this.config.baseRequestConfig,
|
|
75
75
|
baseURL: `${this.config.host}${this.urlSuffix}`,
|
|
76
76
|
headers: this.removeUndefinedProperties({
|
|
77
|
-
[ATLASSIAN_TOKEN_CHECK_FLAG]: this.config.noCheckAtlassianToken
|
|
77
|
+
[ATLASSIAN_TOKEN_CHECK_FLAG]: this.config.noCheckAtlassianToken
|
|
78
|
+
? ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE
|
|
79
|
+
: undefined,
|
|
78
80
|
...this.config.baseRequestConfig?.headers,
|
|
79
81
|
}),
|
|
80
82
|
});
|
|
@@ -83,15 +85,8 @@ export class BaseClient implements Client {
|
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
async sendRequest<T>(requestConfig: RequestConfig, callback: never, telemetryData?: any): Promise<T>;
|
|
86
|
-
async sendRequest<T>(
|
|
87
|
-
|
|
88
|
-
callback: Callback<T>,
|
|
89
|
-
telemetryData?: any,
|
|
90
|
-
): Promise<void>;
|
|
91
|
-
async sendRequest<T>(
|
|
92
|
-
requestConfig: RequestConfig,
|
|
93
|
-
callback: Callback<T> | never,
|
|
94
|
-
): Promise<void | T> {
|
|
88
|
+
async sendRequest<T>(requestConfig: RequestConfig, callback: Callback<T>, telemetryData?: any): Promise<void>;
|
|
89
|
+
async sendRequest<T>(requestConfig: RequestConfig, callback: Callback<T> | never): Promise<void | T> {
|
|
95
90
|
try {
|
|
96
91
|
const modifiedRequestConfig = {
|
|
97
92
|
...requestConfig,
|
package/src/clients/client.ts
CHANGED
|
@@ -3,9 +3,5 @@ import type { RequestConfig } from '../requestConfig';
|
|
|
3
3
|
|
|
4
4
|
export interface Client {
|
|
5
5
|
sendRequest<T>(requestConfig: RequestConfig, callback?: never, telemetryData?: any): Promise<T>;
|
|
6
|
-
sendRequest<T>(
|
|
7
|
-
requestConfig: RequestConfig,
|
|
8
|
-
callback?: Callback<T>,
|
|
9
|
-
telemetryData?: any,
|
|
10
|
-
): Promise<void>;
|
|
6
|
+
sendRequest<T>(requestConfig: RequestConfig, callback?: Callback<T>, telemetryData?: any): Promise<void>;
|
|
11
7
|
}
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { BaseClient } from './baseClient';
|
|
2
|
-
import {
|
|
3
|
-
Audit,
|
|
4
|
-
Content,
|
|
5
|
-
ContentBody,
|
|
6
|
-
Group,
|
|
7
|
-
LongTask,
|
|
8
|
-
Search,
|
|
9
|
-
Space,
|
|
10
|
-
User,
|
|
11
|
-
} from '../server';
|
|
2
|
+
import { Audit, Content, ContentBody, Group, LongTask, Search, Space, User } from '../server';
|
|
12
3
|
|
|
13
4
|
export class ServerClient extends BaseClient {
|
|
14
5
|
urlSuffix = '/';
|
package/src/server/audit.ts
CHANGED
|
@@ -34,7 +34,7 @@ export class Audit {
|
|
|
34
34
|
},
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
return this.client.sendRequest(config, callback
|
|
37
|
+
return this.client.sendRequest(config, callback);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/** Creates a record in the audit log. */
|
|
@@ -68,7 +68,7 @@ export class Audit {
|
|
|
68
68
|
},
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
return this.client.sendRequest(config, callback
|
|
71
|
+
return this.client.sendRequest(config, callback);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/** Exports audit records as a CSV file or ZIP file. */
|
|
@@ -93,7 +93,7 @@ export class Audit {
|
|
|
93
93
|
},
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
return this.client.sendRequest(config, callback
|
|
96
|
+
return this.client.sendRequest(config, callback);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
/** Fetches the current retention periodResponses */
|
|
@@ -106,7 +106,7 @@ export class Audit {
|
|
|
106
106
|
method: 'GET',
|
|
107
107
|
};
|
|
108
108
|
|
|
109
|
-
return this.client.sendRequest(config, callback
|
|
109
|
+
return this.client.sendRequest(config, callback);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
/** Set the retention period to a new value. Can throw ServiceException if the retention period is too long */
|
|
@@ -132,7 +132,7 @@ export class Audit {
|
|
|
132
132
|
},
|
|
133
133
|
};
|
|
134
134
|
|
|
135
|
-
return this.client.sendRequest(config, callback
|
|
135
|
+
return this.client.sendRequest(config, callback);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
/** Fetch a paginated list of AuditRecord instances dating back to a certain time */
|
|
@@ -161,6 +161,6 @@ export class Audit {
|
|
|
161
161
|
},
|
|
162
162
|
};
|
|
163
163
|
|
|
164
|
-
return this.client.sendRequest(config, callback
|
|
164
|
+
return this.client.sendRequest(config, callback);
|
|
165
165
|
}
|
|
166
166
|
}
|