[PRODENG-211] integrate JS-API with monorepo (part 1) (#9081)

* integrate JS-API with monorepo

* [ci:force] fix token issue

[ci:force] migrate docs folder

[ci:force] clean personal tokens

* [ci:force] gha workflow support

* [ci:force] npm publish target

* fix js-api test linting

* [ci:force] fix test linting, mocks, https scheme

* [ci:force] fix https scheme

* [ci:force] typescript mappings

* [ci:force] update scripts

* lint fixes

* linting fixes

* fix linting

* [ci:force] linting fixes

* linting fixes

* [ci:force] remove js-api upstream and corresponding scripts

* [ci:force] jsdoc fixes

* fix jsdoc linting

* [ci:force] jsdoc fixes

* [ci:force] jsdoc fixes

* jsdoc fixes

* jsdoc fixes

* jsdoc fixes

* [ci:force] fix jsdoc

* [ci:force] reduce code duplication

* replace 'chai' expect with node.js assert

* replace 'chai' expect with node.js assert

* [ci:force] remove chai and chai-spies for js-api testing

* [ci:force] cleanup and fix imports

* [ci:force] fix linting

* [ci:force] fix unit test

* [ci:force] fix sonar linting findings

* [ci:force] switch activiti api models to interfaces (-2.5% reduction of bundle)

* [ci:force] switch activiti api models to interfaces

* [ci:force] switch AGS api models to interfaces

* [ci:force] switch AGS api models to interfaces

* [ci:force] switch search api models to interfaces

* [ci:force] switch content api models to interfaces where applicable
This commit is contained in:
Denys Vuika 2023-11-21 10:27:51 +00:00 committed by GitHub
parent 804fa2ffd4
commit ea2c0ce229
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1334 changed files with 82605 additions and 1068 deletions

11
.eslintignore Normal file
View File

@ -0,0 +1,11 @@
.angular
nxcache
node_modules
dist
coverage
.github
.vscode
scripts
/angular.json
docs/**/*.md
lib/js-api/docs/**/*.md

View File

@ -1,188 +0,0 @@
module.exports = {
root: true,
ignorePatterns: [
'projects/**/*',
'**/node_modules/**/*',
'lib/cli/node_modules/**/*',
'**/node_modules',
'**/docker',
'**/assets',
'**/scripts',
'**/docs'
],
plugins: ['@nrwl/nx'],
overrides: [
{
files: ['*.ts'],
parserOptions: {
project: ['tsconfig.json', 'e2e/tsconfig.e2e.json'],
createDefaultProgram: true
},
extends: [
'plugin:@nrwl/nx/typescript',
'plugin:@nrwl/nx/angular',
'plugin:@cspell/recommended',
'plugin:@angular-eslint/ng-cli-compat',
'plugin:@angular-eslint/ng-cli-compat--formatting-add-on',
'plugin:@angular-eslint/template/process-inline-templates',
'plugin:jsdoc/recommended-typescript-error'
],
plugins: [
'eslint-plugin-unicorn',
'eslint-plugin-rxjs',
'prettier',
'ban',
'license-header',
'@cspell',
'eslint-plugin-import',
'@angular-eslint/eslint-plugin',
'@typescript-eslint',
'jsdoc'
],
rules: {
// Uncomment this to enable prettier checks as part of the ESLint
// 'prettier/prettier': 'error',
'ban/ban': [
'error',
{ name: 'eval', message: 'Calls to eval is not allowed.' },
{ name: 'fdescribe', message: 'Calls to fdescribe is not allowed' },
{ name: 'fit', message: 'Calls to fit is not allowed' },
{ name: 'xit', message: 'Calls to xit is not allowed' },
{ name: 'xdescribe', message: 'Calls to xdescribe is not allowed' },
{ name: ['test', 'only'], message: 'Calls to test.only is not allowed' },
{ name: ['describe', 'only'], message: 'Calls to describe.only is not allowed' }
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: ['adf', 'app'],
style: 'kebab-case'
}
],
'@angular-eslint/directive-selector': [
'error',
{
type: ['element', 'attribute'],
prefix: ['adf', 'app'],
style: 'kebab-case'
}
],
'@angular-eslint/no-host-metadata-property': 'off',
'@angular-eslint/no-input-prefix': 'error',
'@typescript-eslint/consistent-type-definitions': 'error',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/explicit-member-accessibility': [
'off',
{
accessibility: 'explicit'
}
],
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/prefer-optional-chain': 'warn',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/naming-convention': [
'error',
{
selector: [
'classProperty',
'objectLiteralProperty',
'typeProperty',
'classMethod',
'objectLiteralMethod',
'typeMethod',
'accessor',
'enumMember'
],
format: null,
modifiers: ['requiresQuotes']
}
],
'@typescript-eslint/member-ordering': 'off',
'prefer-arrow/prefer-arrow-functions': 'off',
'prefer-promise-reject-errors': 'error',
'brace-style': 'off',
'@typescript-eslint/brace-style': 'error',
'comma-dangle': 'error',
'default-case': 'error',
'import/order': 'off',
'max-len': [
'error',
{
code: 240
}
],
'no-bitwise': 'off',
'no-console': [
'error',
{
allow: [
'warn',
'dir',
'timeLog',
'assert',
'clear',
'count',
'countReset',
'group',
'groupEnd',
'table',
'dirxml',
'error',
'groupCollapsed',
'Console',
'profile',
'profileEnd',
'timeStamp',
'context'
]
}
],
'no-duplicate-imports': 'error',
'no-multiple-empty-lines': 'error',
'no-redeclare': 'error',
'no-return-await': 'error',
'rxjs/no-create': 'error',
'rxjs/no-subject-unsubscribe': 'error',
'rxjs/no-subject-value': 'error',
'rxjs/no-unsafe-takeuntil': 'error',
'unicorn/filename-case': 'error',
'@typescript-eslint/no-unused-expressions': [
'error',
{
allowShortCircuit: true,
allowTernary: true
}
],
'license-header/header': [
'error',
[
'/*!',
' * @license',
' * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.',
' *',
' * Licensed under the Apache License, Version 2.0 (the "License");',
' * you may not use this file except in compliance with the License.',
' * You may obtain a copy of the License at',
' *',
' * http://www.apache.org/licenses/LICENSE-2.0',
' *',
' * Unless required by applicable law or agreed to in writing, software',
' * distributed under the License is distributed on an "AS IS" BASIS,',
' * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.',
' * See the License for the specific language governing permissions and',
' * limitations under the License.',
' */'
]
]
}
},
{
files: ['*.html'],
extends: ['plugin:@angular-eslint/template/recommended'],
rules: {}
}
]
};

View File

@ -218,16 +218,18 @@ jobs:
# max-parallel: 4
matrix:
unit-tests:
- name: js-api
exclude: "core,insights,content-services,process-services,process-services-cloud,eslint-plugin-eslint-angular"
- name: content-services
exclude: "insights,core,extensions,process-services,process-services-cloud,eslint-plugin-eslint-angular"
exclude: "insights,core,extensions,process-services,process-services-cloud,eslint-plugin-eslint-angular,js-api"
- name: core
exclude: "insights,content-services,process-services,process-services-cloud,eslint-plugin-eslint-angular"
exclude: "insights,content-services,process-services,process-services-cloud,eslint-plugin-eslint-angular,js-api"
- name: insights
exclude: "core,extensions,content-services,process-services-cloud,process-services,eslint-plugin-eslint-angular"
exclude: "core,extensions,content-services,process-services-cloud,process-services,eslint-plugin-eslint-angular,js-api"
- name: process-services
exclude: "core,extensions,content-services,process-services-cloud,insights,eslint-plugin-eslint-angular"
exclude: "core,extensions,content-services,process-services-cloud,insights,eslint-plugin-eslint-angular,js-api"
- name: process-cloud
exclude: "insights,core,extensions,content-services,process-services,eslint-plugin-eslint-angular"
exclude: "insights,core,extensions,content-services,process-services,eslint-plugin-eslint-angular,js-api"
steps:
- name: Checkout repository
uses: actions/checkout@v3

View File

@ -1,214 +0,0 @@
name: Upstream js
on:
schedule:
- cron: '0 */3 * * *' # “At minute 0 past every 3rd hour.”
workflow_dispatch:
inputs:
tag_version:
description: image tag
type: choice
required: true
options:
- alpha
- latest
default: alpha
jobs:
upstream:
runs-on: ubuntu-latest
outputs:
hasAtLeastOneNewVersion: ${{ steps.fetchLatestPkg.outputs.hasAtLeastOneNewVersion }}
hasNewVersionAvailableJS: ${{ steps.fetchLatestPkg.outputs.hasVersionNewJS }}
latestVersionAvailableJS: ${{ steps.fetchLatestPkg.outputs.latestVersionJS }}
hasAtLeastOneNewVersionWithoutPR: ${{ steps.checkPrAlreadyExist.outputs.hasAtLeastOneNewVersionWithoutPR }}
steps:
- id: checkoutRepo
name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- id: fetchLatestPkg
name: Fetch the latest package version
uses: actions/github-script@v6
env:
TAG_VERSION: ${{ inputs.tag_version }}
with:
github-token: ${{ secrets.PAT_WRITE_PKG }}
script: |
const tagVersion = process.env.TAG_VERSION;
console.log('tagVersion:',tagVersion);
const getLatestVersionOf = require('./scripts/github/update/latest-version-of.js');
const { hasVersionNew: hasVersionNewJS, latestVersion: latestVersionJS } = await getLatestVersionOf({github, context, dependencyName: 'js-api', tagVersion});
console.log('hasVersionNewJS', hasVersionNewJS)
console.log('latestVersionJS', latestVersionJS)
if (hasVersionNewJS === 'true' ) {
core.setOutput('hasAtLeastOneNewVersion', 'true');
core.setOutput('hasVersionNewJS', 'true');
core.setOutput('latestVersionJS', latestVersionJS);
} else {
core.setOutput('hasAtLeastOneNewVersion', 'false');
console.log('No new version available, skipping upstream!')
}
- name: Check value after
run: |
echo "The value hasAtLeastOneNewVersion is: ${{ steps.fetchLatestPkg.outputs.hasAtLeastOneNewVersion }}"
echo "The value hasVersionNewJS is: ${{ steps.fetchLatestPkg.outputs.hasVersionNewJS }}"
echo "The value latestVersionJS is: ${{ steps.fetchLatestPkg.outputs.latestVersionJS }}"
- id: checkPrAlreadyExist
name: Check PR with latest already exist
if: ${{ steps.fetchLatestPkg.outputs.hasAtLeastOneNewVersion == 'true' }}
uses: actions/github-script@v6
env:
HAS_NEW_JS_VERSION: ${{ steps.fetchLatestPkg.outputs.hasVersionNewJS }}
LATEST_JS_VERSION: ${{ steps.fetchLatestPkg.outputs.latestVersionJS }}
with:
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
script: |
const hasVersionNewJS = process.env.HAS_NEW_JS_VERSION;
const latestVersionJS = process.env.LATEST_JS_VERSION;
const checkPRAlreadyExist = require('./scripts/github/update/check-pr-already-exist.js');
let isPRWithLatestJSAlreadyAvailable = false;
if (hasVersionNewJS === 'true') {
isPRWithLatestJSAlreadyAvailable = await checkPRAlreadyExist({github, context, version: latestVersionJS});
console.log('isPRWithLatestJSAlreadyAvailable', isPRWithLatestJSAlreadyAvailable);
}
if (isPRWithLatestJSAlreadyAvailable) {
console.log('Warning: Upstream PR already exist, stop the migration execution!');
core.setOutput('hasAtLeastOneNewVersionWithoutPR', 'false');
} else {
core.setOutput('hasAtLeastOneNewVersionWithoutPR', 'true');
}
migrate:
if: ${{ needs.upstream.outputs.hasAtLeastOneNewVersionWithoutPR == 'true' }}
runs-on: ubuntu-latest
needs: upstream
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
fetch-depth: 1
- name: setup NPM
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache-dependency-path: package-lock.json
- name: "General :: dbpci-install"
run: |
npm ci --ignore-scripts
- name: Migration
shell: bash
env:
IS_JS_AFFECTED: ${{ needs.upstream.outputs.hasNewVersionAvailableJS }}
PACKAGE_VERSION_JS: ${{ needs.upstream.outputs.latestVersionAvailableJS }}
BRANCH_TO_CREATE: "upstream-dependencies"
run: |
migrateDependenciesJS() {
echo "Update JS dependencies to: ${PACKAGE_VERSION_JS}"
echo "Calling migration JS"
npx nx migrate @alfresco/js-api@${PACKAGE_VERSION_JS}
echo "Migration JS done"
}
migrateLibDependenciesJS() {
eval projects=( "cli"
"core"
"content-services"
"process-services"
"process-services-cloud"
"insights"
"testing"
"extensions" )
projectslength=${#projects[@]}
for (( i=0; i<${projectslength}; i++ ));
do
echo "Update JS dependencies in adf-${projects[$i]} to: ${PACKAGE_VERSION_JS}"
DESTDIR="lib/${projects[$i]}"
sed -i "${sedi[@]}" "s/\"@alfresco\/js-api\": \".*\"/\"@alfresco\/js-api\": \">=${PACKAGE_VERSION_JS}\"/g" ${DESTDIR}/package.json
done
}
regeneratePackageLock() {
echo "Regenerate lock"
npm i --package-lock-only
echo "Package-lock done."
}
if git checkout ${BRANCH_TO_CREATE} 2>/dev/null ; then
git reset --hard origin/develop
echo "Reset branch"
fi
if [[ "$IS_JS_AFFECTED" == "true" ]]; then
migrateDependenciesJS
migrateLibDependenciesJS
fi
regeneratePackageLock
- name: Commit Code
if: ${{ needs.upstream.outputs.hasAtLeastOneNewVersion == 'true' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[ci:force][auto-commit] Update dependencies JS:${{ needs.upstream.outputs.latestVersionAvailableJS }}"
branch: upstream-dependencies
push_options: '--force'
create_branch: true
- name: Create a Pull request
uses: actions/github-script@v6
env:
PACKAGE_VERSION_JS: ${{ needs.upstream.outputs.latestVersionAvailableJS }}
with:
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
script: |
const { PACKAGE_VERSION_JS } = process.env
const BRANCH_TO_CREATE = 'upstream-dependencies';
const { data: prs } = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
head: `${context.repo.owner}:${BRANCH_TO_CREATE}`,
base: 'develop'
});
if (prs.length < 1) {
const payloadPullRequest = {
owner: context.repo.owner,
repo: context.repo.repo,
title: `GH Auto: Upstream dependencies JS-API:${PACKAGE_VERSION_JS}`,
head: `${context.repo.owner}:${BRANCH_TO_CREATE}`,
base: 'develop',
body: `Automatic PR`
};
console.log('Payload: ',payloadPullRequest);
const { data: pr } = await github.rest.pulls.create(payloadPullRequest);
return pr.number;
} else {
const upstreamPrOpen = prs[0];
// override the title to contains the latest js dep number
const payloadUpdatePullRequest = {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: upstreamPrOpen.number,
title: `GH Auto: Upstream dependencies JS-API:${PACKAGE_VERSION_JS}`,
};
await github.rest.pulls.update(payloadUpdatePullRequest);
return upstreamPrOpen.number;
}
console.log(`Trigger a dispatch event for the monorepo`);

View File

@ -238,6 +238,59 @@
}
}
},
"js-api": {
"projectType": "library",
"root": "lib/js-api/src",
"sourceRoot": "lib/js-api/src",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "lib/js-api/src/tsconfig.lib.json",
"project": "lib/js-api/src/ng-package.json"
},
"configurations": {
"production": {
"project": "lib/js-api/src/ng-package.json",
"tsConfig": "lib/js-api/src/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "lib/js-api/src/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
},
"test": {
"executor": "nx:run-commands",
"options": {
"commands": ["TS_NODE_PROJECT=lib/js-api/test/tsconfig.json mocha --full-trace --config lib/js-api/.mocharc.json"]
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"lib/js-api/**/*.ts"
]
}
},
"npm-publish": {
"executor": "nx:run-commands",
"dependsOn": [
"build"
],
"options": {
"cwd": "dist/libs/js-api",
"commands": [
{
"command": "npm publish --tag {args.tag}",
"forwardAllArgs": true
}
]
}
}
}
},
"core": {
"projectType": "library",
"root": "lib/core",

View File

@ -1,5 +1,5 @@
{
"version": "0.1",
"version": "0.2",
"language": "en",
"words": [
"activiti",

View File

@ -22,7 +22,6 @@ import { TasksPage } from '../pages/tasks.page';
import { TasksListPage } from '../pages/tasks-list.page';
import { TaskDetailsPage } from '../pages/task-details.page';
import { TaskFiltersDemoPage } from '../pages/task-filters-demo.page';
import { UserProcessInstanceFilterRepresentation } from '@alfresco/js-api';
import { browser } from 'protractor';
describe('Task Filters Sorting', () => {
@ -87,12 +86,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277254] Should display tasks under new filter from newest to oldest when they are completed', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Newest first',
icon: 'glyphicon-filter',
filter: { sort: 'created-desc', state: 'completed' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
@ -104,12 +103,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277255] Should display tasks under new filter from oldest to newest when they are completed', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Newest last',
icon: 'glyphicon-filter',
filter: { sort: 'created-asc', state: 'completed' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
@ -121,12 +120,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277256] Should display tasks under new filter from closest due date to farthest when they are completed', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Due first',
icon: 'glyphicon-filter',
filter: { sort: 'due-desc', state: 'completed' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
@ -138,12 +137,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277257] Should display tasks under new filter from farthest due date to closest when they are completed', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Due last',
icon: 'glyphicon-filter',
filter: { sort: 'due-asc', state: 'completed' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
@ -155,12 +154,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277258] Should display tasks under new filter from newest to oldest when they are open ', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Newest first Open',
icon: 'glyphicon-filter',
filter: { sort: 'created-desc', state: 'open' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
@ -172,12 +171,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277259] Should display tasks under new filter from oldest to newest when they are open', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Newest last Open',
icon: 'glyphicon-filter',
filter: { sort: 'created-asc', state: 'open' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
@ -189,12 +188,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277260] Should display tasks under new filter from closest due date to farthest when they are open', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Due first Open',
icon: 'glyphicon-filter',
filter: { sort: 'due-desc', state: 'open' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
@ -206,12 +205,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277261] Should display tasks under new filter from farthest due date to closest when they are open', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Due last Open',
icon: 'glyphicon-filter',
filter: { sort: 'due-asc', state: 'open' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();

View File

@ -18,7 +18,7 @@
import { Injectable } from '@angular/core';
import { Observable, from } from 'rxjs';
import { AlfrescoApiService } from '@alfresco/adf-core';
import { AuditApi, AuditAppPaging, AuditApp, AuditBodyUpdate, AuditEntryPaging, AuditEntryEntry } from '@alfresco/js-api';
import { AuditApi, AuditAppPaging, AuditApp, AuditEntryPaging, AuditEntryEntry } from '@alfresco/js-api';
@Injectable({
providedIn: 'root'
@ -72,7 +72,7 @@ export class AuditService {
updateAuditApp(auditApplicationId: string, auditAppBodyUpdate: boolean, opts?: any): Observable<AuditApp | any> {
const defaultOptions = {};
const queryOptions = Object.assign({}, defaultOptions, opts);
return from(this.auditApi.updateAuditApp(auditApplicationId, new AuditBodyUpdate({ isEnabled: auditAppBodyUpdate }), queryOptions));
return from(this.auditApi.updateAuditApp(auditApplicationId, { isEnabled: auditAppBodyUpdate }, queryOptions));
}
/**

View File

@ -20,10 +20,12 @@ import {
CategoryBody,
CategoryEntry,
CategoryLinkBody,
CategoryPaging, PathInfo,
RequestQuery, ResultNode,
CategoryPaging,
PathInfo,
ResultNode,
ResultSetPaging,
ResultSetPagingList, ResultSetRowEntry
ResultSetPagingList,
ResultSetRowEntry
} from '@alfresco/js-api';
import { fakeAsync, TestBed } from '@angular/core/testing';
import { CategoryService } from './category.service';
@ -42,9 +44,7 @@ describe('CategoryService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
CoreTestingModule
]
imports: [CoreTestingModule]
});
categoryService = TestBed.inject(CategoryService);
@ -119,7 +119,7 @@ describe('CategoryService', () => {
categoryService.searchCategories(name, skipCount, maxItems);
expect(categoryService.searchApi.search).toHaveBeenCalledWith({
query: {
language: RequestQuery.LanguageEnum.Afts,
language: 'afts',
query: `cm:name:"*${name}*" AND TYPE:'cm:category' AND PATH:"/cm:categoryRoot/cm:generalclassifiable//*"`
},
paging: {
@ -136,7 +136,7 @@ describe('CategoryService', () => {
categoryService.searchCategories(name);
expect(categoryService.searchApi.search).toHaveBeenCalledWith({
query: {
language: RequestQuery.LanguageEnum.Afts,
language: 'afts',
query: `cm:name:"*${name}*" AND TYPE:'cm:category' AND PATH:"/cm:categoryRoot/cm:generalclassifiable//*"`
},
paging: {
@ -156,7 +156,9 @@ describe('CategoryService', () => {
});
it('should fetch categories linked to node with nodeId with path included', fakeAsync(() => {
const getLinkedCategoriesSpy = spyOn(categoryService.categoriesApi, 'getCategoryLinksForNode').and.returnValue(Promise.resolve(fakeCategoriesResponse));
const getLinkedCategoriesSpy = spyOn(categoryService.categoriesApi, 'getCategoryLinksForNode').and.returnValue(
Promise.resolve(fakeCategoriesResponse)
);
categoryService.getCategoryLinksForNode(fakeNodeId).subscribe(() => {
expect(getLinkedCategoriesSpy).toHaveBeenCalledOnceWith(fakeNodeId, { include: ['path'] });
});

View File

@ -17,16 +17,7 @@
import { Injectable } from '@angular/core';
import { AlfrescoApiService, UserPreferencesService } from '@alfresco/adf-core';
import {
CategoriesApi,
CategoryBody,
CategoryEntry,
CategoryLinkBody,
CategoryPaging,
RequestQuery,
ResultSetPaging,
SearchApi
} from '@alfresco/js-api';
import { CategoriesApi, CategoryBody, CategoryEntry, CategoryLinkBody, CategoryPaging, ResultSetPaging, SearchApi } from '@alfresco/js-api';
import { from, Observable } from 'rxjs';
@Injectable({ providedIn: 'root' })
@ -115,9 +106,10 @@ export class CategoryService {
*/
searchCategories(name: string, skipCount = 0, maxItems?: number): Observable<ResultSetPaging> {
maxItems = maxItems || this.userPreferencesService.paginationSize;
return from(this.searchApi.search({
return from(
this.searchApi.search({
query: {
language: RequestQuery.LanguageEnum.Afts,
language: 'afts',
query: `cm:name:"*${name}*" AND TYPE:'cm:category' AND PATH:"/cm:categoryRoot/cm:generalclassifiable//*"`
},
paging: {
@ -125,7 +117,8 @@ export class CategoryService {
maxItems
},
include: ['path']
}));
})
);
}
/**

View File

@ -18,14 +18,13 @@
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { Node, NodeEntry, NodePaging, PathElement, ResultSetPaging, Site, SiteEntry, SitePaging, SitePagingList, UserInfo } from '@alfresco/js-api';
import { Node, NodeEntry, NodePaging, ResultSetPaging, Site, SiteEntry, SitePaging, SitePagingList, UserInfo } from '@alfresco/js-api';
import { AppConfigService, DataRow, ThumbnailService, DataColumn } from '@alfresco/adf-core';
import { ContentService } from '../common/services/content.service';
import { UploadService } from '../common/services/upload.service';
import { NodesApiService } from '../common/services/nodes-api.service';
import { FileModel, FileUploadStatus } from '../common/models/file.model';
import { FileUploadCompleteEvent } from '../common/events/file.event';
import { of, throwError } from 'rxjs';
import { DropdownBreadcrumbComponent } from '../breadcrumb';
import { ContentNodeSelectorPanelComponent } from './content-node-selector-panel.component';
@ -129,7 +128,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
it('should trigger siteChange event on init with parent site Title of start folder', () => {
let lastValue: string;
component.siteChange.subscribe((siteTitle: string) => lastValue = siteTitle);
component.siteChange.subscribe((siteTitle: string) => (lastValue = siteTitle));
component.ngOnInit();
fixture.detectChanges();
@ -143,7 +142,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
await fixture.whenStable();
let lastValue: string;
component.siteChange.subscribe((siteTitle: string) => lastValue = siteTitle);
component.siteChange.subscribe((siteTitle: string) => (lastValue = siteTitle));
const sitesDropdown = fixture.debugElement.query(By.directive(DropdownSitesComponent));
sitesDropdown.componentInstance.selectedSite({ value: fakeSiteEntry });
@ -180,7 +179,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
it('should trigger the select event when selection has been made', () => {
const expectedNode = { id: 'fakeid' } as Node;
let lastValue: Node[];
component.select.subscribe((nodes) => lastValue = nodes);
component.select.subscribe((nodes) => (lastValue = nodes));
component.chosenNode = [expectedNode];
expect(lastValue.length).toBe(1);
@ -303,7 +302,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
searchQueryBuilderService.update();
triggerSearchResults(fakeResultSetPaging);
const chosenNode = new Node({ path: { elements: [new PathElement({ name: 'one' })] } });
const chosenNode = new Node({ path: { elements: [{ name: 'one' }] } });
component.onCurrentSelection([{ entry: chosenNode }]);
fixture.detectChanges();
@ -318,7 +317,7 @@ describe('ContentNodeSelectorPanelComponent', () => {
searchQueryBuilderService.update();
triggerSearchResults(fakeResultSetPaging);
const chosenNode = new Node({ path: { elements: [new PathElement({ name: 'fake-path' })] }, isFile: false, isFolder: true });
const chosenNode = new Node({ path: { elements: [{ name: 'fake-path' }] }, isFile: false, isFolder: true });
component.onCurrentSelection([{ entry: chosenNode }]);
fixture.detectChanges();

View File

@ -17,8 +17,6 @@
import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { DownloadEntry } from '@alfresco/js-api';
import { LogService } from '@alfresco/adf-core';
import { NodesApiService } from '../../common/services/nodes-api.service';
import { DownloadZipService } from './services/download-zip.service';
import { ContentService } from '../../common/services/content.service';
@ -39,7 +37,6 @@ export class DownloadZipDialogComponent implements OnInit {
private dialogRef: MatDialogRef<DownloadZipDialogComponent>,
@Inject(MAT_DIALOG_DATA)
public data: any,
private logService: LogService,
private downloadZipService: DownloadZipService,
private nodeService: NodesApiService,
private contentService: ContentService
@ -49,8 +46,6 @@ export class DownloadZipDialogComponent implements OnInit {
if (this.data?.nodeIds?.length > 0) {
if (!this.cancelled) {
this.downloadZip(this.data.nodeIds);
} else {
this.logService.log('Cancelled');
}
}
}
@ -63,12 +58,11 @@ export class DownloadZipDialogComponent implements OnInit {
downloadZip(nodeIds: string[]) {
if (nodeIds && nodeIds.length > 0) {
this.downloadZipService.createDownload({ nodeIds }).subscribe((data: DownloadEntry) => {
this.downloadZipService.createDownload({ nodeIds }).subscribe((data) => {
if (data?.entry?.id) {
const url = this.contentService.getContentUrl(data.entry.id, true);
this.nodeService.getNode(data.entry.id).subscribe((downloadNode) => {
this.logService.log(downloadNode);
const fileName = downloadNode.name;
this.downloadId = data.entry.id;
this.waitAndDownload(data.entry.id, url, fileName);
@ -83,7 +77,7 @@ export class DownloadZipDialogComponent implements OnInit {
return;
}
this.downloadZipService.getDownload(downloadId).subscribe((downloadEntry: DownloadEntry) => {
this.downloadZipService.getDownload(downloadId).subscribe((downloadEntry) => {
if (downloadEntry.entry) {
if (downloadEntry.entry.status === 'DONE') {
this.download(url, fileName);

View File

@ -15,7 +15,7 @@
* limitations under the License.
*/
import { DownloadBodyCreate, DownloadEntry } from '@alfresco/js-api';
import { DownloadBodyCreate, DownloadEntry, Node } from '@alfresco/js-api';
import { from, Observable, of, ReplaySubject, Subject } from 'rxjs';
import { catchError } from 'rxjs/internal/operators/catchError';
import { zipNode, downloadEntry } from './download-zip-data.mock';
@ -40,8 +40,7 @@ class AlfrescoApiMock {
}
export class ContentApiMock {
getContentUrl = (_: string, _1?: boolean, _2?: string): string =>
zipNode.entry.contentUrl;
getContentUrl = (_: string, _1?: boolean, _2?: string): string => zipNode.entry.contentUrl;
}
class CoreMock {
@ -54,13 +53,9 @@ export class NodesApiMock {
}
class DownloadsApiMock {
createDownload = (
_: DownloadBodyCreate,
_2?: any
): Promise<DownloadEntry> => Promise.resolve(downloadEntry);
createDownload = (_: DownloadBodyCreate, _2?: any): Promise<DownloadEntry> => Promise.resolve(downloadEntry);
getDownload = (_: string, _2?: any): Promise<DownloadEntry> =>
Promise.resolve(downloadEntry);
getDownload = (_: string, _2?: any): Promise<DownloadEntry> => Promise.resolve(downloadEntry);
cancelDownload(_: string) {}
}
@ -72,9 +67,7 @@ export class DownloadZipMockService {
}
createDownload(payload: DownloadBodyCreate): Observable<DownloadEntry> {
return from(this.downloadsApi.createDownload(payload)).pipe(
catchError((err) => of(err))
);
return from(this.downloadsApi.createDownload(payload)).pipe(catchError((err) => of(err)));
}
getDownload(downloadId: string): Observable<DownloadEntry> {

View File

@ -28,7 +28,6 @@ import { AlfrescoApiService } from '@alfresco/adf-core';
encapsulation: ViewEncapsulation.None
})
export class NodeLockDialogComponent implements OnInit {
form: UntypedFormGroup;
node: Node = null;
nodeName: string;
@ -46,8 +45,7 @@ export class NodeLockDialogComponent implements OnInit {
@Optional()
@Inject(MAT_DIALOG_DATA)
public data: any
) {
}
) {}
ngOnInit() {
const { node } = this.data;
@ -73,15 +71,17 @@ export class NodeLockDialogComponent implements OnInit {
}
private get nodeBodyLock(): NodeBodyLock {
return new NodeBodyLock({
return {
timeToExpire: this.lockTimeInSeconds,
type: this.form.value.allowOwner ? 'ALLOW_OWNER_CHANGES' : 'FULL',
lifetime: 'PERSISTENT'
});
};
}
private toggleLock(): Promise<NodeEntry> {
const { data: { node } } = this;
const {
data: { node }
} = this;
if (this.form.value.isLocked) {
return this.nodesApi.lockNode(node.id, this.nodeBodyLock);

View File

@ -41,7 +41,6 @@ const CREATE_PERMISSION: string = 'create';
@Injectable({ providedIn: 'root' })
export class CustomResourcesService {
private _peopleApi: PeopleApi;
get peopleApi(): PeopleApi {
this._peopleApi = this._peopleApi ?? new PeopleApi(this.apiService.getInstance());
@ -84,8 +83,7 @@ export class CustomResourcesService {
return this._nodesApi;
}
constructor(private apiService: AlfrescoApiService) {
}
constructor(private apiService: AlfrescoApiService) {}
/**
* Gets files recently accessed by a user.
@ -120,8 +118,8 @@ export class CustomResourcesService {
];
return new Observable((observer) => {
this.peopleApi.getPerson(personId)
.then((person) => {
this.peopleApi.getPerson(personId).then(
(person) => {
const username = person.entry.id;
const filterQueries = [
{ query: `cm:modified:[NOW/DAY-30DAYS TO NOW/DAY+1DAY]` },
@ -135,37 +133,42 @@ export class CustomResourcesService {
});
}
const query = new SearchRequest({
const query: SearchRequest = {
query: {
query: '*',
language: 'afts'
},
filterQueries,
include: ['path', 'properties', 'allowableOperations'],
sort: [{
sort: [
{
type: 'FIELD',
field: 'cm:modified',
ascending: false
}],
}
],
paging: {
maxItems: pagination.maxItems,
skipCount: pagination.skipCount
}
});
return this.searchApi.search(query)
.then((searchResult) => {
};
return this.searchApi.search(query).then(
(searchResult) => {
observer.next(searchResult);
observer.complete();
},
(err) => {
observer.error(err);
observer.complete();
});
}
);
},
(err) => {
observer.error(err);
observer.complete();
});
}
);
});
}
@ -189,12 +192,11 @@ export class CustomResourcesService {
};
return new Observable((observer) => {
this.favoritesApi.listFavorites('-me-', options)
.then((result) => {
this.favoritesApi.listFavorites('-me-', options).then(
(result) => {
const page: FavoritePaging = {
list: {
entries: result.list.entries
.map(({ entry }: any) => {
entries: result.list.entries.map(({ entry }: any) => {
const target = entry.target.file || entry.target.folder;
target.properties = {
...(target.properties || {
@ -218,7 +220,8 @@ export class CustomResourcesService {
(err) => {
observer.error(err);
observer.complete();
});
}
);
});
}
@ -238,12 +241,11 @@ export class CustomResourcesService {
};
return new Observable((observer) => {
this.sitesApi.listSiteMembershipsForPerson('-me-', options)
.then((result: SiteRolePaging) => {
this.sitesApi.listSiteMembershipsForPerson('-me-', options).then(
(result: SiteRolePaging) => {
const page: SiteMemberPaging = new SiteMemberPaging({
list: {
entries: result.list.entries
.map(({ entry: { site } }: any) => {
entries: result.list.entries.map(({ entry: { site } }: any) => {
site.allowableOperations = site.allowableOperations ? site.allowableOperations : [CREATE_PERMISSION];
site.name = site.name || site.title;
return {
@ -260,7 +262,8 @@ export class CustomResourcesService {
(err) => {
observer.error(err);
observer.complete();
});
}
);
});
}
@ -280,23 +283,20 @@ export class CustomResourcesService {
};
return new Observable((observer) => {
this.sitesApi
.listSites(options)
.then(
this.sitesApi.listSites(options).then(
(page) => {
page.list.entries.map(
({ entry }: any) => {
page.list.entries.map(({ entry }: any) => {
entry.name = entry.name || entry.title;
return { entry };
}
);
});
observer.next(page);
observer.complete();
},
(err) => {
observer.error(err);
observer.complete();
});
}
);
});
}
@ -410,14 +410,12 @@ export class CustomResourcesService {
*/
getCorrespondingNodeIds(nodeId: string, pagination: PaginationModel = {}): Observable<string[]> {
if (this.isCustomSource(nodeId)) {
return this.loadFolderByNodeId(nodeId, pagination)
.pipe(map((result: any): string[] => result.list.entries.map((node: any): string => this.getIdFromEntry(node, nodeId))));
return this.loadFolderByNodeId(nodeId, pagination).pipe(
map((result: any): string[] => result.list.entries.map((node: any): string => this.getIdFromEntry(node, nodeId)))
);
} else if (nodeId) {
// cases when nodeId is '-my-', '-root-' or '-shared-'
return from(this.nodesApi.getNode(nodeId)
.then((node) => [node.entry.id]));
return from(this.nodesApi.getNode(nodeId).then((node) => [node.entry.id]));
}
return of([]);
@ -453,7 +451,8 @@ export class CustomResourcesService {
}
private getIncludesFields(includeFields: string[]): string[] {
return ['path', 'properties', 'allowableOperations', 'permissions', 'aspectNames', ...includeFields]
.filter((element, index, array) => index === array.indexOf(element));
return ['path', 'properties', 'allowableOperations', 'permissions', 'aspectNames', ...includeFields].filter(
(element, index, array) => index === array.indexOf(element)
);
}
}

View File

@ -33,7 +33,7 @@ export class SearchPermissionConfigurationService implements SearchConfiguration
) {}
public generateQueryBody(searchTerm: string, maxResults: number, skipCount: number): SearchRequest {
return new SearchRequest({
return {
query: {
query: this.getQuery(searchTerm)
},
@ -46,7 +46,7 @@ export class SearchPermissionConfigurationService implements SearchConfiguration
/* eslint-disable-next-line */
{ query: "TYPE:'cm:authority'" }
]
});
};
}
private getQuery(searchTerm: string) {

View File

@ -51,7 +51,7 @@ export class UserNameColumnComponent implements OnInit {
ngOnInit() {
if (this.context != null) {
const { person, group, authorityId } = this.context.row.obj?.entry ?? this.context.row.obj;
const permissionGroup = authorityId ? { displayName: authorityId } as Group : null;
const permissionGroup = authorityId ? ({ displayName: authorityId } as Group) : null;
this.updatePerson(person);
this.updateGroup(group || permissionGroup);
}

View File

@ -30,7 +30,7 @@ export interface NodePermissionsModel {
export class MemberModel {
id: string;
role: string;
accessStatus: PermissionElement.AccessStatusEnum | string;
accessStatus: 'ALLOWED' | 'DENIED' | string;
entry: {
person?: EcmUserModel;
group?: Group;
@ -62,10 +62,10 @@ export class MemberModel {
}
if (entry.nodeType === 'cm:authorityContainer') {
const group = new Group({
const group: Group = {
id: entry.properties['cm:authorityName'],
displayName: entry.properties['cm:authorityDisplayName'] || entry.properties['cm:authorityName']
});
};
result.id = group.id;
result.entry = { group };

View File

@ -18,10 +18,9 @@
import { PermissionElement } from '@alfresco/js-api';
export class PermissionDisplayModel implements PermissionElement {
authorityId?: string;
name?: string;
accessStatus?: PermissionElement.AccessStatusEnum;
accessStatus?: 'ALLOWED' | 'DENIED' | string;
isInherited: boolean = false;
icon: string;
readonly?: boolean;

View File

@ -18,17 +18,7 @@
import { AlfrescoApiService, TranslationService } from '@alfresco/adf-core';
import { NodesApiService } from '../../common/services/nodes-api.service';
import { EcmUserModel } from '../../common/models/ecm-user.model';
import {
Group,
GroupMemberEntry,
GroupMemberPaging,
GroupsApi,
Node,
PathElement,
PermissionElement,
ResultSetPaging,
SearchRequest
} from '@alfresco/js-api';
import { Group, GroupMemberPaging, GroupsApi, Node, PathElement, PermissionElement, SearchRequest } from '@alfresco/js-api';
import { SearchService } from '../../search/services/search.service';
import { Injectable } from '@angular/core';
import { forkJoin, from, Observable, of, throwError } from 'rxjs';
@ -60,13 +50,14 @@ export class NodePermissionService {
* @returns Array of strings representing the roles
*/
getNodeRoles(node: Node): Observable<string[]> {
if (node.path.elements.some(el => (el.nodeType === 'st:site' || el.nodeType === 'st:sites'))) {
if (node.path.elements.some((el) => el.nodeType === 'st:site' || el.nodeType === 'st:sites')) {
const searchRequest = this.buildRetrieveSiteQueryBody(node.path.elements);
return this.searchApiService.searchByQueryBody(searchRequest).pipe(
switchMap((siteNodeList: ResultSetPaging) => {
switchMap((siteNodeList) => {
const siteName = siteNodeList.list.entries[0].entry.name;
return this.getGroupMembersBySiteName(siteName);
}));
})
);
} else {
return of(node.permissions?.settable);
}
@ -152,7 +143,7 @@ export class NodePermissionService {
private getDuplicatedPermissions(nodeLocallySet: PermissionElement[], permissionListAdded: PermissionElement[]): PermissionElement[] {
const duplicatePermissions: PermissionElement[] = [];
if (nodeLocallySet) {
permissionListAdded.forEach((permission: PermissionElement) => {
permissionListAdded.forEach((permission) => {
const duplicate = nodeLocallySet.find((localPermission) => this.isEqualPermission(localPermission, permission));
if (duplicate) {
duplicatePermissions.push(duplicate);
@ -193,9 +184,9 @@ export class NodePermissionService {
private getGroupMembersBySiteName(siteName: string): Observable<string[]> {
const groupName = 'GROUP_site_' + siteName;
return this.getGroupMemberByGroupName(groupName).pipe(
map((groupMemberPaging: GroupMemberPaging) => {
map((groupMemberPaging) => {
const displayResult: string[] = [];
groupMemberPaging.list.entries.forEach((member: GroupMemberEntry) => {
groupMemberPaging.list.entries.forEach((member) => {
displayResult.push(this.formattedRoleName(member.entry.displayName, 'site_' + siteName));
});
return displayResult;
@ -219,7 +210,7 @@ export class NodePermissionService {
}
private buildRetrieveSiteQueryBody(nodePath: PathElement[]): SearchRequest {
const pathNames = nodePath.map((node: PathElement) => 'name: "' + node.name + '"');
const pathNames = nodePath.map((node) => 'name: "' + node.name + '"');
const builtPathNames = pathNames.join(' OR ');
return {
@ -319,7 +310,7 @@ export class NodePermissionService {
transformNodeToUserPerson(node: Node): { person: EcmUserModel; group: Group } {
let person = null;
let group = null;
let group: Group = null;
if (node.nodeType === 'cm:person') {
const firstName = node.properties['cm:firstName'];
const lastName = node.properties['cm:lastName'];
@ -331,7 +322,7 @@ export class NodePermissionService {
if (node.nodeType === 'cm:authorityContainer') {
const displayName = node.properties['cm:authorityDisplayName'] || node.properties['cm:authorityName'];
const id = node.properties['cm:authorityName'];
group = new Group({ displayName, id });
group = { displayName, id };
}
return { person, group };
}

View File

@ -424,14 +424,11 @@ export abstract class BaseQueryBuilderService {
}
protected get sort(): RequestSortDefinitionInner[] {
return this.sorting.map(
(def) =>
new RequestSortDefinitionInner({
return this.sorting.map((def) => ({
type: def.type,
field: def.field,
ascending: def.ascending
})
);
}));
}
protected get facetQueries(): FacetQuery[] {

View File

@ -32,7 +32,7 @@ export class SearchConfigurationService implements SearchConfigurationInterface
* @returns Query body defined by the parameters
*/
generateQueryBody(searchTerm: string, maxResults: number, skipCount: number): SearchRequest {
return new SearchRequest({
return {
query: {
query: searchTerm ? `'${searchTerm}*' OR name:'${searchTerm}*'` : searchTerm
},
@ -42,6 +42,6 @@ export class SearchConfigurationService implements SearchConfigurationInterface
skipCount
},
filterQueries: [{ query: `TYPE:'cm:folder' OR TYPE:'cm:content'` }, { query: 'NOT cm:creator:System' }]
});
};
}
}

View File

@ -21,7 +21,7 @@ import { SecurityControlsService } from './security-controls-groups-marks-securi
import { fakeAuthorityClearanceApiResponse } from './mock/security-authorities.mock';
import { fakeGroupsApiResponse, createNewSecurityGroupMock } from './mock/security-groups.mock';
import { fakeMarksApiResponse, createNewSecurityMarkMock } from './mock/security-marks.mock';
import { SecurityGroup, SecurityGroupBody, SecurityGroupEntry, SecurityMarkBody, SecurityMarkEntry } from '@alfresco/js-api';
import { SecurityGroupBody, SecurityMarkBody, SecurityMarkEntry } from '@alfresco/js-api';
describe('SecurityControlsService', () => {
let service: SecurityControlsService;
@ -74,15 +74,13 @@ describe('SecurityControlsService', () => {
it('should create new security group', async () => {
spyOn(service.groupsApi, 'createSecurityGroup').and.returnValue(
Promise.resolve(
new SecurityGroupEntry({
entry: new SecurityGroup({
Promise.resolve({
entry: {
groupName: 'TestGroup',
groupType: 'HIERARCHICAL',
id: 'eddf6269-ceba-42c6-b979-9ac445d29a94'
}
})
})
)
);
const response = await service.createSecurityGroup(createNewSecurityGroupMock).toPromise();
@ -110,37 +108,31 @@ describe('SecurityControlsService', () => {
it('should create new security mark', async () => {
spyOn(service.marksApi, 'createSecurityMarks').and.returnValue(
Promise.resolve(
new SecurityMarkEntry({
Promise.resolve({
entry: {
groupId: 'eddf6269-ceba-42c6-b979-9ac445d29a94',
name: 'securityMark1',
id: 'ffBOeOJJ'
}
})
)
);
const response = await service.createSecurityMarks(securityGroupId, createNewSecurityMarkMock);
if (response instanceof SecurityMarkEntry) {
const response = (await service.createSecurityMarks(securityGroupId, createNewSecurityMarkMock)) as SecurityMarkEntry;
securityMarkId = response.entry.id;
expect(response.entry.groupId).toEqual('eddf6269-ceba-42c6-b979-9ac445d29a94');
expect(response.entry.name).toEqual('securityMark1');
expect(response.entry.id).toEqual('ffBOeOJJ');
}
});
it('should edit a security mark', async () => {
spyOn(service.marksApi, 'updateSecurityMark').and.returnValue(
Promise.resolve(
new SecurityMarkEntry({
Promise.resolve({
entry: {
groupId: 'eddf6269-ceba-42c6-b979-9ac445d29a94',
name: 'securityMark1',
id: 'ffBOeOJJ'
}
})
)
);
const response = await service.updateSecurityMark(securityGroupId, securityMarkId, securityMarkBody);
@ -153,15 +145,13 @@ describe('SecurityControlsService', () => {
it('should update a security group', async () => {
spyOn(service.groupsApi, 'updateSecurityGroup').and.returnValue(
Promise.resolve(
new SecurityGroupEntry({
entry: new SecurityGroup({
Promise.resolve({
entry: {
groupName: 'TestGroup',
groupType: 'HIERARCHICAL',
id: 'eddf6269-ceba-42c6-b979-9ac445d29a94'
}
})
})
)
);
const opts = {};
const response = await service.updateSecurityGroup(securityGroupId, securityGroupBody, opts);
@ -172,15 +162,13 @@ describe('SecurityControlsService', () => {
it('should delete a security mark', async () => {
spyOn(service.marksApi, 'deleteSecurityMark').and.returnValue(
Promise.resolve(
new SecurityMarkEntry({
Promise.resolve({
entry: {
groupId: 'eddf6269-ceba-42c6-b979-9ac445d29a94',
name: 'securityMark1',
id: 'ffBOeOJJ'
}
})
)
);
const response = await service.deleteSecurityMark(securityGroupId, securityMarkId);
securityMarkId = response.entry.id;
@ -218,17 +206,15 @@ describe('SecurityControlsService', () => {
it('should update a clearances for authority', async () => {
spyOn(service.authorityClearanceApi, 'updateAuthorityClearance').and.returnValue(
Promise.resolve(
new SecurityMarkEntry({
Promise.resolve({
entry: {
id: 'test-id',
name: 'test-name',
groupId: 'test-groupId'
}
})
)
);
const response = await service
const response = (await service
.updateClearancesForAuthority('test-id', [
{
groupId: 'test-group-id',
@ -236,13 +222,11 @@ describe('SecurityControlsService', () => {
id: 'test-id'
}
])
.toPromise();
.toPromise()) as SecurityMarkEntry;
if (response instanceof SecurityMarkEntry) {
expect(response.entry.id).toEqual('test-id');
expect(response.entry.groupId).toEqual('test-groupId');
expect(response.entry.name).toEqual('test-name');
}
});
it('should reload security groups', (doneCallback) => {

View File

@ -27,7 +27,6 @@ import {
SecurityGroupBody,
SecurityMarkPaging,
SecurityMarkBody,
SecurityGroupPaging,
AuthorityClearanceApi,
AuthorityClearanceGroupPaging,
NodeSecurityMarkBody,
@ -98,13 +97,11 @@ export class SecurityControlsService {
skipCount,
maxItems
})
.then((response: SecurityGroupPaging) => {
.then((response) => {
this.groupsPaginatedSource.next(
(securityControlsGroupResponse = {
pagination: response.list.pagination,
entries: response.list.entries.map(
(group: SecurityGroupEntry) => group.entry
)
entries: response.list.entries.map((group) => group.entry)
})
);
resolve(securityControlsGroupResponse);
@ -119,9 +116,7 @@ export class SecurityControlsService {
* @param input securityGroupBody.
* @returns Observable<SecurityGroupEntry>
*/
createSecurityGroup(
input: SecurityGroupBody
): Observable<SecurityGroupEntry> {
createSecurityGroup(input: SecurityGroupBody): Observable<SecurityGroupEntry> {
this.loadingSource.next(true);
const payload: SecurityGroupBody = {
...input
@ -131,9 +126,7 @@ export class SecurityControlsService {
};
const promise = this.groupsApi.createSecurityGroup(payload, opts);
return from(promise).pipe(
finalize(() => this.loadingSource.next(false))
);
return from(promise).pipe(finalize(() => this.loadingSource.next(false)));
}
/**
@ -143,15 +136,10 @@ export class SecurityControlsService {
* @param input securityMarkBody[].
* @returns Promise<SecurityMarkPaging | SecurityMarkEntry>
*/
createSecurityMarks(
securityGroupId: string,
input: SecurityMarkBody[]
): Promise<SecurityMarkPaging | SecurityMarkEntry> {
createSecurityMarks(securityGroupId: string, input: SecurityMarkBody[]): Promise<SecurityMarkPaging | SecurityMarkEntry> {
this.loadingSource.next(true);
const promise = this.marksApi.createSecurityMarks(
securityGroupId,
input
)
const promise = this.marksApi
.createSecurityMarks(securityGroupId, input)
.then((result) => {
this.loadingSource.next(false);
return result;
@ -172,23 +160,18 @@ export class SecurityControlsService {
* @param skipCount The number of entities that exist in the collection before those included in this list.
* @returns Promise<SecurityControlsMarkResponse>
*/
getSecurityMark(
securityGroupId: string,
skipCount = DEFAULT_SKIP_COUNT
): Promise<SecurityControlsMarkResponse> {
getSecurityMark(securityGroupId: string, skipCount = DEFAULT_SKIP_COUNT): Promise<SecurityControlsMarkResponse> {
let securityControlsMarkResponse: SecurityControlsMarkResponse;
return new Promise((resolve, reject) => {
this.marksApi
.getSecurityMarks(securityGroupId, {
skipCount
})
.then((response: SecurityMarkPaging) => {
.then((response) => {
this.marksPaginatedSource.next(
(securityControlsMarkResponse = {
pagination: response.list.pagination,
entries: response.list.entries.map(
(mark: SecurityMarkEntry) => mark.entry
)
entries: response.list.entries.map((mark) => mark.entry)
})
);
resolve(securityControlsMarkResponse);
@ -205,11 +188,7 @@ export class SecurityControlsService {
* @param opts additional information about the security group
* @returns Promise<SecurityGroupEntry>
*/
updateSecurityGroup(
securityGroupId: string,
input: SecurityGroupBody,
opts?: any
): Promise<SecurityGroupEntry> {
updateSecurityGroup(securityGroupId: string, input: SecurityGroupBody, opts?: any): Promise<SecurityGroupEntry> {
this.loadingSource.next(true);
const payload: SecurityGroupBody = {
...input
@ -219,11 +198,8 @@ export class SecurityControlsService {
DEFAULT_INCLUDE
};
}
const promise = this.groupsApi.updateSecurityGroup(
securityGroupId,
payload,
opts
)
const promise = this.groupsApi
.updateSecurityGroup(securityGroupId, payload, opts)
.then((result) => {
this.loadingSource.next(false);
return result;
@ -244,20 +220,13 @@ export class SecurityControlsService {
* @param input securityMarkBody.
* @returns Promise<SecurityMarkEntry>
*/
updateSecurityMark(
securityGroupId: string,
securityMarkId: string,
input: SecurityMarkBody
): Promise<SecurityMarkEntry> {
updateSecurityMark(securityGroupId: string, securityMarkId: string, input: SecurityMarkBody): Promise<SecurityMarkEntry> {
this.loadingSource.next(true);
const payload: SecurityMarkBody = {
...input
};
const promise = this.marksApi.updateSecurityMark(
securityGroupId,
securityMarkId,
payload
)
const promise = this.marksApi
.updateSecurityMark(securityGroupId, securityMarkId, payload)
.then((result) => {
this.loadingSource.next(false);
return result;
@ -276,15 +245,11 @@ export class SecurityControlsService {
* @param securityGroupId The key for the security group id.
* @returns Observable<void>
*/
deleteSecurityGroup(
securityGroupId: string
): Observable<void> {
deleteSecurityGroup(securityGroupId: string): Observable<void> {
this.loadingSource.next(true);
const promise = this.groupsApi.deleteSecurityGroup(securityGroupId);
return from(promise).pipe(
finalize(() => this.loadingSource.next(false))
);
return from(promise).pipe(finalize(() => this.loadingSource.next(false)));
}
/**
@ -294,15 +259,10 @@ export class SecurityControlsService {
* @param securityMarkId The key for the security mark id.
* @returns Promise<SecurityMarkEntry>
*/
deleteSecurityMark(
securityGroupId: string,
securityMarkId: string
): Promise<SecurityMarkEntry> {
deleteSecurityMark(securityGroupId: string, securityMarkId: string): Promise<SecurityMarkEntry> {
this.loadingSource.next(true);
const promise = this.marksApi.deleteSecurityMark(
securityGroupId,
securityMarkId
)
const promise = this.marksApi
.deleteSecurityMark(securityGroupId, securityMarkId)
.then((result) => {
this.loadingSource.next(false);
return result;
@ -330,14 +290,12 @@ export class SecurityControlsService {
): Observable<AuthorityClearanceGroupPaging> {
this.loadingSource.next(true);
const opts = {
skipCount, maxItems
skipCount,
maxItems
};
const promise =
this.authorityClearanceApi.getAuthorityClearanceForAuthority(authorityName, opts);
const promise = this.authorityClearanceApi.getAuthorityClearanceForAuthority(authorityName, opts);
return from(promise).pipe(
finalize(() => this.loadingSource.next(false))
);
return from(promise).pipe(finalize(() => this.loadingSource.next(false)));
}
/**
@ -347,7 +305,10 @@ export class SecurityControlsService {
* @param securityMarksList NodeSecurityMarkBody[]
* @returns Observable<SecurityMarkEntry | SecurityMarkPaging>
*/
updateClearancesForAuthority(authorityName: string, securityMarksList: NodeSecurityMarkBody[]): Observable<SecurityMarkEntry | SecurityMarkPaging> {
updateClearancesForAuthority(
authorityName: string,
securityMarksList: NodeSecurityMarkBody[]
): Observable<SecurityMarkEntry | SecurityMarkPaging> {
this.loadingSource.next(true);
const promise = this.authorityClearanceApi.updateAuthorityClearance(authorityName, securityMarksList);

View File

@ -25,15 +25,13 @@ import { RatingServiceInterface } from './rating.service.interface';
providedIn: 'root'
})
export class RatingService implements RatingServiceInterface {
private _ratingsApi: RatingsApi;
get ratingsApi(): RatingsApi {
this._ratingsApi = this._ratingsApi ?? new RatingsApi(this.apiService.getInstance());
return this._ratingsApi;
}
constructor(private apiService: AlfrescoApiService) {
}
constructor(private apiService: AlfrescoApiService) {}
/**
* Gets the current user's rating for a node.
@ -55,10 +53,10 @@ export class RatingService implements RatingServiceInterface {
* @returns Details about the rating, including the new value
*/
postRating(nodeId: string, ratingType: string, vote: any): Observable<RatingEntry | any> {
const ratingBody: RatingBody = new RatingBody({
const ratingBody: RatingBody = {
id: ratingType,
myRating: vote
});
};
return from(this.ratingsApi.createRating(nodeId, ratingBody));
}

View File

@ -8,7 +8,9 @@
"@alfresco/adf-extensions": ["../../../dist/libs/extensions"],
"@alfresco/adf-extensions/*": ["../../../dist/libs/extensions/*"],
"@alfresco/adf-core": ["../../../dist/libs/core"],
"@alfresco/adf-core/*": ["../../../dist/libs/core/*"]
"@alfresco/adf-core/*": ["../../../dist/libs/core/*"],
"@alfresco/js-api": ["../../../dist/libs/js-api"],
"@alfresco/js-api/*": ["../../../dist/libs/js-api/*"]
}
}
}

View File

@ -10,7 +10,8 @@
"@alfresco/adf-core/auth": ["../auth/src/index.ts"],
"@alfresco/adf-core/shell": ["../shell/src/index.ts"],
"@alfresco/adf-core/api": ["../api/src/index.ts"],
"@alfresco/js-api": ["../../../dist/libs/js-api"],
"@alfresco/js-api/*": ["../../../dist/libs/js-api/*"]
}
},
"exclude": ["./test.ts", "**/*.spec.ts", "**/*.test.ts"],

View File

@ -8,7 +8,9 @@
"@alfresco/adf-extensions": ["../../../dist/libs/extensions"],
"@alfresco/adf-extensions/*": ["../../../dist/libs/extensions/*"],
"@alfresco/adf-core": ["../../../dist/libs/core"],
"@alfresco/adf-core/*": ["../../../dist/libs/core/*"]
"@alfresco/adf-core/*": ["../../../dist/libs/core/*"],
"@alfresco/js-api": ["../../../dist/libs/js-api"],
"@alfresco/js-api/*": ["../../../dist/libs/js-api/*"]
}
}
}

52
lib/js-api/.eslintrc.json Normal file
View File

@ -0,0 +1,52 @@
{
"extends": ["../../.eslintrc.js"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts"],
"extends": ["plugin:@nrwl/nx/angular"],
"rules": {
"no-underscore-dangle": ["warn", { "allowAfterThis": true }],
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": [
"off",
{
"accessibility": "explicit"
}
],
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-var-requires": "error",
"comma-dangle": "error",
"default-case": "error",
"import/order": "off",
"max-len": [
"error",
{
"code": 240
}
],
"no-bitwise": "off",
"no-duplicate-imports": "error",
"no-multiple-empty-lines": "error",
"no-return-await": "error",
"unicorn/filename-case": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/consistent-type-assertions": "off",
"jsdoc/check-param-names": "off",
"jsdoc/require-returns": "off",
"jsdoc/require-param": "off",
"jsdoc/check-tag-names": "off",
"@typescript-eslint/no-shadow": "warn",
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"no-redeclare": "off",
"space-before-function-paren": "off",
"@typescript-eslint/no-empty-interface": "warn"
}
}
]
}

7
lib/js-api/.mocharc.json Normal file
View File

@ -0,0 +1,7 @@
{
"extensions": ["ts"],
"spec": ["lib/js-api/test/**/*.spec.ts"],
"node-option": [
"loader=ts-node/register"
]
}

View File

View File

@ -0,0 +1,22 @@
---
Title: Audit info, @alfresco/js-api 4.10.0
---
# Audit information for @alfresco/js-api 4.10.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed: 41
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,22 @@
---
Title: Audit info, @alfresco/js-api 4.11.0
---
# Audit information for @alfresco/js-api 4.11.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed: 41
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,22 @@
---
Title: Audit info, @alfresco/js-api 4.7.0
---
# Audit information for @alfresco/js-api 4.7.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed:
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,22 @@
---
Title: Audit info, @alfresco/js-api 4.8.0
---
# Audit information for @alfresco/js-api 4.8.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed:
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,22 @@
---
Title: Audit info, @alfresco/js-api 4.9.0
---
# Audit information for @alfresco/js-api 4.9.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed: 41
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,22 @@
---
Title: Audit info, @alfresco/js-api 5.0.0
---
# Audit information for @alfresco/js-api 5.0.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed: 41
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,22 @@
---
Title: Audit info, @alfresco/js-api 5.1.0
---
# Audit information for @alfresco/js-api 5.1.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed: 42
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,22 @@
---
Title: Audit info, @alfresco/js-api 5.2.0
---
# Audit information for @alfresco/js-api 5.2.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed: 42
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,22 @@
---
Title: Audit info, @alfresco/js-api 5.3.0
---
# Audit information for @alfresco/js-api 5.3.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed: 42
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,22 @@
---
Title: Audit info, @alfresco/js-api 5.4.0
---
# Audit information for @alfresco/js-api 5.4.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed: 42
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,22 @@
---
Title: Audit info, @alfresco/js-api 5.5.0
---
# Audit information for @alfresco/js-api 5.5.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed: 39
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,22 @@
---
Title: Audit info, @alfresco/js-api 6.0.0
---
# Audit information for @alfresco/js-api 6.0.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed: 39
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,22 @@
---
Title: Audit info, @alfresco/js-api 6.1.0
---
# Audit information for @alfresco/js-api 6.1.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed:
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,24 @@
---
Title: Audit info, @alfresco/js-api 6.2.0
---
# Audit information for @alfresco/js-api 6.2.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 1
- Low risk: 0
Dependencies analyzed:
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |
|moderate | semver | &#34;&lt;7.5.2&#34; |

View File

@ -0,0 +1,23 @@
---
Title: Audit info, @alfresco/js-api 7.0.0
---
# Audit information for @alfresco/js-api 7.0.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed:
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,23 @@
---
Title: Audit info, @alfresco/js-api 7.1.0
---
# Audit information for @alfresco/js-api 7.1.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed:
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,23 @@
---
Title: Audit info, @alfresco/js-api 7.2.0
---
# Audit information for @alfresco/js-api 7.2.0
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 0
- Moderate risk: 0
- Low risk: 0
Dependencies analyzed:
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |

View File

@ -0,0 +1,320 @@
# Authentication JS-API
## Login
AlfrescoApi({alfrescoHost, activitiHost, contextRoot, ticket});
| Property | Description | default value |
|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|
| hostEcm | (Optional) The Ip or Name of the host where your Alfresco instance is running | http://127.0.0.1:8080 |
| hostBpm | (Optional) The Ip or Name of the host where your Activiti instance is running | http://127.0.0.1:9999 |
| authType | (Optional) can be 'BASIC' or 'OAUTH' | 'BASIC' |
| oauth2 | (Optional) configuration for SSO | |
| contextRoot | (Optional) that define the context Root of the Alfresco ECM API default value is alfresco | alfresco |
| contextRootBpm | (Optional) that define the context Root of the Activiti API default value is activiti-app | alfresco |
| tenant | (Optional) needed in case of multi tenant content service | '-default-' |
| provider | (Optional) default value is ECM. This parameter can accept as value ECM BPM or ALL to use the API and Login in the ECM, Activiti BPM or Both | alfresco |
| ticket | (Optional) only if you want login with the ticket see example below | |
| disableCsrf | To disable CSRF Token to be submitted. Only for Activiti call | false |
| withCredentials | (Optional) configuration for SSO, requires CORS on ECM | false |
| oauthInit | (Optional) if false skip the OAuth2 initialization | true |
### Login with Username and Password BPM and ECM
**Example**
```javascript
const alfrescoApi = new AlfrescoApi({ provider: 'ALL' });
try {
await alfrescoJsApi.login('admin', 'admin');
console.log('API called successfully Login in BPM and ECM performed ');
} catch (error) {
console.error(error);
}
```
### Login with Username and Password ECM
**Example**
```javascript
const alfrescoJsApi = new AlfrescoApi();
try {
const data = await alfrescoJsApi.login('admin', 'admin');
console.log('API called successfully Login ticket:' + data);
// The output will be: API called successfully Login ticket: TICKET_4479f4d3bb155195879bfbb8d5206f433488a1b1
} catch (error) {
console.error(error);
}
```
### Login with ticket
If you already know thw ticket when you invoke the constructor you can pass it as parameter in the constructor otherwise you can call the login with ticket that will validate the ticket against the server
#### Login with ticket ECM
This authentication validate also the ticket against the server
**Example**
```javascript
const ticket = 'TICKET_4479f4d3bb155195879bfbb8d5206f433488a1b1';
try {
await alfrescoJsApi.loginTicket(ticket);
console.log('valid ticket you are logged in');
} catch (error) {
console.error(error);
}
```
#### Login with ticket ECM/BPM as parameter in the constructor
With this authentication the ticket is not validated against the server
**Example**
```javascript
// Login with ECM ticket
const alfrescoApi = new AlfrescoApi({
ticketEcm:'TICKET_4479f4d3bb155195879bfbb8d5206f433488a1b1',
hostEcm:'http://127.0.0.1:8080'
});
// Login with BPM ticket
const alfrescoApi = new AlfrescoApi({
ticketBpm: 'Basic YWRtaW46YWRtaW4=',
hostBpm:'http://127.0.0.1:9999'
});
// Login with ECM and BPM tickets
const alfrescoApi = new AlfrescoApi({
ticketEcm:'TICKET_4479f4d3bb155195879bfbb8d5206f433488a1b1',
ticketBpm: 'Basic YWRtaW46YWRtaW4=',
hostEcm:'http://127.0.0.1:8080',
hostBpm:'http://127.0.0.1:9999'
});
```
### Login with Username and Password BPM
**Example**
```javascript
const alfrescoApi = new AlfrescoApi({ provider:'BPM' });
try {
await alfrescoJsApi.login('admin', 'admin');
console.log('API called successfully Login in Activiti BPM performed ');
} catch (error) {
console.error(error);
}
```
### Login with OAUTH2 Alfresco authorization server
#### Implicit Flow
If your want to redirect to the authorization server and login there, you can use the implicit flow to login
**oauth2 properties**
| Property | Description | Default Value |
|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------|
| host | Your oauth2 server URL | null |
| clientId | Your clientId oauth2 | null |
| secret | Your secret oauth2 | null |
| scope | Your scope | null |
| implicitFlow | true/false | false |
| redirectUri | url to be redirect after login | null |
| redirectLogout | url to be redirect after logout optional, if is nor present the redirectUri will be used | null |
| refreshTokenTimeout | millisecond value, after how many millisecond you want refresh the token | 30000 |
| redirectSilentIframeUri | url to be redirect after silent refresh login | /assets/silent-refresh.html |
| silentLogin | direct execute the implicit login without the need to call AlfrescoJsApi.implicitLogin() method | false |
| publicUrls | list of public urls that don't need authorization. It is possible too pass absolute paths and string patterns. In patterns you can use * or ** wildcards. Single means that you can have anything in one part of URL for example http://some-public-url/path/* matches with http://some-public-url/path/test. Double means that you can have anything in any number of parts, for example http://some-public-url/path/** matches with http://some-public-url/path/test/some-test. |
| authorizationUrl | authorization url, relative to the host | /protocol/openid-connect/auth |
| tokenUrl | token url, relative to the host | /protocol/openid-connect/token |
| logoutUrl | logout url, relative to the host | /protocol/openid-connect/logout |
The api/js-api will automatically redirect you to the login page anf refresh the token if necessary
**Events**
| Property | Description | Default Value |
|-------------------|--------------------------------------------------------------------------------------------------------------|---------------|
| implicit_redirect | triggered when the user is redirect to the auth server return url parameter of the redirect | |
| discovery | triggered when all the openId discovery url phase is terminated return an object with all the discovered url | |
| token_issued | triggered when a new token is issued | |
The api/js-api will automatically redirect you to the login page and refresh the token if necessary
**Example**
```javascript
const alfrescoApi = new AlfrescoApi({
oauth2: {
host: 'HOST_OAUTH2_SERVER',
clientId: 'YOUR_CLIENT_ID',
secret: 'SECRET',
scope: 'openid',
implicitFlow: true,
redirectUri: 'YOUR_HOME_APP_URL',
silentRefreshTimeout: '600000' //Optional parameter 10 minutes default value
},
authType: 'OAUTH',
provider: 'ALL'
});
alfrescoJsApi.implicitLogin();
```
**Example skip login form (implicitFlow)**
```javascript
const alfrescoApi = new AlfrescoApi({
oauth2: {
host: 'HOST_OAUTH2_SERVER',
clientId: 'YOUR_CLIENT_ID',
secret: 'SECRET',
scope: 'openid',
implicitFlow: true,
redirectUri: 'YOUR_HOME_APP_URL',
silentRefreshTimeout: '600000', // Optional parameter 10 minutes default value,
silentLogin: true,
publicUrls: ['PUBLIC_URL', 'URL_PATTERN']
},
authType: 'OAUTH',
provider: 'ALL'
});
```
#### Password Flow
If your auth endpoint is different from the standard one "/oauth/token" you can override it through the property authPath
**Example**
```javascript
const alfrescoApi = new AlfrescoApi({
oauth2: {
host: 'HOST_OAUTH2_SERVER',
clientId: 'YOUR_CLIENT_ID',
secret: 'SECRET',
authPath:'my-custom-auth-endpoint/token'
},
authType: 'OAUTH',
provider: 'ALL'
});
try {
await alfrescoJsApi.login('admin', 'admin');
console.log('API called successfully Login in with authorization server performed');
} catch (error) {
console.error(error);
}
```
After the login if you want refresh your token you can use this call
**Example**
```javascript
try {
await alfrescoJsApi.refreshToken();
console.log('Your token has been refreshed');
} catch (error) {
console.error(error);
}
```
## Logout
```javascript
alfrescoJsApi.logout();
```
**Example**
```javascript
try {
await alfrescoJsApi.logout();
console.log('Successfully logged out');
} catch (error) {
console.error('Error logging out');
}
```
## isLoggedIn
```javascript
alfrescoJsApi.isLoggedIn()
```
Returns `true` if you are logged in, and `false` if you are not.
**Example**
```javascript
const isLoggedIn = alfrescoJsApi.isLoggedIn();
if (isLoggedIn) {
console.log('You are logged in');
} else {
console.log('You are not logged in');
}
```
## Get tickets
### getTicketEcm()
After the log in you can retrieve you ECM ticket
```javascript
const ecmTicket = alfrescoJsApi.getTicketEcm() ;
console.log('This is your ECM ticket ' + ecmTicket);
```
### getTicketBpm()
After the log in you can retrieve you BPM ticket
```javascript
const bpmTicket = alfrescoJsApi.getTicketBpm();
console.log('This is your BPM ticket ' + bpmTicket);
```
**Events login/logout**
The login/logout are also an EventEmitter which you can register to listen to any of the following event types:
- unauthorized (If this event is triggered a call to the Api was unauthorized)
- success (If this event is triggered the login was success you can use this event > instead the login promise)
- logout (If this event is triggered the client is successfully logout)
**Example**
```javascript
alfrescoJsApi.login('admin', 'admin')
.on('unauthorized', () => {
console.log('You are unauthorized you can use this event to redirect to login');
});
alfrescoJsApi.login('admin', 'admin')
.on('success', () => {
console.log('Success Login');
});
alfrescoJsApi.logout()
.on('logout', () => {
console.log('Successfully Logout');
});
```

View File

@ -0,0 +1,563 @@
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
<!-- toc -->
- [BPM](#bpm)
* [Task Api](#task-api)
+ [List Task](#list-task)
+ [Get Task](#get-task)
+ [Filter Tasks](#filter-tasks)
+ [Complete Task](#complete-task)
+ [Get Task Form](#get-task-form)
+ [Complete Task Form](#complete-task-form)
* [Process Api](#process-api)
+ [Get Process Instances](#get-process-instances)
* [Models Api](#models-api)
+ [Get Model](#get-model)
* [Report Api](#report-api)
+ [Create default Reports](#create-default-reports)
+ [Get Reports](#get-reports)
+ [Report Params](#report-params)
* [Report Process Definitions](#report-process-definitions)
* [Tasks of process definition](#tasks-of-process-definition)
* [Generate reports](#generate-reports)
* [Update report details](#update-report-details)
* [Export to csv](#export-to-csv)
* [Save Report](#save-report)
* [Delete report](#delete-report)
<!-- tocstop -->
<!-- markdown-toc end -->
# BPM
A complete list of all the BPM methods is available here: [Activiti API](../src/api/activiti-rest-api/README.md).
Below you can find some common examples.
## Task Api
Below you can find some example relative to the Activiti process api for all the possible method go to [Tasks Api](../src/api/activiti-rest-api/docs/TasksApi.md) documentation.
### List Task
```javascript
TasksApi.listTasks(tasksQuery)
```
return a list of task based on the `tasksQuery` query
#### Example
```javascript
import { TasksApi, TaskQueryRepresentation } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*...*/);
const taskApi = TasksApi(alfrescoApi);
const tasksQuery = new TaskQueryRepresentation();
taskApi.listTasks(tasksQuery).then(
(data) => {
console.log('listTasks ' + data);
},
(error) => {
console.log('Error' + error);
});
```
### Get Task
```javascript
TasksApi.getTask(taskId)
```
Returns the [TaskRepresentation](/src/api/activiti-rest-api/docs/TaskRepresentation.md) of single task by id
**Parameters**
| Name | Type | Description |
|--------|--------|-------------|
| taskId | String | taskId |
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const taskApi = TasksApi(this.alfrescoApi);
const taskId = '10'; // String | taskId
taskApi.getTask(taskId).then(
(data) => {
console.log('Task representation ' + data);
}, (error) => {
console.log('Error' + error);
});
```
### Filter Tasks
```javascript
TasksApi.filterTasks(requestTasks)
```
Returns the [ResultListDataRepresentation](../src/api/activiti-rest-api/docs/ResultListDataRepresentation«TaskRepresentation».md) that is a filtered list of all the tasks.
**Parameters**
| Name | Type | Description |
|--------------|------------------------------------------------------------------------------------------------------|--------------|
| requestTasks | [TaskFilterRequestRepresentation](../src/api/activiti-rest-api/docs/TaskFilterRequestRepresentation.md) | requestTasks |
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const taskApi = TasksApi(alfrescoApi);
const requestTasks = new TaskFilterRequestRepresentation({
appDefinitionId: 1
});
taskApi.filterTasks(requestTasks).then(
(data) => {
console.log('Task filter list ' + data);
},
(error) => {
console.log('Error' + error);
});
```
### Complete Task
```javascript
TasksApi.completeTask(taskId)
```
To complete a task (standalone or without a task form).
**Parameters**
| Name | Type | Description |
|------------|------------|-------------|
| **taskId** | **String** | taskId |
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const taskApi = TasksApi(alfrescoApi);
const taskId = '10'; // String | taskId
taskApi.taskApi.completeTask(taskId).then(
() => {
console.log('Task completed');
},
(error) => {
console.log('Error' + error);
});
```
### Get Task Form
```javascript
TasksApi.getTaskForm(taskId)
```
Retrieve the [Task Form](../src/api/activiti-rest-api/docs/FormDefinitionRepresentation.md) representation.
**Parameters**
| Name | Type | Description |
|------------|------------|-------------|
| **taskId** | **String** | taskId |
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const taskApi = TasksApi(this.alfrescoApi);
const taskId = '10';
taskApi.getTaskForm(taskId).then(
(data) => {
console.log('Task form representation' + data);
},
(error) => {
console.log('Error' + error);
});
```
### Complete Task Form
completeTaskForm(taskId, completeTaskFormRepresentation)
Complete a Task Form
**Parameters**
| Name | Type | Description |
|--------------------------------|--------------------------------------------------------------------------------------------|--------------------------------|
| taskId | String | taskId |
| completeTaskFormRepresentation | [CompleteFormRepresentation](../src/api/activiti-rest-api/docs/CompleteFormRepresentation.md) | completeTaskFormRepresentation |
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const taskApi = TasksApi(this.alfrescoApi);
const taskId = '10'; // String | taskId
taskApi.completeTaskForm(taskId, completeTaskFormRepresentation).then(
() => {
console.log('Task completed');
},
(error) => {
console.log('Error' + error);
});
```
## Process Api
### Get Process Instances
```javascript
ProcessInstancesApi.getProcessInstances(requestNode)
```
Retrieve a list of process instances, see [ResultListDataRepresentationProcessInstanceRepresentation](../src/api/activiti-rest-api/docs/ResultListDataRepresentation«ProcessInstanceRepresentation».md)
**Parameters**
| Name | Type | Description |
|-------------|------------------------------------------------------------------------------------------------------------|-------------|
| requestNode | [ProcessInstanceQueryRepresentation](../src/api/activiti-rest-api/docs/ProcessInstanceQueryRepresentation.md) | requestNode |
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const processApi = ProcessApi(alfrescoApi);
const requestNode = new ProcessInstanceQueryRepresentation();
processApi.getProcessInstances(requestNode).then(
(data) => {
console.log('All processes' + data);
},
(error) => {
console.log('Error' + error);
});
```
Filtered process:
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const processApi = ProcessApi(this.alfrescoApi);
const requestNode = new ProcessInstanceQueryRepresentation({
page: 0,
sort: 'created-desc',
state: 'completed'
});
processApi.getProcessInstances(requestNode).then(
(data) => {
console.log('All processes completed' + data);
},
(error) => {
console.log('Error' + error);
});
```
## Models Api
Below you can find some example relative to the Activiti process api for all the possible method go to [Models Api](../src/api/activiti-rest-api/docs/ModelsApi.md) documentation.
### Get Model
getModel(modelId, opts)
To retrieve details about a particular model (process, form, decision rule or app) return a [ModelRepresentation](../src/api/activiti-rest-api/docs/ModelRepresentation.md)
**Parameters**
| Name | Type | Description | Notes |
|--------------------|---------|--------------------|------------|
| modelId | Number | modelId | |
| includePermissions | Boolean | includePermissions | [optional] |
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const modelsApi = new ModelsApi(alfrescoApi);
const opts = {
filter: 'myReusableForms',
modelType: 2
};
modelsApi.getModels(opts).then(
(data) => {
console.log('All your reusable forms' + data);
},
(error) => {
console.log('Error' + error);
});
```
## Report Api
Below you can find some example relative to the Activiti report api for all the possible method go to [Report Api documentation](../src/api/activiti-rest-api/docs/ReportApi.md)
### Create Default Reports
```javascript
ReportApi.createDefaultReports()
```
Creates the default reports
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const reportApi = ReportApi(alfrescoApi);
reportApi.createDefaultReports();
```
### Get Reports
```javascript
ReportApi.getReportList()
```
Retrieve the available report list
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const reportApi = ReportApi(alfrescoApi);
reportApi.getReportList();
```
### Report Params
```javascript
ReportApi.getReportParams(reportId)
```
> Retrieve the parameters referring to the reportId.
**Parameters**
| Name | Type | Description |
|----------|--------|-------------|
| reportId | String | reportId |
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const reportApi = ReportApi(alfrescoApi);
const reportId = '1';
reportApi.getReportParams(reportId);
```
## Report Process Definitions
```javascript
ReportApi.getProcessDefinitions()
```
Retrieve the process definition list for all the apps.
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const reportApi = ReportApi(alfrescoApi);
reportApi.getProcessDefinitions();
```
## Tasks of Process Definition
getTasksByProcessDefinitionId(reportId, processDefinitionId)
Retrieves all tasks that refer to the processDefinitionId
**Parameters**
| Name | Type | Description |
|---------------------|--------|-----------------------|
| reportId | String | reportId |
| processDefinitionId | String | process definition id |
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const reportApi = ReportApi(alfrescoApi);
const reportId = '1';
const processDefinitionId = '1';
reportApi.getTasksByProcessDefinitionId(reportId, processDefinitionId);
```
## Generate reports
```javascript
ReportApi.getReportsByParams(reportId, paramsQuery)
```
Generate the reports based on the input parameters
**Parameters**
| Name | Type | Description |
|-------------|--------|------------------|
| reportId | String | reportId |
| paramsQuery | Object | Query parameters |
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const reportApi = ReportApi(alfrescoApi);
const reportId = '1';
const paramsQuery = { status: 'ALL' };
reportApi.getReportsByParams(reportId, paramsQuery);
```
## Update report details
```javascript
ReportApi.updateReport(reportId, name)
```
Update the report details
**Parameters**
| Name | Type | Description |
|----------|--------|-----------------|
| reportId | String | reportId |
| name | String | The report name |
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const reportApi = ReportApi(alfrescoApi);
const reportId = '1';
const name = 'new report name';
reportApi.updateReport(reportId, name);
```
## Export to CSV
```javascript
ReportApi.exportToCsv(reportId, queryParams)
```
Export a report as csv
**Parameters**
| Name | Type | Description |
|-------------|--------|------------------|
| reportId | String | reportId |
| queryParams | Object | Query parameters |
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const reportApi = ReportApi(alfrescoApi);
const reportId = '1';
const queryParams = {
processDefinitionId: 'TEST:99:999',
dateRange: {
startDate: '2017-01-01T00:00:00.000Z',
endDate: '2017-01-24T23:59:59.999Z',
rangeId: 'currentYear'
},
slowProcessInstanceInteger: 10,
status: 'All',
__reportName: 'FAKE_REPORT_NAME'
};
reportApi.exportToCsv(reportId, queryParams);
```
## Save Report
```javascript
ReportApi.saveReport(reportId, queryParams)
```
Save a report
**Parameters**
| Name | Type | Description |
|-------------|--------|------------------|
| reportId | String | reportId |
| queryParams | Object | Query parameters |
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const reportApi = ReportApi(alfrescoApi);
const reportId = '1';
const queryParams = {
processDefinitionId: 'TEST:99:999',
dateRange: {
startDate: '2017-01-01T00:00:00.000Z',
endDate: '2017-01-24T23:59:59.999Z',
rangeId: 'currentYear'
},
slowProcessInstanceInteger: 10,
status: 'All',
__reportName: 'FAKE_REPORT_NAME'
};
reportApi.saveReport(reportId, queryParams);
```
## Delete report
```javascript
ReportApi.deleteReport(reportId)
```
Delete a report
**Parameters**
| Name | Type | Description |
|----------|--------|-------------|
| reportId | String | reportId |
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const reportApi = ReportApi(alfrescoApi);
const reportId = '1';
reportApi.deleteReport(reportId);
```

View File

@ -0,0 +1,36 @@
# Calling Custom Endpoints
Content service and process service has two different clients:
- AlfrescoJsApi.ProcessClient
- AlfrescoJsApi.ContentClient
Both clients expose a method ***callApi**
```typescript
function callApi(
path: string,
httpMethod: string,
pathParams?: any,
queryParams?: any,
headerParams?: any,
formParams?: any,
bodyParam?: any,
contentTypes?: string[],
accepts?: string[],
returnType?: any,
contextRoot?: string,
responseType?: string
): Promise<any> {};
```
If you want call your custom rest point in one of those two service use the corresponding client.
**Example**
```javascript
alfrescoJsApi.bpmClient.callApi(
'/api/enterprise/app-version', 'GET',
{}, {}, {}, {}, {}, ['application/json'], ['application/json'], {'String': 'String'}
)
```

View File

View File

@ -0,0 +1,18 @@
---
Title: Changelog for @alfresco/js-api v4.10.0
---
# Changelog
- [b9c450cd4](https://github.com/Alfresco/alfresco-js-api/commit/b9c450cd4) Update .mergify.yml
- [ee63a51a6](https://github.com/Alfresco/alfresco-js-api/commit/ee63a51a6) Update js-api-build.yml
- [83db6f6e3](https://github.com/Alfresco/alfresco-js-api/commit/83db6f6e3) Update js-api-build.yml
- [d09f7601c](https://github.com/Alfresco/alfresco-js-api/commit/d09f7601c) Update js-api-build.yml
- [c158ba2ec](https://github.com/Alfresco/alfresco-js-api/commit/c158ba2ec) Update js-api-build.yml (#1358)
- [445a36953](https://github.com/Alfresco/alfresco-js-api/commit/445a36953) fix build
- [be9ccaa78](https://github.com/Alfresco/alfresco-js-api/commit/be9ccaa78) Update js-api-build.yml
- [bc3ee9017](https://github.com/Alfresco/alfresco-js-api/commit/bc3ee9017) Update README.md
- [20abc2960](https://github.com/Alfresco/alfresco-js-api/commit/20abc2960) Move to github actions (#1353)
- [d7f899b49](https://github.com/Alfresco/alfresco-js-api/commit/d7f899b49) Update package.json
- [2730595bd](https://github.com/Alfresco/alfresco-js-api/commit/2730595bd) [AAE-7657] Let js-api depend on generic http client (#1332)

View File

@ -0,0 +1,15 @@
---
Title: Changelog for @alfresco/js-api v4.11.0
---
# Changelog
- [0c345b466](https://github.com/Alfresco/alfresco-js-api/commit/0c345b466) remove mergify config (#1371)
- [a50e297eb](https://github.com/Alfresco/alfresco-js-api/commit/a50e297eb) feat: rename and export LegacyAlfrescoApi in public-api (#1382)
- [e19d6ce50](https://github.com/Alfresco/alfresco-js-api/commit/e19d6ce50) Expose the api to fetch userinfo (#1381)
- [c7273a2ee](https://github.com/Alfresco/alfresco-js-api/commit/c7273a2ee) Check out and npm ci
- [f074f6d0e](https://github.com/Alfresco/alfresco-js-api/commit/f074f6d0e) Create a different flow for upstream manually (#1380)
- [75ba2574e](https://github.com/Alfresco/alfresco-js-api/commit/75ba2574e) Being able to trigger the adf trigger from workflow (#1379)
- [470d9c3ed](https://github.com/Alfresco/alfresco-js-api/commit/470d9c3ed) [AAE-8649] Being able to use input values of discovery (#1378)
- [005b96df6](https://github.com/Alfresco/alfresco-js-api/commit/005b96df6) Ability to pass client secret (#1373)

View File

@ -0,0 +1,8 @@
---
Title: Changelog for @alfresco/js-api v4.7.0
---
# Changelog
- [14f1b3ba](https://github.com/Alfresco/alfresco-js-api/commit/14f1b3ba) release reports generation (#1258)
- [e55cff6b](https://github.com/Alfresco/alfresco-js-api/commit/e55cff6b) Update publish.sh

View File

@ -0,0 +1,8 @@
---
Title: Changelog for @alfresco/js-api v4.8.0
---
# Changelog
- [39afcf33](https://github.com/Alfresco/alfresco-js-api/commit/39afcf33) Bump typescript from 4.5.3 to 4.5.4 (#1273)
- [f2e43b36](https://github.com/Alfresco/alfresco-js-api/commit/f2e43b36) Support custom OAuth endpoints (#1259)

View File

@ -0,0 +1,9 @@
---
Title: Changelog for @alfresco/js-api v4.9.0
---
# Changelog
- [cdeecd6f6](https://github.com/Alfresco/alfresco-js-api/commit/cdeecd6f6) Revert the superagent upgrade (#1340)
- [6dc7e489d](https://github.com/Alfresco/alfresco-js-api/commit/6dc7e489d) Make ADF possible to update on request (#1339)
- [c8db476cb](https://github.com/Alfresco/alfresco-js-api/commit/c8db476cb) revert superagent (#1338)

View File

@ -0,0 +1,11 @@
---
Title: Changelog for @alfresco/js-api v5.0.0
---
# Changelog
- [73acb91ed](https://github.com/Alfresco/alfresco-js-api/commit/73acb91ed) Fix problems around legacyAlfrescoApi (#1403)
- [434c24ea6](https://github.com/Alfresco/alfresco-js-api/commit/434c24ea6) Fix the order of httpClient testing conditions (#1402)
- [8240936f2](https://github.com/Alfresco/alfresco-js-api/commit/8240936f2) [AAE-9334] Improve update project script (#1395)
- [a7fc2e92a](https://github.com/Alfresco/alfresco-js-api/commit/a7fc2e92a) [MNT-22840] Use ticket parameter instead of alf_ticket when withCredentials configuration is enabled (#1392)

View File

@ -0,0 +1,10 @@
---
Title: Changelog for @alfresco/js-api v5.1.0
---
# Changelog
- [ADF-5501] fix: change the guard for progress event detection (#1441)
- add missing tslib dependency (#1437)
- [APPS-1732] Removed AuthorityType and clearance parameters from GET AuthorityClearance endpoint (#1435)
- [AAE-9473] feat: extract http client to handle custom implementations (#1412) (#1392)

View File

@ -0,0 +1,9 @@
---
Title: Changelog for @alfresco/js-api v5.2.0
---
# Changelog
- 90ab51c26 [MNT-23143] Add withCredentials to isLoggedIn
- 80106a493 [MNT-23143] Move withCredentials check to correct method
- f80ed199a [MNT-23143] withCredentials reflected in isBpmLoggedIn

View File

@ -0,0 +1,20 @@
---
Title: Changelog for @alfresco/js-api v5.3.0
---
# Changelog
- 86fec25ec [ACS-4118] create a tag from tags list
- 11252d0e0 [ACS-4413] upgrade CodeQL to v2 (#1493)
- 3d8e2851a [ACS-4118] Update readme file
- 4b58f0f60 [ACS-4118] Little correction for documentation
- b9809fa36 [ACS-4118] Allow to return tags for specified name
- e692367a7 [ACS-4118] Use callApi and write some documentation for tags creation
- cfd2b60b4 [ACS-4118] Update api for tags creation
- ddc565fa2 [ACS-4240] delete category api change (#1484)
- 4286228b5 [ACS-4115] Added module annotation to categoriesApi and added category models to index
- 6ee349878 [ACS-4116]update of updateCategory endpoint.
- f0c6e8e45 added module annotation to categoriesApi and other models to index
- 22d5c2940 [ACS-4114] Export categories api
- 1c1305e91 [ACS-4114] Export categories api
- 2ebce874f [ACS-4114] Add categories api (#1477)

View File

@ -0,0 +1,16 @@
---
Title: Changelog for @alfresco/js-api v5.4.0
---
# Changelog
- [4b9b21f4f](https://github.com/Alfresco/alfresco-js-api/commit/4b9b21f4f) fix-js-api-upstream (#1526)
- [4152c12f3](https://github.com/Alfresco/alfresco-js-api/commit/4152c12f3) [ACS-4331] Add deleteTag method to tags API (#1490)
- [d979e35be](https://github.com/Alfresco/alfresco-js-api/commit/d979e35be) [ACS-4590] cleanup performance tests (#1516)
- [90d83635c](https://github.com/Alfresco/alfresco-js-api/commit/90d83635c) [ACS-4611] Check proper storage (#1515)
- [41e31845e](https://github.com/Alfresco/alfresco-js-api/commit/41e31845e) Improved ESLint setup (#1509)
- [26bbe4e18](https://github.com/Alfresco/alfresco-js-api/commit/26bbe4e18) Fix GHA warnings for upcoming changes for setup-node action (#1508)
- [009444391](https://github.com/Alfresco/alfresco-js-api/commit/009444391) [ADF-5515] disable integration tests until config fixes (#1505)
- [fea47c040](https://github.com/Alfresco/alfresco-js-api/commit/fea47c040) [ACS-4412] Unit tests for createTags function (#1499)
- [39b3c3004](https://github.com/Alfresco/alfresco-js-api/commit/39b3c3004) AAE-12059: Removed createProcessInstanceVariables method from process instance variavles api (#1494)

View File

@ -0,0 +1,17 @@
---
Title: Changelog for @alfresco/js-api v5.5.0
---
# Changelog
- [3939ed803](https://github.com/Alfresco/alfresco-js-api/commit/3939ed803) use the gh strategy (#1565)
- [e90fb3c62](https://github.com/Alfresco/alfresco-js-api/commit/e90fb3c62) [ACS-4126] viewer allow assigning tags to content basic (#1557)
- [b4b9ffe28](https://github.com/Alfresco/alfresco-js-api/commit/b4b9ffe28) [ACS-4753] list of tags is not rendered because of missing count field in backend response (#1546)
- [c3dcf1c39](https://github.com/Alfresco/alfresco-js-api/commit/c3dcf1c39) Use token as part of workflow (#1544)
- [835bb11f7](https://github.com/Alfresco/alfresco-js-api/commit/835bb11f7) fix tab
- [9bd75b802](https://github.com/Alfresco/alfresco-js-api/commit/9bd75b802) Inverte release order (#1543)
- [d697c7623](https://github.com/Alfresco/alfresco-js-api/commit/d697c7623) Rely on action to create npmrc (#1542)
- [3dea8b143](https://github.com/Alfresco/alfresco-js-api/commit/3dea8b143) Publish js pkgs on gh pkg registry (#1538)
- [2414d226f](https://github.com/Alfresco/alfresco-js-api/commit/2414d226f) [ACS-4724] remove minimatch dependency (#1536)
- [a7c0cee18](https://github.com/Alfresco/alfresco-js-api/commit/a7c0cee18) [ACS-4723] Remove fs-extra dependency (#1535)

View File

@ -0,0 +1,11 @@
---
Title: Changelog for @alfresco/js-api v6.0.0
---
# Changelog
- [e70da65bc](https://github.com/Alfresco/alfresco-js-api/commit/e70da65bc) ACS-5040 Renamed one left reference to Alfresco (#1573)
- [c93b633ca](https://github.com/Alfresco/alfresco-js-api/commit/c93b633ca) [AAE-13902] - Create the release tag using the github API (#1572)
- [5cdab4525](https://github.com/Alfresco/alfresco-js-api/commit/5cdab4525) split testing jobs and add error reporting (#1567)
- [22938d88c](https://github.com/Alfresco/alfresco-js-api/commit/22938d88c) [ACS-5040] update license headers to reflect hyland copyright guidelines (#1561)

View File

@ -0,0 +1,8 @@
---
Title: Changelog for @alfresco/js-api v6.1.0
---
# Changelog
- [a1c51dfec](git@github.com:Alfresco/alfresco-js-api/commit/a1c51dfec) [ADF-5510] Upgrade to Node 18 (#1579)

View File

@ -0,0 +1,11 @@
---
Title: Changelog for @alfresco/js-api v6.2.0
---
# Changelog
- [b7cd96b84](https://github.com/Alfresco/alfresco-js-api/commit/b7cd96b84) do not escape basic auth credentials (#1599)
- [a55266731](https://github.com/Alfresco/alfresco-js-api/commit/a55266731) fix child assocs pagination (#1598)
- [58d8c4dff](https://github.com/Alfresco/alfresco-js-api/commit/58d8c4dff) fix missing parentId for declareRecord (#1597)
- [409e47e09](https://github.com/Alfresco/alfresco-js-api/commit/409e47e09) Fix git tag creation failing on master (#1592)

View File

@ -0,0 +1,31 @@
---
Title: Changelog for @alfresco/js-api v7.0.0
---
# Changelog
- [a67a0222e](https://github.com/Alfresco/alfresco-js-api/commit/a67a0222e) [ACS-5946] aps documentation enhancements (#1659)
- [2f1de4ec6](https://github.com/Alfresco/alfresco-js-api/commit/2f1de4ec6) Add relations to site entry (#1658)
- [7d6d1882b](https://github.com/Alfresco/alfresco-js-api/commit/7d6d1882b) [ACS-5946] documentation improvements (#1652)
- [4e3b831bd](https://github.com/Alfresco/alfresco-js-api/commit/4e3b831bd) [ACS-5839] api typings and docs improvements (#1651)
- [76f951f67](https://github.com/Alfresco/alfresco-js-api/commit/76f951f67) [ACS-5839] api typings and docs (#1650)
- [8ca4ed0a1](https://github.com/Alfresco/alfresco-js-api/commit/8ca4ed0a1) [ACS-5839] GS Api enhancements and typings(#1649)
- [0e9673d8b](https://github.com/Alfresco/alfresco-js-api/commit/0e9673d8b) [ACS-5839] fix security groups api
- [7119cbe0f](https://github.com/Alfresco/alfresco-js-api/commit/7119cbe0f) [ACS-5839] minor fix to trigger gha deployment
- [03c641de2](https://github.com/Alfresco/alfresco-js-api/commit/03c641de2) [ACS-5839] bump to 7.0.0, api enhancements (#1648)
- [277b79f3e](https://github.com/Alfresco/alfresco-js-api/commit/277b79f3e) [ACS-5839] typing fixes (#1646)
- [de66ea713](https://github.com/Alfresco/alfresco-js-api/commit/de66ea713) [ACS-5839] api fixes and improvements (#1645)
- [12567fefe](https://github.com/Alfresco/alfresco-js-api/commit/12567fefe) [ACS-5839] improved typing support (#1638)
- [877bae3f7](https://github.com/Alfresco/alfresco-js-api/commit/877bae3f7) [ACS-5839] improved documentation and TypeScript support (#1636)
- [241a47ee6](https://github.com/Alfresco/alfresco-js-api/commit/241a47ee6) [ACS-5839] improved API typings (#1635)
- [b7b8dbbbc](https://github.com/Alfresco/alfresco-js-api/commit/b7b8dbbbc) [ACS-5845] Remove deprecated apis, documentation updates (#1629)
- [54c609427](https://github.com/Alfresco/alfresco-js-api/commit/54c609427) [ACS-5839] Make `contextRoot` optional as per documentation (#1628)
- [8cc1d4cdd](https://github.com/Alfresco/alfresco-js-api/commit/8cc1d4cdd) [ACS-5845] remove Alfresco Compatibility usage (#1627)
- [e274913c7](https://github.com/Alfresco/alfresco-js-api/commit/e274913c7) [ACS-5839] Improved typings for model classes (#1626)
- [5ecfdb2f1](https://github.com/Alfresco/alfresco-js-api/commit/5ecfdb2f1) Remove console logs from auth and fix promise rejections (#1621)
- [8faeff9bb](https://github.com/Alfresco/alfresco-js-api/commit/8faeff9bb) [ACS-5839] more TS typings support for Content API models (#1622)
- [f1e55ab17](https://github.com/Alfresco/alfresco-js-api/commit/f1e55ab17) Fix FormFieldRepresentation typings, add missing &#34;fields&#34; property (#1623)
- [e736ce8ec](https://github.com/Alfresco/alfresco-js-api/commit/e736ce8ec) Update dependencies and various audit fixes (#1620)
- [14129b977](https://github.com/Alfresco/alfresco-js-api/commit/14129b977) bump superagent (#1614)
- [70e78e889](https://github.com/Alfresco/alfresco-js-api/commit/70e78e889) [AAE-12502] Handle Storage as a singleton to fix on ADF the alf_ticket in not added to the content api because config.ticketECM is undefined (#1616)

View File

@ -0,0 +1,12 @@
---
Title: Changelog for @alfresco/js-api v7.1.0
---
# Changelog
- [f00bc51ed](git@github.com:Alfresco/alfresco-js-api/commit/f00bc51ed) [ACA-4724] Use jsdom directly instead of mocha-jsdom in unit test (#1693)
- [ca1ef4f45](git@github.com:Alfresco/alfresco-js-api/commit/ca1ef4f45) [ACS-5994] Add multiple nodes deletion support (#1687)
- [9d1c6a752](git@github.com:Alfresco/alfresco-js-api/commit/9d1c6a752) Break various dependencies on 3rd party libs (#1679)
- [2ee68fbec](git@github.com:Alfresco/alfresco-js-api/commit/2ee68fbec) remove mocha-jsdom dependency due to security issues and deprecated status (#1678)
- [8f3c66976](git@github.com:Alfresco/alfresco-js-api/commit/8f3c66976) [ACTIVITI-4914] updated getProcessesAndTasksOnContent (#1672)

View File

@ -0,0 +1,10 @@
---
Title: Changelog for @alfresco/js-api v7.2.0
---
# Changelog
- [b41cc2629](https://github.com/Alfresco/alfresco-js-api/commit/b41cc2629) [ACS-6231] cleanup old codegen (#1716)
- [8d02eb4ea](https://github.com/Alfresco/alfresco-js-api/commit/8d02eb4ea) [ACS-6231] cleanup old angular projects and break dependency on remove env (#1715)
- [928f9cd91](https://github.com/Alfresco/alfresco-js-api/commit/928f9cd91) [ACS-6231] preparation cleanup before supporting Nx (#1714)

View File

@ -0,0 +1,494 @@
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
<!-- toc -->
- [ECM](#ecm)
* [Get Node content](#get-node--content)
* [Get File or Folder Info](#get-file-or-folder-info)
* [Get Folder Children Info](#get-folder-children-info)
* [Create Folder](#create-folder)
* [Upload File](#upload-file)
* [Events Upload File](#events-upload-file)
* [Delete File or Folder](#delete-file-or-folder)
* [Delete File or Folder Permanent](#delete-file-or-folder-permanent)
* [Get thumbnail Url](#get-thumbnail-url)
* [Get preview Url](#get-preview-url)
* [Get content Url](#get-content-url)
* [Custom web scripts call](#custom-web-scripts-call)
<!-- tocstop -->
<!-- markdown-toc end -->
# ECM
A complete list of all the ECM methods is available here: [Content API](../src/api/content-rest-api/README.md).
Below you can find some common examples.
## Get Node Content
```javascript
NodesApi.getFileContent(nodeId, opts)
```
Returns the file content of the node with identifier **nodeId**.
**Example**
```javascript
const fs = require('fs');
const alfrescoApi = new AlfrescoApi(/*...*/);
const nodesApi = new NodesApi(alfrescoApi);
const nodeId = '80a94ac8-3ece-47ad-864e-5d939424c47c';
nodesApi.getNodeContent(nodeId).then(
(data) => {
fs.writeFile('./test/grass.jpg', data, (error) => {
if (error) {
console.error(error);
return;
}
console.log('The file was saved!');
});
},
(error) => {
console.error(error);
});
```
## Get a Node Info
```javascript
NodesApi.getNodeInfo(nodeId, opts)
```
Get information for the File/Folder with the identifier nodeId.
You can also use one of these well-known aliases: `-my-`, `-shared-` or `-root-` as `nodeId` value.
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const nodeId = '80a94ac8-3ece-47ad-864e-5d939424c47c';
const nodesApi = new NodesApi(alfrescoApi);
nodesApi.getNode(nodeId, opts).then(
(nodeEntry) => {
console.log('This is the name' + nodeEntry.entry.name );
},
(error) => {
console.log('This node does not exist');
});
```
## Get Folder Children Info
```javascript
NodesApi.getNodeChildren(fileOrFolderId, opts)
```
Minimal information for each child is returned by default.
You can use the include parameter to return additional information.
returns a promise with the Info about the children of the node if resolved and `{error}` if rejected.
You can also use one of these well-known aliases: `-my-`, `-shared-` or `-root-` as `nodeId` value.
**Example**:
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const nodeId = '80a94ac8-3ece-47ad-864e-5d939424c47c';
const nodesApi = new NodesApi(alfrescoApi);
nodesApi.listNodeChildren(nodeId, opts).then(
(data) => {
console.log(
'The number of children in this folder are ' + data.list.pagination.count
);
},
(error) => {
console.log('This node does not exist');
});
```
## Create Folder
```javascript
NodesApi.addNode(nodeId, nodeBody, opts)
```
Returns a promise that is resolved if the folder is created and `{error}` if rejected.
You can also use one of these well-known aliases: `-my-`, `-shared-` or `-root-` as `nodeId` value.
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const nodesApi = new NodesApi(alfrescoApi);
const nodeBody = {
'name': 'newFolderName',
'nodeType': 'cm:folder',
'relativePath': relativePath
};
nodesApi.addNode('-root-', nodeBody).then(
(data) => {
console.log('The folder is created in root');
},
(error) => {
console.log('Error in creation of this folder or folder already exist' + error);
});
```
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const nodesApi = new NodesApi(alfrescoApi);
const nodeBody = {
'name': 'newFolderName',
'nodeType': 'cm:folder',
'relativePath': 'folderA/folderB'
};
nodesApi.addNode('-root-', nodeBody).then(
(data) => {
console.log('The folder is created in folderA/folderB from root');
},
(error) => {
console.log('Error in creation of this folder or folder already exist' + error);
});
```
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const nodesApi = new NodesApi(alfrescoApi);
const nodeBody = {
'name': 'newFolderName',
'nodeType': 'cm:folder',
'relativePath': 'folderA/folderB'
};
const parentFolder = '80a94ac8-3ece-47ad-864e-5d939424c47c'
nodesApi.addNode(parentFolder, nodeBody).then(
(data) => {
console.log('The folder is created in folderA/folderB from parentFolder:' + parentFolder);
},
(error) => {
console.log('Error in creation of this folder or folder already exist' + error);
});
```
**CreateFolder With Auto Rename**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const nodesApi = new NodesApi(this.alfrescoApi);
const nodeBody = {
name: 'newFolderName',
nodeType: 'cm:folder',
autoRename: true,
relativePath: 'folderA/folderB'
};
nodesApi.addNode('-root-', nodeBody).then(
(data) => {
console.log('The folder is created in root');
},
(error) => {
console.log('Error in creation of this folder or folder already exist' + error);
});
```
## Upload File
```javascript
UploadApi.uploadFile(fileDefinition, relativePath, nodeId, nodeBody, opts)
```
Returns a promise that is resolved if the file is successful uploaded and `{error}` if rejected.
The `fileDefinition` provides information about files and allows JavaScript to access their content.
**Web**
File Definition are generally retrieved from a FileList object returned as a result of a user selecting files using the `<input>` element
**Node**
File Definition are generally retrieved from a read stream
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const fs = require('fs');
const fileToUpload = fs.createReadStream('./folderA/folderB/newFile.txt');
const uploadApi = new UploadApi(alfrescoApi);
uploadApi.uploadFile(fileToUpload).then(
() => {
console.log('File Uploaded in the root');
},
(error) => {
console.log('Error during the upload' + error);
});
uploadApi.uploadFile(fileToUpload, null, null, null, { autoRename: true })
.then(() => {
console.log('File Uploaded in the root');
}, (error) => {
console.log('Error during the upload' + error);
});
uploadApi.uploadFile(fileToUpload, 'folderX/folderY/folderZ')
.then(() => {
console.log('File Uploaded in the from root folderX/folderY/folderZ');
}, (error) => {
console.log('Error during the upload' + error);
});
const parentFolder = '80a94ac8-3ece-47ad-864e-5d939424c47c';
uploadApi.uploadFile(fileToUpload, 'folderX/folderY/folderZ', parentFolder )
.then(() => {
console.log('File Uploaded in the from parentFolder ' + parentFolder + ' n folderX/folderY/folderZ');
}, (error) => {
console.log('Error during the upload' + error);
});
```
The default behaviour of the Upload API will not create any thumbnail.
In order to create a thumbnail you have to perform to pass the parameter `{renditions: 'doclib'}` as in the example below.
This parameter will basically perform also a call to the Rendition API.
For more information about the Rendition API :
* [Rendition API](../src/api/content-rest-api/docs/RenditionsApi.md)
* [Rendition service Wiki](https://wiki.alfresco.com/wiki/Rendition_Service)
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const fs = require('fs');
const fileToUpload = fs.createReadStream('./folderA/folderB/newFile.txt');
const uploadApi = new UploadApi(alfrescoApi);
uploadApi.uploadFile(fileToUpload, null, null, null, {renditions: 'doclib'})
.then(() => {
console.log('File Uploaded in the root');
}, (error) => {
console.log('Error during the upload' + error);
});
```
To abort a file uploading:
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const fs = require('fs');
const fileToUpload = fs.createReadStream('./folderA/folderB/newFile.txt');
const uploadApi = new UploadApi(alfrescoApi);
const promiseUpload = uploadApi.uploadFile(fileToUpload)
.once('abort', function () {
console.log('File Uploaded aborted');
});
promiseUpload.abort();
```
### Upload File Events
The `uploadFile` is also an `EventEmitter` which you can register to listen to any of the following event types:
* progress
* success
* abort
* error
* unauthorized
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const fs = require('fs');
const fileToUpload = fs.createReadStream('./folderA/folderB/newFile.txt');
const uploadApi = new UploadApi(alfrescoApi);
uploadApi.uploadFile(fileToUpload)
.on('progress', (progress) => {
console.log( 'Total :' + progress.total );
console.log( 'Loaded :' + progress.loaded );
console.log( 'Percent :' + progress.percent );
})
.on('success', () => {
console.log( 'Your File is uploaded');
})
.on('abort', () => {
console.log( 'Upload Aborted');
})
.on('error', () => {
console.log( 'Error during the upload');
})
.on('unauthorized', () => {
console.log('You are unauthorized');
})
```
## Delete a Node
```javascript
NodesApi.deleteNode(fileOrFolderId, opts)
```
Delete File/Folder with the identifier nodeId, if the nodeId is a folder, then its children are also deleted.
Deleted nodes are moved to the trash bin, and it is still possible to recover them.
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const fileOrFolderId = '80a94ac8-3ece-47ad-864e-5d939424c47c';
const nodesApi = new NodesApi(alfrescoApi);
nodesApi.deleteNode(fileOrFolderId).then(
(data) => {
console.log('The file/folder is deleted');
},
(error) => {
console.log('This node does not exist');
});
```
### Delete a Node Permanently
```javascript
NodesApi.deleteNode(fileOrFolderId, { permanent: true })
```
Delete File/Folder with the identifier nodeId, if the nodeId is a folder, then its children are also deleted.
It will not be possible to recover the files after this call.
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const fileOrFolderId = '80a94ac8-3ece-47ad-864e-5d939424c47c';
const nodesApi = new NodesApi(alfrescoApi);
nodesApi.deleteNode(fileOrFolderId, { permanent: true }).then(
(data) => {
console.log('The file/folder is deleted');
},
(error) => {
console.log('This node does not exist');
});
```
## Get Thumbnail Url
```javascript
ContentApi.getDocumentThumbnailUrl(documentId)
```
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const contentApi = new ContentApi(alfrescoApi);
const thumbnailUrl = contentApi.getDocumentThumbnailUrl('1a0b110f-1e09-4ca2-b367-fe25e4964a4');
```
## Get Preview Url
```javascript
ContentApi.getDocumentPreviewUrl(documentId)
```
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const contentApi = new ContentApi(alfrescoApi);
const previewUrl = contentApi.getDocumentPreviewUrl('1a0b110f-1e09-4ca2-b367-fe25e4964a4');
```
## Get Content Url
```javascript
ContentApi.getContentUrl(documentId)
```
**Example**
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const contentApi = new ContentApi(alfrescoApi);
const contentUrl = contentApi.getContentUrl('1a0b110f-1e09-4ca2-b367-fe25e4964a4');
```
## Custom WebScript Calls
For mor information about web scripts read the [Wiki](https://wiki.alfresco.com/wiki/Web_Scripts) and the [Wiki with Web ScriptsExamples](https://wiki.alfresco.com/wiki/Web_Scripts_Examples)
```javascript
executeWebScript(httpMethod, scriptPath, scriptArgs, contextRoot, servicePath, postBody)
```
Anatomy of a Web Script URI:
```text
http(s)://(host):(port)/(contextPath)/(servicePath)/(scriptPath)?(scriptArgs)
```
A Web Script is simply a service bound to a URI which responds to HTTP methods such as GET, POST, PUT and DELETE.
While using the same underlying code, there are broadly two kinds of Web Scripts.
**Parameters**
| Name | Description |
|-----------------|-----------------------------------------------------------------|
| **httpMethod** | possible value GET, POST, PUT and DELETE |
| **scriptPath** | path to Web Script (as defined by Web Script) |
| **scriptArgs** | arguments to pass to Web Script |
| **contextRoot** | path where application is deployed default value 'alfresco' |
| **servicePath** | path where Web Script service is mapped default value 'service' |
| **postBody** | post body |
```javascript
const alfrescoApi = new AlfrescoApi(/*...*/);
const webscriptApi = new WebscriptApi(alfrescoApi);
// Call a GET on a Web Scripts available at the following URIs: http://127.0.01:8080/alfresco/service/mytasks
webscriptApi.executeWebScript('GET', 'mytasks').then(
(data) => {
console.log('Data received form http://127.0.01:8080/alfresco/service/mytasks' + data);
},
(error) => {
console.log('Error' + error);
});
// Call a GET on a Web Scripts available at the following URIs: http://127.0.01:8080/share/service/mytasks
webscriptApi.executeWebScript('GET', 'mytasks', null, 'share').then(
(data)=> {
console.log('Data received form http://127.0.01:8080/share/service/mytasks' + data);
},
(error)=> {
console.log('Error' + error);
});
// Call a GET on a Web Scripts available at the following URIs: http://127.0.01:8080/share/differentServiceSlug/mytasks
webscriptApi.executeWebScript('GET', 'mytasks', null, 'share', 'differentServiceSlug').then(
(data)=> {
console.log('Data received form http://127.0.01:8080/share/differentServiceSlug/mytasks' + data);
},
(error) => {
console.log('Error' + error);
});
```

View File

@ -0,0 +1,11 @@
# Error Events
The api/js-api has an error handler event where you can subscribe
**Example**
```javascript
alfrescoJsApi.on('error', error => {
console.log(error);
});
```

View File

View File

@ -0,0 +1,55 @@
---
Title: License info, @alfresco/js-api 4.10.0
---
# License information for @alfresco/js-api 4.10.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 4.10.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/visionmedia/debug) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [inherits](https://github.com/isaacs/inherits) | 2.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [minimatch](https://github.com/isaacs/minimatch) | 5.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.10.3 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [semver](https://github.com/npm/node-semver) | 7.3.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

View File

@ -0,0 +1,55 @@
---
Title: License info, @alfresco/js-api 4.11.0
---
# License information for @alfresco/js-api 4.11.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 4.11.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/visionmedia/debug) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [inherits](https://github.com/isaacs/inherits) | 2.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [minimatch](https://github.com/isaacs/minimatch) | 5.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.10.3 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [semver](https://github.com/npm/node-semver) | 7.3.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

View File

@ -0,0 +1,47 @@
---
Title: License info, @alfresco/js-api 4.7.0
---
# License information for @alfresco/js-api 4.7.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 4.7.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 1.1.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [concat-map](https://github.com/substack/node-concat-map) | 0.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/visionmedia/debug) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.0.7 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 1.2.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [inherits](https://github.com/isaacs/inherits) | 2.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.4.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [minimatch](https://github.com/isaacs/minimatch) | 3.0.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.9.4 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [semver](https://github.com/npm/node-semver) | 7.3.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |

View File

@ -0,0 +1,47 @@
---
Title: License info, @alfresco/js-api 4.8.0
---
# License information for @alfresco/js-api 4.8.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 4.8.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 1.1.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [concat-map](https://github.com/substack/node-concat-map) | 0.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/visionmedia/debug) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.0.7 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 1.2.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [inherits](https://github.com/isaacs/inherits) | 2.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.4.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [minimatch](https://github.com/isaacs/minimatch) | 3.0.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.9.4 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [semver](https://github.com/npm/node-semver) | 7.3.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |

View File

@ -0,0 +1,55 @@
---
Title: License info, @alfresco/js-api 4.9.0
---
# License information for @alfresco/js-api 4.9.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 4.9.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/visionmedia/debug) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [inherits](https://github.com/isaacs/inherits) | 2.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [minimatch](https://github.com/isaacs/minimatch) | 5.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.10.3 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [semver](https://github.com/npm/node-semver) | 7.3.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

View File

@ -0,0 +1,55 @@
---
Title: License info, @alfresco/js-api 5.0.0
---
# License information for @alfresco/js-api 5.0.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 5.0.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/visionmedia/debug) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [inherits](https://github.com/isaacs/inherits) | 2.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [minimatch](https://github.com/isaacs/minimatch) | 5.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.10.3 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [semver](https://github.com/npm/node-semver) | 7.3.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

View File

@ -0,0 +1,55 @@
---
Title: License info, @alfresco/js-api 5.1.0
---
# License information for @alfresco/js-api 5.1.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 5.1.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/visionmedia/debug) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [inherits](https://github.com/isaacs/inherits) | 2.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.10.3 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [semver](https://github.com/npm/node-semver) | 7.3.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [tslib](https://github.com/Microsoft/tslib) | 2.4.0 | [0BSD](http://landley.net/toybox/license.html) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

View File

@ -0,0 +1,56 @@
---
Title: License info, @alfresco/js-api 5.2.0
---
# License information for @alfresco/js-api 5.2.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 5.2.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/visionmedia/debug) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [inherits](https://github.com/isaacs/inherits) | 2.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [minimatch](https://github.com/isaacs/minimatch) | 5.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.10.3 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [semver](https://github.com/npm/node-semver) | 7.3.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [tslib](https://github.com/Microsoft/tslib) | 2.4.0 | [0BSD](http://landley.net/toybox/license.html) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

View File

@ -0,0 +1,56 @@
---
Title: License info, @alfresco/js-api 5.3.0
---
# License information for @alfresco/js-api 5.3.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 5.3.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/visionmedia/debug) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [inherits](https://github.com/isaacs/inherits) | 2.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [minimatch](https://github.com/isaacs/minimatch) | 5.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.10.3 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [semver](https://github.com/npm/node-semver) | 7.3.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [tslib](https://github.com/Microsoft/tslib) | 2.4.0 | [0BSD](http://landley.net/toybox/license.html) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

View File

@ -0,0 +1,56 @@
---
Title: License info, @alfresco/js-api 5.4.0
---
# License information for @alfresco/js-api 5.4.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 5.4.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [balanced-match](https://github.com/juliangruber/balanced-match) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) | 2.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/visionmedia/debug) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [inherits](https://github.com/isaacs/inherits) | 2.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [minimatch](https://github.com/isaacs/minimatch) | 5.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.11.0 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [semver](https://github.com/npm/node-semver) | 7.3.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [tslib](https://github.com/Microsoft/tslib) | 2.5.0 | [0BSD](http://landley.net/toybox/license.html) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

View File

@ -0,0 +1,53 @@
---
Title: License info, @alfresco/js-api 5.5.0
---
# License information for @alfresco/js-api 5.5.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 5.5.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/visionmedia/debug) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [inherits](https://github.com/isaacs/inherits) | 2.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.11.0 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [semver](https://github.com/npm/node-semver) | 7.3.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [tslib](https://github.com/Microsoft/tslib) | 2.5.0 | [0BSD](http://landley.net/toybox/license.html) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

View File

@ -0,0 +1,53 @@
---
Title: License info, @alfresco/js-api 6.0.0
---
# License information for @alfresco/js-api 6.0.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 6.0.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/visionmedia/debug) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [inherits](https://github.com/isaacs/inherits) | 2.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.11.0 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [semver](https://github.com/npm/node-semver) | 7.3.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [tslib](https://github.com/Microsoft/tslib) | 2.5.0 | [0BSD](http://landley.net/toybox/license.html) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

View File

@ -0,0 +1,53 @@
---
Title: License info, @alfresco/js-api 6.1.0
---
# License information for @alfresco/js-api 6.1.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 6.1.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/visionmedia/debug) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [inherits](https://github.com/isaacs/inherits) | 2.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.11.0 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [semver](https://github.com/npm/node-semver) | 7.3.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [tslib](https://github.com/Microsoft/tslib) | 2.5.2 | [0BSD](http://landley.net/toybox/license.html) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

View File

@ -0,0 +1,53 @@
---
Title: License info, @alfresco/js-api 6.2.0
---
# License information for @alfresco/js-api 6.2.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 6.2.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/visionmedia/debug) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 3.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 1.2.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [inherits](https://github.com/isaacs/inherits) | 2.0.3 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.11.0 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [readable-stream](https://github.com/nodejs/readable-stream) | 3.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safe-buffer](https://github.com/feross/safe-buffer) | 5.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [semver](https://github.com/npm/node-semver) | 7.3.5 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [string_decoder](https://github.com/nodejs/string_decoder) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/visionmedia/superagent) | 6.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [tslib](https://github.com/Microsoft/tslib) | 2.5.3 | [0BSD](http://landley.net/toybox/license.html) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [util-deprecate](https://github.com/TooTallNate/util-deprecate) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

View File

@ -0,0 +1,53 @@
---
Title: License info, @alfresco/js-api 7.0.0
---
# License information for @alfresco/js-api 7.0.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 7.0.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asap](https://github.com/kriskowal/asap) | 2.0.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/debug-js/debug) | 4.3.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [dezalgo](https://github.com/npm/dezalgo) | 1.0.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [hexoid](https://github.com/lukeed/hexoid) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [once](https://github.com/isaacs/once) | 1.4.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [qs](https://github.com/ljharb/qs) | 6.11.0 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [semver](https://github.com/npm/node-semver) | 7.5.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/ladjs/superagent) | 8.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [tslib](https://github.com/Microsoft/tslib) | 2.6.2 | [0BSD](http://landley.net/toybox/license.html) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [wrappy](https://github.com/npm/wrappy) | 1.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

View File

@ -0,0 +1,90 @@
---
Title: License info, @alfresco/js-api 7.1.0
---
# License information for @alfresco/js-api 7.1.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 7.1.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [@tootallnate/once](https://github.com/TooTallNate/once) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [abab](https://github.com/jsdom/abab) | 2.0.6 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [agent-base](https://github.com/TooTallNate/node-agent-base) | 6.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [asap](https://github.com/kriskowal/asap) | 2.0.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cssstyle](https://github.com/jsdom/cssstyle) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [data-urls](https://github.com/jsdom/data-urls) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [debug](https://github.com/debug-js/debug) | 4.3.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [decimal.js](https://github.com/MikeMcl/decimal.js) | 10.4.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [dezalgo](https://github.com/npm/dezalgo) | 1.0.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [domexception](https://github.com/jsdom/domexception) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [entities](https://github.com/fb55/entities) | 4.5.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-proto](https://github.com/inspect-js/has-proto) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [hexoid](https://github.com/lukeed/hexoid) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [html-encoding-sniffer](https://github.com/jsdom/html-encoding-sniffer) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [http-proxy-agent](https://github.com/TooTallNate/node-http-proxy-agent) | 5.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [https-proxy-agent](https://github.com/TooTallNate/node-https-proxy-agent) | 5.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [iconv-lite](https://github.com/ashtuchkin/iconv-lite) | 0.6.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [is-potential-custom-element-name](https://github.com/mathiasbynens/is-potential-custom-element-name) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [jsdom](https://github.com/jsdom/jsdom) | 22.1.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [nwsapi](https://github.com/dperini/nwsapi) | 2.2.7 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [once](https://github.com/isaacs/once) | 1.4.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [parse5](https://github.com/inikulin/parse5) | 7.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [psl](https://github.com/lupomontero/psl) | 1.9.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [punycode](https://github.com/mathiasbynens/punycode.js) | 2.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [qs](https://github.com/ljharb/qs) | 6.11.0 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [querystringify](https://github.com/unshiftio/querystringify) | 2.2.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [requires-port](https://github.com/unshiftio/requires-port) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [rrweb-cssom](https://github.com/rrweb-io/CSSOM) | 0.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [safer-buffer](https://github.com/ChALkeR/safer-buffer) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [saxes](https://github.com/lddubeau/saxes) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [semver](https://github.com/npm/node-semver) | 7.5.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/ladjs/superagent) | 8.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [symbol-tree](https://github.com/jsdom/js-symbol-tree) | 3.2.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [tough-cookie](https://github.com/salesforce/tough-cookie) | 4.1.3 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [tr46](https://github.com/jsdom/tr46) | 4.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [tslib](https://github.com/Microsoft/tslib) | 2.6.2 | [0BSD](http://landley.net/toybox/license.html) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [universalify](https://github.com/RyanZim/universalify) | 0.2.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [url-parse](https://github.com/unshiftio/url-parse) | 1.5.10 | [MIT](http://www.opensource.org/licenses/MIT) |
| [w3c-xmlserializer](https://github.com/jsdom/w3c-xmlserializer) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [webidl-conversions](https://github.com/jsdom/webidl-conversions) | 7.0.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) |
| [whatwg-encoding](https://github.com/jsdom/whatwg-encoding) | 2.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [whatwg-mimetype](https://github.com/jsdom/whatwg-mimetype) | 3.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [whatwg-url](https://github.com/jsdom/whatwg-url) | 12.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [wrappy](https://github.com/npm/wrappy) | 1.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [ws](https://github.com/websockets/ws) | 8.14.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [xml-name-validator](https://github.com/jsdom/xml-name-validator) | 4.0.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [xmlchars](https://github.com/lddubeau/xmlchars) | 2.2.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

View File

@ -0,0 +1,54 @@
---
Title: License info, @alfresco/js-api 7.2.0
---
# License information for @alfresco/js-api 7.2.0
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@alfresco/js-api](https://github.com/Alfresco/alfresco-js-api) | 7.2.0 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [asap](https://github.com/kriskowal/asap) | 2.0.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [asynckit](https://github.com/alexindigo/asynckit) | 0.4.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [call-bind](https://github.com/ljharb/call-bind) | 1.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [combined-stream](https://github.com/felixge/node-combined-stream) | 1.0.8 | [MIT](http://www.opensource.org/licenses/MIT) |
| [component-emitter](https://github.com/component/emitter) | 1.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cookiejar](https://github.com/bmeck/node-cookiejar) | 2.1.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [d](https://github.com/medikoo/d) | 1.0.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [debug](https://github.com/debug-js/debug) | 4.3.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [delayed-stream](https://github.com/felixge/node-delayed-stream) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [dezalgo](https://github.com/npm/dezalgo) | 1.0.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es5-ext](https://github.com/medikoo/es5-ext) | 0.10.51 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [es6-iterator](https://github.com/medikoo/es6-iterator) | 2.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [es6-symbol](https://github.com/medikoo/es6-symbol) | 3.1.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [fast-safe-stringify](https://github.com/davidmarkclements/fast-safe-stringify) | 2.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [form-data](https://github.com/form-data/form-data) | 4.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [formidable](https://github.com/node-formidable/formidable) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [function-bind](https://github.com/Raynos/function-bind) | 1.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [get-intrinsic](https://github.com/ljharb/get-intrinsic) | 1.2.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-proto](https://github.com/inspect-js/has-proto) | 1.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has-symbols](https://github.com/inspect-js/has-symbols) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [has](https://github.com/tarruda/has) | 1.0.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [hexoid](https://github.com/lukeed/hexoid) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [lru-cache](https://github.com/isaacs/node-lru-cache) | 6.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [methods](https://github.com/jshttp/methods) | 1.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-db](https://github.com/jshttp/mime-db) | 1.40.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime-types](https://github.com/jshttp/mime-types) | 2.1.24 | [MIT](http://www.opensource.org/licenses/MIT) |
| [mime](https://github.com/broofa/mime) | 2.6.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [ms](https://github.com/zeit/ms) | 2.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [next-tick](https://github.com/medikoo/next-tick) | 1.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [object-inspect](https://github.com/inspect-js/object-inspect) | 1.12.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [once](https://github.com/isaacs/once) | 1.4.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [qs](https://github.com/ljharb/qs) | 6.11.0 | [BSD-3-Clause](http://www.opensource.org/licenses/BSD-3-Clause) |
| [semver](https://github.com/npm/node-semver) | 7.5.4 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [side-channel](https://github.com/ljharb/side-channel) | 1.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/ladjs/superagent) | 8.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [tslib](https://github.com/Microsoft/tslib) | 2.6.2 | [0BSD](http://landley.net/toybox/license.html) |
| [type](https://github.com/medikoo/type) | 1.2.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [wrappy](https://github.com/npm/wrappy) | 1.0.2 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [yallist](https://github.com/isaacs/yallist) | 4.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |

177
lib/js-api/src/LICENSE.txt Normal file
View File

@ -0,0 +1,177 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

52
lib/js-api/src/README.md Normal file
View File

@ -0,0 +1,52 @@
# Alfresco JavaScript API
JavaScript client API for the Alfresco REST API and Activiti REST API.
## API clients documentation
- [Authentication Api](src/api/auth-rest-api/README.md)
- [Content Api](src/api/content-rest-api/README.md)
- [Model Api](src/api/model-rest-api/README.md)
- [Process Api (AAE)](src/api/activiti-rest-api/README.md)
- [Search Api](src/api/search-rest-api/README.md)
- [Governance Classification Api](src/api/gs-classification-rest-api/README.md)
- [Governance Core Api](src/api/gs-core-rest-api/README.md)
- [Discovery Content API](src/api/discovery-rest-api/README.md)
## Guides
- [Authentication](docs/authentication.md)
- [Calling Custom Endpoints](docs/calling-custom-endpoints.md)
- [Error Events](docs/error-events.md)
- [ECM Examples](docs/ecm-example.md), full docs: [Content API](src/api/content-rest-api/README.md)
- [BPM Examples](docs/bpm-example.md), full docs: [APS 2.X API](src/api/activiti-rest-api/README.md)
## Prerequisites
The minimal supported versions are:
- Alfresco Platform Repository: version [5.2.a-EA](https://wiki.alfresco.com/wiki/Community_file_list_201606-EA) or newer
- Activiti: 1.5
- Node.js ([Long Term Support](https://nodejs.org/en/) version)
## Installing
Using NPM:
```sh
npm install @alfresco/js-api
```
## Development
To run the build
```sh
npm run build
```
To run the test
```sh
npm run test
```

View File

@ -0,0 +1,576 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import ee, { EmitterMethod, Emitter } from 'event-emitter';
import { ContentAuth } from './authentication/contentAuth';
import { ProcessAuth } from './authentication/processAuth';
import { Oauth2Auth } from './authentication/oauth2Auth';
import { ContentClient } from './contentClient';
import { ProcessClient } from './processClient';
import { Storage } from './storage';
import { AlfrescoApiConfig } from './alfrescoApiConfig';
import { Authentication } from './authentication/authentication';
import { AlfrescoApiType } from './to-deprecate/alfresco-api-type';
import { HttpClient } from './api-clients/http-client.interface';
export class AlfrescoApi implements Emitter, AlfrescoApiType {
__type = 'legacy-client';
storage: Storage;
config: AlfrescoApiConfig;
contentClient: ContentClient;
contentPrivateClient: ContentClient;
processClient: ProcessClient;
searchClient: ContentClient;
discoveryClient: ContentClient;
gsClient: ContentClient;
authClient: ContentClient;
oauth2Auth: Oauth2Auth;
processAuth: ProcessAuth;
contentAuth: ContentAuth;
on: EmitterMethod;
off: EmitterMethod;
once: EmitterMethod;
bufferEvents: string[] = [];
emit: (type: string, ...args: any[]) => void;
username: string;
constructor(config?: AlfrescoApiConfig, public httpClient?: HttpClient) {
ee(this);
if (config) {
this.setConfig(config);
}
}
setConfig(config: AlfrescoApiConfig) {
if (!config) {
config = {};
}
this.storage = Storage.getInstance();
this.storage.setDomainPrefix(config.domainPrefix);
this.config = new AlfrescoApiConfig(config);
this.clientsFactory();
this.errorListeners();
if (this.config.oauthInit) {
this.initAuth(config);
if (this.isLoggedIn()) {
this.emitBuffer('logged-in');
}
}
return config;
}
private initAuth(config: AlfrescoApiConfig): void {
if (this.isOauthConfiguration()) {
if (!this.oauth2Auth) {
this.oauth2Auth = new Oauth2Auth(this.config, this, this.httpClient);
} else {
this.oauth2Auth.setConfig(this.config, this);
}
this.oauth2Auth?.on('logged-in', () => {
this.emitBuffer('logged-in');
});
this.setAuthenticationClientECMBPM(this.oauth2Auth.getAuthentication(), this.oauth2Auth.getAuthentication());
} else {
if (!this.processAuth) {
this.processAuth = new ProcessAuth(this.config, this.httpClient);
} else {
this.processAuth.setConfig(this.config);
}
this.processAuth?.on('logged-in', () => {
this.emitBuffer('logged-in');
});
if (!this.contentAuth) {
this.contentAuth = new ContentAuth(this.config, this, this.httpClient);
} else {
this.contentAuth.setConfig(config);
}
this.contentAuth?.on('logged-in', () => {
this.emitBuffer('logged-in');
});
this.setAuthenticationClientECMBPM(this.contentAuth.getAuthentication(), this.processAuth.getAuthentication());
}
}
private clientsFactory() {
if (!this.contentPrivateClient) {
this.contentPrivateClient = new ContentClient(this.config, `/api/${this.config.tenant}/private/alfresco/versions/1`, this.httpClient);
} else {
this.contentPrivateClient.setConfig(this.config, `/api/${this.config.tenant}/private/alfresco/versions/1`);
}
if (!this.contentClient) {
this.contentClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/alfresco/versions/1`, this.httpClient);
} else {
this.contentClient.setConfig(this.config, `/api/${this.config.tenant}/public/alfresco/versions/1`);
}
if (!this.authClient) {
this.authClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/authentication/versions/1`, this.httpClient);
} else {
this.authClient.setConfig(this.config, `/api/${this.config.tenant}/public/authentication/versions/1`);
}
if (!this.searchClient) {
this.searchClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/search/versions/1`, this.httpClient);
} else {
this.searchClient.setConfig(this.config, `/api/${this.config.tenant}/public/search/versions/1`);
}
if (!this.discoveryClient) {
this.discoveryClient = new ContentClient(this.config, `/api`, this.httpClient);
} else {
this.discoveryClient.setConfig(this.config, `/api`);
}
if (!this.gsClient) {
this.gsClient = new ContentClient(this.config, `/api/${this.config.tenant}/public/gs/versions/1`, this.httpClient);
} else {
this.gsClient.setConfig(this.config, `/api/${this.config.tenant}/public/gs/versions/1`);
}
if (!this.processClient) {
this.processClient = new ProcessClient(this.config, this.httpClient);
} else {
this.processClient.setConfig(this.config);
}
}
/**@private? */
errorListeners() {
this.contentClient.off('error', () => {});
this.authClient.off('error', () => {});
this.contentPrivateClient.off('error', () => {});
this.processClient.off('error', () => {});
this.searchClient.off('error', () => {});
this.discoveryClient.off('error', () => {});
this.gsClient.off('error', () => {});
this.contentClient.on('error', (error: any) => {
this.errorHandler(error);
});
this.authClient.on('error', (error: any) => {
this.errorHandler(error);
});
this.contentPrivateClient.on('error', (error: any) => {
this.errorHandler(error);
});
this.processClient.on('error', (error: any) => {
this.errorHandler(error);
});
this.searchClient.on('error', (error: any) => {
this.errorHandler(error);
});
this.discoveryClient.on('error', (error: any) => {
this.errorHandler(error);
});
this.gsClient.on('error', (error: any) => {
this.errorHandler(error);
});
}
/**@private? */
errorHandler(error: { status?: number }) {
if (error.status === 401) {
this.invalidateSession();
}
this.emitBuffer('error', error);
}
changeWithCredentialsConfig(withCredentials: boolean) {
this.config.withCredentials = withCredentials;
}
changeCsrfConfig(disableCsrf: boolean) {
this.config.disableCsrf = disableCsrf;
this.processAuth.changeCsrfConfig(disableCsrf);
}
changeEcmHost(hostEcm: string) {
this.config.hostEcm = hostEcm;
this.contentAuth.changeHost();
this.contentClient.changeHost();
this.authClient.changeHost();
}
changeBpmHost(hostBpm: string) {
this.config.hostBpm = hostBpm;
this.processAuth.changeHost();
this.processClient.changeHost();
}
/**
* login Alfresco API
*
* @param username Username to login
* @param password Password to login
* @returns A promise that returns {new authentication ticket} if resolved and {error} if rejected.
*/
login(username: string, password: string): Promise<any> {
if (!this.isCredentialValid(username) || !this.isCredentialValid(password)) {
return Promise.reject(new Error('missing username or password'));
}
if (username) {
username = username.trim();
}
this.username = username;
if (this.isOauthConfiguration()) {
const promise = this.oauth2Auth.login(username, password);
promise.then((accessToken) => {
this.config.accessToken = accessToken;
});
return promise;
} else {
if (this.isBpmConfiguration()) {
const promise = this.processAuth.login(username, password);
promise.then((ticketBpm) => {
this.config.ticketBpm = ticketBpm;
});
return promise;
} else if (this.isEcmConfiguration()) {
const promise = this.contentAuth.login(username, password);
promise.then((ticketEcm) => {
this.setAuthenticationClientECMBPM(this.contentAuth.getAuthentication(), null);
this.config.ticketEcm = ticketEcm;
});
return promise;
} else if (this.isEcmBpmConfiguration()) {
const contentProcessPromise = this.loginBPMECM(username, password);
contentProcessPromise.then((data) => {
this.config.ticketEcm = data[0];
this.config.ticketBpm = data[1];
});
return contentProcessPromise;
} else {
return Promise.reject(new Error('Unknown configuration'));
}
}
}
isCredentialValid(credential: string): boolean {
return credential !== undefined && credential !== null && credential !== '';
}
implicitLogin(): Promise<any> {
if (!this.isOauthConfiguration()) {
return Promise.reject(new Error('Missing the required oauth2 configuration'));
}
return new Promise(() => {
this.oauth2Auth.implicitLogin();
});
}
setAuthenticationClientECMBPM(authECM: Authentication, authBPM: Authentication) {
this.contentClient.setAuthentications(authECM);
this.authClient.setAuthentications(authECM);
this.searchClient.setAuthentications(authECM);
this.contentPrivateClient.setAuthentications(authECM);
this.processClient.setAuthentications(authBPM);
this.searchClient.setAuthentications(authECM);
this.discoveryClient.setAuthentications(authECM);
this.gsClient.setAuthentications(authECM);
}
/**
* login Tickets
*
* @param ticketEcm alfresco ticket
* @param ticketBpm alfresco ticket
*/
loginTicket(ticketEcm: string, ticketBpm: string): Promise<string> {
this.config.ticketEcm = ticketEcm;
this.config.ticketBpm = ticketBpm;
return this.contentAuth.validateTicket();
}
private loginBPMECM(username: string, password: string): Promise<[string, string]> {
const contentPromise = this.contentAuth.login(username, password);
const processPromise = this.processAuth.login(username, password);
const promise: any = new Promise<[string, string]>((resolve, reject) => {
Promise.all([contentPromise, processPromise]).then(
(data) => {
promise.emit('success');
resolve(data);
},
(error) => {
this.contentAuth.invalidateSession();
this.processAuth.invalidateSession();
if (error.status === 401) {
promise.emit('unauthorized');
}
promise.emit('error');
reject(error);
}
);
});
ee(promise); // jshint ignore:line
return promise;
}
/**
* logout Alfresco API
*/
logout(): Promise<void> {
this.username = null;
if (this.isOauthConfiguration()) {
return this.oauth2Auth.logOut();
}
if (this.isBpmConfiguration()) {
return this.processAuth.logout();
}
if (this.isEcmConfiguration()) {
const contentPromise = this.contentAuth.logout();
contentPromise.then(
() => (this.config.ticket = undefined),
() => {}
);
return contentPromise;
}
if (this.isEcmBpmConfiguration()) {
return this._logoutBPMECM();
}
return Promise.resolve();
}
private _logoutBPMECM(): Promise<void> {
const contentPromise = this.contentAuth.logout();
const processPromise = this.processAuth.logout();
const promise: any = new Promise<void>((resolve, reject) => {
Promise.all([contentPromise, processPromise]).then(
() => {
this.config.ticket = undefined;
promise.emit('logout');
resolve();
},
(error) => {
if (error.status === 401) {
promise.emit('unauthorized');
}
promise.emit('error');
reject(error);
}
);
});
ee(promise); // jshint ignore:line
return promise;
}
/**
* If the client is logged in return true
*/
isLoggedIn(): boolean {
if (this.isOauthConfiguration()) {
return this.oauth2Auth.isLoggedIn();
}
if (this.isBpmConfiguration()) {
return this.processAuth.isLoggedIn();
}
if (this.isEcmConfiguration()) {
return this.config.withCredentials ? true : this.contentAuth.isLoggedIn();
}
if (this.isEcmBpmConfiguration()) {
return this.config.withCredentials ? true : this.contentAuth.isLoggedIn() && this.processAuth.isLoggedIn();
}
return false;
}
isBpmLoggedIn(): boolean {
if (this.isBpmConfiguration() || this.isEcmBpmConfiguration()) {
if (this.isOauthConfiguration()) {
return this.oauth2Auth.isLoggedIn();
} else {
return this.processAuth.isLoggedIn();
}
}
return false;
}
isEcmLoggedIn(): boolean {
if (this.isEcmConfiguration() || this.isEcmBpmConfiguration()) {
if (this.isOauthConfiguration()) {
return this.oauth2Auth.isLoggedIn();
} else {
return this.config.withCredentials ? true : this.contentAuth.isLoggedIn();
}
}
return false;
}
getBpmUsername(): string {
if (this.isOauthConfiguration()) {
return this.username || this.oauth2Auth.storage.getItem('USERNAME');
} else {
return this.username || this.processAuth.storage.getItem('APS_USERNAME');
}
}
getEcmUsername(): string {
if (this.isOauthConfiguration()) {
return this.username || this.oauth2Auth.storage.getItem('USERNAME');
} else {
return this.username || this.contentAuth.storage.getItem('ACS_USERNAME');
}
}
/**
* refresh token
*/
refreshToken(): Promise<any> {
if (!this.isOauthConfiguration()) {
return Promise.reject(new Error('Missing the required oauth2 configuration'));
}
if (this.config.oauth2.implicitFlow) {
return Promise.reject(new Error('Manual refresh token not possible in implicit flow'));
}
return this.oauth2Auth.refreshToken();
}
getTicketAuth(): string {
return this.oauth2Auth?.getToken();
}
/**
* Set the current Ticket
*
* @param ticketEcm ecm ticket
* @param ticketBpm bpm ticket
*/
setTicket(ticketEcm: string, ticketBpm: string) {
if (this.contentAuth) {
this.contentAuth.setTicket(ticketEcm);
}
if (this.processAuth) {
this.processAuth.setTicket(ticketBpm);
}
}
/**
* invalidate the current session
*/
invalidateSession() {
if (this.oauth2Auth) {
this.oauth2Auth.invalidateSession();
} else {
this.contentAuth.invalidateSession();
this.processAuth.invalidateSession();
}
}
/**
* Get the current Ticket for the Bpm
*/
getTicketBpm(): string {
return this.processAuth?.getTicket();
}
/**
* Get the current Ticket for the Ecm
*/
getTicketEcm(): string {
return this.contentAuth?.getTicket();
}
/**
* Get the current Ticket for the Ecm and BPM
*/
getTicket(): [string, string] {
return [this.contentAuth.getTicket(), this.processAuth.getTicket()];
}
isBpmConfiguration(): boolean {
return this.config.provider && this.config.provider.toUpperCase() === 'BPM';
}
isEcmConfiguration(): boolean {
return this.config.provider && this.config.provider.toUpperCase() === 'ECM';
}
isOauthConfiguration(): boolean {
return this.config.authType === 'OAUTH';
}
isPublicUrl(): boolean {
if (this.isOauthConfiguration()) {
return this.oauth2Auth.isPublicUrl();
}
return false;
}
isEcmBpmConfiguration(): boolean {
return this.config.provider && this.config.provider.toUpperCase() === 'ALL';
}
private emitBuffer(event: string, callback?: any): void {
this.emit(event, callback);
this.bufferEvents.push(event);
}
reply(event: string, callback?: any): void {
if (this.bufferEvents.indexOf(event) >= 0) {
// eslint-disable-next-line prefer-rest-params
Function.prototype.apply.call(callback, this, arguments);
} else {
this.on(event, callback);
}
}
}

View File

@ -0,0 +1,396 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import ee from 'event-emitter';
import { AlfrescoApiConfig } from './alfrescoApiConfig';
import { Authentication } from './authentication/authentication';
import { SuperagentHttpClient } from './superagentHttpClient';
import { Emitters, HttpClient, LegacyHttpClient, RequestOptions, SecurityOptions } from './api-clients/http-client.interface';
import { paramToString } from './utils';
import { Storage } from './storage';
declare const Buffer: any;
export type AlfrescoApiClientPromise<T = any> = Promise<T> & {
on: ee.EmitterMethod;
off: ee.EmitterMethod;
once: ee.EmitterMethod;
emit: (type: string, ...args: any[]) => void;
abort?: () => void;
};
/**
* Builds a string representation of an array-type actual parameter, according to the given collection format.
*
* @param param An array parameter.
* @param collectionFormat The array element separator strategy.
* @returns A string representation of the supplied collection, using the specified delimiter. Returns
* <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.
*/
export function buildCollectionParam(param: string[], collectionFormat: string): string | any[] {
if (!param) {
return null;
}
switch (collectionFormat) {
case 'csv':
return param.map(paramToString).join(',');
case 'ssv':
return param.map(paramToString).join(' ');
case 'tsv':
return param.map(paramToString).join('\t');
case 'pipes':
return param.map(paramToString).join('|');
case 'multi':
// return the array directly as SuperAgent will handle it as expected
return param.map(paramToString);
default:
throw new Error('Unknown collection format: ' + collectionFormat);
}
}
export class AlfrescoApiClient implements ee.Emitter, LegacyHttpClient {
on: ee.EmitterMethod;
off: ee.EmitterMethod;
once: ee.EmitterMethod;
emit: (type: string, ...args: any[]) => void;
storage: Storage;
host: string;
className: string;
config: AlfrescoApiConfig;
url: string;
/**
* The base URL against which to resolve every API call's (relative) path.
*/
basePath = '';
/**
* The authentication methods to be included for all API calls.
*/
authentications: Authentication = {
basicAuth: {
ticket: ''
},
type: 'basic'
};
/**
* The default HTTP headers to be included for all API calls.
*/
defaultHeaders = {};
/**
* The default HTTP timeout for all API calls.
*/
timeout: number | { deadline?: number; response?: number } = undefined;
contentTypes = {
JSON: ['application/json']
};
httpClient: HttpClient;
constructor(host?: string, httpClient?: HttpClient) {
this.host = host;
this.storage = Storage.getInstance();
// fallback for backward compatibility
this.httpClient = httpClient || new SuperagentHttpClient();
ee(this);
}
request<T = any>(options: RequestOptions): Promise<T> {
return this.buildRequestCall(this.basePath, options, this.httpClient.request.bind(this.httpClient));
}
post<T = any>(options: RequestOptions): AlfrescoApiClientPromise<T> {
const url = this.getCallApiUrl(options);
return this.buildRequestCall(url, options, this.httpClient.post.bind(this.httpClient));
}
put<T = any>(options: RequestOptions): AlfrescoApiClientPromise<T> {
const url = this.getCallApiUrl(options);
return this.buildRequestCall(url, options, this.httpClient.put.bind(this.httpClient));
}
get<T = any>(options: RequestOptions): AlfrescoApiClientPromise<T> {
const url = this.getCallApiUrl(options);
return this.buildRequestCall(url, options, this.httpClient.get.bind(this.httpClient));
}
delete<T = void>(options: RequestOptions): AlfrescoApiClientPromise<T> {
const url = this.getCallApiUrl(options);
return this.buildRequestCall<T>(url, options, this.httpClient.delete.bind(this.httpClient));
}
callApi(
path: string,
httpMethod: string,
pathParams?: any,
queryParams?: any,
headerParams?: any,
formParams?: any,
bodyParam?: any,
contentTypes?: string[],
accepts?: string[],
returnType?: any,
contextRoot?: string,
responseType?: string,
url?: string
): AlfrescoApiClientPromise<any> {
const callApiUrl = url ?? this.getCallApiUrl({ contextRoot, path, pathParams });
const options: RequestOptions = {
path,
httpMethod,
pathParams,
queryParams,
headerParams,
formParams,
bodyParam,
contentTypes,
accepts,
returnType,
contextRoot,
responseType,
url
};
return this.buildRequestCall(callApiUrl, options, this.httpClient.request.bind(this.httpClient));
}
callCustomApi(
path: string,
httpMethod: string,
pathParams?: any,
queryParams?: any,
headerParams?: any,
formParams?: any,
bodyParam?: any,
contentTypes?: string[],
accepts?: string[],
returnType?: any,
contextRoot?: string,
responseType?: string
): AlfrescoApiClientPromise<any> {
const customApiUrl = AlfrescoApiClient.buildUrl(path, '', pathParams);
const options: RequestOptions = {
path,
httpMethod,
pathParams,
queryParams,
headerParams,
formParams,
bodyParam,
contentTypes,
accepts,
returnType,
contextRoot,
responseType
};
return this.buildRequestCall(customApiUrl, options, this.httpClient.request.bind(this.httpClient));
}
isCsrfEnabled(): boolean {
if (this.config) {
return !this.config.disableCsrf;
} else {
return true;
}
}
isBpmRequest(): boolean {
return this.className === 'ProcessAuth' || this.className === 'ProcessClient';
}
basicAuth(username: string, password: string): string {
const str = username + ':' + password;
let base64;
if (typeof Buffer === 'function') {
base64 = Buffer.from(str, 'binary').toString('base64');
} else {
base64 = btoa(str);
}
return 'Basic ' + base64;
}
isWithCredentials(): boolean {
return !!this.config?.withCredentials;
}
getAlfTicket(ticket: string): string {
const ticketParam = this.isWithCredentials() ? '&ticket=' : '&alf_ticket=';
if (ticket) {
return ticketParam + ticket;
} else if (this.config.ticketEcm) {
return ticketParam + this.config.ticketEcm;
} else if (this.storage.getItem('ticket-ECM')) {
return ticketParam + this.storage.getItem('ticket-ECM');
}
return '';
}
/**
* Builds full URL by appending the given path to the base URL and replacing path parameter place-holders
* with parameter values
*/
private static buildUrl(basePath: string, path: string, pathParams: any): string {
if (path && path !== '' && !path.match(/^\//)) {
path = '/' + path;
}
const url = basePath + path;
return AlfrescoApiClient.addParamsToUrl(url, pathParams);
}
private static addParamsToUrl(path: string, pathParams: any) {
return path.replace(/\{([\w-]+)}/g, (fullMatch, key) => {
let value;
if (Object.prototype.hasOwnProperty.call(pathParams, key)) {
value = paramToString(pathParams[key]);
} else {
value = fullMatch;
}
return encodeURIComponent(value);
});
}
private getCallApiUrl({ contextRoot, path, pathParams }: { contextRoot?: string; path: string; pathParams?: any }): string {
const basePath = contextRoot ? `${this.host}/${contextRoot}` : this.basePath;
return AlfrescoApiClient.buildUrl(basePath, path, pathParams);
}
private buildRequestCall<T = any>(
url: string,
options: RequestOptions,
httpCall: (url: string, options: RequestOptions, security: SecurityOptions, emitters: Emitters) => Promise<T>
): AlfrescoApiClientPromise<T> {
const security = this.getSecurityOptions();
const emitters = this.getEventEmitters();
const httpRequestOptions = this.getRequestOptionsWithAcceptAndContentType(options);
const promise = httpCall(url, httpRequestOptions, security, emitters);
return this.addPromiseListeners(promise, emitters.eventEmitter);
}
private getSecurityOptions(): SecurityOptions {
return {
isBpmRequest: this.isBpmRequest(),
enableCsrf: this.isCsrfEnabled(),
withCredentials: this.isWithCredentials(),
authentications: this.authentications,
defaultHeaders: this.defaultHeaders
};
}
private getEventEmitters(): Emitters {
const apiClientEmitter = {
on: this.on.bind(this),
off: this.off.bind(this),
once: this.once.bind(this),
emit: this.emit.bind(this)
};
return {
apiClientEmitter,
eventEmitter: ee({})
};
}
private getRequestOptionsWithAcceptAndContentType(options: RequestOptions): RequestOptions {
const contentType = AlfrescoApiClient.jsonPreferredMime(options.contentTypes);
const accept = AlfrescoApiClient.jsonPreferredMime(options.accepts);
return {
...options,
contentType,
accept
};
}
/**
* Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
*
* @param contentTypes content types
* @returns The chosen content type, preferring JSON.
*/
private static jsonPreferredMime(contentTypes: readonly string[]): string {
if (!contentTypes?.length) {
return 'application/json';
}
for (const item of contentTypes) {
if (AlfrescoApiClient.isJsonMime(item)) {
return item;
}
}
return contentTypes[0];
}
/**
* Checks whether the given content type represents JSON.<br>
*
* JSON content type examples:<br>
* <ul>
* <li>application/json</li>
* <li>application/json; charset=UTF8</li>
* <li>APPLICATION/JSON</li>
* </ul>
*
* @param contentType The MIME content type to check.
* @returns <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
*/
private static isJsonMime(contentType: string): boolean {
return Boolean(contentType?.match(/^application\/json(;.*)?$/i));
}
private addPromiseListeners<T = any>(promise: Promise<T>, eventEmitter: ee.Emitter): AlfrescoApiClientPromise<T> {
return Object.assign(promise, {
on() {
// eslint-disable-next-line prefer-spread,prefer-rest-params
eventEmitter.on.apply(eventEmitter, arguments);
return this;
},
once() {
// eslint-disable-next-line prefer-spread,prefer-rest-params
eventEmitter.once.apply(eventEmitter, arguments);
return this;
},
emit() {
// eslint-disable-next-line prefer-spread,prefer-rest-params
eventEmitter.emit.apply(eventEmitter, arguments);
return this;
},
off() {
// eslint-disable-next-line prefer-spread,prefer-rest-params
eventEmitter.off.apply(eventEmitter, arguments);
return this;
}
});
}
}

View File

@ -0,0 +1,54 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Oauth2Config } from './authentication/oauth2Config';
export class AlfrescoApiConfig {
ticket?: string;
hostEcm?: string = 'http://127.0.0.1:8080';
hostBpm?: string = 'http://127.0.0.1:9999';
hostOauth2?: string;
authType?: string = 'BASIC';
oauth2?: Oauth2Config;
contextRoot? = 'alfresco';
tenant?: string = '-default-';
contextRootBpm?: string = 'activiti-app';
domainPrefix?: string = '';
provider?: string = 'ECM';
ticketEcm?: string;
ticketBpm?: string;
accessToken?: string;
disableCsrf?: boolean = false;
withCredentials?: boolean = false;
oauthInit?: boolean = true;
constructor(input: any = { oauth2: {} }) {
Object.assign(this, input);
this.hostEcm = input.hostEcm ? input.hostEcm : 'http://127.0.0.1:8080';
this.hostBpm = input.hostBpm ? input.hostBpm : 'http://127.0.0.1:9999';
this.authType = input.authType ? input.authType : 'BASIC';
this.contextRoot = input.contextRoot ? input.contextRoot : 'alfresco';
this.contextRootBpm = input.contextRootBpm ? input.contextRootBpm : 'activiti-app';
this.tenant = input.tenant ? input.tenant : '-default-';
this.provider = input.provider ? input.provider : 'ECM';
this.disableCsrf = input.disableCsrf ? input.disableCsrf : false;
this.domainPrefix = input.domainPrefix ? input.domainPrefix : '';
this.withCredentials = input.withCredentials ? input.withCredentials : false;
this.oauth2 = input.oauth2;
}
}

View File

@ -0,0 +1,59 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { AlfrescoApiType } from '../to-deprecate/alfresco-api-type';
import { LegacyHttpClient, RequestOptions } from './http-client.interface';
export abstract class ApiClient {
protected alfrescoApi: AlfrescoApiType;
protected httpClient: LegacyHttpClient;
get apiClient(): LegacyHttpClient {
return this.httpClient;
}
constructor(legacyApi?: AlfrescoApiType);
constructor(httpClient: LegacyHttpClient);
constructor(httpClient?: AlfrescoApiType & LegacyHttpClient) {
if (httpClient?.__type === 'legacy-client') {
// TODO: remove legacyApi?: AlfrescoApi option and clean up this code. BREAKING CHANGE!
this.alfrescoApi = httpClient;
} else {
this.httpClient = httpClient;
}
}
post<T = any>(options: RequestOptions): Promise<T> {
return this.apiClient.post<T>(options);
}
put<T = any>(options: RequestOptions): Promise<T> {
return this.apiClient.put<T>(options);
}
get<T = any>(options: RequestOptions): Promise<T> {
return this.apiClient.get<T>(options);
}
delete<T = void>(options: RequestOptions): Promise<T> {
return this.apiClient.delete(options);
}
errorMessage(param: string, methodName: string) {
return `Missing param ${param} in ${methodName}`;
}
}

View File

@ -0,0 +1,106 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Authentication } from '../authentication/authentication';
import { Emitter } from 'event-emitter';
export interface RequestOptions {
path: string;
httpMethod?: string;
pathParams?: any;
queryParams?: any;
headerParams?: any;
formParams?: any;
bodyParam?: any;
contentTypes?: string[];
accepts?: string[];
returnType?: any;
contextRoot?: string;
responseType?: string;
url?: string;
readonly accept?: string;
readonly contentType?: string;
}
export interface HttpClientConfig {
contextRoot?: string;
host?: string; // Should be mandatory but can't make it because of AlfrescoApiConfig incompatibility 😕
servicePath?: string; // Should be mandatory but can't make it because of AlfrescoApiConfig incompatibility 😕
}
export interface LegacyHttpClient {
basePath: string;
config: HttpClientConfig;
request<T = any>(options: RequestOptions): Promise<T>;
post<T = any>(options: RequestOptions): Promise<T>;
put<T = any>(options: RequestOptions): Promise<T>;
get<T = any>(options: RequestOptions): Promise<T>;
delete<T = void>(options: RequestOptions): Promise<T>;
/** @deprecated */
callApi(
path: string,
httpMethod: string,
pathParams?: any,
queryParams?: any,
headerParams?: any,
formParams?: any,
bodyParam?: any,
contentTypes?: string[],
accepts?: string[],
returnType?: any,
contextRoot?: string,
responseType?: string,
url?: string
): Promise<any>;
/** @deprecated */
callCustomApi(
path: string,
httpMethod: string,
pathParams?: any,
queryParams?: any,
headerParams?: any,
formParams?: any,
bodyParam?: any,
contentTypes?: string[],
accepts?: string[],
returnType?: any,
contextRoot?: string,
responseType?: string
): Promise<any>;
}
export interface SecurityOptions {
readonly isBpmRequest: boolean;
readonly enableCsrf?: boolean;
readonly withCredentials?: boolean;
readonly authentications: Authentication;
readonly defaultHeaders: Record<string, string>;
}
export interface Emitters {
readonly eventEmitter: Emitter;
readonly apiClientEmitter: Emitter;
}
export interface HttpClient {
request<T = any>(url: string, options: RequestOptions, security: SecurityOptions, emitters: Emitters): Promise<T>;
post<T = any>(url: string, options: RequestOptions, security: SecurityOptions, emitters: Emitters): Promise<T>;
put<T = any>(url: string, options: RequestOptions, security: SecurityOptions, emitters: Emitters): Promise<T>;
get<T = any>(url: string, options: RequestOptions, security: SecurityOptions, emitters: Emitters): Promise<T>;
delete<T = void>(url: string, options: RequestOptions, security: SecurityOptions, emitters: Emitters): Promise<T>;
}

View File

@ -0,0 +1,55 @@
# **Process API**
Provides access to the complete features provided by Alfresco Process Services powered by Activiti.
You can use this API to integrate Alfresco Process Services with external applications.
## Endpoint Clients
All URIs are relative to:
```text
/activiti-app/api
```
- [AboutApi](docs/AboutApi.md)
- [AccountIntegrationApi](docs/AccountIntegrationApi.md)
- [AdminEndpointsApi](docs/AdminEndpointsApi.md)
- [AdminGroupsApi](docs/AdminGroupsApi.md)
- [AdminTenantsApi](docs/AdminTenantsApi.md)
- [AdminUsersApi](docs/AdminUsersApi.md)
- [AppDefinitionsApi](docs/AppDefinitionsApi.md)
- [ChecklistsApi](docs/ChecklistsApi.md)
- [CommentsApi](docs/CommentsApi.md)
- [ContentApi](docs/ContentApi.md)
- [DataSourcesApi](docs/DataSourcesApi.md)
- [DecisionAuditsApi](docs/DecisionAuditsApi.md)
- [EndpointsApi](docs/EndpointsApi.md)
- [FormModelsApi](docs/FormModelsApi.md)
- [GroupsApi](docs/GroupsApi.md)
- [IDMSyncApi](docs/IDMSyncApi.md)
- [IntegrationAlfrescoOnPremiseApi](docs/IntegrationAlfrescoOnPremiseApi.md)
- [IntegrationBoxApi](docs/IntegrationBoxApi.md)
- [IntegrationDriveApi](docs/IntegrationDriveApi.md)
- [ModelsApi](docs/ModelsApi.md)
- [ModelsBpmnApi](docs/ModelsBpmnApi.md)
- [ModelsHistoryApi](docs/ModelsHistoryApi.md)
- [ProcessDefinitionsApi](docs/ProcessDefinitionsApi.md)
- [ProcessInstancesApi](docs/ProcessInstancesApi.md)
- [ProcessInstanceVariablesApi](docs/ProcessInstanceVariablesApi.md)
- [ProcessScopesApi](docs/ProcessScopesApi.md)
- [RuntimeAppDefinitionsApi](docs/RuntimeAppDefinitionsApi.md)
- [RuntimeAppDeploymentsApi](docs/RuntimeAppDeploymentsApi.md)
- [ScriptFilesApi](docs/ScriptFilesApi.md)
- [SubmittedFormsApi](docs/SubmittedFormsApi.md)
- [SystemPropertiesApi](docs/SystemPropertiesApi.md)
- [TaskActionsApi](docs/TaskActionsApi.md)
- [TaskFormsApi](docs/TaskFormsApi.md)
- [TasksApi](docs/TasksApi.md)
- [TaskVariablesApi](docs/TaskVariablesApi.md)
- [UserFiltersApi](docs/UserFiltersApi.md)
- [UserProfileApi](docs/UserProfileApi.md)
- [UsersApi](docs/UsersApi.md)
- [ReportApi](docs/ReportApi.md)
- [ModelJsonBpmnApi](docs/ModelJsonBpmnApi.md)
- [TemporaryApi](docs/TemporaryApi.md)

View File

@ -0,0 +1,35 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { BaseApi } from './base.api';
/**
* About service.
*/
export class AboutApi extends BaseApi {
/**
* Get server type and version
* Provides information about the running Alfresco Process Services Suite. The response payload object has the properties type, majorVersion, minorVersion, revisionVersion and edition.
*
* @return Promise<{ [key: string]: string; }>
*/
getAppVersion(): Promise<{ [key: string]: string }> {
return this.get({
path: '/api/enterprise/app-version'
});
}
}

View File

@ -0,0 +1,36 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ResultListDataRepresentationAccountRepresentation } from '../model';
import { BaseApi } from './base.api';
/**
* AccountIntegrationApi service.
*/
export class AccountIntegrationApi extends BaseApi {
/**
* Retrieve external account information
* Accounts are used to integrate with third party apps and clients
*
* @return Promise<ResultListDataRepresentationAccountRepresentation>
*/
getAccounts(): Promise<ResultListDataRepresentationAccountRepresentation> {
return this.get({
path: '/api/enterprise/account/integration'
});
}
}

View File

@ -0,0 +1,251 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { CreateEndpointBasicAuthRepresentation, EndpointBasicAuthRepresentation, EndpointConfigurationRepresentation } from '../model';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
/**
* AdminEndpointsApi service.
*/
export class AdminEndpointsApi extends BaseApi {
/**
* Add an endpoint authorization
*
* @param createRepresentation createRepresentation
* @return Promise<EndpointBasicAuthRepresentation>
*/
createBasicAuthConfiguration(createRepresentation: CreateEndpointBasicAuthRepresentation): Promise<EndpointBasicAuthRepresentation> {
throwIfNotDefined(createRepresentation, 'createRepresentation');
return this.post({
path: '/api/enterprise/admin/basic-auths',
bodyParam: createRepresentation,
returnType: EndpointBasicAuthRepresentation
});
}
/**
* Create an endpoint
*
* @param representation representation
* @return Promise<EndpointConfigurationRepresentation>
*/
createEndpointConfiguration(representation: EndpointConfigurationRepresentation): Promise<EndpointConfigurationRepresentation> {
throwIfNotDefined(representation, 'representation');
return this.post({
path: '/api/enterprise/admin/endpoints',
bodyParam: representation
});
}
/**
* Get an endpoint authorization
*
* @param basicAuthId basicAuthId
* @param tenantId tenantId
* @return Promise<EndpointBasicAuthRepresentation>
*/
getBasicAuthConfiguration(basicAuthId: number, tenantId: number): Promise<EndpointBasicAuthRepresentation> {
throwIfNotDefined(basicAuthId, 'basicAuthId');
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
basicAuthId
};
const queryParams = {
tenantId
};
return this.get({
path: '/api/enterprise/admin/basic-auths/{basicAuthId}',
pathParams,
queryParams,
returnType: EndpointBasicAuthRepresentation
});
}
/**
* List endpoint authorizations
*
* @param tenantId tenantId
* @return Promise<EndpointBasicAuthRepresentation>
*/
getBasicAuthConfigurations(tenantId: number): Promise<EndpointBasicAuthRepresentation> {
throwIfNotDefined(tenantId, 'tenantId');
const queryParams = {
tenantId
};
return this.get({
path: '/api/enterprise/admin/basic-auths',
queryParams,
returnType: EndpointBasicAuthRepresentation
});
}
/**
* Get an endpoint
*
* @param endpointConfigurationId endpointConfigurationId
* @param tenantId tenantId
* @return Promise<EndpointConfigurationRepresentation>
*/
getEndpointConfiguration(endpointConfigurationId: number, tenantId: number): Promise<EndpointConfigurationRepresentation> {
throwIfNotDefined(endpointConfigurationId, 'endpointConfigurationId');
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
endpointConfigurationId
};
const queryParams = {
tenantId
};
return this.get({
path: '/api/enterprise/admin/endpoints/{endpointConfigurationId}',
pathParams,
queryParams
});
}
/**
* List endpoints
*
* @param tenantId tenantId
* @return Promise<EndpointConfigurationRepresentation>
*/
getEndpointConfigurations(tenantId: number): Promise<EndpointConfigurationRepresentation> {
throwIfNotDefined(tenantId, 'tenantId');
const queryParams = {
tenantId
};
return this.get({
path: '/api/enterprise/admin/endpoints',
queryParams
});
}
/**
* Delete an endpoint authorization
*
* @param basicAuthId basicAuthId
* @param tenantId tenantId
* @return Promise<{}>
*/
removeBasicAuthConfiguration(basicAuthId: number, tenantId: number): Promise<void> {
throwIfNotDefined(basicAuthId, 'basicAuthId');
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
basicAuthId
};
const queryParams = {
tenantId
};
return this.delete({
path: '/api/enterprise/admin/basic-auths/{basicAuthId}',
pathParams,
queryParams
});
}
/**
* Delete an endpoint
*
* @param endpointConfigurationId endpointConfigurationId
* @param tenantId tenantId
* @return Promise<{}>
*/
removeEndpointConfiguration(endpointConfigurationId: number, tenantId: number): Promise<void> {
throwIfNotDefined(endpointConfigurationId, 'endpointConfigurationId');
throwIfNotDefined(tenantId, 'tenantId');
const pathParams = {
endpointConfigurationId
};
const queryParams = {
tenantId
};
return this.delete({
path: '/api/enterprise/admin/endpoints/{endpointConfigurationId}',
pathParams,
queryParams
});
}
/**
* Update an endpoint authorization
*
* @param basicAuthId basicAuthId
* @param createRepresentation createRepresentation
* @return Promise<EndpointBasicAuthRepresentation>
*/
updateBasicAuthConfiguration(
basicAuthId: number,
createRepresentation: CreateEndpointBasicAuthRepresentation
): Promise<EndpointBasicAuthRepresentation> {
throwIfNotDefined(basicAuthId, 'basicAuthId');
throwIfNotDefined(createRepresentation, 'createRepresentation');
const pathParams = {
basicAuthId
};
return this.put({
path: '/api/enterprise/admin/basic-auths/{basicAuthId}',
pathParams,
bodyParam: createRepresentation,
returnType: EndpointBasicAuthRepresentation
});
}
/**
* Update an endpoint
*
* @param endpointConfigurationId endpointConfigurationId
* @param representation representation
* @return Promise<EndpointConfigurationRepresentation>
*/
updateEndpointConfiguration(
endpointConfigurationId: number,
representation: EndpointConfigurationRepresentation
): Promise<EndpointConfigurationRepresentation> {
throwIfNotDefined(endpointConfigurationId, 'endpointConfigurationId');
throwIfNotDefined(representation, 'representation');
const pathParams = {
endpointConfigurationId
};
return this.put({
path: '/api/enterprise/admin/endpoints/{endpointConfigurationId}',
pathParams,
bodyParam: representation
});
}
}

Some files were not shown because too many files have changed in this diff Show More