Skip to content

Commit fcdbb74

Browse files
incremental api changes (#146)
* incremental api changes * changelog updated * readme updated * readme updated * import fixes
1 parent 8ab1af2 commit fcdbb74

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2517
-1171
lines changed

CHANGELOG.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,54 @@
11
# Changelog
22

3+
## [2.1.0] - 2025-07-17
4+
### **Deprecations** ⚠️
5+
- **Package dependencies**:
6+
- Replaced deprecated `atlassian-jwt` with `@atlassian/atlassian-jwt`.
7+
- **Content APIs**:
8+
- Deprecated all content-related methods due to [Confluence API changes](https://developer.atlassian.com/cloud/confluence/changelog/#CHANGE-2520):
9+
- `content.getContent`, `content.createContent`, `content.getContentById`, `content.updateContent`, `content.deleteContent`
10+
- `content.getHistoryForContent`, `contentAttachments.getAttachments`, `contentBody.convertContentBody`
11+
- `contentChildrenAndDescendants.getContentChildren`, `contentChildrenAndDescendants.getContentChildrenByType`
12+
- `ContentComments`, `contentLabels.getLabelsForContent`, `ContentProperties`
13+
- `contentVersions.getContentVersions`, `contentVersions.getContentVersion`
14+
- **Group APIs**:
15+
- Deprecated group-related methods:
16+
- `group.removeGroup`, `group.getGroupByQueryParam`, `group.getGroupByName`
17+
- `group.getMembersByQueryParam`, `group.getGroupMembers`
18+
- **Other APIs**:
19+
- Deprecated `InlineTasks`, `SpaceProperties`, `users.getBulkUserMigration`
20+
- Deprecated content restriction methods:
21+
- `contentRestrictions.getContentRestrictionStatusForGroup`
22+
- `contentRestrictions.addGroupToContentRestriction`
23+
- `contentRestrictions.removeGroupByName`
24+
- Deprecated `settings.setLookAndFeelSettings`
25+
- Deprecated space-related methods:
26+
- `space.getSpaces`, `space.getSpace`, `space.getContentForSpace`, `space.getContentByTypeForSpace`
27+
28+
### **New Features**
29+
- **New endpoints**:
30+
- Added `contentBody.bulkAsyncConvertContentBodyResponse` and `contentBody.bulkAsyncConvertContentBodyRequest`
31+
- Added `contentStates.getContentsWithState` method
32+
- Introduced new `UserProperties` API
33+
- **API improvements**:
34+
- Added `status` property to `contentAttachments.downloadAttachment`
35+
- Added `key` property to `longRunningTask.getTasks`
36+
- Added `sitePermissionTypeFilter` property to `search.searchUser`
37+
- Added `alias` property to both `space.createSpace` and `space.createPrivateSpace`
38+
39+
### **API Changes** 🔄
40+
- **Experimental methods moved**:
41+
- Moved experimental user property methods to `userProperties` namespace:
42+
- `getUserProperties`, `getUserProperty`, `createUserProperty`, `updateUserProperty`, `deleteUserProperty`
43+
- **Parameter fixes**:
44+
- Simplified `group.removeGroupById` parameters (no longer requires `operationKey` and `groupId`)
45+
46+
### **Other Changes**
47+
- **Package structure**:
48+
- Reordered `exports` in `package.json` for better module resolution
49+
50+
---
51+
352
## [2.0.0] - 2025-05-09
453
### **Breaking Changes** ⚠️
554
- **Deprecated APIs removed**: APIs marked as deprecated in v1.x have been removed.
@@ -19,12 +68,12 @@
1968
- **Telemetry**: All telemetry/tracking code has been removed.
2069
- No data is collected by the package.
2170

22-
### [1.7.3] - 2024-03-04
71+
## [1.7.3] - 2024-03-04
2372

2473
- Dependencies updated
2574
- Expand properties added for few endpoints
2675

27-
### [1.7.2] - 2023-12-01
76+
## [1.7.2] - 2023-12-01
2877

2978
Changes in this version:
3079

README.md

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -172,37 +172,38 @@ const results = await client.search.search({ cql: 'title~"Project"' });
172172
<details>
173173
<summary>🔽 Available API Groups</summary>
174174

175-
- [analytics](https://developer.atlassian.com/cloud/confluence/rest/api-group-analytics/)
176-
- [audit](https://developer.atlassian.com/cloud/confluence/rest/api-group-audit)
177-
- [content](https://developer.atlassian.com/cloud/confluence/rest/api-group-content/)
178-
- [contentAttachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-group-content---attachments)
179-
- [contentBody](https://developer.atlassian.com/cloud/confluence/rest/api-group-content-body/#api-group-content-body)
180-
- [contentChildrenAndDescendants](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---children-and-descendants/#api-group-content---children-and-descendants)
181-
- [contentComments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content-comments/#api-group-content-comments)
182-
- [contentLabels](https://developer.atlassian.com/cloud/confluence/rest/api-group-content-labels/#api-group-content-labels)
183-
- [contentMacroBody](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---macro-body/#api-group-content---macro-body)
184-
- [contentPermissions](https://developer.atlassian.com/cloud/confluence/rest/api-group-content-permissions/#api-group-content-permissions)
185-
- [contentProperties](https://developer.atlassian.com/cloud/confluence/rest/api-group-content-properties/#api-group-content-properties)
186-
- [contentRestrictions](https://developer.atlassian.com/cloud/confluence/rest/api-group-content-restrictions/#api-group-content-restrictions)
187-
- [contentStates](https://developer.atlassian.com/cloud/confluence/rest/api-group-content-states/#api-group-content-states)
188-
- [contentVersions](https://developer.atlassian.com/cloud/confluence/rest/api-group-content-versions/#api-group-content-versions)
189-
- [contentWatches](https://developer.atlassian.com/cloud/confluence/rest/api-group-content-watches/#api-group-content-watches)
190-
- [dynamicModules](https://developer.atlassian.com/cloud/confluence/rest/api-group-dynamic-modules/#api-group-dynamic-modules)
191-
- [experimental](https://developer.atlassian.com/cloud/confluence/rest/api-group-experimental/#api-group-experimental)
192-
- [group](https://developer.atlassian.com/cloud/confluence/rest/api-group-group/#api-group-group)
193-
- [inlineTasks](https://developer.atlassian.com/cloud/confluence/rest/api-group-inline-tasks/#api-group-inline-tasks)
194-
- [labelInfo](https://developer.atlassian.com/cloud/confluence/rest/api-group-label-info/#api-group-label-info)
195-
- [longRunningTask](https://developer.atlassian.com/cloud/confluence/rest/api-group-long-running-task/#api-group-long-running-task)
196-
- [relation](https://developer.atlassian.com/cloud/confluence/rest/api-group-relation/#api-group-relation)
197-
- [search](https://developer.atlassian.com/cloud/confluence/rest/api-group-search/#api-group-search)
198-
- [settings](https://developer.atlassian.com/cloud/confluence/rest/api-group-settings/#api-group-settings)
199-
- [space](https://developer.atlassian.com/cloud/confluence/rest/api-group-space/#api-group-space)
200-
- [spacePermissions](https://developer.atlassian.com/cloud/confluence/rest/api-group-space-permissions/#api-group-space-permissions)
201-
- [spaceProperties](https://developer.atlassian.com/cloud/confluence/rest/api-group-space-properties/#api-group-space-properties)
202-
- [spaceSettings](https://developer.atlassian.com/cloud/confluence/rest/api-group-space-settings/#api-group-space-settings)
203-
- [template](https://developer.atlassian.com/cloud/confluence/rest/api-group-template/#api-group-template)
204-
- [themes](https://developer.atlassian.com/cloud/confluence/rest/api-group-themes/#api-group-themes)
205-
- [users](https://developer.atlassian.com/cloud/confluence/rest/api-group-users/#api-group-users)
175+
- [audit](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-audit/#api-group-audit)
176+
- [analytics](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-analytics/#api-group-analytics)
177+
- [content](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content/#api-group-content)
178+
- [contentAttachments](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content---attachments/#api-group-content---attachments)
179+
- [contentBody](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-body/#api-group-content-body)
180+
- [contentChildrenAndDescendants](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content---children-and-descendants/#api-group-content---children-and-descendants)
181+
- contentComments - was deprecated
182+
- [contentMacroBody](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content---macro-body/#api-group-content---macro-body)
183+
- [contentLabels](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-labels/#api-group-content-labels)
184+
- [contentPermissions](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-permissions/#api-group-content-permissions)
185+
- contentProperties - was deprecated
186+
- [contentRestrictions](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-restrictions/#api-group-content-restrictions)
187+
- [contentStates](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-states/#api-group-content-states)
188+
- [contentVersions](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-versions/#api-group-content-versions)
189+
- [contentWatches](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-watches/#api-group-content-watches)
190+
- [dynamicModules](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-dynamic-modules/#api-group-dynamic-modules)
191+
- [experimental](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-experimental/#api-group-experimental)
192+
- [group](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-group/#api-group-group)
193+
- inlineTasks - was deprecated
194+
- [labelInfo](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-label-info/#api-group-label-info)
195+
- [longRunningTask](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-long-running-task/#api-group-long-running-task)
196+
- [relation](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-relation/#api-group-relation)
197+
- [search](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-search/#api-group-search)
198+
- [settings](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-settings/#api-group-settings)
199+
- [space](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space/#api-group-space)
200+
- [spacePermissions](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space-permissions/#api-group-space-permissions)
201+
- spaceProperties - was deprecated
202+
- [spaceSettings](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-space-settings/#api-group-space-settings)
203+
- [template](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-template/#api-group-template)
204+
- [themes](https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-themes/#api-group-themes)
205+
- [users](https://developer.atlassian.com/cloud/confluence/rest/v1/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

eslint.config.ts

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import js from '@eslint/js';
22
import globals from 'globals';
33
import tseslint from 'typescript-eslint';
44
import { defineConfig } from 'eslint/config';
5-
import stylisticJs from '@stylistic/eslint-plugin-js';
6-
import stylisticTs from '@stylistic/eslint-plugin-ts';
5+
import stylistic from '@stylistic/eslint-plugin';
76

87
export default defineConfig([
98
{ files: ['**/*.{js,mjs,cjs,ts}'], plugins: { js }, extends: ['js/recommended'] },
@@ -17,30 +16,31 @@ export default defineConfig([
1716
},
1817
},
1918
plugins: {
20-
'@stylistic/js': stylisticJs,
21-
'@stylistic/ts': stylisticTs,
19+
'@stylistic': stylistic,
2220
},
2321
rules: {
24-
'@stylistic/js/no-trailing-spaces': 'error',
25-
'@stylistic/ts/indent': ['error', 2],
26-
'@stylistic/ts/lines-between-class-members': [
22+
'@stylistic/comma-dangle': ['error', 'always-multiline'],
23+
'@stylistic/indent': ['error', 2],
24+
'@stylistic/lines-between-class-members': [
2725
'error',
2826
'always',
2927
{
3028
exceptAfterOverload: true,
3129
exceptAfterSingleLine: true,
3230
},
3331
],
34-
'@stylistic/ts/padding-line-between-statements': [
32+
'@stylistic/no-trailing-spaces': 'error',
33+
'@stylistic/object-curly-spacing': ['error', 'always'],
34+
'@stylistic/padding-line-between-statements': [
3535
'error',
3636
// Return statements
3737
{ blankLine: 'always', prev: '*', next: 'return' },
3838
// Import statements
3939
{ blankLine: 'always', prev: 'import', next: '*' },
4040
{ blankLine: 'any', prev: 'import', next: 'import' },
4141
],
42-
'@stylistic/ts/quotes': ['error', 'single'],
43-
'@stylistic/ts/semi': ['error', 'always'],
42+
'@stylistic/quotes': ['error', 'single'],
43+
'@stylistic/semi': ['error', 'always'],
4444
'@typescript-eslint/consistent-type-imports': [
4545
'error',
4646
{
@@ -49,14 +49,9 @@ export default defineConfig([
4949
},
5050
],
5151
'@typescript-eslint/no-empty-object-type': 'off',
52-
'@typescript-eslint/no-redundant-type-constituents': 'off', // todo fix it
53-
'@typescript-eslint/no-unnecessary-condition': 'error', // todo fix it
54-
'@typescript-eslint/no-unsafe-argument': 'off', // todo fix it
55-
'@typescript-eslint/no-unsafe-assignment': 'off', // todo fix it
56-
'@typescript-eslint/no-unsafe-call': 'off', // todo fix it
52+
'@typescript-eslint/no-unnecessary-condition': 'error',
5753
'@typescript-eslint/no-unsafe-member-access': 'off',
5854
'@typescript-eslint/prefer-optional-chain': 'error',
59-
'@stylistic/ts/object-curly-spacing': ["error", "always"]
6055
},
6156
},
6257
]);

package.json

Lines changed: 29 additions & 28 deletions
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",
@@ -16,13 +16,13 @@
1616
"exports": {
1717
".": {
1818
"types": "./dist/esm/types/index.d.ts",
19-
"import": "./dist/esm/index.mjs",
20-
"require": "./dist/cjs/index.cjs"
19+
"require": "./dist/cjs/index.cjs",
20+
"import": "./dist/esm/index.mjs"
2121
},
2222
"./*": {
2323
"types": "./dist/esm/types/*.d.ts",
24-
"import": "./dist/esm/*.mjs",
25-
"require": "./dist/cjs/*.cjs"
24+
"require": "./dist/cjs/*.cjs",
25+
"import": "./dist/esm/*.mjs"
2626
},
2727
"./package.json": "./package.json"
2828
},
@@ -52,39 +52,40 @@
5252
"lint:fix": "pnpm run lint --fix",
5353
"test:unit": "vitest run tests/unit --minWorkers=1 --maxWorkers=8 --sequence.concurrent",
5454
"test:integration": "vitest run tests/integration --bail=1 --no-file-parallelism --max-concurrency 1 -c vitest.config.mts --hookTimeout 100000 --testTimeout 100000",
55-
"code:formatting": "npm run prettier && npm run lint:fix"
55+
"replace:wiki-rest": "grep -rl '/wiki/rest' src/api | xargs sed -i '' 's|/wiki/rest||g'",
56+
"replace:all": "pnpm run replace:wiki-rest",
57+
"code:formatting": "pnpm run replace:all && pnpm run prettier && pnpm run lint:fix"
5658
},
5759
"dependencies": {
58-
"atlassian-jwt": "^2.0.3",
59-
"axios": "^1.9.0",
60-
"form-data": "^4.0.2",
60+
"@atlassian/atlassian-jwt": "^2.2.0",
61+
"axios": "^1.10.0",
62+
"form-data": "^4.0.3",
6163
"oauth": "^0.10.2",
62-
"zod": "^3.24.4"
64+
"zod": "^3.25.76"
6365
},
6466
"devDependencies": {
65-
"@eslint/js": "^9.26.0",
67+
"@eslint/js": "^9.31.0",
6668
"@rollup/plugin-alias": "^5.1.1",
67-
"@rollup/plugin-commonjs": "^28.0.3",
69+
"@rollup/plugin-commonjs": "^28.0.6",
6870
"@rollup/plugin-node-resolve": "^16.0.1",
69-
"@rollup/plugin-typescript": "^12.1.2",
70-
"@stylistic/eslint-plugin-js": "^4.2.0",
71-
"@stylistic/eslint-plugin-ts": "^4.2.0",
72-
"@types/express": "^4.17.21",
73-
"@types/node": "^20.17.46",
71+
"@rollup/plugin-typescript": "^12.1.4",
72+
"@stylistic/eslint-plugin": "^5.2.0",
73+
"@types/express": "^4.17.23",
74+
"@types/node": "^20.19.8",
7475
"@types/oauth": "^0.9.6",
75-
"dotenv": "^16.5.0",
76-
"eslint": "^9.26.0",
77-
"globals": "^16.1.0",
76+
"dotenv": "^17.2.0",
77+
"eslint": "^9.31.0",
78+
"globals": "^16.3.0",
7879
"jiti": "^2.4.2",
79-
"prettier": "^3.5.3",
80-
"prettier-plugin-jsdoc": "^1.3.2",
81-
"rollup": "^4.40.2",
82-
"rollup-plugin-esnext-to-nodenext": "^1.0.0",
83-
"rollup-plugin-node-externals": "^8.0.0",
80+
"prettier": "^3.6.2",
81+
"prettier-plugin-jsdoc": "^1.3.3",
82+
"rollup": "^4.45.1",
83+
"rollup-plugin-esnext-to-nodenext": "^1.0.1",
84+
"rollup-plugin-node-externals": "^8.0.1",
8485
"tslib": "^2.8.1",
85-
"typedoc": "^0.28.4",
86+
"typedoc": "^0.28.7",
8687
"typescript": "^5.8.3",
87-
"typescript-eslint": "^8.32.1",
88-
"vitest": "^3.1.3"
88+
"typescript-eslint": "^8.37.0",
89+
"vitest": "^3.2.4"
8990
}
9091
}

0 commit comments

Comments
 (0)