Skip to content

Commit 738dc56

Browse files
1.4.1 RC (#22)
* telemetry data removed from endpoints * #14 bugfix * deps update and lint fixes * 1.4.0 * Update CHANGELOG.md * changlog fixed * docs fixes * 1.4.1 dependencies updated
1 parent b46e2c6 commit 738dc56

File tree

10 files changed

+535
-402
lines changed

10 files changed

+535
-402
lines changed

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tests/
55

66
.editorconfig
77
.eslintrc
8-
tsconfig.tests.json
8+
tsconfig.lint.json
99
.DS_Store
1010
.env
1111
.env.example

CHANGELOG.md

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

3+
### 1.4.1
4+
5+
- Dependencies updated.
6+
7+
### 1.4.0
8+
39
- Analytics API added.
410
- ContentContentState API added.
511
- `deletePageTree` method added to `Experimental`.

package-lock.json

Lines changed: 491 additions & 376 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "confluence.js",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
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,17 +16,20 @@
1616
"doc": "typedoc --name \"Confluence.js - Cloud and Server API library\" --out docs ./src/index.ts --plugin typedoc-plugin-extras --footerDate --footerTime --footerTypedocVersion --favicon https://svgshare.com/i/bVi.svg",
1717
"lint": "eslint src --ext .ts",
1818
"lint:fix": "npm run lint -- --fix",
19-
"test:unit": "ava --timeout=2m tests/unit",
19+
"test:unit": "ava tests/unit",
2020
"test:e2e": "ava --timeout=2m --fail-fast --no-worker-threads -c 1 -s tests/e2e/**/*.test.ts"
2121
},
2222
"ava": {
2323
"extensions": [
2424
"ts"
2525
],
2626
"require": [
27-
"ts-node/register",
27+
"@swc-node/register",
2828
"dotenv/config"
29-
]
29+
],
30+
"environmentVariables": {
31+
"SWC_NODE_PROJECT": "./tsconfig.lint.json"
32+
}
3033
},
3134
"keywords": [
3235
"confluence",
@@ -38,30 +41,30 @@
3841
"atlassian"
3942
],
4043
"devDependencies": {
44+
"@swc-node/register": "^1.4.2",
4145
"@types/express": "^4.17.13",
4246
"@types/oauth": "^0.9.1",
4347
"@types/sinon": "^10.0.11",
44-
"@typescript-eslint/eslint-plugin": "^5.17.0",
45-
"@typescript-eslint/parser": "^5.17.0",
46-
"ava": "^4.1.0",
48+
"@typescript-eslint/eslint-plugin": "^5.21.0",
49+
"@typescript-eslint/parser": "^5.21.0",
50+
"ava": "^4.2.0",
4751
"dotenv": "^16.0.0",
48-
"eslint": "^8.12.0",
52+
"eslint": "^8.14.0",
4953
"eslint-config-airbnb": "^19.0.4",
50-
"eslint-config-airbnb-typescript": "^16.2.0",
51-
"eslint-import-resolver-typescript": "^2.7.0",
52-
"eslint-plugin-import": "^2.25.4",
53-
"prettier": "^2.6.1",
54-
"prettier-plugin-jsdoc": "^0.3.36",
55-
"sinon": "^13.0.1",
56-
"ts-node": "^10.7.0",
57-
"typedoc": "^0.22.13",
54+
"eslint-config-airbnb-typescript": "^17.0.0",
55+
"eslint-import-resolver-typescript": "^2.7.1",
56+
"eslint-plugin-import": "^2.26.0",
57+
"prettier": "^2.6.2",
58+
"prettier-plugin-jsdoc": "^0.3.38",
59+
"sinon": "^13.0.2",
60+
"typedoc": "^0.22.15",
5861
"typedoc-plugin-extras": "^2.2.3",
5962
"typescript": "^4.6.3"
6063
},
6164
"dependencies": {
6265
"atlassian-jwt": "^2.0.2",
63-
"axios": "^0.26.1",
66+
"axios": "^0.27.0",
6467
"oauth": "^0.9.15",
65-
"tslib": "^2.3.1"
68+
"tslib": "^2.4.0"
6669
}
6770
}

src/api/content.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export class Content {
113113
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Archive' permission for each of the pages
114114
* in the corresponding space it belongs to.
115115
*/
116-
async archivePages<T = unknown>(
116+
async archivePages<T = Models.LongTask>(
117117
parameters: Parameters.ArchivePages,
118118
callback: Callback<T>
119119
): Promise<void>;
@@ -128,8 +128,8 @@ export class Content {
128128
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Archive' permission for each of the pages
129129
* in the corresponding space it belongs to.
130130
*/
131-
async archivePages<T = unknown>(parameters: Parameters.ArchivePages, callback?: never): Promise<T>;
132-
async archivePages<T = unknown>(parameters: Parameters.ArchivePages, callback?: Callback<T>): Promise<void | T> {
131+
async archivePages<T = Models.LongTask>(parameters: Parameters.ArchivePages, callback?: never): Promise<T>;
132+
async archivePages<T = Models.LongTask>(parameters: Parameters.ArchivePages, callback?: Callback<T>): Promise<void | T> {
133133
const config: RequestConfig = {
134134
url: '/api/content/archive',
135135
method: 'POST',
@@ -377,7 +377,7 @@ export class Content {
377377
* - If the content's type is `comment` or `attachment`, it will be deleted permanently without being trashed.
378378
*
379379
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the
380-
* content is in, and permission to edit the content.
380+
* content is in.
381381
*/
382382
async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback: Callback<T>): Promise<void>;
383383
/**
@@ -389,7 +389,7 @@ export class Content {
389389
* - If the content's type is `comment` or `attachment`, it will be deleted permanently without being trashed.
390390
*
391391
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the
392-
* content is in, and permission to edit the content.
392+
* content is in.
393393
*/
394394
async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback?: never): Promise<T>;
395395
async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback?: Callback<T>): Promise<void | T> {

src/api/models/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export * from './attachmentUpdate';
88
export * from './auditRecord';
99
export * from './auditRecordArray';
1010
export * from './auditRecordCreate';
11+
export * from './appDescriptor';
1112
export * from './blueprintTemplate';
1213
export * from './blueprintTemplateArray';
1314
export * from './breadcrumb';
@@ -85,6 +86,7 @@ export * from './labeledContentPageResponse';
8586
export * from './contentStateSettings';
8687
export * from './labeledContentType';
8788
export * from './longTask';
89+
export * from './contentState';
8890
export * from './userPropertyCreate';
8991
export * from './userPropertyUpdate';
9092
export * from './contentStateContainer';
@@ -100,6 +102,7 @@ export * from './lookAndFeelSettings';
100102
export * from './lookAndFeelUpdated';
101103
export * from './macroInstance';
102104
export * from './menusLookAndFeel';
105+
export * from './lifecycle';
103106
export * from './message';
104107
export * from './migratedUser';
105108
export * from './migratedUserArray';

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ export * from './clients';
22
export * from './config';
33
export * from './requestConfig';
44
export * from './callback';
5+
export * from './pagination';
6+
export * from './utilityTypes';
57

68
export * as Api from './api';
79
export * as Server from './server';
810
export * as Models from './api/models';
911
export * as Parameters from './api/parameters';
12+
export * as ServerModels from './server/models';
13+
export * as ServerParameters from './server/parameters';

src/utilityTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export namespace UtilityTypes {
22
/** Mark some properties which only the former including as optional and set the value to never */
3-
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
3+
export type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
44

55
/** get the XOR type which could make 2 types exclude each other */
66
export type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"module": "CommonJS",
55
"outDir": "out",
66
"strict": true,
7+
"sourceMap": true,
78
"declaration": true,
89
"importHelpers": true,
910
"forceConsistentCasingInFileNames": true

tsconfig.lint.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"include": [
44
"src",
55
"tests"
6-
]
6+
],
7+
"exclude": []
78
}

0 commit comments

Comments
 (0)