Skip to content

Commit 51e047c

Browse files
committed
readme updated
1 parent 8f337ba commit 51e047c

File tree

5 files changed

+39
-7
lines changed

5 files changed

+39
-7
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ const results = await client.search.search({ cql: 'title~"Project"' });
203203
- [template](https://developer.atlassian.com/cloud/confluence/rest/api-group-template/#api-group-template)
204204
- [themes](https://developer.atlassian.com/cloud/confluence/rest/api-group-themes/#api-group-themes)
205205
- [users](https://developer.atlassian.com/cloud/confluence/rest/api-group-users/#api-group-users)
206+
- [userProperties](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-user-properties/#api-group-user-properties)
206207

207208
</details>
208209

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "confluence.js",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "confluence.js is a powerful Node.JS/Browser module that allows you to interact with the Confluence API very easily",
55
"author": "Vladislav Tupikin <[email protected]>",
66
"license": "MIT",

src/clients/confluenceClient.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import {
3333
Themes,
3434
Users,
3535
} from '../api';
36+
import { UserProperties } from '~/api/userProperties';
3637

3738
export class ConfluenceClient extends BaseClient {
3839
constructor(config: Config) {
@@ -77,4 +78,5 @@ export class ConfluenceClient extends BaseClient {
7778
template = new Template(this);
7879
themes = new Themes(this);
7980
users = new Users(this);
81+
userProperties = new UserProperties(this);
8082
}

src/config.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,10 @@ export const MiddlewaresSchema = z.object({
5454
});
5555

5656
export const ConfigSchema = z.object({
57-
host: z
58-
.string()
59-
.url({
60-
message:
61-
'Couldn\'t parse the host URL. Perhaps you forgot to add \'http://\' or \'https://\' at the beginning of the URL?',
62-
}),
57+
host: z.string().url({
58+
message:
59+
'Couldn\'t parse the host URL. Perhaps you forgot to add \'http://\' or \'https://\' at the beginning of the URL?',
60+
}),
6361
baseRequestConfig: z.optional(RequestConfigSchema),
6462
authentication: z.optional(AuthenticationSchema),
6563
middlewares: z.optional(MiddlewaresSchema),
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { beforeEach, describe, expect, it } from 'vitest';
2+
import { ConfluenceClient } from '~/clients';
3+
4+
describe('Confluence Client', () => {
5+
let instance: ConfluenceClient;
6+
7+
beforeEach(() => {
8+
instance = new ConfluenceClient({ host: 'https://127.0.0.1' });
9+
});
10+
11+
it('should have contentComments api group', () => {
12+
expect(instance).toHaveProperty('contentComments');
13+
});
14+
15+
it('should have contentProperties api group', () => {
16+
expect(instance).toHaveProperty('contentProperties');
17+
});
18+
19+
it('should have inlineTasks api group', () => {
20+
expect(instance).toHaveProperty('inlineTasks');
21+
});
22+
23+
it('should have spaceProperties api group', () => {
24+
expect(instance).toHaveProperty('spaceProperties');
25+
});
26+
27+
it('should have userProperties api group', () => {
28+
expect(instance).toHaveProperty('userProperties');
29+
});
30+
});
31+

0 commit comments

Comments
 (0)