Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #172 from Alfresco/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
magemello committed Jan 27, 2017
2 parents 035e29a + 0af7194 commit aab3101
Show file tree
Hide file tree
Showing 35 changed files with 3,174 additions and 65,909 deletions.
34 changes: 30 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,57 @@
Alfresco JS API

_This project provides a JavaScript client API into the v1 Alfresco REST API_
<a name="1.1.0"></a>
# [1.1.0](https://github.com/Alfresco/alfresco-js-api/releases/tag/1.1.0) (26-01-2017)
## Fix
- [Add getRawContentUrl API #161](https://github.com/Alfresco/alfresco-js-api/issues/161)
- [Add getContentThumbnailUrl API #160](https://github.com/Alfresco/alfresco-js-api/issues/160)
- [Fix null string field values parsed as text 'null' #158](https://github.com/Alfresco/alfresco-js-api/issues/158)
- [Wrong API name - getRawContent3 #156](https://github.com/Alfresco/alfresco-js-api/issues/156)
- [Error on login when user has non-latin character in username or password #146](https://github.com/Alfresco/alfresco-js-api/pull/146)
- [Ticket not cleaned when host is changed #143](https://github.com/Alfresco/alfresco-js-api/pull/143)
- [Wrong NodesApi.getNodeInfo declaration #140](https://github.com/Alfresco/alfresco-js-api/pull/140)
- [Wrong PathInfoEntity declaration #139](https://github.com/Alfresco/alfresco-js-api/pull/139)
- [Missing reference to ecmClient and bpmClient in the .d.ts in the AlfrescoApi #138](https://github.com/Alfresco/alfresco-js-api/pull/138)
- [remove UnhandledPromiseRejectionWarning in the test log #153](https://github.com/Alfresco/alfresco-js-api/pull/153)
- [Provide Activiti Api with Export / Save and Delete report #164](https://github.com/Alfresco/alfresco-js-api/issues/164)

## Features
- [Change Activiti contextroot #137](https://github.com/Alfresco/alfresco-js-api/pull/137)

```javascript
this.bpmAuth = new BpmAuth({
hostBpm: 'http://127.0.0.1:9999',
contextRootBpm: 'activiti-custom-root'
});

this.bpmAuth.login('admin', 'admin');
```

<a name="1.0.0"></a>
# [1.0.0](https://github.com/Alfresco/alfresco-js-api/releases/tag/1.0.0) (20-12-2016)
## fix
## Fix
- [/api/enterprise/script-files/controllers sending wrong accept header #130](https://github.com/Alfresco/alfresco-js-api/pull/130)
- [CSRF Token is not working #128](https://github.com/Alfresco/alfresco-js-api/pull/128)
- [Timestamp timezones are ignored #134](https://github.com/Alfresco/alfresco-js-api/issues/134)

<a name="0.5.5"></a>
# [0.5.5](https://github.com/Alfresco/alfresco-js-api/releases/tag/0.5.5) (09-12-2016)
## fix
## Fix
- [Added bable plugin for IE10 #121](https://github.com/Alfresco/alfresco-js-api/pull/122)

## Features
- [Add the report api inside the js api #124](https://github.com/Alfresco/alfresco-js-api/issues/124)

<a name="0.5.3"></a>
# [0.5.3](https://github.com/Alfresco/alfresco-js-api/releases/tag/0.5.3) (06-12-2016)
## fix
## Fix
- [CSRF Token fix for activiti #116](https://github.com/Alfresco/alfresco-js-api/issues/116)

<a name="0.5.2"></a>
# [0.5.2](https://github.com/Alfresco/alfresco-js-api/releases/tag/0.5.2) (05-12-2016)

## fix
## Fix
- [ProcessInstanceVariablesApi doesn't work in webpack #111](https://github.com/Alfresco/alfresco-js-api/issues/111)

## Features
Expand Down
93 changes: 88 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ This project provides a JavaScript client API into the Alfresco REST API and Act
* [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)
- [Development](#development)
- [Release History](#release-history)

Expand All @@ -88,7 +91,7 @@ This project provides a JavaScript client API into the Alfresco REST API and Act

# Prerequisites

To correctly use the alafresco js api the minimal supported version are:
To correctly use the alfresco js api the minimal supported version are:

- 5.2.a-EA Alfresco Platform Repository (version [5.2.a-EA](https://wiki.alfresco.com/wiki/Community_file_list_201606-EA) or newer)
- 1.5 Activiti
Expand Down Expand Up @@ -135,7 +138,8 @@ Property | Description | default value|
------------- | ------------- | -------------|
hostEcm| (Optional value The Ip or Name of the host where your Alfresco instance is running )|http://127.0.0.1:8080 |
hostBpm| (Optional value The Ip or Name of the host where your Activiti instance is running )|http://127.0.0.1:9999 |
contextRoot| (Optional value that define the context Root of the API default value is alfresco )|alfresco |
contextRoot| (Optional value that define the context Root of the Alfresco ECM API default value is alfresco )|alfresco |
contextRootBpm| (Optional value that define the context Root of the Activiti API default value is activiti-app )|alfresco |
provider| (Optional value 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 |
Expand Down Expand Up @@ -657,23 +661,23 @@ Name | Description

//Call a GET on a Web Scripts available at the following URIs: http://127.0.01:8080/alfresco/service/mytasks

this.alfrescoJsApi.webScript.executeWebScript('GET', 'mytasks').then(function (data) {
this.alfrescoJsApi.core.webscriptApi.executeWebScript('GET', 'mytasks').then(function (data) {
console.log('Data received form http://127.0.01:8080/alfresco/service/mytasks' + data);
}, function (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

this.alfrescoJsApi.webScript.executeWebScript('GET', 'mytasks', null, 'share').then(function (data) {
this.alfrescoJsApi.core.webscriptApi.executeWebScript('GET', 'mytasks', null, 'share').then(function (data) {
console.log('Data received form http://127.0.01:8080/share/service/mytasks' + data);
}, function (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

this.alfrescoJsApi.webScript.executeWebScript('GET', 'mytasks', null, 'share', 'differentServiceSlug').then(function (data) {
this.alfrescoJsApi.core.webscriptApi.executeWebScript('GET', 'mytasks', null, 'share', 'differentServiceSlug').then(function (data) {
console.log('Data received form http://127.0.01:8080/share/differentServiceSlug/mytasks' + data);
}, function (error) {
console.log('Error' + error);
Expand Down Expand Up @@ -1059,6 +1063,85 @@ var name = "new Fake name"; // String | reportId
this.alfrescoJsApi.activiti.reportApi.updateReport(reportId, name);
```

## Export to csv
exportToCsv(reportId, queryParms)

> Export a report as csv
####Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**reportId** | **String**| reportId |
**queryParms** | **Object**| Query parameters |

####Example
```javascript

var reportId = "1"; // String | reportId
var queryParms = {
'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'
};

this.alfrescoJsApi.activiti.reportApi.exportToCsv(reportId, queryParms);
```

## Save Report

saveReport(reportId, queryParams)

> Save a report
####Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**reportId** | **String**| reportId |
**queryParms** | **Object**| Query parameters |

####Example
```javascript

var reportId = "1"; // String | reportId
var queryParms = {
'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'
};

this.alfrescoJsApi.activiti.reportApi.saveReport(reportId, queryParms);
```

## Delete report
deleteReport(reportId)

> Delete a report
####Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**reportId** | **String**| reportId |

####Example
```javascript

var reportId = "1"; // String | reportId

this.alfrescoJsApi.activiti.reportApi.deleteReport(reportId);
```

# Development

* To run the build
Expand Down
Loading

0 comments on commit aab3101

Please sign in to comment.