Skip to content

Commit

Permalink
1.4.1 RC (#22)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
MrRefactoring authored Apr 25, 2022
1 parent b46e2c6 commit 738dc56
Show file tree
Hide file tree
Showing 10 changed files with 535 additions and 402 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ tests/

.editorconfig
.eslintrc
tsconfig.tests.json
tsconfig.lint.json
.DS_Store
.env
.env.example
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

### 1.4.1

- Dependencies updated.

### 1.4.0

- Analytics API added.
- ContentContentState API added.
- `deletePageTree` method added to `Experimental`.
Expand Down
867 changes: 491 additions & 376 deletions package-lock.json

Large diffs are not rendered by default.

39 changes: 21 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "confluence.js",
"version": "1.4.0",
"version": "1.4.1",
"description": "confluence.js is a powerful Node.JS/Browser module that allows you to interact with the Confluence API very easily",
"author": "Vladislav Tupikin <[email protected]>",
"license": "MIT",
Expand All @@ -16,17 +16,20 @@
"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",
"lint": "eslint src --ext .ts",
"lint:fix": "npm run lint -- --fix",
"test:unit": "ava --timeout=2m tests/unit",
"test:unit": "ava tests/unit",
"test:e2e": "ava --timeout=2m --fail-fast --no-worker-threads -c 1 -s tests/e2e/**/*.test.ts"
},
"ava": {
"extensions": [
"ts"
],
"require": [
"ts-node/register",
"@swc-node/register",
"dotenv/config"
]
],
"environmentVariables": {
"SWC_NODE_PROJECT": "./tsconfig.lint.json"
}
},
"keywords": [
"confluence",
Expand All @@ -38,30 +41,30 @@
"atlassian"
],
"devDependencies": {
"@swc-node/register": "^1.4.2",
"@types/express": "^4.17.13",
"@types/oauth": "^0.9.1",
"@types/sinon": "^10.0.11",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"ava": "^4.1.0",
"@typescript-eslint/eslint-plugin": "^5.21.0",
"@typescript-eslint/parser": "^5.21.0",
"ava": "^4.2.0",
"dotenv": "^16.0.0",
"eslint": "^8.12.0",
"eslint": "^8.14.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^16.2.0",
"eslint-import-resolver-typescript": "^2.7.0",
"eslint-plugin-import": "^2.25.4",
"prettier": "^2.6.1",
"prettier-plugin-jsdoc": "^0.3.36",
"sinon": "^13.0.1",
"ts-node": "^10.7.0",
"typedoc": "^0.22.13",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-import-resolver-typescript": "^2.7.1",
"eslint-plugin-import": "^2.26.0",
"prettier": "^2.6.2",
"prettier-plugin-jsdoc": "^0.3.38",
"sinon": "^13.0.2",
"typedoc": "^0.22.15",
"typedoc-plugin-extras": "^2.2.3",
"typescript": "^4.6.3"
},
"dependencies": {
"atlassian-jwt": "^2.0.2",
"axios": "^0.26.1",
"axios": "^0.27.0",
"oauth": "^0.9.15",
"tslib": "^2.3.1"
"tslib": "^2.4.0"
}
}
10 changes: 5 additions & 5 deletions src/api/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class Content {
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Archive' permission for each of the pages
* in the corresponding space it belongs to.
*/
async archivePages<T = unknown>(
async archivePages<T = Models.LongTask>(
parameters: Parameters.ArchivePages,
callback: Callback<T>
): Promise<void>;
Expand All @@ -128,8 +128,8 @@ export class Content {
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Archive' permission for each of the pages
* in the corresponding space it belongs to.
*/
async archivePages<T = unknown>(parameters: Parameters.ArchivePages, callback?: never): Promise<T>;
async archivePages<T = unknown>(parameters: Parameters.ArchivePages, callback?: Callback<T>): Promise<void | T> {
async archivePages<T = Models.LongTask>(parameters: Parameters.ArchivePages, callback?: never): Promise<T>;
async archivePages<T = Models.LongTask>(parameters: Parameters.ArchivePages, callback?: Callback<T>): Promise<void | T> {
const config: RequestConfig = {
url: '/api/content/archive',
method: 'POST',
Expand Down Expand Up @@ -377,7 +377,7 @@ export class Content {
* - If the content's type is `comment` or `attachment`, it will be deleted permanently without being trashed.
*
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the
* content is in, and permission to edit the content.
* content is in.
*/
async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback: Callback<T>): Promise<void>;
/**
Expand All @@ -389,7 +389,7 @@ export class Content {
* - If the content's type is `comment` or `attachment`, it will be deleted permanently without being trashed.
*
* **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the
* content is in, and permission to edit the content.
* content is in.
*/
async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback?: never): Promise<T>;
async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback?: Callback<T>): Promise<void | T> {
Expand Down
3 changes: 3 additions & 0 deletions src/api/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export * from './attachmentUpdate';
export * from './auditRecord';
export * from './auditRecordArray';
export * from './auditRecordCreate';
export * from './appDescriptor';
export * from './blueprintTemplate';
export * from './blueprintTemplateArray';
export * from './breadcrumb';
Expand Down Expand Up @@ -85,6 +86,7 @@ export * from './labeledContentPageResponse';
export * from './contentStateSettings';
export * from './labeledContentType';
export * from './longTask';
export * from './contentState';
export * from './userPropertyCreate';
export * from './userPropertyUpdate';
export * from './contentStateContainer';
Expand All @@ -100,6 +102,7 @@ export * from './lookAndFeelSettings';
export * from './lookAndFeelUpdated';
export * from './macroInstance';
export * from './menusLookAndFeel';
export * from './lifecycle';
export * from './message';
export * from './migratedUser';
export * from './migratedUserArray';
Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ export * from './clients';
export * from './config';
export * from './requestConfig';
export * from './callback';
export * from './pagination';
export * from './utilityTypes';

export * as Api from './api';
export * as Server from './server';
export * as Models from './api/models';
export * as Parameters from './api/parameters';
export * as ServerModels from './server/models';
export * as ServerParameters from './server/parameters';
2 changes: 1 addition & 1 deletion src/utilityTypes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export namespace UtilityTypes {
/** Mark some properties which only the former including as optional and set the value to never */
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
export type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };

/** get the XOR type which could make 2 types exclude each other */
export type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"module": "CommonJS",
"outDir": "out",
"strict": true,
"sourceMap": true,
"declaration": true,
"importHelpers": true,
"forceConsistentCasingInFileNames": true
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.lint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"include": [
"src",
"tests"
]
],
"exclude": []
}

0 comments on commit 738dc56

Please sign in to comment.