@valtimo/document 4.23.0 → 5.2.0

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.
Files changed (47) hide show
  1. package/esm2020/lib/document-search-request.mjs +64 -0
  2. package/esm2020/lib/document.module.mjs +26 -0
  3. package/esm2020/lib/document.service.mjs +121 -0
  4. package/esm2020/lib/models/audit.model.mjs +17 -0
  5. package/esm2020/lib/models/document.model.mjs +52 -0
  6. package/esm2020/lib/models/index.mjs +21 -0
  7. package/esm2020/lib/models/list-sorting.model.mjs +2 -0
  8. package/esm2020/public_api.mjs +23 -0
  9. package/esm2020/valtimo-document.mjs +5 -0
  10. package/fesm2015/valtimo-document.mjs +301 -0
  11. package/fesm2015/valtimo-document.mjs.map +1 -0
  12. package/{fesm2015/valtimo-document.js → fesm2020/valtimo-document.mjs} +21 -18
  13. package/fesm2020/valtimo-document.mjs.map +1 -0
  14. package/lib/document-search-request.d.ts +1 -0
  15. package/lib/document-search-request.d.ts.map +1 -0
  16. package/lib/document.module.d.ts +5 -0
  17. package/lib/document.module.d.ts.map +1 -0
  18. package/lib/document.service.d.ts +5 -1
  19. package/lib/document.service.d.ts.map +1 -0
  20. package/lib/models/audit.model.d.ts +1 -0
  21. package/lib/models/audit.model.d.ts.map +1 -0
  22. package/lib/models/document.model.d.ts +1 -0
  23. package/lib/models/document.model.d.ts.map +1 -0
  24. package/lib/models/index.d.ts +1 -0
  25. package/lib/models/index.d.ts.map +1 -0
  26. package/lib/models/list-sorting.model.d.ts +1 -0
  27. package/lib/models/list-sorting.model.d.ts.map +1 -0
  28. package/package.json +22 -10
  29. package/public_api.d.ts +1 -0
  30. package/public_api.d.ts.map +1 -0
  31. package/valtimo-document.d.ts +2 -1
  32. package/valtimo-document.d.ts.map +1 -0
  33. package/bundles/valtimo-document.umd.js +0 -344
  34. package/bundles/valtimo-document.umd.js.map +0 -1
  35. package/bundles/valtimo-document.umd.min.js +0 -2
  36. package/bundles/valtimo-document.umd.min.js.map +0 -1
  37. package/esm2015/lib/document-search-request.js +0 -64
  38. package/esm2015/lib/document.module.js +0 -22
  39. package/esm2015/lib/document.service.js +0 -124
  40. package/esm2015/lib/models/audit.model.js +0 -16
  41. package/esm2015/lib/models/document.model.js +0 -52
  42. package/esm2015/lib/models/index.js +0 -21
  43. package/esm2015/lib/models/list-sorting.model.js +0 -1
  44. package/esm2015/public_api.js +0 -23
  45. package/esm2015/valtimo-document.js +0 -5
  46. package/fesm2015/valtimo-document.js.map +0 -1
  47. package/valtimo-document.metadata.json +0 -1
package/package.json CHANGED
@@ -1,20 +1,32 @@
1
1
  {
2
2
  "name": "@valtimo/document",
3
3
  "license": "EUPL-1.2",
4
- "version": "4.23.0",
4
+ "version": "5.2.0",
5
5
  "peerDependencies": {
6
- "@angular/common": "^10.0.11",
7
- "@angular/core": "^10.0.11"
6
+ "@angular/common": "^13.2.3",
7
+ "@angular/core": "^13.2.3"
8
8
  },
9
9
  "dependencies": {
10
10
  "tslib": "^2.0.0"
11
11
  },
12
- "main": "bundles/valtimo-document.umd.js",
13
- "module": "fesm2015/valtimo-document.js",
14
- "es2015": "fesm2015/valtimo-document.js",
15
- "esm2015": "esm2015/valtimo-document.js",
16
- "fesm2015": "fesm2015/valtimo-document.js",
12
+ "module": "fesm2015/valtimo-document.mjs",
13
+ "es2020": "fesm2020/valtimo-document.mjs",
14
+ "esm2020": "esm2020/valtimo-document.mjs",
15
+ "fesm2020": "fesm2020/valtimo-document.mjs",
16
+ "fesm2015": "fesm2015/valtimo-document.mjs",
17
17
  "typings": "valtimo-document.d.ts",
18
- "metadata": "valtimo-document.metadata.json",
18
+ "exports": {
19
+ "./package.json": {
20
+ "default": "./package.json"
21
+ },
22
+ ".": {
23
+ "types": "./valtimo-document.d.ts",
24
+ "esm2020": "./esm2020/valtimo-document.mjs",
25
+ "es2020": "./fesm2020/valtimo-document.mjs",
26
+ "es2015": "./fesm2015/valtimo-document.mjs",
27
+ "node": "./fesm2015/valtimo-document.mjs",
28
+ "default": "./fesm2020/valtimo-document.mjs"
29
+ }
30
+ },
19
31
  "sideEffects": false
20
- }
32
+ }
package/public_api.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './lib/models';
2
2
  export * from './lib/document.service';
3
3
  export * from './lib/document.module';
4
4
  export * from './lib/document-search-request';
5
+ //# sourceMappingURL=public_api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public_api.d.ts","sourceRoot":"","sources":["../../../projects/valtimo/document/src/public_api.ts"],"names":[],"mappings":"AAoBA,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
+ /// <amd-module name="@valtimo/document" />
4
5
  export * from './public_api';
5
- export { SortState as ɵa } from './lib/models';
6
+ //# sourceMappingURL=valtimo-document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-document.d.ts","sourceRoot":"","sources":["../../../projects/valtimo/document/src/valtimo-document.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}
@@ -1,344 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@valtimo/config')) :
3
- typeof define === 'function' && define.amd ? define('@valtimo/document', ['exports', '@angular/core', '@angular/common/http', '@valtimo/config'], factory) :
4
- (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.document = {}), global.ng.core, global.ng.common.http, global.config));
5
- }(this, (function (exports, i0, i1, i2) { 'use strict';
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 ModifyDocumentRequestImpl = /** @class */ (function () {
23
- function ModifyDocumentRequestImpl(documentId, content, versionBasedOn) {
24
- this.documentId = documentId;
25
- this.content = content;
26
- this.versionBasedOn = versionBasedOn;
27
- }
28
- return ModifyDocumentRequestImpl;
29
- }());
30
- var ModifyDocumentAndCompleteTaskRequestImpl = /** @class */ (function () {
31
- function ModifyDocumentAndCompleteTaskRequestImpl(taskId, request) {
32
- this.taskId = taskId;
33
- this.request = request;
34
- }
35
- return ModifyDocumentAndCompleteTaskRequestImpl;
36
- }());
37
- var NewDocumentRequestImpl = /** @class */ (function () {
38
- function NewDocumentRequestImpl(definition, content) {
39
- this.definition = definition;
40
- this.content = content;
41
- }
42
- return NewDocumentRequestImpl;
43
- }());
44
- var NewDocumentAndStartProcessRequestImpl = /** @class */ (function () {
45
- function NewDocumentAndStartProcessRequestImpl(processDefinitionKey, request) {
46
- this.processDefinitionKey = processDefinitionKey;
47
- this.request = request;
48
- }
49
- return NewDocumentAndStartProcessRequestImpl;
50
- }());
51
- var ModifyDocumentAndStartProcessRequestImpl = /** @class */ (function () {
52
- function ModifyDocumentAndStartProcessRequestImpl(processDefinitionKey, request) {
53
- this.processDefinitionKey = processDefinitionKey;
54
- this.request = request;
55
- }
56
- return ModifyDocumentAndStartProcessRequestImpl;
57
- }());
58
- var DocumentDefinitionCreateRequest = /** @class */ (function () {
59
- function DocumentDefinitionCreateRequest(definition) {
60
- this.definition = definition;
61
- }
62
- return DocumentDefinitionCreateRequest;
63
- }());
64
-
65
- /*
66
- * Copyright 2015-2020 Ritense BV, the Netherlands.
67
- *
68
- * Licensed under EUPL, Version 1.2 (the "License");
69
- * you may not use this file except in compliance with the License.
70
- * You may obtain a copy of the License at
71
- *
72
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
73
- *
74
- * Unless required by applicable law or agreed to in writing, software
75
- * distributed under the License is distributed on an "AS IS" basis,
76
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
77
- * See the License for the specific language governing permissions and
78
- * limitations under the License.
79
- */
80
-
81
- /*
82
- *
83
- * * Copyright 2015-2020 Ritense BV, the Netherlands.
84
- * *
85
- * * Licensed under EUPL, Version 1.2 (the "License");
86
- * * you may not use this file except in compliance with the License.
87
- * * You may obtain a copy of the License at
88
- * *
89
- * * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
90
- * *
91
- * * Unless required by applicable law or agreed to in writing, software
92
- * * distributed under the License is distributed on an "AS IS" basis,
93
- * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
94
- * * See the License for the specific language governing permissions and
95
- * * limitations under the License.
96
- *
97
- */
98
-
99
- /*
100
- * Copyright 2015-2020 Ritense BV, the Netherlands.
101
- *
102
- * Licensed under EUPL, Version 1.2 (the "License");
103
- * you may not use this file except in compliance with the License.
104
- * You may obtain a copy of the License at
105
- *
106
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
107
- *
108
- * Unless required by applicable law or agreed to in writing, software
109
- * distributed under the License is distributed on an "AS IS" basis,
110
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
111
- * See the License for the specific language governing permissions and
112
- * limitations under the License.
113
- */
114
- var DocumentService = /** @class */ (function () {
115
- function DocumentService(http, configService) {
116
- this.http = http;
117
- this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
118
- }
119
- // Document-calls
120
- DocumentService.prototype.getAllDefinitions = function () {
121
- return this.http.get(this.valtimoEndpointUri + "document-definition");
122
- };
123
- DocumentService.prototype.queryDefinitions = function (params) {
124
- return this.http.get(this.valtimoEndpointUri + "document-definition", { params: params });
125
- };
126
- DocumentService.prototype.getDocumentDefinition = function (documentDefinitionName) {
127
- return this.http.get(this.valtimoEndpointUri + "document-definition/" + documentDefinitionName);
128
- };
129
- DocumentService.prototype.getDocuments = function (documentSearchRequest) {
130
- return this.http.post(this.valtimoEndpointUri + "document-search", documentSearchRequest.asHttpBody(), { params: documentSearchRequest.asHttpParams() });
131
- };
132
- DocumentService.prototype.getDocumentRoles = function (documentDefinitionName) {
133
- return this.http.get(this.valtimoEndpointUri + "document-definition/" + documentDefinitionName + "/roles");
134
- };
135
- DocumentService.prototype.modifyDocumentRoles = function (documentDefinitionName, roles) {
136
- return this.http.put(this.valtimoEndpointUri + "document-definition/" + documentDefinitionName + "/roles", roles);
137
- };
138
- DocumentService.prototype.getDocument = function (documentId) {
139
- return this.http.get(this.valtimoEndpointUri + "document/" + documentId);
140
- };
141
- DocumentService.prototype.modifyDocument = function (document) {
142
- return this.http.put(this.valtimoEndpointUri + "document", document);
143
- };
144
- // ProcessDocument-calls
145
- DocumentService.prototype.getProcessDocumentDefinitions = function () {
146
- return this.http.get(this.valtimoEndpointUri + "process-document/definition");
147
- };
148
- DocumentService.prototype.findProcessDocumentDefinitions = function (documentDefinitionName) {
149
- return this.http.get(this.valtimoEndpointUri + "process-document/definition/document/" + documentDefinitionName);
150
- };
151
- DocumentService.prototype.findProcessDocumentInstances = function (documentId) {
152
- return this.http.get(this.valtimoEndpointUri + "process-document/instance/document/" + documentId);
153
- };
154
- DocumentService.prototype.newDocumentAndStartProcess = function (request) {
155
- return this.http.post(this.valtimoEndpointUri + "process-document/operation/new-document-and-start-process", request);
156
- };
157
- DocumentService.prototype.modifyDocumentAndCompleteTask = function (request) {
158
- return this.http.post(this.valtimoEndpointUri + "process-document/operation/modify-document-and-complete-task", request);
159
- };
160
- DocumentService.prototype.modifyDocumentAndStartProcess = function (request) {
161
- return this.http.post(this.valtimoEndpointUri + "process-document/operation/modify-document-and-start-process", request);
162
- };
163
- DocumentService.prototype.createProcessDocumentDefinition = function (request) {
164
- return this.http.post(this.valtimoEndpointUri + "process-document/definition", request);
165
- };
166
- DocumentService.prototype.createDocumentDefinition = function (documentDefinitionCreateRequest) {
167
- var options = {
168
- headers: new i1.HttpHeaders({
169
- 'Content-Type': 'application/json',
170
- }),
171
- };
172
- return this.http.post(this.valtimoEndpointUri + "document-definition", documentDefinitionCreateRequest, options);
173
- };
174
- DocumentService.prototype.deleteProcessDocumentDefinition = function (request) {
175
- var options = {
176
- headers: new i1.HttpHeaders({
177
- 'Content-Type': 'application/json',
178
- }),
179
- body: request,
180
- };
181
- return this.http.delete(this.valtimoEndpointUri + "process-document/definition", options);
182
- };
183
- DocumentService.prototype.getAuditLog = function (documentId, page) {
184
- if (page === void 0) { page = 0; }
185
- var params = new i1.HttpParams();
186
- params = params.set('page', page.toString());
187
- return this.http.get(this.valtimoEndpointUri + "process-document/instance/document/" + documentId + "/audit", { params: params });
188
- };
189
- DocumentService.prototype.assignResource = function (documentId, resourceId) {
190
- return this.http.post(this.valtimoEndpointUri + "document/" + documentId + "/resource/" + resourceId, {});
191
- };
192
- DocumentService.prototype.removeResource = function (documentId, resourceId) {
193
- var options = {
194
- headers: new i1.HttpHeaders({
195
- 'Content-Type': 'application/json',
196
- }),
197
- };
198
- return this.http.delete(this.valtimoEndpointUri + "document/" + documentId + "/resource/" + resourceId, options);
199
- };
200
- DocumentService.prototype.removeDocumentDefinition = function (name) {
201
- return this.http.delete(this.valtimoEndpointUri + "document-definition/" + name);
202
- };
203
- DocumentService.prototype.sendMessage = function (documentId, request) {
204
- return this.http.post(this.valtimoEndpointUri + "document/" + documentId + "/message", request);
205
- };
206
- return DocumentService;
207
- }());
208
- DocumentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DocumentService_Factory() { return new DocumentService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.ConfigService)); }, token: DocumentService, providedIn: "root" });
209
- DocumentService.decorators = [
210
- { type: i0.Injectable, args: [{
211
- providedIn: 'root',
212
- },] }
213
- ];
214
- DocumentService.ctorParameters = function () { return [
215
- { type: i1.HttpClient },
216
- { type: i2.ConfigService }
217
- ]; };
218
-
219
- /*
220
- * Copyright 2015-2020 Ritense BV, the Netherlands.
221
- *
222
- * Licensed under EUPL, Version 1.2 (the "License");
223
- * you may not use this file except in compliance with the License.
224
- * You may obtain a copy of the License at
225
- *
226
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
227
- *
228
- * Unless required by applicable law or agreed to in writing, software
229
- * distributed under the License is distributed on an "AS IS" basis,
230
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
231
- * See the License for the specific language governing permissions and
232
- * limitations under the License.
233
- */
234
- var DocumentModule = /** @class */ (function () {
235
- function DocumentModule() {
236
- }
237
- return DocumentModule;
238
- }());
239
- DocumentModule.decorators = [
240
- { type: i0.NgModule }
241
- ];
242
-
243
- /*
244
- * Copyright 2015-2020 Ritense BV, the Netherlands.
245
- *
246
- * Licensed under EUPL, Version 1.2 (the "License");
247
- * you may not use this file except in compliance with the License.
248
- * You may obtain a copy of the License at
249
- *
250
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
251
- *
252
- * Unless required by applicable law or agreed to in writing, software
253
- * distributed under the License is distributed on an "AS IS" basis,
254
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
255
- * See the License for the specific language governing permissions and
256
- * limitations under the License.
257
- */
258
- var DocumentSearchRequestHttpBody = /** @class */ (function () {
259
- function DocumentSearchRequestHttpBody() {
260
- }
261
- return DocumentSearchRequestHttpBody;
262
- }());
263
- var DocumentSearchRequestImpl = /** @class */ (function () {
264
- function DocumentSearchRequestImpl(definitionName, page, size, sequence, createdBy, globalSearchFilter, sort, otherFilters) {
265
- this.definitionName = definitionName;
266
- this.page = page;
267
- this.size = size;
268
- this.sequence = sequence;
269
- this.createdBy = createdBy;
270
- this.globalSearchFilter = globalSearchFilter;
271
- this.sort = sort;
272
- this.otherFilters = otherFilters;
273
- }
274
- DocumentSearchRequestImpl.prototype.asHttpBody = function () {
275
- var httpBody = new DocumentSearchRequestHttpBody();
276
- httpBody.documentDefinitionName = this.definitionName;
277
- if (this.sequence) {
278
- httpBody.sequence = this.sequence;
279
- }
280
- if (this.createdBy) {
281
- httpBody.createdBy = this.createdBy;
282
- }
283
- if (this.globalSearchFilter) {
284
- httpBody.globalSearchFilter = this.globalSearchFilter;
285
- }
286
- if (this.otherFilters) {
287
- httpBody.otherFilters = this.otherFilters;
288
- }
289
- return httpBody;
290
- };
291
- DocumentSearchRequestImpl.prototype.asHttpParams = function () {
292
- var params = new i1.HttpParams()
293
- .set('definitionName', this.definitionName)
294
- .set('page', this.page.toString())
295
- .set('size', this.size.toString());
296
- if (this.sort) {
297
- params = params.set('sort', this.getSortString(this.sort));
298
- }
299
- return params;
300
- };
301
- DocumentSearchRequestImpl.prototype.setPage = function (page) {
302
- this.page = page;
303
- };
304
- DocumentSearchRequestImpl.prototype.getSortString = function (sort) {
305
- return sort.state.name + "," + sort.state.direction;
306
- };
307
- return DocumentSearchRequestImpl;
308
- }());
309
-
310
- /*
311
- * Copyright 2015-2020 Ritense BV, the Netherlands.
312
- *
313
- * Licensed under EUPL, Version 1.2 (the "License");
314
- * you may not use this file except in compliance with the License.
315
- * You may obtain a copy of the License at
316
- *
317
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
318
- *
319
- * Unless required by applicable law or agreed to in writing, software
320
- * distributed under the License is distributed on an "AS IS" basis,
321
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
322
- * See the License for the specific language governing permissions and
323
- * limitations under the License.
324
- */
325
-
326
- /**
327
- * Generated bundle index. Do not edit.
328
- */
329
-
330
- exports.DocumentDefinitionCreateRequest = DocumentDefinitionCreateRequest;
331
- exports.DocumentModule = DocumentModule;
332
- exports.DocumentSearchRequestHttpBody = DocumentSearchRequestHttpBody;
333
- exports.DocumentSearchRequestImpl = DocumentSearchRequestImpl;
334
- exports.DocumentService = DocumentService;
335
- exports.ModifyDocumentAndCompleteTaskRequestImpl = ModifyDocumentAndCompleteTaskRequestImpl;
336
- exports.ModifyDocumentAndStartProcessRequestImpl = ModifyDocumentAndStartProcessRequestImpl;
337
- exports.ModifyDocumentRequestImpl = ModifyDocumentRequestImpl;
338
- exports.NewDocumentAndStartProcessRequestImpl = NewDocumentAndStartProcessRequestImpl;
339
- exports.NewDocumentRequestImpl = NewDocumentRequestImpl;
340
-
341
- Object.defineProperty(exports, '__esModule', { value: true });
342
-
343
- })));
344
- //# sourceMappingURL=valtimo-document.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"valtimo-document.umd.js","sources":["../../../../projects/valtimo/document/src/lib/models/document.model.ts","../../../../projects/valtimo/document/src/lib/models/audit.model.ts","../../../../projects/valtimo/document/src/lib/models/index.ts","../../../../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\nexport interface SortResult {\n sorted: boolean;\n unsorted: boolean;\n}\n\nexport interface Pageable {\n sort: SortResult;\n pageSize: number;\n pageNumber: number;\n offset: number;\n unpaged: boolean;\n paged: boolean;\n}\n\nexport interface Page<T> {\n content: Array<T>;\n pageable: Pageable;\n last: boolean;\n totalPages: number;\n totalElements: number;\n first: boolean;\n sort: SortResult;\n numberOfElements: number;\n size: number;\n number: number;\n}\n\nexport interface DocumentDefinitions {\n content: DocumentDefinition[];\n empty: boolean;\n first: boolean;\n last: boolean;\n number: number;\n numberOfElements: number;\n size: number;\n sort: any;\n totalElements: number;\n totalPages: number;\n}\n\nexport interface DocumentDefinition {\n id: DefinitionId;\n schema: any;\n createdOn: string;\n readOnly: boolean;\n}\n\nexport interface DefinitionId {\n name: string;\n version: number;\n}\n\nexport interface Documents {\n content: Document[];\n empty: boolean;\n first: boolean;\n last: boolean;\n number: number;\n numberOfElements: number;\n size: number;\n sort: any;\n totalElements: number;\n totalPages: number;\n}\n\nexport interface RelatedFile {\n fileId: string;\n fileName: string;\n sizeInBytes: number;\n createdOn: Date;\n createdBy: string;\n}\n\nexport interface Document {\n id: string;\n content: object;\n version: string;\n createdOn: Date;\n modifiedOn: Date;\n createdBy: string;\n sequence: number;\n definitionName: string;\n relations: string[];\n relatedFiles: RelatedFile[];\n}\n\nexport interface ProcessDocumentDefinitionId {\n processDefinitionKey: string;\n documentDefinitionId: DefinitionId;\n}\n\nexport interface ProcessDocumentDefinition {\n id: ProcessDocumentDefinitionId;\n processName: string;\n canInitializeDocument: boolean;\n startableByUser: boolean;\n}\n\nexport interface ProcessDocumentInstanceId {\n processInstanceId: string;\n documentId: string;\n}\n\nexport interface ProcessDocumentInstance {\n id: ProcessDocumentInstanceId;\n processName: string;\n}\n\nexport interface NewDocumentAndStartProcessResult {\n document: Document;\n processInstanceId: string;\n errors: string[];\n}\n\nexport interface ModifyDocumentAndCompleteTaskResult {\n document: Document;\n errors: string[];\n}\n\nexport interface ModifyDocumentAndStartProcessResult {\n document: Document;\n processInstanceId: string;\n errors: string[];\n}\n\nexport interface DocumentResult {\n document: Document;\n errors: string[];\n}\n\nexport interface ModifyDocumentRequest {\n documentId: string;\n content: object;\n versionBasedOn: string;\n}\n\nexport class ModifyDocumentRequestImpl implements ModifyDocumentRequest {\n documentId: string;\n content: object;\n versionBasedOn: string;\n\n constructor(documentId: string, content: object, versionBasedOn: string) {\n this.documentId = documentId;\n this.content = content;\n this.versionBasedOn = versionBasedOn;\n }\n}\n\nexport interface ModifyDocumentAndCompleteTaskRequest<\n T_MODIFY_DOCUMENT_REQUEST extends ModifyDocumentRequest\n> {\n taskId: string;\n request: T_MODIFY_DOCUMENT_REQUEST;\n}\n\nexport class ModifyDocumentAndCompleteTaskRequestImpl\n implements ModifyDocumentAndCompleteTaskRequest<ModifyDocumentRequestImpl>\n{\n taskId: string;\n request: ModifyDocumentRequestImpl;\n\n constructor(taskId: string, request: ModifyDocumentRequestImpl) {\n this.taskId = taskId;\n this.request = request;\n }\n}\n\nexport interface NewDocumentRequest {\n definition: string;\n content: object;\n}\n\nexport class NewDocumentRequestImpl implements NewDocumentRequest {\n definition: string;\n content: object;\n\n constructor(definition: string, content: object) {\n this.definition = definition;\n this.content = content;\n }\n}\n\nexport interface NewDocumentAndStartProcessRequest<\n T_NEW_DOCUMENT_REQUEST extends NewDocumentRequest\n> {\n processDefinitionKey: string;\n request: T_NEW_DOCUMENT_REQUEST;\n}\n\nexport class NewDocumentAndStartProcessRequestImpl\n implements NewDocumentAndStartProcessRequest<NewDocumentRequestImpl>\n{\n processDefinitionKey: string;\n request: NewDocumentRequestImpl;\n\n constructor(processDefinitionKey: string, request: NewDocumentRequestImpl) {\n this.processDefinitionKey = processDefinitionKey;\n this.request = request;\n }\n}\n\nexport interface ModifyDocumentAndStartProcessRequest<\n T_MODIFY_DOCUMENT_REQUEST extends ModifyDocumentRequest\n> {\n processDefinitionKey: string;\n request: T_MODIFY_DOCUMENT_REQUEST;\n}\n\nexport class ModifyDocumentAndStartProcessRequestImpl\n implements ModifyDocumentAndStartProcessRequest<ModifyDocumentRequestImpl>\n{\n processDefinitionKey: string;\n request: ModifyDocumentRequestImpl;\n\n constructor(processDefinitionKey: string, request: ModifyDocumentRequestImpl) {\n this.processDefinitionKey = processDefinitionKey;\n this.request = request;\n }\n}\n\nexport interface ProcessDocumentDefinitionRequest {\n processDefinitionKey: string;\n documentDefinitionName: string;\n canInitializeDocument: boolean;\n startableByUser: boolean;\n}\n\nexport class DocumentDefinitionCreateRequest {\n definition: string;\n\n constructor(definition: string) {\n this.definition = definition;\n }\n}\n\nexport interface UndeployDocumentDefinitionResult {\n documentDefinitionName: string;\n errors: string[];\n}\n\nexport interface DocumentSendMessageRequest {\n subject: string;\n bodyText: string;\n}\n\nexport interface DocumentRoles {\n content: DocumentRole[];\n}\n\nexport interface DocumentRole {\n name: string;\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\nexport interface AuditEvent {\n className: string;\n id: string;\n origin: string;\n occurredOn: Date;\n user: string;\n}\n\nexport interface MetaData {\n id: any;\n origin: string;\n occurredOn: Date;\n user: string;\n}\n\nexport interface AuditRecord {\n metaData: MetaData;\n createdOn: Date;\n auditEvent: AuditEvent;\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\nexport * from './document.model';\nexport * from './list-sorting.model';\nexport * from './audit.model';\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 {Injectable} from '@angular/core';\nimport {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {\n AuditRecord,\n Document,\n DocumentDefinition,\n DocumentDefinitionCreateRequest,\n DocumentDefinitions,\n DocumentResult,\n Documents,\n DocumentSendMessageRequest,\n ModifyDocumentAndCompleteTaskRequestImpl,\n ModifyDocumentAndCompleteTaskResult,\n ModifyDocumentAndStartProcessRequestImpl,\n ModifyDocumentAndStartProcessResult,\n NewDocumentAndStartProcessRequestImpl,\n NewDocumentAndStartProcessResult,\n Page,\n ProcessDocumentDefinition,\n ProcessDocumentDefinitionRequest,\n ProcessDocumentInstance,\n UndeployDocumentDefinitionResult,\n} from './models';\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>>(\n `${this.valtimoEndpointUri}document-definition`,\n {params: params}\n );\n }\n\n getDocumentDefinition(documentDefinitionName: string): Observable<DocumentDefinition> {\n return this.http.get<DocumentDefinition>(\n `${this.valtimoEndpointUri}document-definition/${documentDefinitionName}`\n );\n }\n\n getDocuments(documentSearchRequest: DocumentSearchRequest): Observable<Documents> {\n return this.http.post<Documents>(\n `${this.valtimoEndpointUri}document-search`,\n documentSearchRequest.asHttpBody(),\n {params: documentSearchRequest.asHttpParams()}\n );\n }\n\n public getDocumentRoles(documentDefinitionName: string): Observable<Array<String>> {\n return this.http.get<Array<String>>(\n `${this.valtimoEndpointUri}document-definition/${documentDefinitionName}/roles`\n );\n }\n\n public modifyDocumentRoles(documentDefinitionName: string, roles: any): Observable<void> {\n return this.http.put<void>(\n `${this.valtimoEndpointUri}document-definition/${documentDefinitionName}/roles`,\n roles\n );\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>(\n `${this.valtimoEndpointUri}process-document/definition`\n );\n }\n\n findProcessDocumentDefinitions(\n documentDefinitionName: string\n ): 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[]>(\n `${this.valtimoEndpointUri}process-document/instance/document/${documentId}`\n );\n }\n\n newDocumentAndStartProcess(\n request: NewDocumentAndStartProcessRequestImpl\n ): 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(\n request: ModifyDocumentAndCompleteTaskRequestImpl\n ): 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(\n request: ModifyDocumentAndStartProcessRequestImpl\n ): 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(\n request: ProcessDocumentDefinitionRequest\n ): Observable<ProcessDocumentDefinition> {\n return this.http.post<ProcessDocumentDefinition>(\n `${this.valtimoEndpointUri}process-document/definition`,\n request\n );\n }\n\n createDocumentDefinition(\n documentDefinitionCreateRequest: DocumentDefinitionCreateRequest\n ): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json',\n }),\n };\n return this.http.post<void>(\n `${this.valtimoEndpointUri}document-definition`,\n documentDefinitionCreateRequest,\n options\n );\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>>(\n `${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>(\n `${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`,\n {}\n );\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>(\n `${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`,\n options\n );\n }\n\n removeDocumentDefinition(name: string): Observable<UndeployDocumentDefinitionResult> {\n return this.http.delete<UndeployDocumentDefinitionResult>(\n `${this.valtimoEndpointUri}document-definition/${name}`\n );\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 * 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 './models';\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 */\n\nexport * from './lib/models';\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\nexport {SortState as ɵa} from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,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;aAC3C;YAED,OAAO,QAAQ,CAAC;SACjB;QAED,gDAAY,GAAZ;YACE,IAAI,MAAM,GAAG,IAAIJ,aAAU,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,2 +0,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,n,o){"use strict";var i=function(t,e,n){this.documentId=t,this.content=e,this.versionBasedOn=n},r=function(t,e){this.taskId=t,this.request=e},s=function(t,e){this.definition=t,this.content=e},p=function(t,e){this.processDefinitionKey=t,this.request=e},c=function(t,e){this.processDefinitionKey=t,this.request=e},u=function(t){this.definition=t},a=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.getDocumentRoles=function(t){return this.http.get(this.valtimoEndpointUri+"document-definition/"+t+"/roles")},t.prototype.modifyDocumentRoles=function(t,e){return this.http.put(this.valtimoEndpointUri+"document-definition/"+t+"/roles",e)},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 n.HttpHeaders({"Content-Type":"application/json"})};return this.http.post(this.valtimoEndpointUri+"document-definition",t,e)},t.prototype.deleteProcessDocumentDefinition=function(t){var e={headers:new n.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 o=new n.HttpParams;return o=o.set("page",e.toString()),this.http.get(this.valtimoEndpointUri+"process-document/instance/document/"+t+"/audit",{params:o})},t.prototype.assignResource=function(t,e){return this.http.post(this.valtimoEndpointUri+"document/"+t+"/resource/"+e,{})},t.prototype.removeResource=function(t,e){var o={headers:new n.HttpHeaders({"Content-Type":"application/json"})};return this.http.delete(this.valtimoEndpointUri+"document/"+t+"/resource/"+e,o)},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}();a.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new a(e.ɵɵinject(n.HttpClient),e.ɵɵinject(o.ConfigService))},token:a,providedIn:"root"}),a.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],a.ctorParameters=function(){return[{type:n.HttpClient},{type:o.ConfigService}]};var d=function(){};d.decorators=[{type:e.NgModule}];var m=function(){},h=function(){function t(t,e,n,o,i,r,s,p){this.definitionName=t,this.page=e,this.size=n,this.sequence=o,this.createdBy=i,this.globalSearchFilter=r,this.sort=s,this.otherFilters=p}return t.prototype.asHttpBody=function(){var t=new m;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 n.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.DocumentDefinitionCreateRequest=u,t.DocumentModule=d,t.DocumentSearchRequestHttpBody=m,t.DocumentSearchRequestImpl=h,t.DocumentService=a,t.ModifyDocumentAndCompleteTaskRequestImpl=r,t.ModifyDocumentAndStartProcessRequestImpl=c,t.ModifyDocumentRequestImpl=i,t.NewDocumentAndStartProcessRequestImpl=p,t.NewDocumentRequestImpl=s,Object.defineProperty(t,"__esModule",{value:!0})}));
2
- //# sourceMappingURL=valtimo-document.umd.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../projects/valtimo/document/src/lib/models/document.model.ts","../../../../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"],"names":["documentId","content","versionBasedOn","this","taskId","request","definition","processDefinitionKey","DocumentService","http","configService","valtimoEndpointUri","config","valtimoApi","endpointUri","prototype","getAllDefinitions","get","queryDefinitions","params","getDocumentDefinition","documentDefinitionName","getDocuments","documentSearchRequest","post","asHttpBody","asHttpParams","getDocumentRoles","modifyDocumentRoles","roles","put","getDocument","modifyDocument","document","getProcessDocumentDefinitions","findProcessDocumentDefinitions","findProcessDocumentInstances","newDocumentAndStartProcess","modifyDocumentAndCompleteTask","modifyDocumentAndStartProcess","createProcessDocumentDefinition","createDocumentDefinition","documentDefinitionCreateRequest","options","headers","HttpHeaders","deleteProcessDocumentDefinition","body","delete","getAuditLog","page","HttpParams","set","toString","assignResource","resourceId","removeResource","removeDocumentDefinition","name","sendMessage","Injectable","args","providedIn","HttpClient","ConfigService","NgModule","DocumentSearchRequestImpl","definitionName","size","sequence","createdBy","globalSearchFilter","sort","otherFilters","httpBody","DocumentSearchRequestHttpBody","getSortString","setPage","state","direction"],"mappings":"ybA6JE,SAAYA,EAAoBC,EAAiBC,GAC/CC,KAAKH,WAAaA,EAClBG,KAAKF,QAAUA,EACfE,KAAKD,eAAiBA,KAiBxB,SAAYE,EAAgBC,GAC1BF,KAAKC,OAASA,EACdD,KAAKE,QAAUA,KAajB,SAAYC,EAAoBL,GAC9BE,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etE,KAAKsE,cAGxBC,GAGTR,EAAAnD,UAAAW,aAAA,WACE,IAAIP,GAAS,IAAIgC,EAAAA,YACdC,IAAI,iBAAkBjD,KAAKgE,gBAC3Bf,IAAI,OAAQjD,KAAK+C,KAAKG,YACtBD,IAAI,OAAQjD,KAAKiE,KAAKf,YAIzB,OAHIlD,KAAKqE,OACPrD,EAASA,EAAOiC,IAAI,OAAQjD,KAAKyE,cAAczE,KAAKqE,QAE/CrD,GAGT+C,EAAAnD,UAAA8D,QAAA,SAAQ3B,GACN/C,KAAK+C,KAAOA,GAGdgB,EAAAnD,UAAA6D,cAAA,SAAcJ,GACZ,OAAUA,EAAKM,MAAMpB,KAAI,IAAIc,EAAKM,MAAMC","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\nexport interface SortResult {\n sorted: boolean;\n unsorted: boolean;\n}\n\nexport interface Pageable {\n sort: SortResult;\n pageSize: number;\n pageNumber: number;\n offset: number;\n unpaged: boolean;\n paged: boolean;\n}\n\nexport interface Page<T> {\n content: Array<T>;\n pageable: Pageable;\n last: boolean;\n totalPages: number;\n totalElements: number;\n first: boolean;\n sort: SortResult;\n numberOfElements: number;\n size: number;\n number: number;\n}\n\nexport interface DocumentDefinitions {\n content: DocumentDefinition[];\n empty: boolean;\n first: boolean;\n last: boolean;\n number: number;\n numberOfElements: number;\n size: number;\n sort: any;\n totalElements: number;\n totalPages: number;\n}\n\nexport interface DocumentDefinition {\n id: DefinitionId;\n schema: any;\n createdOn: string;\n readOnly: boolean;\n}\n\nexport interface DefinitionId {\n name: string;\n version: number;\n}\n\nexport interface Documents {\n content: Document[];\n empty: boolean;\n first: boolean;\n last: boolean;\n number: number;\n numberOfElements: number;\n size: number;\n sort: any;\n totalElements: number;\n totalPages: number;\n}\n\nexport interface RelatedFile {\n fileId: string;\n fileName: string;\n sizeInBytes: number;\n createdOn: Date;\n createdBy: string;\n}\n\nexport interface Document {\n id: string;\n content: object;\n version: string;\n createdOn: Date;\n modifiedOn: Date;\n createdBy: string;\n sequence: number;\n definitionName: string;\n relations: string[];\n relatedFiles: RelatedFile[];\n}\n\nexport interface ProcessDocumentDefinitionId {\n processDefinitionKey: string;\n documentDefinitionId: DefinitionId;\n}\n\nexport interface ProcessDocumentDefinition {\n id: ProcessDocumentDefinitionId;\n processName: string;\n canInitializeDocument: boolean;\n startableByUser: boolean;\n}\n\nexport interface ProcessDocumentInstanceId {\n processInstanceId: string;\n documentId: string;\n}\n\nexport interface ProcessDocumentInstance {\n id: ProcessDocumentInstanceId;\n processName: string;\n}\n\nexport interface NewDocumentAndStartProcessResult {\n document: Document;\n processInstanceId: string;\n errors: string[];\n}\n\nexport interface ModifyDocumentAndCompleteTaskResult {\n document: Document;\n errors: string[];\n}\n\nexport interface ModifyDocumentAndStartProcessResult {\n document: Document;\n processInstanceId: string;\n errors: string[];\n}\n\nexport interface DocumentResult {\n document: Document;\n errors: string[];\n}\n\nexport interface ModifyDocumentRequest {\n documentId: string;\n content: object;\n versionBasedOn: string;\n}\n\nexport class ModifyDocumentRequestImpl implements ModifyDocumentRequest {\n documentId: string;\n content: object;\n versionBasedOn: string;\n\n constructor(documentId: string, content: object, versionBasedOn: string) {\n this.documentId = documentId;\n this.content = content;\n this.versionBasedOn = versionBasedOn;\n }\n}\n\nexport interface ModifyDocumentAndCompleteTaskRequest<\n T_MODIFY_DOCUMENT_REQUEST extends ModifyDocumentRequest\n> {\n taskId: string;\n request: T_MODIFY_DOCUMENT_REQUEST;\n}\n\nexport class ModifyDocumentAndCompleteTaskRequestImpl\n implements ModifyDocumentAndCompleteTaskRequest<ModifyDocumentRequestImpl>\n{\n taskId: string;\n request: ModifyDocumentRequestImpl;\n\n constructor(taskId: string, request: ModifyDocumentRequestImpl) {\n this.taskId = taskId;\n this.request = request;\n }\n}\n\nexport interface NewDocumentRequest {\n definition: string;\n content: object;\n}\n\nexport class NewDocumentRequestImpl implements NewDocumentRequest {\n definition: string;\n content: object;\n\n constructor(definition: string, content: object) {\n this.definition = definition;\n this.content = content;\n }\n}\n\nexport interface NewDocumentAndStartProcessRequest<\n T_NEW_DOCUMENT_REQUEST extends NewDocumentRequest\n> {\n processDefinitionKey: string;\n request: T_NEW_DOCUMENT_REQUEST;\n}\n\nexport class NewDocumentAndStartProcessRequestImpl\n implements NewDocumentAndStartProcessRequest<NewDocumentRequestImpl>\n{\n processDefinitionKey: string;\n request: NewDocumentRequestImpl;\n\n constructor(processDefinitionKey: string, request: NewDocumentRequestImpl) {\n this.processDefinitionKey = processDefinitionKey;\n this.request = request;\n }\n}\n\nexport interface ModifyDocumentAndStartProcessRequest<\n T_MODIFY_DOCUMENT_REQUEST extends ModifyDocumentRequest\n> {\n processDefinitionKey: string;\n request: T_MODIFY_DOCUMENT_REQUEST;\n}\n\nexport class ModifyDocumentAndStartProcessRequestImpl\n implements ModifyDocumentAndStartProcessRequest<ModifyDocumentRequestImpl>\n{\n processDefinitionKey: string;\n request: ModifyDocumentRequestImpl;\n\n constructor(processDefinitionKey: string, request: ModifyDocumentRequestImpl) {\n this.processDefinitionKey = processDefinitionKey;\n this.request = request;\n }\n}\n\nexport interface ProcessDocumentDefinitionRequest {\n processDefinitionKey: string;\n documentDefinitionName: string;\n canInitializeDocument: boolean;\n startableByUser: boolean;\n}\n\nexport class DocumentDefinitionCreateRequest {\n definition: string;\n\n constructor(definition: string) {\n this.definition = definition;\n }\n}\n\nexport interface UndeployDocumentDefinitionResult {\n documentDefinitionName: string;\n errors: string[];\n}\n\nexport interface DocumentSendMessageRequest {\n subject: string;\n bodyText: string;\n}\n\nexport interface DocumentRoles {\n content: DocumentRole[];\n}\n\nexport interface DocumentRole {\n name: string;\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 {Injectable} from '@angular/core';\nimport {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {\n AuditRecord,\n Document,\n DocumentDefinition,\n DocumentDefinitionCreateRequest,\n DocumentDefinitions,\n DocumentResult,\n Documents,\n DocumentSendMessageRequest,\n ModifyDocumentAndCompleteTaskRequestImpl,\n ModifyDocumentAndCompleteTaskResult,\n ModifyDocumentAndStartProcessRequestImpl,\n ModifyDocumentAndStartProcessResult,\n NewDocumentAndStartProcessRequestImpl,\n NewDocumentAndStartProcessResult,\n Page,\n ProcessDocumentDefinition,\n ProcessDocumentDefinitionRequest,\n ProcessDocumentInstance,\n UndeployDocumentDefinitionResult,\n} from './models';\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>>(\n `${this.valtimoEndpointUri}document-definition`,\n {params: params}\n );\n }\n\n getDocumentDefinition(documentDefinitionName: string): Observable<DocumentDefinition> {\n return this.http.get<DocumentDefinition>(\n `${this.valtimoEndpointUri}document-definition/${documentDefinitionName}`\n );\n }\n\n getDocuments(documentSearchRequest: DocumentSearchRequest): Observable<Documents> {\n return this.http.post<Documents>(\n `${this.valtimoEndpointUri}document-search`,\n documentSearchRequest.asHttpBody(),\n {params: documentSearchRequest.asHttpParams()}\n );\n }\n\n public getDocumentRoles(documentDefinitionName: string): Observable<Array<String>> {\n return this.http.get<Array<String>>(\n `${this.valtimoEndpointUri}document-definition/${documentDefinitionName}/roles`\n );\n }\n\n public modifyDocumentRoles(documentDefinitionName: string, roles: any): Observable<void> {\n return this.http.put<void>(\n `${this.valtimoEndpointUri}document-definition/${documentDefinitionName}/roles`,\n roles\n );\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>(\n `${this.valtimoEndpointUri}process-document/definition`\n );\n }\n\n findProcessDocumentDefinitions(\n documentDefinitionName: string\n ): 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[]>(\n `${this.valtimoEndpointUri}process-document/instance/document/${documentId}`\n );\n }\n\n newDocumentAndStartProcess(\n request: NewDocumentAndStartProcessRequestImpl\n ): 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(\n request: ModifyDocumentAndCompleteTaskRequestImpl\n ): 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(\n request: ModifyDocumentAndStartProcessRequestImpl\n ): 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(\n request: ProcessDocumentDefinitionRequest\n ): Observable<ProcessDocumentDefinition> {\n return this.http.post<ProcessDocumentDefinition>(\n `${this.valtimoEndpointUri}process-document/definition`,\n request\n );\n }\n\n createDocumentDefinition(\n documentDefinitionCreateRequest: DocumentDefinitionCreateRequest\n ): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json',\n }),\n };\n return this.http.post<void>(\n `${this.valtimoEndpointUri}document-definition`,\n documentDefinitionCreateRequest,\n options\n );\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>>(\n `${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>(\n `${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`,\n {}\n );\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>(\n `${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`,\n options\n );\n }\n\n removeDocumentDefinition(name: string): Observable<UndeployDocumentDefinitionResult> {\n return this.http.delete<UndeployDocumentDefinitionResult>(\n `${this.valtimoEndpointUri}document-definition/${name}`\n );\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 * 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 './models';\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"]}
@@ -1,64 +0,0 @@
1
- /*
2
- * Copyright 2015-2020 Ritense BV, the Netherlands.
3
- *
4
- * Licensed under EUPL, Version 1.2 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" basis,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
- import { HttpParams } from '@angular/common/http';
17
- export class DocumentSearchRequestHttpBody {
18
- }
19
- export class DocumentSearchRequestImpl {
20
- constructor(definitionName, page, size, sequence, createdBy, globalSearchFilter, sort, otherFilters) {
21
- this.definitionName = definitionName;
22
- this.page = page;
23
- this.size = size;
24
- this.sequence = sequence;
25
- this.createdBy = createdBy;
26
- this.globalSearchFilter = globalSearchFilter;
27
- this.sort = sort;
28
- this.otherFilters = otherFilters;
29
- }
30
- asHttpBody() {
31
- const httpBody = new DocumentSearchRequestHttpBody();
32
- httpBody.documentDefinitionName = this.definitionName;
33
- if (this.sequence) {
34
- httpBody.sequence = this.sequence;
35
- }
36
- if (this.createdBy) {
37
- httpBody.createdBy = this.createdBy;
38
- }
39
- if (this.globalSearchFilter) {
40
- httpBody.globalSearchFilter = this.globalSearchFilter;
41
- }
42
- if (this.otherFilters) {
43
- httpBody.otherFilters = this.otherFilters;
44
- }
45
- return httpBody;
46
- }
47
- asHttpParams() {
48
- let params = new HttpParams()
49
- .set('definitionName', this.definitionName)
50
- .set('page', this.page.toString())
51
- .set('size', this.size.toString());
52
- if (this.sort) {
53
- params = params.set('sort', this.getSortString(this.sort));
54
- }
55
- return params;
56
- }
57
- setPage(page) {
58
- this.page = page;
59
- }
60
- getSortString(sort) {
61
- return `${sort.state.name},${sort.state.direction}`;
62
- }
63
- }
64
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9jdW1lbnQtc2VhcmNoLXJlcXVlc3QuanMiLCJzb3VyY2VSb290IjoiL3RtcC9qZW5raW5zLTBlODRmNjBmL3dvcmtzcGFjZS9yb250ZW5kX2xpYnJhcmllc18tX3JlbGVhc2VfbWFpbi9wcm9qZWN0cy92YWx0aW1vL2RvY3VtZW50L3NyYy8iLCJzb3VyY2VzIjpbImxpYi9kb2N1bWVudC1zZWFyY2g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