@valtimo/document 4.15.2-next-main.14 → 4.15.3-next-main.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/valtimo-document.umd.js +215 -209
- package/bundles/valtimo-document.umd.js.map +1 -1
- package/bundles/valtimo-document.umd.min.js +1 -1
- package/bundles/valtimo-document.umd.min.js.map +1 -1
- package/esm2015/lib/document-search-request.js +63 -63
- package/esm2015/lib/document.module.js +21 -21
- package/esm2015/lib/document.service.js +118 -113
- package/esm2015/public_api.js +21 -21
- package/esm2015/valtimo-document.js +4 -4
- package/fesm2015/valtimo-document.js +207 -202
- package/fesm2015/valtimo-document.js.map +1 -1
- package/lib/document-search-request.d.ts +50 -50
- package/lib/document.module.d.ts +2 -2
- package/lib/document.service.d.ts +30 -29
- package/package.json +1 -1
- package/public_api.d.ts +3 -3
- package/valtimo-document.d.ts +4 -4
- package/valtimo-document.metadata.json +1 -1
|
@@ -4,223 +4,229 @@
|
|
|
4
4
|
(global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.document = {}), global.ng.core, global.ng.common.http, global.config));
|
|
5
5
|
}(this, (function (exports, i0, i1, i2) { 'use strict';
|
|
6
6
|
|
|
7
|
-
/*
|
|
8
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
9
|
-
*
|
|
10
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
11
|
-
* you may not use this file except in compliance with the License.
|
|
12
|
-
* You may obtain a copy of the License at
|
|
13
|
-
*
|
|
14
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
15
|
-
*
|
|
16
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
18
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
* See the License for the specific language governing permissions and
|
|
20
|
-
* limitations under the License.
|
|
21
|
-
*/
|
|
22
|
-
var DocumentService = /** @class */ (function () {
|
|
23
|
-
function DocumentService(http, configService) {
|
|
24
|
-
this.http = http;
|
|
25
|
-
this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
|
|
26
|
-
}
|
|
27
|
-
// Document-calls
|
|
28
|
-
DocumentService.prototype.getAllDefinitions = function () {
|
|
29
|
-
return this.http.get(this.valtimoEndpointUri + "document-definition");
|
|
30
|
-
};
|
|
31
|
-
DocumentService.prototype.queryDefinitions = function (params) {
|
|
32
|
-
return this.http.get(this.valtimoEndpointUri + "document-definition", { params: params });
|
|
33
|
-
};
|
|
34
|
-
DocumentService.prototype.getDocumentDefinition = function (documentDefinitionName) {
|
|
35
|
-
return this.http.get(this.valtimoEndpointUri + "document-definition/" + documentDefinitionName);
|
|
36
|
-
};
|
|
37
|
-
DocumentService.prototype.getDocuments = function (documentSearchRequest) {
|
|
38
|
-
return this.http.post(this.valtimoEndpointUri + "document-search", documentSearchRequest.asHttpBody(), { params: documentSearchRequest.asHttpParams() });
|
|
39
|
-
};
|
|
40
|
-
DocumentService.prototype.getDocument = function (documentId) {
|
|
41
|
-
return this.http.get(this.valtimoEndpointUri + "document/" + documentId);
|
|
42
|
-
};
|
|
43
|
-
DocumentService.prototype.modifyDocument = function (document) {
|
|
44
|
-
return this.http.put(this.valtimoEndpointUri + "document", document);
|
|
45
|
-
};
|
|
46
|
-
// ProcessDocument-calls
|
|
47
|
-
DocumentService.prototype.getProcessDocumentDefinitions = function () {
|
|
48
|
-
return this.http.get(this.valtimoEndpointUri + "process-document/definition");
|
|
49
|
-
};
|
|
50
|
-
DocumentService.prototype.findProcessDocumentDefinitions = function (documentDefinitionName) {
|
|
51
|
-
return this.http.get(this.valtimoEndpointUri + "process-document/definition/document/" + documentDefinitionName);
|
|
52
|
-
};
|
|
53
|
-
DocumentService.prototype.findProcessDocumentInstances = function (documentId) {
|
|
54
|
-
return this.http.get(this.valtimoEndpointUri + "process-document/instance/document/" + documentId);
|
|
55
|
-
};
|
|
56
|
-
DocumentService.prototype.newDocumentAndStartProcess = function (request) {
|
|
57
|
-
return this.http.post(this.valtimoEndpointUri + "process-document/operation/new-document-and-start-process", request);
|
|
58
|
-
};
|
|
59
|
-
DocumentService.prototype.modifyDocumentAndCompleteTask = function (request) {
|
|
60
|
-
return this.http.post(this.valtimoEndpointUri + "process-document/operation/modify-document-and-complete-task", request);
|
|
61
|
-
};
|
|
62
|
-
DocumentService.prototype.modifyDocumentAndStartProcess = function (request) {
|
|
63
|
-
return this.http.post(this.valtimoEndpointUri + "process-document/operation/modify-document-and-start-process", request);
|
|
64
|
-
};
|
|
65
|
-
DocumentService.prototype.createProcessDocumentDefinition = function (request) {
|
|
66
|
-
return this.http.post(this.valtimoEndpointUri + "process-document/definition", request);
|
|
67
|
-
};
|
|
68
|
-
DocumentService.prototype.createDocumentDefinition = function (documentDefinitionCreateRequest) {
|
|
69
|
-
var options = {
|
|
70
|
-
headers: new i1.HttpHeaders({
|
|
71
|
-
'Content-Type': 'application/json'
|
|
72
|
-
})
|
|
73
|
-
};
|
|
74
|
-
return this.http.post(this.valtimoEndpointUri + "document-definition", documentDefinitionCreateRequest, options);
|
|
75
|
-
};
|
|
76
|
-
DocumentService.prototype.deleteProcessDocumentDefinition = function (request) {
|
|
77
|
-
var options = {
|
|
78
|
-
headers: new i1.HttpHeaders({
|
|
79
|
-
'Content-Type': 'application/json'
|
|
80
|
-
}),
|
|
81
|
-
body: request
|
|
82
|
-
};
|
|
83
|
-
return this.http.delete(this.valtimoEndpointUri + "process-document/definition", options);
|
|
84
|
-
};
|
|
85
|
-
DocumentService.prototype.getAuditLog = function (documentId) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
return this.http.
|
|
90
|
-
};
|
|
91
|
-
DocumentService.prototype.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return this.http.delete(this.valtimoEndpointUri + "document
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
DocumentService
|
|
111
|
-
|
|
112
|
-
{ type:
|
|
7
|
+
/*
|
|
8
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
9
|
+
*
|
|
10
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
11
|
+
* you may not use this file except in compliance with the License.
|
|
12
|
+
* You may obtain a copy of the License at
|
|
13
|
+
*
|
|
14
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
15
|
+
*
|
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
18
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
* See the License for the specific language governing permissions and
|
|
20
|
+
* limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
var DocumentService = /** @class */ (function () {
|
|
23
|
+
function DocumentService(http, configService) {
|
|
24
|
+
this.http = http;
|
|
25
|
+
this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
|
|
26
|
+
}
|
|
27
|
+
// Document-calls
|
|
28
|
+
DocumentService.prototype.getAllDefinitions = function () {
|
|
29
|
+
return this.http.get(this.valtimoEndpointUri + "document-definition");
|
|
30
|
+
};
|
|
31
|
+
DocumentService.prototype.queryDefinitions = function (params) {
|
|
32
|
+
return this.http.get(this.valtimoEndpointUri + "document-definition", { params: params });
|
|
33
|
+
};
|
|
34
|
+
DocumentService.prototype.getDocumentDefinition = function (documentDefinitionName) {
|
|
35
|
+
return this.http.get(this.valtimoEndpointUri + "document-definition/" + documentDefinitionName);
|
|
36
|
+
};
|
|
37
|
+
DocumentService.prototype.getDocuments = function (documentSearchRequest) {
|
|
38
|
+
return this.http.post(this.valtimoEndpointUri + "document-search", documentSearchRequest.asHttpBody(), { params: documentSearchRequest.asHttpParams() });
|
|
39
|
+
};
|
|
40
|
+
DocumentService.prototype.getDocument = function (documentId) {
|
|
41
|
+
return this.http.get(this.valtimoEndpointUri + "document/" + documentId);
|
|
42
|
+
};
|
|
43
|
+
DocumentService.prototype.modifyDocument = function (document) {
|
|
44
|
+
return this.http.put(this.valtimoEndpointUri + "document", document);
|
|
45
|
+
};
|
|
46
|
+
// ProcessDocument-calls
|
|
47
|
+
DocumentService.prototype.getProcessDocumentDefinitions = function () {
|
|
48
|
+
return this.http.get(this.valtimoEndpointUri + "process-document/definition");
|
|
49
|
+
};
|
|
50
|
+
DocumentService.prototype.findProcessDocumentDefinitions = function (documentDefinitionName) {
|
|
51
|
+
return this.http.get(this.valtimoEndpointUri + "process-document/definition/document/" + documentDefinitionName);
|
|
52
|
+
};
|
|
53
|
+
DocumentService.prototype.findProcessDocumentInstances = function (documentId) {
|
|
54
|
+
return this.http.get(this.valtimoEndpointUri + "process-document/instance/document/" + documentId);
|
|
55
|
+
};
|
|
56
|
+
DocumentService.prototype.newDocumentAndStartProcess = function (request) {
|
|
57
|
+
return this.http.post(this.valtimoEndpointUri + "process-document/operation/new-document-and-start-process", request);
|
|
58
|
+
};
|
|
59
|
+
DocumentService.prototype.modifyDocumentAndCompleteTask = function (request) {
|
|
60
|
+
return this.http.post(this.valtimoEndpointUri + "process-document/operation/modify-document-and-complete-task", request);
|
|
61
|
+
};
|
|
62
|
+
DocumentService.prototype.modifyDocumentAndStartProcess = function (request) {
|
|
63
|
+
return this.http.post(this.valtimoEndpointUri + "process-document/operation/modify-document-and-start-process", request);
|
|
64
|
+
};
|
|
65
|
+
DocumentService.prototype.createProcessDocumentDefinition = function (request) {
|
|
66
|
+
return this.http.post(this.valtimoEndpointUri + "process-document/definition", request);
|
|
67
|
+
};
|
|
68
|
+
DocumentService.prototype.createDocumentDefinition = function (documentDefinitionCreateRequest) {
|
|
69
|
+
var options = {
|
|
70
|
+
headers: new i1.HttpHeaders({
|
|
71
|
+
'Content-Type': 'application/json'
|
|
72
|
+
})
|
|
73
|
+
};
|
|
74
|
+
return this.http.post(this.valtimoEndpointUri + "document-definition", documentDefinitionCreateRequest, options);
|
|
75
|
+
};
|
|
76
|
+
DocumentService.prototype.deleteProcessDocumentDefinition = function (request) {
|
|
77
|
+
var options = {
|
|
78
|
+
headers: new i1.HttpHeaders({
|
|
79
|
+
'Content-Type': 'application/json'
|
|
80
|
+
}),
|
|
81
|
+
body: request
|
|
82
|
+
};
|
|
83
|
+
return this.http.delete(this.valtimoEndpointUri + "process-document/definition", options);
|
|
84
|
+
};
|
|
85
|
+
DocumentService.prototype.getAuditLog = function (documentId, page) {
|
|
86
|
+
if (page === void 0) { page = 0; }
|
|
87
|
+
var params = new i1.HttpParams();
|
|
88
|
+
params = params.set('page', page.toString());
|
|
89
|
+
return this.http.get(this.valtimoEndpointUri + "process-document/instance/document/" + documentId + "/audit", { params: params });
|
|
90
|
+
};
|
|
91
|
+
DocumentService.prototype.assignResource = function (documentId, resourceId) {
|
|
92
|
+
return this.http.post(this.valtimoEndpointUri + "document/" + documentId + "/resource/" + resourceId, {});
|
|
93
|
+
};
|
|
94
|
+
DocumentService.prototype.removeResource = function (documentId, resourceId) {
|
|
95
|
+
var options = {
|
|
96
|
+
headers: new i1.HttpHeaders({
|
|
97
|
+
'Content-Type': 'application/json'
|
|
98
|
+
})
|
|
99
|
+
};
|
|
100
|
+
return this.http.delete(this.valtimoEndpointUri + "document/" + documentId + "/resource/" + resourceId, options);
|
|
101
|
+
};
|
|
102
|
+
DocumentService.prototype.removeDocumentDefinition = function (name) {
|
|
103
|
+
return this.http.delete(this.valtimoEndpointUri + "document-definition/" + name);
|
|
104
|
+
};
|
|
105
|
+
DocumentService.prototype.sendMessage = function (documentId, request) {
|
|
106
|
+
return this.http.post(this.valtimoEndpointUri + "document/" + documentId + "/message", request);
|
|
107
|
+
};
|
|
108
|
+
return DocumentService;
|
|
109
|
+
}());
|
|
110
|
+
DocumentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DocumentService_Factory() { return new DocumentService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.ConfigService)); }, token: DocumentService, providedIn: "root" });
|
|
111
|
+
DocumentService.decorators = [
|
|
112
|
+
{ type: i0.Injectable, args: [{
|
|
113
|
+
providedIn: 'root'
|
|
114
|
+
},] }
|
|
115
|
+
];
|
|
116
|
+
DocumentService.ctorParameters = function () { return [
|
|
117
|
+
{ type: i1.HttpClient },
|
|
118
|
+
{ type: i2.ConfigService }
|
|
113
119
|
]; };
|
|
114
120
|
|
|
115
|
-
/*
|
|
116
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
117
|
-
*
|
|
118
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
119
|
-
* you may not use this file except in compliance with the License.
|
|
120
|
-
* You may obtain a copy of the License at
|
|
121
|
-
*
|
|
122
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
123
|
-
*
|
|
124
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
125
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
126
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
127
|
-
* See the License for the specific language governing permissions and
|
|
128
|
-
* limitations under the License.
|
|
129
|
-
*/
|
|
130
|
-
var DocumentModule = /** @class */ (function () {
|
|
131
|
-
function DocumentModule() {
|
|
132
|
-
}
|
|
133
|
-
return DocumentModule;
|
|
134
|
-
}());
|
|
135
|
-
DocumentModule.decorators = [
|
|
136
|
-
{ type: i0.NgModule }
|
|
121
|
+
/*
|
|
122
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
123
|
+
*
|
|
124
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
125
|
+
* you may not use this file except in compliance with the License.
|
|
126
|
+
* You may obtain a copy of the License at
|
|
127
|
+
*
|
|
128
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
129
|
+
*
|
|
130
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
131
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
132
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
133
|
+
* See the License for the specific language governing permissions and
|
|
134
|
+
* limitations under the License.
|
|
135
|
+
*/
|
|
136
|
+
var DocumentModule = /** @class */ (function () {
|
|
137
|
+
function DocumentModule() {
|
|
138
|
+
}
|
|
139
|
+
return DocumentModule;
|
|
140
|
+
}());
|
|
141
|
+
DocumentModule.decorators = [
|
|
142
|
+
{ type: i0.NgModule }
|
|
137
143
|
];
|
|
138
144
|
|
|
139
|
-
/*
|
|
140
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
141
|
-
*
|
|
142
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
143
|
-
* you may not use this file except in compliance with the License.
|
|
144
|
-
* You may obtain a copy of the License at
|
|
145
|
-
*
|
|
146
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
147
|
-
*
|
|
148
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
149
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
150
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
151
|
-
* See the License for the specific language governing permissions and
|
|
152
|
-
* limitations under the License.
|
|
153
|
-
*/
|
|
154
|
-
var DocumentSearchRequestHttpBody = /** @class */ (function () {
|
|
155
|
-
function DocumentSearchRequestHttpBody() {
|
|
156
|
-
}
|
|
157
|
-
return DocumentSearchRequestHttpBody;
|
|
158
|
-
}());
|
|
159
|
-
var DocumentSearchRequestImpl = /** @class */ (function () {
|
|
160
|
-
function DocumentSearchRequestImpl(definitionName, page, size, sequence, createdBy, globalSearchFilter, sort, otherFilters) {
|
|
161
|
-
this.definitionName = definitionName;
|
|
162
|
-
this.page = page;
|
|
163
|
-
this.size = size;
|
|
164
|
-
this.sequence = sequence;
|
|
165
|
-
this.createdBy = createdBy;
|
|
166
|
-
this.globalSearchFilter = globalSearchFilter;
|
|
167
|
-
this.sort = sort;
|
|
168
|
-
this.otherFilters = otherFilters;
|
|
169
|
-
}
|
|
170
|
-
DocumentSearchRequestImpl.prototype.asHttpBody = function () {
|
|
171
|
-
var httpBody = new DocumentSearchRequestHttpBody();
|
|
172
|
-
httpBody.documentDefinitionName = this.definitionName;
|
|
173
|
-
if (this.sequence) {
|
|
174
|
-
httpBody.sequence = this.sequence;
|
|
175
|
-
}
|
|
176
|
-
if (this.createdBy) {
|
|
177
|
-
httpBody.createdBy = this.createdBy;
|
|
178
|
-
}
|
|
179
|
-
if (this.globalSearchFilter) {
|
|
180
|
-
httpBody.globalSearchFilter = this.globalSearchFilter;
|
|
181
|
-
}
|
|
182
|
-
if (this.otherFilters) {
|
|
183
|
-
httpBody.otherFilters = this.otherFilters;
|
|
184
|
-
}
|
|
185
|
-
return httpBody;
|
|
186
|
-
};
|
|
187
|
-
DocumentSearchRequestImpl.prototype.asHttpParams = function () {
|
|
188
|
-
var params = new i1.HttpParams()
|
|
189
|
-
.set('definitionName', this.definitionName)
|
|
190
|
-
.set('page', this.page.toString())
|
|
191
|
-
.set('size', this.size.toString());
|
|
192
|
-
if (this.sort) {
|
|
193
|
-
params = params.set('sort', this.getSortString(this.sort));
|
|
194
|
-
}
|
|
195
|
-
return params;
|
|
196
|
-
};
|
|
197
|
-
DocumentSearchRequestImpl.prototype.setPage = function (page) {
|
|
198
|
-
this.page = page;
|
|
199
|
-
};
|
|
200
|
-
DocumentSearchRequestImpl.prototype.getSortString = function (sort) {
|
|
201
|
-
return sort.state.name + "," + sort.state.direction;
|
|
202
|
-
};
|
|
203
|
-
return DocumentSearchRequestImpl;
|
|
145
|
+
/*
|
|
146
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
147
|
+
*
|
|
148
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
149
|
+
* you may not use this file except in compliance with the License.
|
|
150
|
+
* You may obtain a copy of the License at
|
|
151
|
+
*
|
|
152
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
153
|
+
*
|
|
154
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
155
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
156
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
157
|
+
* See the License for the specific language governing permissions and
|
|
158
|
+
* limitations under the License.
|
|
159
|
+
*/
|
|
160
|
+
var DocumentSearchRequestHttpBody = /** @class */ (function () {
|
|
161
|
+
function DocumentSearchRequestHttpBody() {
|
|
162
|
+
}
|
|
163
|
+
return DocumentSearchRequestHttpBody;
|
|
164
|
+
}());
|
|
165
|
+
var DocumentSearchRequestImpl = /** @class */ (function () {
|
|
166
|
+
function DocumentSearchRequestImpl(definitionName, page, size, sequence, createdBy, globalSearchFilter, sort, otherFilters) {
|
|
167
|
+
this.definitionName = definitionName;
|
|
168
|
+
this.page = page;
|
|
169
|
+
this.size = size;
|
|
170
|
+
this.sequence = sequence;
|
|
171
|
+
this.createdBy = createdBy;
|
|
172
|
+
this.globalSearchFilter = globalSearchFilter;
|
|
173
|
+
this.sort = sort;
|
|
174
|
+
this.otherFilters = otherFilters;
|
|
175
|
+
}
|
|
176
|
+
DocumentSearchRequestImpl.prototype.asHttpBody = function () {
|
|
177
|
+
var httpBody = new DocumentSearchRequestHttpBody();
|
|
178
|
+
httpBody.documentDefinitionName = this.definitionName;
|
|
179
|
+
if (this.sequence) {
|
|
180
|
+
httpBody.sequence = this.sequence;
|
|
181
|
+
}
|
|
182
|
+
if (this.createdBy) {
|
|
183
|
+
httpBody.createdBy = this.createdBy;
|
|
184
|
+
}
|
|
185
|
+
if (this.globalSearchFilter) {
|
|
186
|
+
httpBody.globalSearchFilter = this.globalSearchFilter;
|
|
187
|
+
}
|
|
188
|
+
if (this.otherFilters) {
|
|
189
|
+
httpBody.otherFilters = this.otherFilters;
|
|
190
|
+
}
|
|
191
|
+
return httpBody;
|
|
192
|
+
};
|
|
193
|
+
DocumentSearchRequestImpl.prototype.asHttpParams = function () {
|
|
194
|
+
var params = new i1.HttpParams()
|
|
195
|
+
.set('definitionName', this.definitionName)
|
|
196
|
+
.set('page', this.page.toString())
|
|
197
|
+
.set('size', this.size.toString());
|
|
198
|
+
if (this.sort) {
|
|
199
|
+
params = params.set('sort', this.getSortString(this.sort));
|
|
200
|
+
}
|
|
201
|
+
return params;
|
|
202
|
+
};
|
|
203
|
+
DocumentSearchRequestImpl.prototype.setPage = function (page) {
|
|
204
|
+
this.page = page;
|
|
205
|
+
};
|
|
206
|
+
DocumentSearchRequestImpl.prototype.getSortString = function (sort) {
|
|
207
|
+
return sort.state.name + "," + sort.state.direction;
|
|
208
|
+
};
|
|
209
|
+
return DocumentSearchRequestImpl;
|
|
204
210
|
}());
|
|
205
211
|
|
|
206
|
-
/*
|
|
207
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
208
|
-
*
|
|
209
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
210
|
-
* you may not use this file except in compliance with the License.
|
|
211
|
-
* You may obtain a copy of the License at
|
|
212
|
-
*
|
|
213
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
214
|
-
*
|
|
215
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
216
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
217
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
218
|
-
* See the License for the specific language governing permissions and
|
|
219
|
-
* limitations under the License.
|
|
212
|
+
/*
|
|
213
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
214
|
+
*
|
|
215
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
216
|
+
* you may not use this file except in compliance with the License.
|
|
217
|
+
* You may obtain a copy of the License at
|
|
218
|
+
*
|
|
219
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
220
|
+
*
|
|
221
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
222
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
223
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
224
|
+
* See the License for the specific language governing permissions and
|
|
225
|
+
* limitations under the License.
|
|
220
226
|
*/
|
|
221
227
|
|
|
222
|
-
/**
|
|
223
|
-
* Generated bundle index. Do not edit.
|
|
228
|
+
/**
|
|
229
|
+
* Generated bundle index. Do not edit.
|
|
224
230
|
*/
|
|
225
231
|
|
|
226
232
|
exports.DocumentModule = DocumentModule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valtimo-document.umd.js","sources":["../../../../projects/valtimo/document/src/lib/document.service.ts","../../../../projects/valtimo/document/src/lib/document.module.ts","../../../../projects/valtimo/document/src/lib/document-search-request.ts","../../../../projects/valtimo/document/src/public_api.ts","../../../../projects/valtimo/document/src/valtimo-document.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient, HttpHeaders} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {\n AuditRecord,\n Document,\n DocumentDefinition,\n DocumentDefinitions,\n DocumentResult,\n Documents,\n ModifyDocumentAndCompleteTaskRequestImpl,\n ModifyDocumentAndCompleteTaskResult,\n ModifyDocumentAndStartProcessRequestImpl,\n ModifyDocumentAndStartProcessResult,\n NewDocumentAndStartProcessRequestImpl,\n NewDocumentAndStartProcessResult,\n Page,\n ProcessDocumentDefinition,\n ProcessDocumentDefinitionRequest,\n ProcessDocumentInstance,\n DocumentDefinitionCreateRequest,\n UndeployDocumentDefinitionResult\n} from '@valtimo/contract';\nimport {DocumentSearchRequest} from './document-search-request';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DocumentService {\n private valtimoEndpointUri: string;\n\n constructor(private http: HttpClient, configService: ConfigService) {\n this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;\n }\n\n // Document-calls\n public getAllDefinitions(): Observable<DocumentDefinitions> {\n return this.http.get<DocumentDefinitions>(`${this.valtimoEndpointUri}document-definition`);\n }\n\n queryDefinitions(params?: any): Observable<Page<DocumentDefinition>> {\n return this.http.get<Page<DocumentDefinition>>(`${this.valtimoEndpointUri}document-definition`, {params: params});\n }\n\n getDocumentDefinition(documentDefinitionName: string): Observable<DocumentDefinition> {\n return this.http.get<DocumentDefinition>(`${this.valtimoEndpointUri}document-definition/${documentDefinitionName}`);\n }\n\n getDocuments(documentSearchRequest: DocumentSearchRequest): Observable<Documents> {\n return this.http.post<Documents>(`${this.valtimoEndpointUri}document-search`,\n documentSearchRequest.asHttpBody(), {params: documentSearchRequest.asHttpParams()});\n }\n\n getDocument(documentId: string): Observable<Document> {\n return this.http.get<Document>(`${this.valtimoEndpointUri}document/${documentId}`);\n }\n\n modifyDocument(document: any): Observable<DocumentResult> {\n return this.http.put<DocumentResult>(`${this.valtimoEndpointUri}document`, document);\n }\n\n // ProcessDocument-calls\n getProcessDocumentDefinitions(): Observable<ProcessDocumentDefinition> {\n return this.http.get<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`);\n }\n\n findProcessDocumentDefinitions(documentDefinitionName: string): Observable<ProcessDocumentDefinition[]> {\n return this.http.get<ProcessDocumentDefinition[]>(\n `${this.valtimoEndpointUri}process-document/definition/document/${documentDefinitionName}`\n );\n }\n\n findProcessDocumentInstances(documentId: string): Observable<ProcessDocumentInstance[]> {\n return this.http.get<ProcessDocumentInstance[]>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}`);\n }\n\n newDocumentAndStartProcess(request: NewDocumentAndStartProcessRequestImpl): Observable<NewDocumentAndStartProcessResult> {\n return this.http.post<NewDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/new-document-and-start-process`,\n request\n );\n }\n\n modifyDocumentAndCompleteTask(request: ModifyDocumentAndCompleteTaskRequestImpl): Observable<ModifyDocumentAndCompleteTaskResult> {\n return this.http.post<ModifyDocumentAndCompleteTaskResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-complete-task`,\n request\n );\n }\n\n modifyDocumentAndStartProcess(request: ModifyDocumentAndStartProcessRequestImpl): Observable<ModifyDocumentAndStartProcessResult> {\n return this.http.post<ModifyDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-start-process`,\n request\n );\n }\n\n createProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<ProcessDocumentDefinition> {\n return this.http.post<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`, request);\n }\n\n createDocumentDefinition(documentDefinitionCreateRequest: DocumentDefinitionCreateRequest): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.post<void>(`${this.valtimoEndpointUri}document-definition`, documentDefinitionCreateRequest, options);\n }\n\n deleteProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<any> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n body: request\n };\n return this.http.delete(`${this.valtimoEndpointUri}process-document/definition`, options);\n }\n\n getAuditLog(documentId: string): Observable<Page<AuditRecord>> {\n return this.http.get<Page<AuditRecord>>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}/audit`);\n }\n\n assignResource(documentId: string, resourceId: string): Observable<void> {\n return this.http.post<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, {});\n }\n\n removeResource(documentId: string, resourceId: string): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.delete<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, options);\n }\n\n removeDocumentDefinition(name: string): Observable<UndeployDocumentDefinitionResult> {\n return this.http.delete<UndeployDocumentDefinitionResult>(`${this.valtimoEndpointUri}document-definition/${name}`);\n }\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\n\n@NgModule()\nexport class DocumentModule {\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {HttpParams} from '@angular/common/http';\nimport {SortState} from '@valtimo/contract';\n\nexport interface DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n searchCriteria?: Array<{path: string; value: string}>;\n\n asHttpBody(): DocumentSearchRequestHttpBody;\n asHttpParams(): HttpParams;\n setPage(page: number): void;\n getSortString(sort: SortState): string;\n}\n\nexport class DocumentSearchRequestHttpBody {\n documentDefinitionName?: string;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n otherFilters?: Array<{path: string; value: string}>;\n}\n\nexport class DocumentSearchRequestImpl implements DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n otherFilters?: Array<{path: string; value: string}>;\n\n constructor(\n definitionName: string,\n page: number,\n size: number,\n sequence?: number,\n createdBy?: string,\n globalSearchFilter?: string,\n sort?: SortState,\n otherFilters?: Array<{path: string; value: string}>\n ) {\n this.definitionName = definitionName;\n this.page = page;\n this.size = size;\n this.sequence = sequence;\n this.createdBy = createdBy;\n this.globalSearchFilter = globalSearchFilter;\n this.sort = sort;\n this.otherFilters = otherFilters;\n }\n\n asHttpBody(): DocumentSearchRequestHttpBody {\n const httpBody = new DocumentSearchRequestHttpBody();\n\n httpBody.documentDefinitionName = this.definitionName;\n\n if (this.sequence) {\n httpBody.sequence = this.sequence;\n }\n if (this.createdBy) {\n httpBody.createdBy = this.createdBy;\n }\n if (this.globalSearchFilter) {\n httpBody.globalSearchFilter = this.globalSearchFilter;\n }\n if (this.otherFilters) {\n httpBody.otherFilters = this.otherFilters;\n }\n\n return httpBody;\n }\n\n asHttpParams(): HttpParams {\n let params = new HttpParams()\n .set('definitionName', this.definitionName)\n .set('page', this.page.toString())\n .set('size', this.size.toString());\n if (this.sort) {\n params = params.set('sort', this.getSortString(this.sort));\n }\n return params;\n }\n\n setPage(page: number): void {\n this.page = page;\n }\n\n getSortString(sort: SortState): string {\n return `${sort.state.name},${sort.state.direction}`;\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of document\n */\nexport * from './lib/document.service';\nexport * from './lib/document.module';\nexport * from './lib/document-search-request';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["HttpHeaders","Injectable","HttpClient","ConfigService","NgModule","HttpParams"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;QAgDE,yBAAoB,IAAgB,EAAE,aAA4B;YAA9C,SAAI,GAAJ,IAAI,CAAY;YAClC,IAAI,CAAC,kBAAkB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC;SACvE;;QAGM,2CAAiB,GAAjB;YACL,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAyB,IAAI,CAAC,kBAAkB,wBAAqB,CAAC,CAAC;SAC5F;QAED,0CAAgB,GAAhB,UAAiB,MAAY;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA8B,IAAI,CAAC,kBAAkB,wBAAqB,EAAE,EAAC,MAAM,EAAE,MAAM,EAAC,CAAC,CAAC;SACnH;QAED,+CAAqB,GAArB,UAAsB,sBAA8B;YAClD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAwB,IAAI,CAAC,kBAAkB,4BAAuB,sBAAwB,CAAC,CAAC;SACrH;QAED,sCAAY,GAAZ,UAAa,qBAA4C;YACvD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAe,IAAI,CAAC,kBAAkB,oBAAiB,EAC1E,qBAAqB,CAAC,UAAU,EAAE,EAAE,EAAC,MAAM,EAAE,qBAAqB,CAAC,YAAY,EAAE,EAAC,CAAC,CAAC;SACvF;QAED,qCAAW,GAAX,UAAY,UAAkB;YAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAc,IAAI,CAAC,kBAAkB,iBAAY,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EAAE;iBAC1B,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,cAAc,CAAC;iBAC1C,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACjC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YACrC,IAAI,IAAI,CAAC,IAAI,EAAE;gBACb,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;aAC5D;YACD,OAAO,MAAM,CAAC;SACf;QAED,2CAAO,GAAP,UAAQ,IAAY;YAClB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;SAClB;QAED,iDAAa,GAAb,UAAc,IAAe;YAC3B,OAAU,IAAI,CAAC,KAAK,CAAC,IAAI,SAAI,IAAI,CAAC,KAAK,CAAC,SAAW,CAAC;SACrD;wCACF;KAAA;;IChHD;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"valtimo-document.umd.js","sources":["../../../../projects/valtimo/document/src/lib/document.service.ts","../../../../projects/valtimo/document/src/lib/document.module.ts","../../../../projects/valtimo/document/src/lib/document-search-request.ts","../../../../projects/valtimo/document/src/public_api.ts","../../../../projects/valtimo/document/src/valtimo-document.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {\n AuditRecord,\n Document,\n DocumentDefinition,\n DocumentDefinitions,\n DocumentResult,\n Documents,\n ModifyDocumentAndCompleteTaskRequestImpl,\n ModifyDocumentAndCompleteTaskResult,\n ModifyDocumentAndStartProcessRequestImpl,\n ModifyDocumentAndStartProcessResult,\n NewDocumentAndStartProcessRequestImpl,\n NewDocumentAndStartProcessResult,\n Page,\n ProcessDocumentDefinition,\n ProcessDocumentDefinitionRequest,\n ProcessDocumentInstance,\n DocumentDefinitionCreateRequest,\n UndeployDocumentDefinitionResult,\n DocumentSendMessageRequest\n} from '@valtimo/contract';\nimport {DocumentSearchRequest} from './document-search-request';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DocumentService {\n private valtimoEndpointUri: string;\n\n constructor(private http: HttpClient, configService: ConfigService) {\n this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;\n }\n\n // Document-calls\n public getAllDefinitions(): Observable<DocumentDefinitions> {\n return this.http.get<DocumentDefinitions>(`${this.valtimoEndpointUri}document-definition`);\n }\n\n queryDefinitions(params?: any): Observable<Page<DocumentDefinition>> {\n return this.http.get<Page<DocumentDefinition>>(`${this.valtimoEndpointUri}document-definition`, {params: params});\n }\n\n getDocumentDefinition(documentDefinitionName: string): Observable<DocumentDefinition> {\n return this.http.get<DocumentDefinition>(`${this.valtimoEndpointUri}document-definition/${documentDefinitionName}`);\n }\n\n getDocuments(documentSearchRequest: DocumentSearchRequest): Observable<Documents> {\n return this.http.post<Documents>(`${this.valtimoEndpointUri}document-search`,\n documentSearchRequest.asHttpBody(), {params: documentSearchRequest.asHttpParams()});\n }\n\n getDocument(documentId: string): Observable<Document> {\n return this.http.get<Document>(`${this.valtimoEndpointUri}document/${documentId}`);\n }\n\n modifyDocument(document: any): Observable<DocumentResult> {\n return this.http.put<DocumentResult>(`${this.valtimoEndpointUri}document`, document);\n }\n\n // ProcessDocument-calls\n getProcessDocumentDefinitions(): Observable<ProcessDocumentDefinition> {\n return this.http.get<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`);\n }\n\n findProcessDocumentDefinitions(documentDefinitionName: string): Observable<ProcessDocumentDefinition[]> {\n return this.http.get<ProcessDocumentDefinition[]>(\n `${this.valtimoEndpointUri}process-document/definition/document/${documentDefinitionName}`\n );\n }\n\n findProcessDocumentInstances(documentId: string): Observable<ProcessDocumentInstance[]> {\n return this.http.get<ProcessDocumentInstance[]>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}`);\n }\n\n newDocumentAndStartProcess(request: NewDocumentAndStartProcessRequestImpl): Observable<NewDocumentAndStartProcessResult> {\n return this.http.post<NewDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/new-document-and-start-process`,\n request\n );\n }\n\n modifyDocumentAndCompleteTask(request: ModifyDocumentAndCompleteTaskRequestImpl): Observable<ModifyDocumentAndCompleteTaskResult> {\n return this.http.post<ModifyDocumentAndCompleteTaskResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-complete-task`,\n request\n );\n }\n\n modifyDocumentAndStartProcess(request: ModifyDocumentAndStartProcessRequestImpl): Observable<ModifyDocumentAndStartProcessResult> {\n return this.http.post<ModifyDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-start-process`,\n request\n );\n }\n\n createProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<ProcessDocumentDefinition> {\n return this.http.post<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`, request);\n }\n\n createDocumentDefinition(documentDefinitionCreateRequest: DocumentDefinitionCreateRequest): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.post<void>(`${this.valtimoEndpointUri}document-definition`, documentDefinitionCreateRequest, options);\n }\n\n deleteProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<any> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n body: request\n };\n return this.http.delete(`${this.valtimoEndpointUri}process-document/definition`, options);\n }\n\n getAuditLog(documentId: string, page: number = 0): Observable<Page<AuditRecord>> {\n let params = new HttpParams();\n params = params.set('page', page.toString());\n return this.http.get<Page<AuditRecord>>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}/audit`,\n {params}\n );\n }\n\n assignResource(documentId: string, resourceId: string): Observable<void> {\n return this.http.post<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, {});\n }\n\n removeResource(documentId: string, resourceId: string): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.delete<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, options);\n }\n\n removeDocumentDefinition(name: string): Observable<UndeployDocumentDefinitionResult> {\n return this.http.delete<UndeployDocumentDefinitionResult>(`${this.valtimoEndpointUri}document-definition/${name}`);\n }\n\n sendMessage(documentId: string, request: DocumentSendMessageRequest): Observable<any> {\n return this.http.post(`${this.valtimoEndpointUri}document/${documentId}/message`, request);\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\n\n@NgModule()\nexport class DocumentModule {\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {HttpParams} from '@angular/common/http';\nimport {SortState} from '@valtimo/contract';\n\nexport interface DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n searchCriteria?: Array<{path: string; value: string}>;\n\n asHttpBody(): DocumentSearchRequestHttpBody;\n asHttpParams(): HttpParams;\n setPage(page: number): void;\n getSortString(sort: SortState): string;\n}\n\nexport class DocumentSearchRequestHttpBody {\n documentDefinitionName?: string;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n otherFilters?: Array<{path: string; value: string}>;\n}\n\nexport class DocumentSearchRequestImpl implements DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n otherFilters?: Array<{path: string; value: string}>;\n\n constructor(\n definitionName: string,\n page: number,\n size: number,\n sequence?: number,\n createdBy?: string,\n globalSearchFilter?: string,\n sort?: SortState,\n otherFilters?: Array<{path: string; value: string}>\n ) {\n this.definitionName = definitionName;\n this.page = page;\n this.size = size;\n this.sequence = sequence;\n this.createdBy = createdBy;\n this.globalSearchFilter = globalSearchFilter;\n this.sort = sort;\n this.otherFilters = otherFilters;\n }\n\n asHttpBody(): DocumentSearchRequestHttpBody {\n const httpBody = new DocumentSearchRequestHttpBody();\n\n httpBody.documentDefinitionName = this.definitionName;\n\n if (this.sequence) {\n httpBody.sequence = this.sequence;\n }\n if (this.createdBy) {\n httpBody.createdBy = this.createdBy;\n }\n if (this.globalSearchFilter) {\n httpBody.globalSearchFilter = this.globalSearchFilter;\n }\n if (this.otherFilters) {\n httpBody.otherFilters = this.otherFilters;\n }\n\n return httpBody;\n }\n\n asHttpParams(): HttpParams {\n let params = new HttpParams()\n .set('definitionName', this.definitionName)\n .set('page', this.page.toString())\n .set('size', this.size.toString());\n if (this.sort) {\n params = params.set('sort', this.getSortString(this.sort));\n }\n return params;\n }\n\n setPage(page: number): void {\n this.page = page;\n }\n\n getSortString(sort: SortState): string {\n return `${sort.state.name},${sort.state.direction}`;\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of document\n */\nexport * from './lib/document.service';\nexport * from './lib/document.module';\nexport * from './lib/document-search-request';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["HttpHeaders","HttpParams","Injectable","HttpClient","ConfigService","NgModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;QAiDE,yBAAoB,IAAgB,EAAE,aAA4B;YAA9C,SAAI,GAAJ,IAAI,CAAY;YAClC,IAAI,CAAC,kBAAkB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC;SACvE;;QAGM,2CAAiB,GAAjB;YACL,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAyB,IAAI,CAAC,kBAAkB,wBAAqB,CAAC,CAAC;SAC5F;QAED,0CAAgB,GAAhB,UAAiB,MAAY;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA8B,IAAI,CAAC,kBAAkB,wBAAqB,EAAE,EAAC,MAAM,EAAE,MAAM,EAAC,CAAC,CAAC;SACnH;QAED,+CAAqB,GAArB,UAAsB,sBAA8B;YAClD,OAAO,IAAI,CAAC,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CAAC,IAAI,GAAG,IAAI,CAAC;SAClB;QAED,iDAAa,GAAb,UAAc,IAAe;YAC3B,OAAU,IAAI,CAAC,KAAK,CAAC,IAAI,SAAI,IAAI,CAAC,KAAK,CAAC,SAAW,CAAC;SACrD;wCACF;KAAA;;IChHD;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http"),require("@valtimo/config")):"function"==typeof define&&define.amd?define("@valtimo/document",["exports","@angular/core","@angular/common/http","@valtimo/config"],e):e(((t=t||self).valtimo=t.valtimo||{},t.valtimo.document={}),t.ng.core,t.ng.common.http,t.config)}(this,(function(t,e,o,n){"use strict";var i=function(){function t(t,e){this.http=t,this.valtimoEndpointUri=e.config.valtimoApi.endpointUri}return t.prototype.getAllDefinitions=function(){return this.http.get(this.valtimoEndpointUri+"document-definition")},t.prototype.queryDefinitions=function(t){return this.http.get(this.valtimoEndpointUri+"document-definition",{params:t})},t.prototype.getDocumentDefinition=function(t){return this.http.get(this.valtimoEndpointUri+"document-definition/"+t)},t.prototype.getDocuments=function(t){return this.http.post(this.valtimoEndpointUri+"document-search",t.asHttpBody(),{params:t.asHttpParams()})},t.prototype.getDocument=function(t){return this.http.get(this.valtimoEndpointUri+"document/"+t)},t.prototype.modifyDocument=function(t){return this.http.put(this.valtimoEndpointUri+"document",t)},t.prototype.getProcessDocumentDefinitions=function(){return this.http.get(this.valtimoEndpointUri+"process-document/definition")},t.prototype.findProcessDocumentDefinitions=function(t){return this.http.get(this.valtimoEndpointUri+"process-document/definition/document/"+t)},t.prototype.findProcessDocumentInstances=function(t){return this.http.get(this.valtimoEndpointUri+"process-document/instance/document/"+t)},t.prototype.newDocumentAndStartProcess=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/operation/new-document-and-start-process",t)},t.prototype.modifyDocumentAndCompleteTask=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/operation/modify-document-and-complete-task",t)},t.prototype.modifyDocumentAndStartProcess=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/operation/modify-document-and-start-process",t)},t.prototype.createProcessDocumentDefinition=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/definition",t)},t.prototype.createDocumentDefinition=function(t){var e={headers:new o.HttpHeaders({"Content-Type":"application/json"})};return this.http.post(this.valtimoEndpointUri+"document-definition",t,e)},t.prototype.deleteProcessDocumentDefinition=function(t){var e={headers:new o.HttpHeaders({"Content-Type":"application/json"}),body:t};return this.http.delete(this.valtimoEndpointUri+"process-document/definition",e)},t.prototype.getAuditLog=function(t){return this.http.get(this.valtimoEndpointUri+"process-document/instance/document/"+t+"/audit")},t.prototype.assignResource=function(t,e){return this.http.post(this.valtimoEndpointUri+"document/"+t+"/resource/"+e,{})},t.prototype.removeResource=function(t,e){var n={headers:new o.HttpHeaders({"Content-Type":"application/json"})};return this.http.delete(this.valtimoEndpointUri+"document/"+t+"/resource/"+e,n)},t.prototype.removeDocumentDefinition=function(t){return this.http.delete(this.valtimoEndpointUri+"document-definition/"+t)},t}();i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(o.HttpClient),e.ɵɵinject(n.ConfigService))},token:i,providedIn:"root"}),i.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],i.ctorParameters=function(){return[{type:o.HttpClient},{type:n.ConfigService}]};var r=function(){};r.decorators=[{type:e.NgModule}];var s=function(){},p=function(){function t(t,e,o,n,i,r,s,p){this.definitionName=t,this.page=e,this.size=o,this.sequence=n,this.createdBy=i,this.globalSearchFilter=r,this.sort=s,this.otherFilters=p}return t.prototype.asHttpBody=function(){var t=new s;return t.documentDefinitionName=this.definitionName,this.sequence&&(t.sequence=this.sequence),this.createdBy&&(t.createdBy=this.createdBy),this.globalSearchFilter&&(t.globalSearchFilter=this.globalSearchFilter),this.otherFilters&&(t.otherFilters=this.otherFilters),t},t.prototype.asHttpParams=function(){var t=(new o.HttpParams).set("definitionName",this.definitionName).set("page",this.page.toString()).set("size",this.size.toString());return this.sort&&(t=t.set("sort",this.getSortString(this.sort))),t},t.prototype.setPage=function(t){this.page=t},t.prototype.getSortString=function(t){return t.state.name+","+t.state.direction},t}();t.DocumentModule=r,t.DocumentSearchRequestHttpBody=s,t.DocumentSearchRequestImpl=p,t.DocumentService=i,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http"),require("@valtimo/config")):"function"==typeof define&&define.amd?define("@valtimo/document",["exports","@angular/core","@angular/common/http","@valtimo/config"],e):e(((t=t||self).valtimo=t.valtimo||{},t.valtimo.document={}),t.ng.core,t.ng.common.http,t.config)}(this,(function(t,e,o,n){"use strict";var i=function(){function t(t,e){this.http=t,this.valtimoEndpointUri=e.config.valtimoApi.endpointUri}return t.prototype.getAllDefinitions=function(){return this.http.get(this.valtimoEndpointUri+"document-definition")},t.prototype.queryDefinitions=function(t){return this.http.get(this.valtimoEndpointUri+"document-definition",{params:t})},t.prototype.getDocumentDefinition=function(t){return this.http.get(this.valtimoEndpointUri+"document-definition/"+t)},t.prototype.getDocuments=function(t){return this.http.post(this.valtimoEndpointUri+"document-search",t.asHttpBody(),{params:t.asHttpParams()})},t.prototype.getDocument=function(t){return this.http.get(this.valtimoEndpointUri+"document/"+t)},t.prototype.modifyDocument=function(t){return this.http.put(this.valtimoEndpointUri+"document",t)},t.prototype.getProcessDocumentDefinitions=function(){return this.http.get(this.valtimoEndpointUri+"process-document/definition")},t.prototype.findProcessDocumentDefinitions=function(t){return this.http.get(this.valtimoEndpointUri+"process-document/definition/document/"+t)},t.prototype.findProcessDocumentInstances=function(t){return this.http.get(this.valtimoEndpointUri+"process-document/instance/document/"+t)},t.prototype.newDocumentAndStartProcess=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/operation/new-document-and-start-process",t)},t.prototype.modifyDocumentAndCompleteTask=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/operation/modify-document-and-complete-task",t)},t.prototype.modifyDocumentAndStartProcess=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/operation/modify-document-and-start-process",t)},t.prototype.createProcessDocumentDefinition=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/definition",t)},t.prototype.createDocumentDefinition=function(t){var e={headers:new o.HttpHeaders({"Content-Type":"application/json"})};return this.http.post(this.valtimoEndpointUri+"document-definition",t,e)},t.prototype.deleteProcessDocumentDefinition=function(t){var e={headers:new o.HttpHeaders({"Content-Type":"application/json"}),body:t};return this.http.delete(this.valtimoEndpointUri+"process-document/definition",e)},t.prototype.getAuditLog=function(t,e){void 0===e&&(e=0);var n=new o.HttpParams;return n=n.set("page",e.toString()),this.http.get(this.valtimoEndpointUri+"process-document/instance/document/"+t+"/audit",{params:n})},t.prototype.assignResource=function(t,e){return this.http.post(this.valtimoEndpointUri+"document/"+t+"/resource/"+e,{})},t.prototype.removeResource=function(t,e){var n={headers:new o.HttpHeaders({"Content-Type":"application/json"})};return this.http.delete(this.valtimoEndpointUri+"document/"+t+"/resource/"+e,n)},t.prototype.removeDocumentDefinition=function(t){return this.http.delete(this.valtimoEndpointUri+"document-definition/"+t)},t.prototype.sendMessage=function(t,e){return this.http.post(this.valtimoEndpointUri+"document/"+t+"/message",e)},t}();i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(o.HttpClient),e.ɵɵinject(n.ConfigService))},token:i,providedIn:"root"}),i.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],i.ctorParameters=function(){return[{type:o.HttpClient},{type:n.ConfigService}]};var r=function(){};r.decorators=[{type:e.NgModule}];var s=function(){},p=function(){function t(t,e,o,n,i,r,s,p){this.definitionName=t,this.page=e,this.size=o,this.sequence=n,this.createdBy=i,this.globalSearchFilter=r,this.sort=s,this.otherFilters=p}return t.prototype.asHttpBody=function(){var t=new s;return t.documentDefinitionName=this.definitionName,this.sequence&&(t.sequence=this.sequence),this.createdBy&&(t.createdBy=this.createdBy),this.globalSearchFilter&&(t.globalSearchFilter=this.globalSearchFilter),this.otherFilters&&(t.otherFilters=this.otherFilters),t},t.prototype.asHttpParams=function(){var t=(new o.HttpParams).set("definitionName",this.definitionName).set("page",this.page.toString()).set("size",this.size.toString());return this.sort&&(t=t.set("sort",this.getSortString(this.sort))),t},t.prototype.setPage=function(t){this.page=t},t.prototype.getSortString=function(t){return t.state.name+","+t.state.direction},t}();t.DocumentModule=r,t.DocumentSearchRequestHttpBody=s,t.DocumentSearchRequestImpl=p,t.DocumentService=i,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=valtimo-document.umd.min.js.map
|