@valtimo/document 11.3.2 → 12.0.1
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/esm2022/lib/document.module.mjs +6 -6
- package/esm2022/lib/models/advanced-document-search-request.mjs +56 -0
- package/esm2022/lib/models/audit.model.mjs +2 -2
- package/esm2022/lib/models/document-search-request.mjs +64 -0
- package/esm2022/lib/models/document.model.mjs +2 -2
- package/esm2022/lib/models/index.mjs +5 -2
- package/esm2022/lib/models/internal-case-status.model.mjs +32 -0
- package/esm2022/lib/models/list-sorting.model.mjs +2 -2
- package/esm2022/lib/services/case-status.service.mjs +54 -0
- package/esm2022/lib/services/document.service.mjs +257 -0
- package/esm2022/lib/services/file-sort.service.mjs +39 -0
- package/esm2022/lib/services/index.mjs +19 -0
- package/esm2022/lib/utils/index.mjs +17 -0
- package/esm2022/lib/utils/internal-case-status.utils.mjs +32 -0
- package/esm2022/public_api.mjs +4 -5
- package/fesm2022/valtimo-document.mjs +298 -124
- package/fesm2022/valtimo-document.mjs.map +1 -1
- package/lib/{advanced-document-search-request.d.ts → models/advanced-document-search-request.d.ts} +1 -1
- package/lib/models/advanced-document-search-request.d.ts.map +1 -0
- package/lib/{document-search-request.d.ts → models/document-search-request.d.ts} +1 -1
- package/lib/models/document-search-request.d.ts.map +1 -0
- package/lib/models/document.model.d.ts +22 -8
- package/lib/models/document.model.d.ts.map +1 -1
- package/lib/models/index.d.ts +3 -0
- package/lib/models/index.d.ts.map +1 -1
- package/lib/models/internal-case-status.model.d.ts +26 -0
- package/lib/models/internal-case-status.model.d.ts.map +1 -0
- package/lib/services/case-status.service.d.ts +19 -0
- package/lib/services/case-status.service.d.ts.map +1 -0
- package/lib/{document.service.d.ts → services/document.service.d.ts} +9 -12
- package/lib/services/document.service.d.ts.map +1 -0
- package/lib/services/file-sort.service.d.ts +11 -0
- package/lib/services/file-sort.service.d.ts.map +1 -0
- package/lib/services/index.d.ts +4 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/internal-case-status.utils.d.ts +7 -0
- package/lib/utils/internal-case-status.utils.d.ts.map +1 -0
- package/package.json +3 -3
- package/public_api.d.ts +2 -3
- package/public_api.d.ts.map +1 -1
- package/esm2022/lib/advanced-document-search-request.mjs +0 -56
- package/esm2022/lib/document-search-request.mjs +0 -64
- package/esm2022/lib/document.service.mjs +0 -262
- package/lib/advanced-document-search-request.d.ts.map +0 -1
- package/lib/document-search-request.d.ts.map +0 -1
- package/lib/document.service.d.ts.map +0 -1
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import * as i1 from '@angular/common/http';
|
|
2
|
+
import { HttpParams, HttpHeaders } from '@angular/common/http';
|
|
1
3
|
import * as i0 from '@angular/core';
|
|
2
4
|
import { Injectable, NgModule } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/common/http';
|
|
4
|
-
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
|
5
|
-
import { catchError, of } from 'rxjs';
|
|
6
5
|
import * as i2 from '@valtimo/config';
|
|
6
|
+
import { BaseApiService } from '@valtimo/config';
|
|
7
|
+
import { InterceptorSkip } from '@valtimo/security';
|
|
8
|
+
import { catchError, of, switchMap } from 'rxjs';
|
|
7
9
|
|
|
8
10
|
/*
|
|
9
|
-
* Copyright 2015-
|
|
11
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
10
12
|
*
|
|
11
13
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
12
14
|
* you may not use this file except in compliance with the License.
|
|
@@ -58,7 +60,94 @@ class DocumentDefinitionCreateRequest {
|
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
/*
|
|
61
|
-
* Copyright 2015-
|
|
63
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
64
|
+
*
|
|
65
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
66
|
+
* you may not use this file except in compliance with the License.
|
|
67
|
+
* You may obtain a copy of the License at
|
|
68
|
+
*
|
|
69
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
70
|
+
*
|
|
71
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
72
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
73
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
74
|
+
* See the License for the specific language governing permissions and
|
|
75
|
+
* limitations under the License.
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
/*
|
|
79
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
80
|
+
*
|
|
81
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
82
|
+
* you may not use this file except in compliance with the License.
|
|
83
|
+
* You may obtain a copy of the License at
|
|
84
|
+
*
|
|
85
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
86
|
+
*
|
|
87
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
88
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
89
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
90
|
+
* See the License for the specific language governing permissions and
|
|
91
|
+
* limitations under the License.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
/*
|
|
95
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
96
|
+
*
|
|
97
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
98
|
+
* you may not use this file except in compliance with the License.
|
|
99
|
+
* You may obtain a copy of the License at
|
|
100
|
+
*
|
|
101
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
102
|
+
*
|
|
103
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
104
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
105
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
106
|
+
* See the License for the specific language governing permissions and
|
|
107
|
+
* limitations under the License.
|
|
108
|
+
*/
|
|
109
|
+
class AdvancedDocumentSearchRequestHttpBody {
|
|
110
|
+
}
|
|
111
|
+
class AdvancedDocumentSearchRequestImpl {
|
|
112
|
+
constructor(definitionName, page, size, sort, searchOperator, otherFilters) {
|
|
113
|
+
this.definitionName = definitionName;
|
|
114
|
+
this.page = page;
|
|
115
|
+
this.size = size;
|
|
116
|
+
this.sort = sort;
|
|
117
|
+
this.otherFilters = otherFilters;
|
|
118
|
+
this.searchOperator = searchOperator;
|
|
119
|
+
}
|
|
120
|
+
asHttpBody() {
|
|
121
|
+
const httpBody = new AdvancedDocumentSearchRequestHttpBody();
|
|
122
|
+
httpBody.documentDefinitionName = this.definitionName;
|
|
123
|
+
if (this.otherFilters) {
|
|
124
|
+
httpBody.otherFilters = this.otherFilters;
|
|
125
|
+
}
|
|
126
|
+
if (this.searchOperator) {
|
|
127
|
+
httpBody.searchOperator = this.searchOperator;
|
|
128
|
+
}
|
|
129
|
+
return httpBody;
|
|
130
|
+
}
|
|
131
|
+
asHttpParams() {
|
|
132
|
+
let params = new HttpParams()
|
|
133
|
+
.set('definitionName', this.definitionName)
|
|
134
|
+
.set('page', this.page.toString())
|
|
135
|
+
.set('size', this.size.toString());
|
|
136
|
+
if (this.sort) {
|
|
137
|
+
params = params.set('sort', this.getSortString(this.sort));
|
|
138
|
+
}
|
|
139
|
+
return params;
|
|
140
|
+
}
|
|
141
|
+
setPage(page) {
|
|
142
|
+
this.page = page;
|
|
143
|
+
}
|
|
144
|
+
getSortString(sort) {
|
|
145
|
+
return `${sort.state.name},${sort.state.direction}`;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/*
|
|
150
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
62
151
|
*
|
|
63
152
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
64
153
|
* you may not use this file except in compliance with the License.
|
|
@@ -72,9 +161,56 @@ class DocumentDefinitionCreateRequest {
|
|
|
72
161
|
* See the License for the specific language governing permissions and
|
|
73
162
|
* limitations under the License.
|
|
74
163
|
*/
|
|
164
|
+
class DocumentSearchRequestHttpBody {
|
|
165
|
+
}
|
|
166
|
+
class DocumentSearchRequestImpl {
|
|
167
|
+
constructor(definitionName, page, size, sequence, createdBy, globalSearchFilter, sort, otherFilters) {
|
|
168
|
+
this.definitionName = definitionName;
|
|
169
|
+
this.page = page;
|
|
170
|
+
this.size = size;
|
|
171
|
+
this.sequence = sequence;
|
|
172
|
+
this.createdBy = createdBy;
|
|
173
|
+
this.globalSearchFilter = globalSearchFilter;
|
|
174
|
+
this.sort = sort;
|
|
175
|
+
this.otherFilters = otherFilters;
|
|
176
|
+
}
|
|
177
|
+
asHttpBody() {
|
|
178
|
+
const httpBody = new DocumentSearchRequestHttpBody();
|
|
179
|
+
httpBody.documentDefinitionName = this.definitionName;
|
|
180
|
+
if (this.sequence) {
|
|
181
|
+
httpBody.sequence = this.sequence;
|
|
182
|
+
}
|
|
183
|
+
if (this.createdBy) {
|
|
184
|
+
httpBody.createdBy = this.createdBy;
|
|
185
|
+
}
|
|
186
|
+
if (this.globalSearchFilter) {
|
|
187
|
+
httpBody.globalSearchFilter = this.globalSearchFilter;
|
|
188
|
+
}
|
|
189
|
+
if (this.otherFilters) {
|
|
190
|
+
httpBody.otherFilters = this.otherFilters;
|
|
191
|
+
}
|
|
192
|
+
return httpBody;
|
|
193
|
+
}
|
|
194
|
+
asHttpParams() {
|
|
195
|
+
let params = new HttpParams()
|
|
196
|
+
.set('definitionName', this.definitionName)
|
|
197
|
+
.set('page', this.page.toString())
|
|
198
|
+
.set('size', this.size.toString());
|
|
199
|
+
if (this.sort) {
|
|
200
|
+
params = params.set('sort', this.getSortString(this.sort));
|
|
201
|
+
}
|
|
202
|
+
return params;
|
|
203
|
+
}
|
|
204
|
+
setPage(page) {
|
|
205
|
+
this.page = page;
|
|
206
|
+
}
|
|
207
|
+
getSortString(sort) {
|
|
208
|
+
return `${sort.state.name},${sort.state.direction}`;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
75
211
|
|
|
76
212
|
/*
|
|
77
|
-
* Copyright 2015-
|
|
213
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
78
214
|
*
|
|
79
215
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
80
216
|
* you may not use this file except in compliance with the License.
|
|
@@ -88,9 +224,24 @@ class DocumentDefinitionCreateRequest {
|
|
|
88
224
|
* See the License for the specific language governing permissions and
|
|
89
225
|
* limitations under the License.
|
|
90
226
|
*/
|
|
227
|
+
var InternalCaseStatusColor;
|
|
228
|
+
(function (InternalCaseStatusColor) {
|
|
229
|
+
InternalCaseStatusColor["WarmGray"] = "WARMGRAY";
|
|
230
|
+
InternalCaseStatusColor["Red"] = "RED";
|
|
231
|
+
InternalCaseStatusColor["Magenta"] = "MAGENTA";
|
|
232
|
+
InternalCaseStatusColor["Purple"] = "PURPLE";
|
|
233
|
+
InternalCaseStatusColor["Blue"] = "BLUE";
|
|
234
|
+
InternalCaseStatusColor["Cyan"] = "CYAN";
|
|
235
|
+
InternalCaseStatusColor["Teal"] = "TEAL";
|
|
236
|
+
InternalCaseStatusColor["Green"] = "GREEN";
|
|
237
|
+
InternalCaseStatusColor["Gray"] = "GRAY";
|
|
238
|
+
InternalCaseStatusColor["CoolGray"] = "COOLGRAY";
|
|
239
|
+
InternalCaseStatusColor["HighContrast"] = "HIGHCONTRAST";
|
|
240
|
+
InternalCaseStatusColor["Outline"] = "OUTLINE";
|
|
241
|
+
})(InternalCaseStatusColor || (InternalCaseStatusColor = {}));
|
|
91
242
|
|
|
92
243
|
/*
|
|
93
|
-
* Copyright 2015-
|
|
244
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
94
245
|
*
|
|
95
246
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
96
247
|
* you may not use this file except in compliance with the License.
|
|
@@ -106,7 +257,56 @@ class DocumentDefinitionCreateRequest {
|
|
|
106
257
|
*/
|
|
107
258
|
|
|
108
259
|
/*
|
|
109
|
-
* Copyright 2015-
|
|
260
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
261
|
+
*
|
|
262
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
263
|
+
* you may not use this file except in compliance with the License.
|
|
264
|
+
* You may obtain a copy of the License at
|
|
265
|
+
*
|
|
266
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
267
|
+
*
|
|
268
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
269
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
270
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
271
|
+
* See the License for the specific language governing permissions and
|
|
272
|
+
* limitations under the License.
|
|
273
|
+
*/
|
|
274
|
+
class CaseStatusService extends BaseApiService {
|
|
275
|
+
constructor(httpClient, configService) {
|
|
276
|
+
super(httpClient, configService);
|
|
277
|
+
this.httpClient = httpClient;
|
|
278
|
+
this.configService = configService;
|
|
279
|
+
}
|
|
280
|
+
getInternalCaseStatusesManagement(caseDefinitionName) {
|
|
281
|
+
return this.httpClient.get(this.getApiUrl(`/management/v1/case-definition/${caseDefinitionName}/internal-status`));
|
|
282
|
+
}
|
|
283
|
+
getInternalCaseStatuses(caseDefinitionName) {
|
|
284
|
+
return this.httpClient.get(this.getApiUrl(`/v1/case-definition/${caseDefinitionName}/internal-status`));
|
|
285
|
+
}
|
|
286
|
+
saveInternalCaseStatus(caseDefinitionName, status) {
|
|
287
|
+
return this.httpClient.post(this.getApiUrl(`/management/v1/case-definition/${caseDefinitionName}/internal-status`), status);
|
|
288
|
+
}
|
|
289
|
+
deleteInternalCaseStatus(caseDefinitionName, statusKey) {
|
|
290
|
+
return this.httpClient.delete(this.getApiUrl(`/management/v1/case-definition/${caseDefinitionName}/internal-status/${statusKey}`));
|
|
291
|
+
}
|
|
292
|
+
updateInternalCaseStatus(caseDefinitionName, currentStatusKey, updatedStatus) {
|
|
293
|
+
return this.httpClient.put(this.getApiUrl(`/management/v1/case-definition/${caseDefinitionName}/internal-status/${currentStatusKey}`), updatedStatus);
|
|
294
|
+
}
|
|
295
|
+
updateInternalCaseStatuses(caseDefinitionName, reorderedStatus) {
|
|
296
|
+
return this.httpClient.put(this.getApiUrl(`/management/v1/case-definition/${caseDefinitionName}/internal-status`), reorderedStatus);
|
|
297
|
+
}
|
|
298
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CaseStatusService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
299
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CaseStatusService, providedIn: 'root' }); }
|
|
300
|
+
}
|
|
301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: CaseStatusService, decorators: [{
|
|
302
|
+
type: Injectable,
|
|
303
|
+
args: [{
|
|
304
|
+
providedIn: 'root',
|
|
305
|
+
}]
|
|
306
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ConfigService }] });
|
|
307
|
+
|
|
308
|
+
/*
|
|
309
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
110
310
|
*
|
|
111
311
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
112
312
|
* you may not use this file except in compliance with the License.
|
|
@@ -139,7 +339,7 @@ class DocumentService {
|
|
|
139
339
|
}
|
|
140
340
|
// Document-calls
|
|
141
341
|
getAllDefinitions() {
|
|
142
|
-
return this.http.get(`${this.valtimoEndpointUri}v1/document-definition`);
|
|
342
|
+
return this.http.get(`${this.valtimoEndpointUri}v1/document-definition?size=1000`);
|
|
143
343
|
}
|
|
144
344
|
queryDefinitions(params) {
|
|
145
345
|
return this.http.get(`${this.valtimoEndpointUri}v1/document-definition`, { params });
|
|
@@ -147,8 +347,10 @@ class DocumentService {
|
|
|
147
347
|
queryDefinitionsForManagement(params) {
|
|
148
348
|
return this.http.get(`${this.valtimoEndpointUri}management/v1/document-definition`, { params });
|
|
149
349
|
}
|
|
150
|
-
getDocumentDefinition(documentDefinitionName) {
|
|
151
|
-
return
|
|
350
|
+
getDocumentDefinition(documentDefinitionName, skipNotFound = false) {
|
|
351
|
+
return skipNotFound
|
|
352
|
+
? this.http.get(`${this.valtimoEndpointUri}v1/document-definition/${documentDefinitionName}`, { headers: new HttpHeaders().set(InterceptorSkip, '404') })
|
|
353
|
+
: this.http.get(`${this.valtimoEndpointUri}v1/document-definition/${documentDefinitionName}`);
|
|
152
354
|
}
|
|
153
355
|
getDocumentDefinitionForManagement(documentDefinitionName) {
|
|
154
356
|
return this.http.get(`${this.valtimoEndpointUri}management/v1/document-definition/${documentDefinitionName}`);
|
|
@@ -158,23 +360,25 @@ class DocumentService {
|
|
|
158
360
|
params: documentSearchRequest.asHttpParams(),
|
|
159
361
|
});
|
|
160
362
|
}
|
|
161
|
-
getDocumentsSearch(documentSearchRequest, searchOperator, assigneeFilter, otherFilters) {
|
|
363
|
+
getDocumentsSearch(documentSearchRequest, searchOperator, assigneeFilter, otherFilters, statusFilter) {
|
|
162
364
|
const body = {
|
|
163
365
|
...documentSearchRequest.asHttpBody(),
|
|
164
366
|
...(searchOperator && { searchOperator }),
|
|
165
367
|
...(assigneeFilter && { assigneeFilter }),
|
|
166
368
|
...(otherFilters && { otherFilters }),
|
|
369
|
+
...(statusFilter && { statusFilter }),
|
|
167
370
|
};
|
|
168
371
|
return this.http
|
|
169
372
|
.post(`${this.valtimoEndpointUri}v1/document-definition/${documentSearchRequest.definitionName}/search`, body, { params: documentSearchRequest.asHttpParams() })
|
|
170
373
|
.pipe(catchError(() => of(this.EMPTY_DOCUMENTS_RESPONSE)));
|
|
171
374
|
}
|
|
172
|
-
getSpecifiedDocumentsSearch(documentSearchRequest, searchOperator, assigneeFilter, otherFilters) {
|
|
375
|
+
getSpecifiedDocumentsSearch(documentSearchRequest, searchOperator, assigneeFilter, otherFilters, statusFilter) {
|
|
173
376
|
const body = {
|
|
174
377
|
...documentSearchRequest.asHttpBody(),
|
|
175
378
|
...(searchOperator && { searchOperator }),
|
|
176
379
|
...(assigneeFilter && { assigneeFilter }),
|
|
177
380
|
...(otherFilters && { otherFilters }),
|
|
381
|
+
...(statusFilter && { statusFilter }),
|
|
178
382
|
};
|
|
179
383
|
return this.http
|
|
180
384
|
.post(`${this.valtimoEndpointUri}v1/case/${documentSearchRequest.definitionName}/search`, body, { params: documentSearchRequest.asHttpParams() })
|
|
@@ -237,6 +441,11 @@ class DocumentService {
|
|
|
237
441
|
findProcessDocumentInstances(documentId) {
|
|
238
442
|
return this.http.get(`${this.valtimoEndpointUri}v1/process-document/instance/document/${documentId}`);
|
|
239
443
|
}
|
|
444
|
+
createDocumentDefinitionTemplate(payload) {
|
|
445
|
+
return this.http
|
|
446
|
+
.post(`${this.valtimoEndpointUri}management/v1/document-definition-template`, payload)
|
|
447
|
+
.pipe(switchMap((definition) => this.createDocumentDefinitionForManagement({ definition: JSON.stringify(definition) })));
|
|
448
|
+
}
|
|
240
449
|
newDocumentAndStartProcess(request) {
|
|
241
450
|
return this.http.post(`${this.valtimoEndpointUri}v1/process-document/operation/new-document-and-start-process`, request);
|
|
242
451
|
}
|
|
@@ -291,18 +500,6 @@ class DocumentService {
|
|
|
291
500
|
getDocumentTypes(documentDefinitionName) {
|
|
292
501
|
return this.http.get(`${this.valtimoEndpointUri}v1/documentdefinition/${documentDefinitionName}/zaaktype/documenttype`);
|
|
293
502
|
}
|
|
294
|
-
getLinkedUploadProcess(documentDefinitionName) {
|
|
295
|
-
return this.http.get(`${this.valtimoEndpointUri}v1/process-document/demo/${documentDefinitionName}/process`);
|
|
296
|
-
}
|
|
297
|
-
updateLinkedUploadProcess(documentDefinitionName, processDefinitionKey) {
|
|
298
|
-
return this.http.put(`${this.valtimoEndpointUri}v1/process-document/demo/${documentDefinitionName}/process`, {
|
|
299
|
-
processDefinitionKey,
|
|
300
|
-
linkType: 'DOCUMENT_UPLOAD',
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
deleteLinkedUploadProcess(documentDefinitionName) {
|
|
304
|
-
return this.http.delete(`${this.valtimoEndpointUri}v1/process-document/demo/${documentDefinitionName}/process`);
|
|
305
|
-
}
|
|
306
503
|
getProcessDocumentDefinitionFromProcessInstanceId(processInstanceId) {
|
|
307
504
|
return this.http.get(`${this.valtimoEndpointUri}v1/process-document/definition/processinstance/${processInstanceId}`);
|
|
308
505
|
}
|
|
@@ -342,27 +539,76 @@ class DocumentService {
|
|
|
342
539
|
deleteCaseListForManagement(documentDefinitionName, columnKey) {
|
|
343
540
|
return this.http.delete(`${this.valtimoEndpointUri}management/v1/case/${documentDefinitionName}/list-column/${columnKey}`);
|
|
344
541
|
}
|
|
345
|
-
getZakenApiDocuments(documentId) {
|
|
346
|
-
return this.http.get(`${this.valtimoEndpointUri}v1/zaken-api/document/${documentId}/files`);
|
|
347
|
-
}
|
|
348
542
|
getDocumentDefinitionVersions(documentDefinitionName) {
|
|
349
543
|
return this.http.get(`${this.valtimoEndpointUri}management/v1/document-definition/${documentDefinitionName}/version`);
|
|
350
544
|
}
|
|
351
545
|
getDocumentDefinitionByVersion(documentDefinitionName, version) {
|
|
352
546
|
return this.http.get(`${this.valtimoEndpointUri}management/v1/document-definition/${documentDefinitionName}/version/${version}`);
|
|
353
547
|
}
|
|
354
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
355
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
548
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
549
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentService, providedIn: 'root' }); }
|
|
550
|
+
}
|
|
551
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentService, decorators: [{
|
|
552
|
+
type: Injectable,
|
|
553
|
+
args: [{
|
|
554
|
+
providedIn: 'root',
|
|
555
|
+
}]
|
|
556
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ConfigService }] });
|
|
557
|
+
|
|
558
|
+
/*
|
|
559
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
560
|
+
*
|
|
561
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
562
|
+
* you may not use this file except in compliance with the License.
|
|
563
|
+
* You may obtain a copy of the License at
|
|
564
|
+
*
|
|
565
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
566
|
+
*
|
|
567
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
568
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
569
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
570
|
+
* See the License for the specific language governing permissions and
|
|
571
|
+
* limitations under the License.
|
|
572
|
+
*/
|
|
573
|
+
class FileSortService {
|
|
574
|
+
constructor(configService) {
|
|
575
|
+
this.configService = configService;
|
|
576
|
+
}
|
|
577
|
+
sortRelatedFilesByDateDescending(relatedFiles) {
|
|
578
|
+
const sortByDate = this.configService.config?.featureToggles?.sortFilesByDate;
|
|
579
|
+
if (sortByDate) {
|
|
580
|
+
return relatedFiles.sort((a, b) => new Date(b.createdOn).getTime() - new Date(a.createdOn).getTime());
|
|
581
|
+
}
|
|
582
|
+
return relatedFiles;
|
|
583
|
+
}
|
|
584
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FileSortService, deps: [{ token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
585
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FileSortService, providedIn: 'root' }); }
|
|
356
586
|
}
|
|
357
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
587
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: FileSortService, decorators: [{
|
|
358
588
|
type: Injectable,
|
|
359
589
|
args: [{
|
|
360
590
|
providedIn: 'root',
|
|
361
591
|
}]
|
|
362
|
-
}], ctorParameters:
|
|
592
|
+
}], ctorParameters: () => [{ type: i2.ConfigService }] });
|
|
593
|
+
|
|
594
|
+
/*
|
|
595
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
596
|
+
*
|
|
597
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
598
|
+
* you may not use this file except in compliance with the License.
|
|
599
|
+
* You may obtain a copy of the License at
|
|
600
|
+
*
|
|
601
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
602
|
+
*
|
|
603
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
604
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
605
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
606
|
+
* See the License for the specific language governing permissions and
|
|
607
|
+
* limitations under the License.
|
|
608
|
+
*/
|
|
363
609
|
|
|
364
610
|
/*
|
|
365
|
-
* Copyright 2015-
|
|
611
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
366
612
|
*
|
|
367
613
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
368
614
|
* you may not use this file except in compliance with the License.
|
|
@@ -377,16 +623,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
377
623
|
* limitations under the License.
|
|
378
624
|
*/
|
|
379
625
|
class DocumentModule {
|
|
380
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
381
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
382
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
626
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
627
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: DocumentModule }); }
|
|
628
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentModule }); }
|
|
383
629
|
}
|
|
384
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: DocumentModule, decorators: [{
|
|
385
631
|
type: NgModule
|
|
386
632
|
}] });
|
|
387
633
|
|
|
388
634
|
/*
|
|
389
|
-
* Copyright 2015-
|
|
635
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
390
636
|
*
|
|
391
637
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
392
638
|
* you may not use this file except in compliance with the License.
|
|
@@ -400,56 +646,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
|
|
|
400
646
|
* See the License for the specific language governing permissions and
|
|
401
647
|
* limitations under the License.
|
|
402
648
|
*/
|
|
403
|
-
class
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
this.otherFilters = otherFilters;
|
|
415
|
-
}
|
|
416
|
-
asHttpBody() {
|
|
417
|
-
const httpBody = new DocumentSearchRequestHttpBody();
|
|
418
|
-
httpBody.documentDefinitionName = this.definitionName;
|
|
419
|
-
if (this.sequence) {
|
|
420
|
-
httpBody.sequence = this.sequence;
|
|
421
|
-
}
|
|
422
|
-
if (this.createdBy) {
|
|
423
|
-
httpBody.createdBy = this.createdBy;
|
|
424
|
-
}
|
|
425
|
-
if (this.globalSearchFilter) {
|
|
426
|
-
httpBody.globalSearchFilter = this.globalSearchFilter;
|
|
427
|
-
}
|
|
428
|
-
if (this.otherFilters) {
|
|
429
|
-
httpBody.otherFilters = this.otherFilters;
|
|
430
|
-
}
|
|
431
|
-
return httpBody;
|
|
432
|
-
}
|
|
433
|
-
asHttpParams() {
|
|
434
|
-
let params = new HttpParams()
|
|
435
|
-
.set('definitionName', this.definitionName)
|
|
436
|
-
.set('page', this.page.toString())
|
|
437
|
-
.set('size', this.size.toString());
|
|
438
|
-
if (this.sort) {
|
|
439
|
-
params = params.set('sort', this.getSortString(this.sort));
|
|
649
|
+
class InternalCaseStatusUtils {
|
|
650
|
+
static getTagTypeFromInternalCaseStatusColor(internalCaseStatusColor) {
|
|
651
|
+
switch (internalCaseStatusColor) {
|
|
652
|
+
case InternalCaseStatusColor.HighContrast:
|
|
653
|
+
return 'high-contrast';
|
|
654
|
+
case InternalCaseStatusColor.CoolGray:
|
|
655
|
+
return 'cool-gray';
|
|
656
|
+
case InternalCaseStatusColor.WarmGray:
|
|
657
|
+
return 'warm-gray';
|
|
658
|
+
default:
|
|
659
|
+
return internalCaseStatusColor?.toLowerCase();
|
|
440
660
|
}
|
|
441
|
-
return params;
|
|
442
|
-
}
|
|
443
|
-
setPage(page) {
|
|
444
|
-
this.page = page;
|
|
445
|
-
}
|
|
446
|
-
getSortString(sort) {
|
|
447
|
-
return `${sort.state.name},${sort.state.direction}`;
|
|
448
661
|
}
|
|
449
662
|
}
|
|
450
663
|
|
|
451
664
|
/*
|
|
452
|
-
* Copyright 2015-
|
|
665
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
453
666
|
*
|
|
454
667
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
455
668
|
* you may not use this file except in compliance with the License.
|
|
@@ -463,48 +676,9 @@ class DocumentSearchRequestImpl {
|
|
|
463
676
|
* See the License for the specific language governing permissions and
|
|
464
677
|
* limitations under the License.
|
|
465
678
|
*/
|
|
466
|
-
class AdvancedDocumentSearchRequestHttpBody {
|
|
467
|
-
}
|
|
468
|
-
class AdvancedDocumentSearchRequestImpl {
|
|
469
|
-
constructor(definitionName, page, size, sort, searchOperator, otherFilters) {
|
|
470
|
-
this.definitionName = definitionName;
|
|
471
|
-
this.page = page;
|
|
472
|
-
this.size = size;
|
|
473
|
-
this.sort = sort;
|
|
474
|
-
this.otherFilters = otherFilters;
|
|
475
|
-
this.searchOperator = searchOperator;
|
|
476
|
-
}
|
|
477
|
-
asHttpBody() {
|
|
478
|
-
const httpBody = new AdvancedDocumentSearchRequestHttpBody();
|
|
479
|
-
httpBody.documentDefinitionName = this.definitionName;
|
|
480
|
-
if (this.otherFilters) {
|
|
481
|
-
httpBody.otherFilters = this.otherFilters;
|
|
482
|
-
}
|
|
483
|
-
if (this.searchOperator) {
|
|
484
|
-
httpBody.searchOperator = this.searchOperator;
|
|
485
|
-
}
|
|
486
|
-
return httpBody;
|
|
487
|
-
}
|
|
488
|
-
asHttpParams() {
|
|
489
|
-
let params = new HttpParams()
|
|
490
|
-
.set('definitionName', this.definitionName)
|
|
491
|
-
.set('page', this.page.toString())
|
|
492
|
-
.set('size', this.size.toString());
|
|
493
|
-
if (this.sort) {
|
|
494
|
-
params = params.set('sort', this.getSortString(this.sort));
|
|
495
|
-
}
|
|
496
|
-
return params;
|
|
497
|
-
}
|
|
498
|
-
setPage(page) {
|
|
499
|
-
this.page = page;
|
|
500
|
-
}
|
|
501
|
-
getSortString(sort) {
|
|
502
|
-
return `${sort.state.name},${sort.state.direction}`;
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
679
|
|
|
506
680
|
/*
|
|
507
|
-
* Copyright 2015-
|
|
681
|
+
* Copyright 2015-2024 Ritense BV, the Netherlands.
|
|
508
682
|
*
|
|
509
683
|
* Licensed under EUPL, Version 1.2 (the "License");
|
|
510
684
|
* you may not use this file except in compliance with the License.
|
|
@@ -526,5 +700,5 @@ class AdvancedDocumentSearchRequestImpl {
|
|
|
526
700
|
* Generated bundle index. Do not edit.
|
|
527
701
|
*/
|
|
528
702
|
|
|
529
|
-
export { AdvancedDocumentSearchRequestHttpBody, AdvancedDocumentSearchRequestImpl, DocumentDefinitionCreateRequest, DocumentModule, DocumentSearchRequestHttpBody, DocumentSearchRequestImpl, DocumentService, ModifyDocumentAndCompleteTaskRequestImpl, ModifyDocumentAndStartProcessRequestImpl, ModifyDocumentRequestImpl, NewDocumentAndStartProcessRequestImpl, NewDocumentRequestImpl };
|
|
703
|
+
export { AdvancedDocumentSearchRequestHttpBody, AdvancedDocumentSearchRequestImpl, CaseStatusService, DocumentDefinitionCreateRequest, DocumentModule, DocumentSearchRequestHttpBody, DocumentSearchRequestImpl, DocumentService, FileSortService, InternalCaseStatusColor, InternalCaseStatusUtils, ModifyDocumentAndCompleteTaskRequestImpl, ModifyDocumentAndStartProcessRequestImpl, ModifyDocumentRequestImpl, NewDocumentAndStartProcessRequestImpl, NewDocumentRequestImpl };
|
|
530
704
|
//# sourceMappingURL=valtimo-document.mjs.map
|