Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit aab3101

Browse files
authored
Merge pull request #172 from Alfresco/development
Development
2 parents 035e29a + 0af7194 commit aab3101

35 files changed

+3174
-65909
lines changed

CHANGELOG.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,57 @@
55
Alfresco JS API
66

77
_This project provides a JavaScript client API into the v1 Alfresco REST API_
8+
<a name="1.1.0"></a>
9+
# [1.1.0](https://github.com/Alfresco/alfresco-js-api/releases/tag/1.1.0) (26-01-2017)
10+
## Fix
11+
- [Add getRawContentUrl API #161](https://github.com/Alfresco/alfresco-js-api/issues/161)
12+
- [Add getContentThumbnailUrl API #160](https://github.com/Alfresco/alfresco-js-api/issues/160)
13+
- [Fix null string field values parsed as text 'null' #158](https://github.com/Alfresco/alfresco-js-api/issues/158)
14+
- [Wrong API name - getRawContent3 #156](https://github.com/Alfresco/alfresco-js-api/issues/156)
15+
- [Error on login when user has non-latin character in username or password #146](https://github.com/Alfresco/alfresco-js-api/pull/146)
16+
- [Ticket not cleaned when host is changed #143](https://github.com/Alfresco/alfresco-js-api/pull/143)
17+
- [Wrong NodesApi.getNodeInfo declaration #140](https://github.com/Alfresco/alfresco-js-api/pull/140)
18+
- [Wrong PathInfoEntity declaration #139](https://github.com/Alfresco/alfresco-js-api/pull/139)
19+
- [Missing reference to ecmClient and bpmClient in the .d.ts in the AlfrescoApi #138](https://github.com/Alfresco/alfresco-js-api/pull/138)
20+
- [remove UnhandledPromiseRejectionWarning in the test log #153](https://github.com/Alfresco/alfresco-js-api/pull/153)
21+
- [Provide Activiti Api with Export / Save and Delete report #164](https://github.com/Alfresco/alfresco-js-api/issues/164)
22+
23+
## Features
24+
- [Change Activiti contextroot #137](https://github.com/Alfresco/alfresco-js-api/pull/137)
25+
26+
```javascript
27+
this.bpmAuth = new BpmAuth({
28+
hostBpm: 'http://127.0.0.1:9999',
29+
contextRootBpm: 'activiti-custom-root'
30+
});
31+
32+
this.bpmAuth.login('admin', 'admin');
33+
```
834

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

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

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

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

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

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

3561
## Features

README.md

Lines changed: 88 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ This project provides a JavaScript client API into the Alfresco REST API and Act
7979
* [Tasks of process definition](#tasks-of-process-definition)
8080
* [Generate reports](#generate-reports)
8181
* [Update report details](#update-report-details)
82+
* [Export to csv](#export-to-csv)
83+
* [Save Report](#save-report)
84+
* [Delete report](#delete-report)
8285
- [Development](#development)
8386
- [Release History](#release-history)
8487

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

8992
# Prerequisites
9093

91-
To correctly use the alafresco js api the minimal supported version are:
94+
To correctly use the alfresco js api the minimal supported version are:
9295

9396
- 5.2.a-EA Alfresco Platform Repository (version [5.2.a-EA](https://wiki.alfresco.com/wiki/Community_file_list_201606-EA) or newer)
9497
- 1.5 Activiti
@@ -135,7 +138,8 @@ Property | Description | default value|
135138
------------- | ------------- | -------------|
136139
hostEcm| (Optional value The Ip or Name of the host where your Alfresco instance is running )|http://127.0.0.1:8080 |
137140
hostBpm| (Optional value The Ip or Name of the host where your Activiti instance is running )|http://127.0.0.1:9999 |
138-
contextRoot| (Optional value that define the context Root of the API default value is alfresco )|alfresco |
141+
contextRoot| (Optional value that define the context Root of the Alfresco ECM API default value is alfresco )|alfresco |
142+
contextRootBpm| (Optional value that define the context Root of the Activiti API default value is activiti-app )|alfresco |
139143
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 |
140144
ticket| (Optional only if you want login with the ticket see example below)| |
141145
disableCsrf| To disable CSRF Token to be submitted. Only for Activiti call.| false |
@@ -657,23 +661,23 @@ Name | Description
657661

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

660-
this.alfrescoJsApi.webScript.executeWebScript('GET', 'mytasks').then(function (data) {
664+
this.alfrescoJsApi.core.webscriptApi.executeWebScript('GET', 'mytasks').then(function (data) {
661665
console.log('Data received form http://127.0.01:8080/alfresco/service/mytasks' + data);
662666
}, function (error) {
663667
console.log('Error' + error);
664668
});
665669

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

668-
this.alfrescoJsApi.webScript.executeWebScript('GET', 'mytasks', null, 'share').then(function (data) {
672+
this.alfrescoJsApi.core.webscriptApi.executeWebScript('GET', 'mytasks', null, 'share').then(function (data) {
669673
console.log('Data received form http://127.0.01:8080/share/service/mytasks' + data);
670674
}, function (error) {
671675
console.log('Error' + error);
672676
});
673677

674678
//Call a GET on a Web Scripts available at the following URIs: http://127.0.01:8080/share/differentServiceSlug/mytasks
675679

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

1066+
## Export to csv
1067+
exportToCsv(reportId, queryParms)
1068+
1069+
> Export a report as csv
1070+
1071+
####Parameters
1072+
Name | Type | Description | Notes
1073+
------------- | ------------- | ------------- | -------------
1074+
**reportId** | **String**| reportId |
1075+
**queryParms** | **Object**| Query parameters |
1076+
1077+
####Example
1078+
```javascript
1079+
1080+
var reportId = "1"; // String | reportId
1081+
var queryParms = {
1082+
'processDefinitionId': 'TEST:99:999',
1083+
'dateRange': {
1084+
'startDate': '2017-01-01T00:00:00.000Z',
1085+
'endDate': '2017-01-24T23:59:59.999Z',
1086+
'rangeId': 'currentYear'
1087+
},
1088+
'slowProcessInstanceInteger': 10,
1089+
'status': 'All',
1090+
'__reportName': 'FAKE_REPORT_NAME'
1091+
};
1092+
1093+
this.alfrescoJsApi.activiti.reportApi.exportToCsv(reportId, queryParms);
1094+
```
1095+
1096+
## Save Report
1097+
1098+
saveReport(reportId, queryParams)
1099+
1100+
> Save a report
1101+
1102+
####Parameters
1103+
Name | Type | Description | Notes
1104+
------------- | ------------- | ------------- | -------------
1105+
**reportId** | **String**| reportId |
1106+
**queryParms** | **Object**| Query parameters |
1107+
1108+
####Example
1109+
```javascript
1110+
1111+
var reportId = "1"; // String | reportId
1112+
var queryParms = {
1113+
'processDefinitionId': 'TEST:99:999',
1114+
'dateRange': {
1115+
'startDate': '2017-01-01T00:00:00.000Z',
1116+
'endDate': '2017-01-24T23:59:59.999Z',
1117+
'rangeId': 'currentYear'
1118+
},
1119+
'slowProcessInstanceInteger': 10,
1120+
'status': 'All',
1121+
'__reportName': 'FAKE_REPORT_NAME'
1122+
};
1123+
1124+
this.alfrescoJsApi.activiti.reportApi.saveReport(reportId, queryParms);
1125+
```
1126+
1127+
## Delete report
1128+
deleteReport(reportId)
1129+
1130+
> Delete a report
1131+
1132+
####Parameters
1133+
Name | Type | Description | Notes
1134+
------------- | ------------- | ------------- | -------------
1135+
**reportId** | **String**| reportId |
1136+
1137+
####Example
1138+
```javascript
1139+
1140+
var reportId = "1"; // String | reportId
1141+
1142+
this.alfrescoJsApi.activiti.reportApi.deleteReport(reportId);
1143+
```
1144+
10621145
# Development
10631146

10641147
* To run the build

0 commit comments

Comments
 (0)