@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
|
@@ -1,216 +1,221 @@
|
|
|
1
1
|
import { ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule } from '@angular/core';
|
|
2
|
-
import { HttpHeaders,
|
|
2
|
+
import { HttpHeaders, HttpParams, HttpClient } from '@angular/common/http';
|
|
3
3
|
import { ConfigService } from '@valtimo/config';
|
|
4
4
|
|
|
5
|
-
/*
|
|
6
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
7
|
-
*
|
|
8
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*/
|
|
20
|
-
class DocumentService {
|
|
21
|
-
constructor(http, configService) {
|
|
22
|
-
this.http = http;
|
|
23
|
-
this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
|
|
24
|
-
}
|
|
25
|
-
// Document-calls
|
|
26
|
-
getAllDefinitions() {
|
|
27
|
-
return this.http.get(`${this.valtimoEndpointUri}document-definition`);
|
|
28
|
-
}
|
|
29
|
-
queryDefinitions(params) {
|
|
30
|
-
return this.http.get(`${this.valtimoEndpointUri}document-definition`, { params: params });
|
|
31
|
-
}
|
|
32
|
-
getDocumentDefinition(documentDefinitionName) {
|
|
33
|
-
return this.http.get(`${this.valtimoEndpointUri}document-definition/${documentDefinitionName}`);
|
|
34
|
-
}
|
|
35
|
-
getDocuments(documentSearchRequest) {
|
|
36
|
-
return this.http.post(`${this.valtimoEndpointUri}document-search`, documentSearchRequest.asHttpBody(), { params: documentSearchRequest.asHttpParams() });
|
|
37
|
-
}
|
|
38
|
-
getDocument(documentId) {
|
|
39
|
-
return this.http.get(`${this.valtimoEndpointUri}document/${documentId}`);
|
|
40
|
-
}
|
|
41
|
-
modifyDocument(document) {
|
|
42
|
-
return this.http.put(`${this.valtimoEndpointUri}document`, document);
|
|
43
|
-
}
|
|
44
|
-
// ProcessDocument-calls
|
|
45
|
-
getProcessDocumentDefinitions() {
|
|
46
|
-
return this.http.get(`${this.valtimoEndpointUri}process-document/definition`);
|
|
47
|
-
}
|
|
48
|
-
findProcessDocumentDefinitions(documentDefinitionName) {
|
|
49
|
-
return this.http.get(`${this.valtimoEndpointUri}process-document/definition/document/${documentDefinitionName}`);
|
|
50
|
-
}
|
|
51
|
-
findProcessDocumentInstances(documentId) {
|
|
52
|
-
return this.http.get(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}`);
|
|
53
|
-
}
|
|
54
|
-
newDocumentAndStartProcess(request) {
|
|
55
|
-
return this.http.post(`${this.valtimoEndpointUri}process-document/operation/new-document-and-start-process`, request);
|
|
56
|
-
}
|
|
57
|
-
modifyDocumentAndCompleteTask(request) {
|
|
58
|
-
return this.http.post(`${this.valtimoEndpointUri}process-document/operation/modify-document-and-complete-task`, request);
|
|
59
|
-
}
|
|
60
|
-
modifyDocumentAndStartProcess(request) {
|
|
61
|
-
return this.http.post(`${this.valtimoEndpointUri}process-document/operation/modify-document-and-start-process`, request);
|
|
62
|
-
}
|
|
63
|
-
createProcessDocumentDefinition(request) {
|
|
64
|
-
return this.http.post(`${this.valtimoEndpointUri}process-document/definition`, request);
|
|
65
|
-
}
|
|
66
|
-
createDocumentDefinition(documentDefinitionCreateRequest) {
|
|
67
|
-
const options = {
|
|
68
|
-
headers: new HttpHeaders({
|
|
69
|
-
'Content-Type': 'application/json'
|
|
70
|
-
})
|
|
71
|
-
};
|
|
72
|
-
return this.http.post(`${this.valtimoEndpointUri}document-definition`, documentDefinitionCreateRequest, options);
|
|
73
|
-
}
|
|
74
|
-
deleteProcessDocumentDefinition(request) {
|
|
75
|
-
const options = {
|
|
76
|
-
headers: new HttpHeaders({
|
|
77
|
-
'Content-Type': 'application/json'
|
|
78
|
-
}),
|
|
79
|
-
body: request
|
|
80
|
-
};
|
|
81
|
-
return this.http.delete(`${this.valtimoEndpointUri}process-document/definition`, options);
|
|
82
|
-
}
|
|
83
|
-
getAuditLog(documentId) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
DocumentService.
|
|
108
|
-
{ type:
|
|
109
|
-
|
|
5
|
+
/*
|
|
6
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
7
|
+
*
|
|
8
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
class DocumentService {
|
|
21
|
+
constructor(http, configService) {
|
|
22
|
+
this.http = http;
|
|
23
|
+
this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
|
|
24
|
+
}
|
|
25
|
+
// Document-calls
|
|
26
|
+
getAllDefinitions() {
|
|
27
|
+
return this.http.get(`${this.valtimoEndpointUri}document-definition`);
|
|
28
|
+
}
|
|
29
|
+
queryDefinitions(params) {
|
|
30
|
+
return this.http.get(`${this.valtimoEndpointUri}document-definition`, { params: params });
|
|
31
|
+
}
|
|
32
|
+
getDocumentDefinition(documentDefinitionName) {
|
|
33
|
+
return this.http.get(`${this.valtimoEndpointUri}document-definition/${documentDefinitionName}`);
|
|
34
|
+
}
|
|
35
|
+
getDocuments(documentSearchRequest) {
|
|
36
|
+
return this.http.post(`${this.valtimoEndpointUri}document-search`, documentSearchRequest.asHttpBody(), { params: documentSearchRequest.asHttpParams() });
|
|
37
|
+
}
|
|
38
|
+
getDocument(documentId) {
|
|
39
|
+
return this.http.get(`${this.valtimoEndpointUri}document/${documentId}`);
|
|
40
|
+
}
|
|
41
|
+
modifyDocument(document) {
|
|
42
|
+
return this.http.put(`${this.valtimoEndpointUri}document`, document);
|
|
43
|
+
}
|
|
44
|
+
// ProcessDocument-calls
|
|
45
|
+
getProcessDocumentDefinitions() {
|
|
46
|
+
return this.http.get(`${this.valtimoEndpointUri}process-document/definition`);
|
|
47
|
+
}
|
|
48
|
+
findProcessDocumentDefinitions(documentDefinitionName) {
|
|
49
|
+
return this.http.get(`${this.valtimoEndpointUri}process-document/definition/document/${documentDefinitionName}`);
|
|
50
|
+
}
|
|
51
|
+
findProcessDocumentInstances(documentId) {
|
|
52
|
+
return this.http.get(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}`);
|
|
53
|
+
}
|
|
54
|
+
newDocumentAndStartProcess(request) {
|
|
55
|
+
return this.http.post(`${this.valtimoEndpointUri}process-document/operation/new-document-and-start-process`, request);
|
|
56
|
+
}
|
|
57
|
+
modifyDocumentAndCompleteTask(request) {
|
|
58
|
+
return this.http.post(`${this.valtimoEndpointUri}process-document/operation/modify-document-and-complete-task`, request);
|
|
59
|
+
}
|
|
60
|
+
modifyDocumentAndStartProcess(request) {
|
|
61
|
+
return this.http.post(`${this.valtimoEndpointUri}process-document/operation/modify-document-and-start-process`, request);
|
|
62
|
+
}
|
|
63
|
+
createProcessDocumentDefinition(request) {
|
|
64
|
+
return this.http.post(`${this.valtimoEndpointUri}process-document/definition`, request);
|
|
65
|
+
}
|
|
66
|
+
createDocumentDefinition(documentDefinitionCreateRequest) {
|
|
67
|
+
const options = {
|
|
68
|
+
headers: new HttpHeaders({
|
|
69
|
+
'Content-Type': 'application/json'
|
|
70
|
+
})
|
|
71
|
+
};
|
|
72
|
+
return this.http.post(`${this.valtimoEndpointUri}document-definition`, documentDefinitionCreateRequest, options);
|
|
73
|
+
}
|
|
74
|
+
deleteProcessDocumentDefinition(request) {
|
|
75
|
+
const options = {
|
|
76
|
+
headers: new HttpHeaders({
|
|
77
|
+
'Content-Type': 'application/json'
|
|
78
|
+
}),
|
|
79
|
+
body: request
|
|
80
|
+
};
|
|
81
|
+
return this.http.delete(`${this.valtimoEndpointUri}process-document/definition`, options);
|
|
82
|
+
}
|
|
83
|
+
getAuditLog(documentId, page = 0) {
|
|
84
|
+
let params = new HttpParams();
|
|
85
|
+
params = params.set('page', page.toString());
|
|
86
|
+
return this.http.get(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}/audit`, { params });
|
|
87
|
+
}
|
|
88
|
+
assignResource(documentId, resourceId) {
|
|
89
|
+
return this.http.post(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, {});
|
|
90
|
+
}
|
|
91
|
+
removeResource(documentId, resourceId) {
|
|
92
|
+
const options = {
|
|
93
|
+
headers: new HttpHeaders({
|
|
94
|
+
'Content-Type': 'application/json'
|
|
95
|
+
})
|
|
96
|
+
};
|
|
97
|
+
return this.http.delete(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, options);
|
|
98
|
+
}
|
|
99
|
+
removeDocumentDefinition(name) {
|
|
100
|
+
return this.http.delete(`${this.valtimoEndpointUri}document-definition/${name}`);
|
|
101
|
+
}
|
|
102
|
+
sendMessage(documentId, request) {
|
|
103
|
+
return this.http.post(`${this.valtimoEndpointUri}document/${documentId}/message`, request);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
DocumentService.ɵprov = ɵɵdefineInjectable({ factory: function DocumentService_Factory() { return new DocumentService(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: DocumentService, providedIn: "root" });
|
|
107
|
+
DocumentService.decorators = [
|
|
108
|
+
{ type: Injectable, args: [{
|
|
109
|
+
providedIn: 'root'
|
|
110
|
+
},] }
|
|
111
|
+
];
|
|
112
|
+
DocumentService.ctorParameters = () => [
|
|
113
|
+
{ type: HttpClient },
|
|
114
|
+
{ type: ConfigService }
|
|
110
115
|
];
|
|
111
116
|
|
|
112
|
-
/*
|
|
113
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
114
|
-
*
|
|
115
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
116
|
-
* you may not use this file except in compliance with the License.
|
|
117
|
-
* You may obtain a copy of the License at
|
|
118
|
-
*
|
|
119
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
120
|
-
*
|
|
121
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
122
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
123
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
124
|
-
* See the License for the specific language governing permissions and
|
|
125
|
-
* limitations under the License.
|
|
126
|
-
*/
|
|
127
|
-
class DocumentModule {
|
|
128
|
-
}
|
|
129
|
-
DocumentModule.decorators = [
|
|
130
|
-
{ type: NgModule }
|
|
117
|
+
/*
|
|
118
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
119
|
+
*
|
|
120
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
121
|
+
* you may not use this file except in compliance with the License.
|
|
122
|
+
* You may obtain a copy of the License at
|
|
123
|
+
*
|
|
124
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
125
|
+
*
|
|
126
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
127
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
128
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
129
|
+
* See the License for the specific language governing permissions and
|
|
130
|
+
* limitations under the License.
|
|
131
|
+
*/
|
|
132
|
+
class DocumentModule {
|
|
133
|
+
}
|
|
134
|
+
DocumentModule.decorators = [
|
|
135
|
+
{ type: NgModule }
|
|
131
136
|
];
|
|
132
137
|
|
|
133
|
-
/*
|
|
134
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
135
|
-
*
|
|
136
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
137
|
-
* you may not use this file except in compliance with the License.
|
|
138
|
-
* You may obtain a copy of the License at
|
|
139
|
-
*
|
|
140
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
141
|
-
*
|
|
142
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
143
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
144
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
145
|
-
* See the License for the specific language governing permissions and
|
|
146
|
-
* limitations under the License.
|
|
147
|
-
*/
|
|
148
|
-
class DocumentSearchRequestHttpBody {
|
|
149
|
-
}
|
|
150
|
-
class DocumentSearchRequestImpl {
|
|
151
|
-
constructor(definitionName, page, size, sequence, createdBy, globalSearchFilter, sort, otherFilters) {
|
|
152
|
-
this.definitionName = definitionName;
|
|
153
|
-
this.page = page;
|
|
154
|
-
this.size = size;
|
|
155
|
-
this.sequence = sequence;
|
|
156
|
-
this.createdBy = createdBy;
|
|
157
|
-
this.globalSearchFilter = globalSearchFilter;
|
|
158
|
-
this.sort = sort;
|
|
159
|
-
this.otherFilters = otherFilters;
|
|
160
|
-
}
|
|
161
|
-
asHttpBody() {
|
|
162
|
-
const httpBody = new DocumentSearchRequestHttpBody();
|
|
163
|
-
httpBody.documentDefinitionName = this.definitionName;
|
|
164
|
-
if (this.sequence) {
|
|
165
|
-
httpBody.sequence = this.sequence;
|
|
166
|
-
}
|
|
167
|
-
if (this.createdBy) {
|
|
168
|
-
httpBody.createdBy = this.createdBy;
|
|
169
|
-
}
|
|
170
|
-
if (this.globalSearchFilter) {
|
|
171
|
-
httpBody.globalSearchFilter = this.globalSearchFilter;
|
|
172
|
-
}
|
|
173
|
-
if (this.otherFilters) {
|
|
174
|
-
httpBody.otherFilters = this.otherFilters;
|
|
175
|
-
}
|
|
176
|
-
return httpBody;
|
|
177
|
-
}
|
|
178
|
-
asHttpParams() {
|
|
179
|
-
let params = new HttpParams()
|
|
180
|
-
.set('definitionName', this.definitionName)
|
|
181
|
-
.set('page', this.page.toString())
|
|
182
|
-
.set('size', this.size.toString());
|
|
183
|
-
if (this.sort) {
|
|
184
|
-
params = params.set('sort', this.getSortString(this.sort));
|
|
185
|
-
}
|
|
186
|
-
return params;
|
|
187
|
-
}
|
|
188
|
-
setPage(page) {
|
|
189
|
-
this.page = page;
|
|
190
|
-
}
|
|
191
|
-
getSortString(sort) {
|
|
192
|
-
return `${sort.state.name},${sort.state.direction}`;
|
|
193
|
-
}
|
|
138
|
+
/*
|
|
139
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
140
|
+
*
|
|
141
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
142
|
+
* you may not use this file except in compliance with the License.
|
|
143
|
+
* You may obtain a copy of the License at
|
|
144
|
+
*
|
|
145
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
146
|
+
*
|
|
147
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
148
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
149
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
150
|
+
* See the License for the specific language governing permissions and
|
|
151
|
+
* limitations under the License.
|
|
152
|
+
*/
|
|
153
|
+
class DocumentSearchRequestHttpBody {
|
|
154
|
+
}
|
|
155
|
+
class DocumentSearchRequestImpl {
|
|
156
|
+
constructor(definitionName, page, size, sequence, createdBy, globalSearchFilter, sort, otherFilters) {
|
|
157
|
+
this.definitionName = definitionName;
|
|
158
|
+
this.page = page;
|
|
159
|
+
this.size = size;
|
|
160
|
+
this.sequence = sequence;
|
|
161
|
+
this.createdBy = createdBy;
|
|
162
|
+
this.globalSearchFilter = globalSearchFilter;
|
|
163
|
+
this.sort = sort;
|
|
164
|
+
this.otherFilters = otherFilters;
|
|
165
|
+
}
|
|
166
|
+
asHttpBody() {
|
|
167
|
+
const httpBody = new DocumentSearchRequestHttpBody();
|
|
168
|
+
httpBody.documentDefinitionName = this.definitionName;
|
|
169
|
+
if (this.sequence) {
|
|
170
|
+
httpBody.sequence = this.sequence;
|
|
171
|
+
}
|
|
172
|
+
if (this.createdBy) {
|
|
173
|
+
httpBody.createdBy = this.createdBy;
|
|
174
|
+
}
|
|
175
|
+
if (this.globalSearchFilter) {
|
|
176
|
+
httpBody.globalSearchFilter = this.globalSearchFilter;
|
|
177
|
+
}
|
|
178
|
+
if (this.otherFilters) {
|
|
179
|
+
httpBody.otherFilters = this.otherFilters;
|
|
180
|
+
}
|
|
181
|
+
return httpBody;
|
|
182
|
+
}
|
|
183
|
+
asHttpParams() {
|
|
184
|
+
let params = new HttpParams()
|
|
185
|
+
.set('definitionName', this.definitionName)
|
|
186
|
+
.set('page', this.page.toString())
|
|
187
|
+
.set('size', this.size.toString());
|
|
188
|
+
if (this.sort) {
|
|
189
|
+
params = params.set('sort', this.getSortString(this.sort));
|
|
190
|
+
}
|
|
191
|
+
return params;
|
|
192
|
+
}
|
|
193
|
+
setPage(page) {
|
|
194
|
+
this.page = page;
|
|
195
|
+
}
|
|
196
|
+
getSortString(sort) {
|
|
197
|
+
return `${sort.state.name},${sort.state.direction}`;
|
|
198
|
+
}
|
|
194
199
|
}
|
|
195
200
|
|
|
196
|
-
/*
|
|
197
|
-
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
198
|
-
*
|
|
199
|
-
* Licensed under EUPL, Version 1.2 (the "License");
|
|
200
|
-
* you may not use this file except in compliance with the License.
|
|
201
|
-
* You may obtain a copy of the License at
|
|
202
|
-
*
|
|
203
|
-
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
204
|
-
*
|
|
205
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
206
|
-
* distributed under the License is distributed on an "AS IS" basis,
|
|
207
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
208
|
-
* See the License for the specific language governing permissions and
|
|
209
|
-
* limitations under the License.
|
|
201
|
+
/*
|
|
202
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
203
|
+
*
|
|
204
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
205
|
+
* you may not use this file except in compliance with the License.
|
|
206
|
+
* You may obtain a copy of the License at
|
|
207
|
+
*
|
|
208
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
209
|
+
*
|
|
210
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
211
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
212
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
213
|
+
* See the License for the specific language governing permissions and
|
|
214
|
+
* limitations under the License.
|
|
210
215
|
*/
|
|
211
216
|
|
|
212
|
-
/**
|
|
213
|
-
* Generated bundle index. Do not edit.
|
|
217
|
+
/**
|
|
218
|
+
* Generated bundle index. Do not edit.
|
|
214
219
|
*/
|
|
215
220
|
|
|
216
221
|
export { DocumentModule, DocumentSearchRequestHttpBody, DocumentSearchRequestImpl, DocumentService };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valtimo-document.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":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;MA6Ca,eAAe;IAG1B,YAAoB,IAAgB,EAAE,aAA4B;QAA9C,SAAI,GAAJ,IAAI,CAAY;QAClC,IAAI,CAAC,kBAAkB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC;KACvE;;IAGM,iBAAiB;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsB,GAAG,IAAI,CAAC,kBAAkB,qBAAqB,CAAC,CAAC;KAC5F;IAED,gBAAgB,CAAC,MAAY;QAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA2B,GAAG,IAAI,CAAC,kBAAkB,qBAAqB,EAAE,EAAC,MAAM,EAAE,MAAM,EAAC,CAAC,CAAC;KACnH;IAED,qBAAqB,CAAC,sBAA8B;QAClD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAqB,GAAG,IAAI,CAAC,kBAAkB,uBAAuB,sBAAsB,EAAE,CAAC,CAAC;KACrH;IAED,YAAY,CAAC,qBAA4C;QACvD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAY,GAAG,IAAI,CAAC,kBAAkB,iBAAiB,EAC1E,qBAAqB,CAAC,UAAU,EAAE,EAAE,EAAC,MAAM,EAAE,qBAAqB,CAAC,YAAY,EAAE,EAAC,CAAC,CAAC;KACvF;IAED,WAAW,CAAC,UAAkB;QAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAW,GAAG,IAAI,CAAC,kBAAkB,YAAY,UAAU,EAAE,CAAC,CAAC;KACpF;IAED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C1C,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;aACjC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACrC,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SAC5D;QACD,OAAO,MAAM,CAAC;KACf;IAED,OAAO,CAAC,IAAY;QAClB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;KAClB;IAED,aAAa,CAAC,IAAe;QAC3B,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;KACrD;;;AC/GH;;;;;;;;;;;;;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"valtimo-document.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":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;MA8Ca,eAAe;IAG1B,YAAoB,IAAgB,EAAE,aAA4B;QAA9C,SAAI,GAAJ,IAAI,CAAY;QAClC,IAAI,CAAC,kBAAkB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC;KACvE;;IAGM,iBAAiB;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsB,GAAG,IAAI,CAAC,kBAAkB,qBAAqB,CAAC,CAAC;KAC5F;IAED,gBAAgB,CAAC,MAAY;QAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA2B,GAAG,IAAI,CAAC,kBAAkB,qBAAqB,EAAE,EAAC,MAAM,EAAE,MAAM,EAAC,CAAC,CAAC;KACnH;IAED,qBAAqB,CAAC,sBAA8B;QAClD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAqB,GAAG,IAAI,CAAC,kBAAkB,uBAAuB,sBAAsB,EAAE,CAAC,CAAC;KACrH;IAED,YAAY,CAAC,qBAA4C;QACvD,OAAO,IAAI,CAAC,IA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1,50 +1,50 @@
|
|
|
1
|
-
import { HttpParams } from '@angular/common/http';
|
|
2
|
-
import { SortState } from '@valtimo/contract';
|
|
3
|
-
export interface DocumentSearchRequest {
|
|
4
|
-
definitionName: string;
|
|
5
|
-
page: number;
|
|
6
|
-
size: number;
|
|
7
|
-
sequence?: number;
|
|
8
|
-
createdBy?: string;
|
|
9
|
-
globalSearchFilter?: string;
|
|
10
|
-
sort?: SortState;
|
|
11
|
-
searchCriteria?: Array<{
|
|
12
|
-
path: string;
|
|
13
|
-
value: string;
|
|
14
|
-
}>;
|
|
15
|
-
asHttpBody(): DocumentSearchRequestHttpBody;
|
|
16
|
-
asHttpParams(): HttpParams;
|
|
17
|
-
setPage(page: number): void;
|
|
18
|
-
getSortString(sort: SortState): string;
|
|
19
|
-
}
|
|
20
|
-
export declare class DocumentSearchRequestHttpBody {
|
|
21
|
-
documentDefinitionName?: string;
|
|
22
|
-
sequence?: number;
|
|
23
|
-
createdBy?: string;
|
|
24
|
-
globalSearchFilter?: string;
|
|
25
|
-
otherFilters?: Array<{
|
|
26
|
-
path: string;
|
|
27
|
-
value: string;
|
|
28
|
-
}>;
|
|
29
|
-
}
|
|
30
|
-
export declare class DocumentSearchRequestImpl implements DocumentSearchRequest {
|
|
31
|
-
definitionName: string;
|
|
32
|
-
page: number;
|
|
33
|
-
size: number;
|
|
34
|
-
sequence?: number;
|
|
35
|
-
createdBy?: string;
|
|
36
|
-
globalSearchFilter?: string;
|
|
37
|
-
sort?: SortState;
|
|
38
|
-
otherFilters?: Array<{
|
|
39
|
-
path: string;
|
|
40
|
-
value: string;
|
|
41
|
-
}>;
|
|
42
|
-
constructor(definitionName: string, page: number, size: number, sequence?: number, createdBy?: string, globalSearchFilter?: string, sort?: SortState, otherFilters?: Array<{
|
|
43
|
-
path: string;
|
|
44
|
-
value: string;
|
|
45
|
-
}>);
|
|
46
|
-
asHttpBody(): DocumentSearchRequestHttpBody;
|
|
47
|
-
asHttpParams(): HttpParams;
|
|
48
|
-
setPage(page: number): void;
|
|
49
|
-
getSortString(sort: SortState): string;
|
|
50
|
-
}
|
|
1
|
+
import { HttpParams } from '@angular/common/http';
|
|
2
|
+
import { SortState } from '@valtimo/contract';
|
|
3
|
+
export interface DocumentSearchRequest {
|
|
4
|
+
definitionName: string;
|
|
5
|
+
page: number;
|
|
6
|
+
size: number;
|
|
7
|
+
sequence?: number;
|
|
8
|
+
createdBy?: string;
|
|
9
|
+
globalSearchFilter?: string;
|
|
10
|
+
sort?: SortState;
|
|
11
|
+
searchCriteria?: Array<{
|
|
12
|
+
path: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}>;
|
|
15
|
+
asHttpBody(): DocumentSearchRequestHttpBody;
|
|
16
|
+
asHttpParams(): HttpParams;
|
|
17
|
+
setPage(page: number): void;
|
|
18
|
+
getSortString(sort: SortState): string;
|
|
19
|
+
}
|
|
20
|
+
export declare class DocumentSearchRequestHttpBody {
|
|
21
|
+
documentDefinitionName?: string;
|
|
22
|
+
sequence?: number;
|
|
23
|
+
createdBy?: string;
|
|
24
|
+
globalSearchFilter?: string;
|
|
25
|
+
otherFilters?: Array<{
|
|
26
|
+
path: string;
|
|
27
|
+
value: string;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
export declare class DocumentSearchRequestImpl implements DocumentSearchRequest {
|
|
31
|
+
definitionName: string;
|
|
32
|
+
page: number;
|
|
33
|
+
size: number;
|
|
34
|
+
sequence?: number;
|
|
35
|
+
createdBy?: string;
|
|
36
|
+
globalSearchFilter?: string;
|
|
37
|
+
sort?: SortState;
|
|
38
|
+
otherFilters?: Array<{
|
|
39
|
+
path: string;
|
|
40
|
+
value: string;
|
|
41
|
+
}>;
|
|
42
|
+
constructor(definitionName: string, page: number, size: number, sequence?: number, createdBy?: string, globalSearchFilter?: string, sort?: SortState, otherFilters?: Array<{
|
|
43
|
+
path: string;
|
|
44
|
+
value: string;
|
|
45
|
+
}>);
|
|
46
|
+
asHttpBody(): DocumentSearchRequestHttpBody;
|
|
47
|
+
asHttpParams(): HttpParams;
|
|
48
|
+
setPage(page: number): void;
|
|
49
|
+
getSortString(sort: SortState): string;
|
|
50
|
+
}
|
package/lib/document.module.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare class DocumentModule {
|
|
2
|
-
}
|
|
1
|
+
export declare class DocumentModule {
|
|
2
|
+
}
|