@valtimo/resource 4.15.2 → 4.16.0-next-main.19

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 (32) hide show
  1. package/README.md +13 -6
  2. package/bundles/valtimo-resource.umd.js +174 -34
  3. package/bundles/valtimo-resource.umd.js.map +1 -1
  4. package/bundles/valtimo-resource.umd.min.js +1 -1
  5. package/bundles/valtimo-resource.umd.min.js.map +1 -1
  6. package/esm2015/lib/models/index.js +21 -0
  7. package/esm2015/lib/models/open-zaak.model.js +75 -0
  8. package/esm2015/lib/models/upload.model.js +16 -0
  9. package/esm2015/lib/models/uploader.model.js +26 -0
  10. package/esm2015/lib/resource.module.js +9 -2
  11. package/esm2015/lib/services/download.service.js +4 -3
  12. package/esm2015/lib/services/open-zaak-upload.service.js +6 -4
  13. package/esm2015/lib/services/open-zaak.service.js +5 -14
  14. package/esm2015/lib/services/s3-upload.service.js +5 -5
  15. package/esm2015/lib/services/s3.service.js +6 -5
  16. package/esm2015/lib/services/upload-provider.service.js +7 -7
  17. package/esm2015/public-api.js +2 -1
  18. package/esm2015/valtimo-resource.js +1 -1
  19. package/fesm2015/valtimo-resource.js +170 -33
  20. package/fesm2015/valtimo-resource.js.map +1 -1
  21. package/lib/models/index.d.ts +3 -0
  22. package/lib/models/open-zaak.model.d.ts +146 -0
  23. package/lib/models/upload.model.d.ts +27 -0
  24. package/lib/models/uploader.model.d.ts +30 -0
  25. package/lib/services/open-zaak-upload.service.d.ts +1 -1
  26. package/lib/services/open-zaak.service.d.ts +2 -5
  27. package/lib/services/s3-upload.service.d.ts +1 -1
  28. package/lib/services/s3.service.d.ts +1 -1
  29. package/lib/services/upload-provider.service.d.ts +1 -1
  30. package/package.json +1 -1
  31. package/public-api.d.ts +1 -0
  32. package/valtimo-resource.metadata.json +1 -1
package/README.md CHANGED
@@ -1,19 +1,25 @@
1
1
  # Upload
2
2
 
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version
4
+ 10.1.2.
4
5
 
5
6
  ## Code scaffolding
6
7
 
7
- Run `ng generate component component-name --project upload` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project upload`.
8
- > Note: Don't forget to add `--project upload` or else it will be added to the default project in your `angular.json` file.
8
+ Run `ng generate component component-name --project upload` to generate a new component. You can
9
+ also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project upload`.
10
+
11
+ > Note: Don't forget to add `--project upload` or else it will be added to the default project in
12
+ > your `angular.json` file.
9
13
 
10
14
  ## Build
11
15
 
12
- Run `ng build upload` to build the project. The build artifacts will be stored in the `dist/` directory.
16
+ Run `ng build upload` to build the project. The build artifacts will be stored in the `dist/`
17
+ directory.
13
18
 
14
19
  ## Publishing
15
20
 
16
- After building your library with `ng build upload`, go to the dist folder `cd dist/upload` and run `npm publish`.
21
+ After building your library with `ng build upload`, go to the dist folder `cd dist/upload` and run
22
+ `npm publish`.
17
23
 
18
24
  ## Running unit tests
19
25
 
@@ -21,4 +27,5 @@ Run `ng test upload` to execute the unit tests via [Karma](https://karma-runner.
21
27
 
22
28
  ## Further help
23
29
 
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
30
+ To get more help on the Angular CLI use `ng help` or go check out the
31
+ [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
@@ -1,8 +1,143 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@valtimo/config'), require('rxjs/operators'), require('@valtimo/contract'), require('uuid'), require('ngx-logger')) :
3
- typeof define === 'function' && define.amd ? define('@valtimo/resource', ['exports', '@angular/core', '@angular/common/http', '@valtimo/config', 'rxjs/operators', '@valtimo/contract', 'uuid', 'ngx-logger'], factory) :
4
- (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.resource = {}), global.ng.core, global.ng.common.http, global.i2, global.rxjs.operators, global.contract, global.uuid, global.i2$1));
5
- }(this, (function (exports, i0, i1, i2, operators, contract, uuid, i2$1) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@valtimo/config'), require('rxjs/operators'), require('uuid'), require('ngx-logger')) :
3
+ typeof define === 'function' && define.amd ? define('@valtimo/resource', ['exports', '@angular/core', '@angular/common/http', '@valtimo/config', 'rxjs/operators', 'uuid', 'ngx-logger'], factory) :
4
+ (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.resource = {}), global.ng.core, global.ng.common.http, global.i2, global.rxjs.operators, global.uuid, global.i2$1));
5
+ }(this, (function (exports, i0, i1, i2, operators, uuid, i2$1) { '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
+
23
+ /*
24
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
25
+ *
26
+ * Licensed under EUPL, Version 1.2 (the "License");
27
+ * you may not use this file except in compliance with the License.
28
+ * You may obtain a copy of the License at
29
+ *
30
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
31
+ *
32
+ * Unless required by applicable law or agreed to in writing, software
33
+ * distributed under the License is distributed on an "AS IS" basis,
34
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35
+ * See the License for the specific language governing permissions and
36
+ * limitations under the License.
37
+ */
38
+ var S3Resource = /** @class */ (function () {
39
+ function S3Resource(file, preSignedUrl) {
40
+ this.id = null;
41
+ this.extension = null;
42
+ this.createdOn = null;
43
+ this.key = decodeURIComponent(preSignedUrl.pathname.substring(1));
44
+ this.name = file.name;
45
+ this.sizeInBytes = file.size;
46
+ }
47
+ return S3Resource;
48
+ }());
49
+
50
+ /*
51
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
52
+ *
53
+ * Licensed under EUPL, Version 1.2 (the "License");
54
+ * you may not use this file except in compliance with the License.
55
+ * You may obtain a copy of the License at
56
+ *
57
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
58
+ *
59
+ * Unless required by applicable law or agreed to in writing, software
60
+ * distributed under the License is distributed on an "AS IS" basis,
61
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
62
+ * See the License for the specific language governing permissions and
63
+ * limitations under the License.
64
+ */
65
+ var OpenZaakConfig = /** @class */ (function () {
66
+ function OpenZaakConfig() {
67
+ }
68
+ return OpenZaakConfig;
69
+ }());
70
+ (function (Archiefnominatie) {
71
+ Archiefnominatie["blijvend_bewaren"] = "blijven_bewaren";
72
+ Archiefnominatie["vernietigen"] = "vernietigen";
73
+ })(exports.Archiefnominatie || (exports.Archiefnominatie = {}));
74
+ (function (Afleidingswijze) {
75
+ Afleidingswijze["afgehandeld"] = "afgehandeld";
76
+ Afleidingswijze["ander_datumkenmerk"] = "ander_datumkenmerk";
77
+ Afleidingswijze["eigenschap"] = "eigenschap";
78
+ Afleidingswijze["gerelateerde_zaak"] = "gerelateerde_zaak";
79
+ Afleidingswijze["hoofdzaak"] = "hoofdzaak";
80
+ Afleidingswijze["ingangsdatum_besluit"] = "ingangsdatum_besluit";
81
+ Afleidingswijze["termijn"] = "termijn";
82
+ Afleidingswijze["vervaldatum_besluit"] = "vervaldatum_besluit";
83
+ Afleidingswijze["zaakobject"] = "zaakobject";
84
+ })(exports.Afleidingswijze || (exports.Afleidingswijze = {}));
85
+ (function (Objecttype) {
86
+ Objecttype["adres"] = "adres";
87
+ Objecttype["besluit"] = "besluit";
88
+ Objecttype["buurt"] = "buurt";
89
+ Objecttype["enkelvoudig_document"] = "enkelvoudig_document";
90
+ Objecttype["gemeente"] = "gemeente";
91
+ Objecttype["gemeentelijke_openbare_ruimte"] = "gemeentelijke_openbare_ruimte";
92
+ Objecttype["huishouden"] = "huishouden";
93
+ Objecttype["inrichtingselement"] = "inrichtingselement";
94
+ Objecttype["kadastrale_onroerende_zaak"] = "kadastrale_onroerende_zaak";
95
+ Objecttype["kunstwerkdeel"] = "kunstwerkdeel";
96
+ Objecttype["maatschappelijke_activiteit"] = "maatschappelijke_activiteit";
97
+ Objecttype["medewerker"] = "medewerker";
98
+ Objecttype["natuurlijk_persoon"] = "natuurlijk_persoon";
99
+ Objecttype["niet_natuurlijk_persoon"] = "niet_natuurlijk_persoon";
100
+ Objecttype["openbare_ruimte"] = "openbare_ruimte";
101
+ Objecttype["organisatorische_eenheid"] = "organisatorische_eenheid";
102
+ Objecttype["pand"] = "pand";
103
+ Objecttype["spoorbaandeel"] = "spoorbaandeel";
104
+ Objecttype["status"] = "status";
105
+ Objecttype["terreindeel"] = "terreindeel";
106
+ Objecttype["terrein_gebouwd_object"] = "terrein_gebouwd_object";
107
+ Objecttype["vestiging"] = "vestiging";
108
+ Objecttype["waterdeel"] = "waterdeel";
109
+ Objecttype["wegdeel"] = "wegdeel";
110
+ Objecttype["wijk"] = "wijk";
111
+ Objecttype["woonplaats"] = "woonplaats";
112
+ Objecttype["woz_deelobject"] = "woz_deelobject";
113
+ Objecttype["woz_object"] = "woz_object";
114
+ Objecttype["woz_waarde"] = "woz_waarde";
115
+ Objecttype["zakelijk_recht"] = "zakelijk_recht";
116
+ Objecttype["overige"] = "overige";
117
+ })(exports.Objecttype || (exports.Objecttype = {}));
118
+ (function (Operation) {
119
+ Operation["CREATE_ZAAK"] = "CREATE_ZAAK";
120
+ Operation["SET_RESULTAAT"] = "SET_RESULTAAT";
121
+ Operation["SET_STATUS"] = "SET_STATUS";
122
+ })(exports.Operation || (exports.Operation = {}));
123
+
124
+ /*
125
+ *
126
+ * * Copyright 2015-2020 Ritense BV, the Netherlands.
127
+ * *
128
+ * * Licensed under EUPL, Version 1.2 (the "License");
129
+ * * you may not use this file except in compliance with the License.
130
+ * * You may obtain a copy of the License at
131
+ * *
132
+ * * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
133
+ * *
134
+ * * Unless required by applicable law or agreed to in writing, software
135
+ * * distributed under the License is distributed on an "AS IS" basis,
136
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
137
+ * * See the License for the specific language governing permissions and
138
+ * * limitations under the License.
139
+ *
140
+ */
6
141
 
7
142
  /*
8
143
  * Copyright 2020 Dimpact.
@@ -32,15 +167,6 @@
32
167
  OpenZaakService.prototype.getResource = function (resourceId) {
33
168
  return this.http.get(this.valtimoApiConfig.endpointUri + "resource/" + resourceId);
34
169
  };
35
- OpenZaakService.prototype.createOpenZaakConfig = function (request) {
36
- return this.http.post(this.valtimoApiConfig.endpointUri + "openzaak/config", request);
37
- };
38
- OpenZaakService.prototype.modifyOpenZaakConfig = function (request) {
39
- return this.http.put(this.valtimoApiConfig.endpointUri + "openzaak/config", request);
40
- };
41
- OpenZaakService.prototype.deleteOpenZaakConfig = function () {
42
- return this.http.delete(this.valtimoApiConfig.endpointUri + "openzaak/config");
43
- };
44
170
  OpenZaakService.prototype.getZaakTypes = function () {
45
171
  return this.http.get(this.valtimoApiConfig.endpointUri + "openzaak/zaaktype");
46
172
  };
@@ -80,8 +206,8 @@
80
206
  OpenZaakService.prototype.modifyServiceTaskHandler = function (id, request) {
81
207
  return this.http.put(this.valtimoApiConfig.endpointUri + "openzaak/link/" + id + "/service-handler", request);
82
208
  };
83
- OpenZaakService.prototype.deleteServiceTaskHandler = function (id, serviceTaskId) {
84
- return this.http.delete(this.valtimoApiConfig.endpointUri + "openzaak/link/" + id + "/service-handler/" + serviceTaskId);
209
+ OpenZaakService.prototype.deleteServiceTaskHandler = function (id, processDefinitionKey, serviceTaskId) {
210
+ return this.http.delete(this.valtimoApiConfig.endpointUri + "openzaak/link/" + id + "/service-handler/" + processDefinitionKey + "/" + serviceTaskId);
85
211
  };
86
212
  OpenZaakService.prototype.upload = function (file, documentDefinitionName) {
87
213
  var formData = new FormData();
@@ -89,7 +215,7 @@
89
215
  formData.append('documentDefinitionName', documentDefinitionName);
90
216
  return this.http.post(this.valtimoApiConfig.endpointUri + "resource/upload-open-zaak", formData, {
91
217
  reportProgress: true,
92
- responseType: 'json'
218
+ responseType: 'json',
93
219
  });
94
220
  };
95
221
  return OpenZaakService;
@@ -97,7 +223,7 @@
97
223
  OpenZaakService.ɵprov = i0.ɵɵdefineInjectable({ factory: function OpenZaakService_Factory() { return new OpenZaakService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.ConfigService)); }, token: OpenZaakService, providedIn: "root" });
98
224
  OpenZaakService.decorators = [
99
225
  { type: i0.Injectable, args: [{
100
- providedIn: 'root'
226
+ providedIn: 'root',
101
227
  },] }
102
228
  ];
103
229
  OpenZaakService.ctorParameters = function () { return [
@@ -129,7 +255,9 @@
129
255
  }
130
256
  OpenZaakUploadService.prototype.uploadFile = function (file, documentDefinitionName) {
131
257
  var _this = this;
132
- return this.openZaakService.upload(new File([file], file.name, { type: file.type }), documentDefinitionName).pipe(operators.map(function (result) { return _this.getResourceFile(result); }));
258
+ return this.openZaakService
259
+ .upload(new File([file], file.name, { type: file.type }), documentDefinitionName)
260
+ .pipe(operators.map(function (result) { return _this.getResourceFile(result); }));
133
261
  };
134
262
  OpenZaakUploadService.prototype.getResource = function (resourceId) {
135
263
  return this.openZaakService.getResource(resourceId);
@@ -147,8 +275,8 @@
147
275
  name: result.name,
148
276
  sizeInBytes: result.sizeInBytes,
149
277
  resourceId: result.resourceId,
150
- extension: result.extension
151
- }
278
+ extension: result.extension,
279
+ },
152
280
  };
153
281
  };
154
282
  return OpenZaakUploadService;
@@ -189,8 +317,7 @@
189
317
  return this.http.get(this.valtimoApiConfig.endpointUri + "resource/pre-signed-url/" + fileName, options);
190
318
  };
191
319
  S3Service.prototype.upload = function (url, file) {
192
- var headers = new i1.HttpHeaders()
193
- .set('Content-Type', file.type);
320
+ var headers = new i1.HttpHeaders().set('Content-Type', file.type);
194
321
  return this.http.put(url.toString(), file, { headers: headers });
195
322
  };
196
323
  S3Service.prototype.registerResource = function (s3ResourceDTO) {
@@ -202,14 +329,16 @@
202
329
  };
203
330
  S3Service.prototype.delete = function (resourceId) {
204
331
  var headers = new i1.HttpHeaders().set('Content-Type', 'application/json;charset=UTF-8');
205
- return this.http.delete(this.valtimoApiConfig.endpointUri + "resource/" + resourceId, { headers: headers });
332
+ return this.http.delete(this.valtimoApiConfig.endpointUri + "resource/" + resourceId, {
333
+ headers: headers,
334
+ });
206
335
  };
207
336
  return S3Service;
208
337
  }());
209
338
  S3Service.ɵprov = i0.ɵɵdefineInjectable({ factory: function S3Service_Factory() { return new S3Service(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.ConfigService)); }, token: S3Service, providedIn: "root" });
210
339
  S3Service.decorators = [
211
340
  { type: i0.Injectable, args: [{
212
- providedIn: 'root'
341
+ providedIn: 'root',
213
342
  },] }
214
343
  ];
215
344
  S3Service.ctorParameters = function () { return [
@@ -243,7 +372,7 @@
243
372
  var splitFileName = fileName.split('.');
244
373
  var fileNameWithUUID = splitFileName[0] + "-" + uuid.v4() + "." + splitFileName[1];
245
374
  var renamedFile = new File([file], fileNameWithUUID, { type: file.type });
246
- return this.s3Service.getPreSignedUrl(renamedFile.name).pipe(operators.map(function (url) { return new URL(url); }), operators.tap(function (url) { return resourceUrl = url; }), operators.switchMap(function (url) { return _this.s3Service.upload(url, renamedFile); }), operators.map(function () { return new contract.S3Resource(file, resourceUrl); }), operators.switchMap(function (s3Resource) { return _this.s3Service.registerResource(s3Resource); }), operators.switchMap(function (s3Resource) { return _this.s3Service.get(s3Resource.id); }), operators.map(function (result) { return (Object.assign(Object.assign({}, result), { originalName: file.name })); }), operators.map(function (result) { return _this.getResourceFile(result); }));
375
+ return this.s3Service.getPreSignedUrl(renamedFile.name).pipe(operators.map(function (url) { return new URL(url); }), operators.tap(function (url) { return (resourceUrl = url); }), operators.switchMap(function (url) { return _this.s3Service.upload(url, renamedFile); }), operators.map(function () { return new S3Resource(file, resourceUrl); }), operators.switchMap(function (s3Resource) { return _this.s3Service.registerResource(s3Resource); }), operators.switchMap(function (s3Resource) { return _this.s3Service.get(s3Resource.id); }), operators.map(function (result) { return (Object.assign(Object.assign({}, result), { originalName: file.name })); }), operators.map(function (result) { return _this.getResourceFile(result); }));
247
376
  };
248
377
  S3UploadService.prototype.getResource = function (resourceId) {
249
378
  return this.s3Service.get(resourceId);
@@ -262,8 +391,8 @@
262
391
  createdOn: result.resource.createdOn,
263
392
  name: result.originalName,
264
393
  sizeInBytes: result.resource.sizeInBytes,
265
- resourceId: result.resource.id.split('ResourceId(id=')[1].slice(0, -1)
266
- }
394
+ resourceId: result.resource.id.split('ResourceId(id=')[1].slice(0, -1),
395
+ },
267
396
  };
268
397
  };
269
398
  return S3UploadService;
@@ -295,9 +424,10 @@
295
424
  this.configService = configService;
296
425
  this.injector = injector;
297
426
  this.logger = logger;
298
- this.uploadService = configService.config.uploadProvider === contract.UploadProvider.S3 ?
299
- injector.get(S3UploadService)
300
- : injector.get(OpenZaakUploadService);
427
+ this.uploadService =
428
+ configService.config.uploadProvider === i2.UploadProvider.S3
429
+ ? injector.get(S3UploadService)
430
+ : injector.get(OpenZaakUploadService);
301
431
  this.logger.debug('Loading UploadService as', this.uploadService);
302
432
  }
303
433
  UploadProviderService.prototype.uploadFile = function (file, documentDefinitionName) {
@@ -311,7 +441,7 @@
311
441
  UploadProviderService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UploadProviderService_Factory() { return new UploadProviderService(i0.ɵɵinject(i2.ConfigService), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i2$1.NGXLogger)); }, token: UploadProviderService, providedIn: "root" });
312
442
  UploadProviderService.decorators = [
313
443
  { type: i0.Injectable, args: [{
314
- providedIn: 'root'
444
+ providedIn: 'root',
315
445
  },] }
316
446
  ];
317
447
  UploadProviderService.ctorParameters = function () { return [
@@ -342,7 +472,8 @@
342
472
  }
343
473
  DownloadService.prototype.downloadFile = function (url, name) {
344
474
  var _this = this;
345
- if (url.startsWith(this.configService.config.valtimoApi.endpointUri) || url.startsWith(window.location.origin)) {
475
+ if (url.startsWith(this.configService.config.valtimoApi.endpointUri) ||
476
+ url.startsWith(window.location.origin)) {
346
477
  // if download url is on backend use angular to get the content so access token is used
347
478
  this.http.get(url, { responseType: 'blob' }).subscribe(function (content) {
348
479
  var downloadUrl = window.URL.createObjectURL(content);
@@ -367,7 +498,7 @@
367
498
  DownloadService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DownloadService_Factory() { return new DownloadService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.ConfigService)); }, token: DownloadService, providedIn: "root" });
368
499
  DownloadService.decorators = [
369
500
  { type: i0.Injectable, args: [{
370
- providedIn: 'root'
501
+ providedIn: 'root',
371
502
  },] }
372
503
  ];
373
504
  DownloadService.ctorParameters = function () { return [
@@ -400,7 +531,14 @@
400
531
  declarations: [],
401
532
  imports: [],
402
533
  exports: [],
403
- providers: [OpenZaakUploadService, S3UploadService, UploadProviderService, OpenZaakService, S3Service, DownloadService]
534
+ providers: [
535
+ OpenZaakUploadService,
536
+ S3UploadService,
537
+ UploadProviderService,
538
+ OpenZaakService,
539
+ S3Service,
540
+ DownloadService,
541
+ ],
404
542
  },] }
405
543
  ];
406
544
 
@@ -413,8 +551,10 @@
413
551
  */
414
552
 
415
553
  exports.DownloadService = DownloadService;
554
+ exports.OpenZaakConfig = OpenZaakConfig;
416
555
  exports.OpenZaakService = OpenZaakService;
417
556
  exports.ResourceModule = ResourceModule;
557
+ exports.S3Resource = S3Resource;
418
558
  exports.S3Service = S3Service;
419
559
  exports.UploadProviderService = UploadProviderService;
420
560
  exports.ɵa = OpenZaakUploadService;
@@ -1 +1 @@
1
- {"version":3,"file":"valtimo-resource.umd.js","sources":["../../../../projects/valtimo/resource/src/lib/services/open-zaak.service.ts","../../../../projects/valtimo/resource/src/lib/services/open-zaak-upload.service.ts","../../../../projects/valtimo/resource/src/lib/services/s3.service.ts","../../../../projects/valtimo/resource/src/lib/services/s3-upload.service.ts","../../../../projects/valtimo/resource/src/lib/services/upload-provider.service.ts","../../../../projects/valtimo/resource/src/lib/services/download.service.ts","../../../../projects/valtimo/resource/src/lib/resource.module.ts","../../../../projects/valtimo/resource/src/public-api.ts","../../../../projects/valtimo/resource/src/valtimo-resource.ts"],"sourcesContent":["/*\n * Copyright 2020 Dimpact.\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} from '@angular/common/http';\nimport {ConfigService} from '@valtimo/config';\nimport {Observable} from 'rxjs';\nimport {\n CreateInformatieObjectTypeLinkRequest,\n CreateOpenZaakConfigRequest,\n CreateOpenZaakConfigResult,\n CreateZaakTypeLinkRequest,\n InformatieObjectType,\n InformatieObjectTypeLink,\n ModifyOpenZaakConfigRequest,\n ModifyOpenZaakConfigResult,\n OpenZaakConfig,\n OpenZaakResource,\n ResourceDto,\n ServiceTaskHandlerRequest,\n ZaakType,\n ZaakTypeLink,\n ZaakTypeRequest\n} from '@valtimo/contract';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OpenZaakService {\n\n private valtimoApiConfig: any;\n private catalogus: string;\n\n constructor(\n private http: HttpClient,\n private configService: ConfigService\n ) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n this.catalogus = configService.config.openZaak.catalogus;\n }\n\n getOpenZaakConfig(): Observable<OpenZaakConfig> {\n return this.http.get<OpenZaakConfig>(`${this.valtimoApiConfig.endpointUri}openzaak/config`);\n }\n\n getResource(resourceId: string): Observable<ResourceDto> {\n return this.http.get<ResourceDto>(`${this.valtimoApiConfig.endpointUri}resource/${resourceId}`);\n }\n\n createOpenZaakConfig(request: CreateOpenZaakConfigRequest): Observable<CreateOpenZaakConfigResult> {\n return this.http.post<CreateOpenZaakConfigResult>(`${this.valtimoApiConfig.endpointUri}openzaak/config`, request);\n }\n\n modifyOpenZaakConfig(request: ModifyOpenZaakConfigRequest): Observable<ModifyOpenZaakConfigResult> {\n return this.http.put<ModifyOpenZaakConfigResult>(`${this.valtimoApiConfig.endpointUri}openzaak/config`, request);\n }\n\n deleteOpenZaakConfig(): Observable<any> {\n return this.http.delete<any>(`${this.valtimoApiConfig.endpointUri}openzaak/config`);\n }\n\n getZaakTypes(): Observable<ZaakType[]> {\n return this.http.get<ZaakType[]>(`${this.valtimoApiConfig.endpointUri}openzaak/zaaktype`);\n }\n\n getInformatieObjectTypes(): Observable<InformatieObjectType[]> {\n return this.http.get<InformatieObjectType[]>(`${this.valtimoApiConfig.endpointUri}openzaak/informatie-object-typen/${this.catalogus}`);\n }\n\n getZaakTypeLink(id: string): Observable<ZaakTypeLink> {\n return this.http.get<ZaakTypeLink>(`${this.valtimoApiConfig.endpointUri}openzaak/link/${id}`);\n }\n\n getInformatieObjectTypeLink(id: string): Observable<InformatieObjectTypeLink> {\n return this.http.get<InformatieObjectTypeLink>(`${this.valtimoApiConfig.endpointUri}openzaak/informatie-object-type-link/${id}`);\n }\n\n createZaakTypeLink(request: CreateZaakTypeLinkRequest): Observable<any> {\n return this.http.post<any>(`${this.valtimoApiConfig.endpointUri}openzaak/link`, request);\n }\n\n createInformatieObjectTypeLink(request: CreateInformatieObjectTypeLinkRequest): Observable<any> {\n return this.http.post<any>(`${this.valtimoApiConfig.endpointUri}openzaak/informatie-object-type-link`, request);\n }\n\n deleteZaakTypeLink(id: string): Observable<any> {\n return this.http.delete<any>(`${this.valtimoApiConfig.endpointUri}openzaak/link/${id}`);\n }\n\n deleteInformatieObjectTypeLink(id: string): Observable<any> {\n return this.http.delete<any>(`${this.valtimoApiConfig.endpointUri}openzaak/informatie-object-type-link/${id}`);\n }\n\n getZaakTypeLinkListByProcess(processDefinitionKey: string): Observable<any> {\n return this.http.get(`${this.valtimoApiConfig.endpointUri}openzaak/link/process/${processDefinitionKey}`);\n }\n\n getStatusTypes(zaakTypeRequest: ZaakTypeRequest): Observable<any> {\n return this.http.post(`${this.valtimoApiConfig.endpointUri}openzaak/status`, zaakTypeRequest);\n }\n\n getStatusResults(zaakTypeRequest): Observable<any> {\n return this.http.post(`${this.valtimoApiConfig.endpointUri}openzaak/resultaat`, zaakTypeRequest);\n }\n\n createServiceTaskHandler(id: string, request: ServiceTaskHandlerRequest): Observable<any> {\n return this.http.post<any>(`${this.valtimoApiConfig.endpointUri}openzaak/link/${id}/service-handler`, request);\n }\n\n modifyServiceTaskHandler(id: string, request: ServiceTaskHandlerRequest): Observable<any> {\n return this.http.put<any>(`${this.valtimoApiConfig.endpointUri}openzaak/link/${id}/service-handler`, request);\n }\n\n deleteServiceTaskHandler(id: string, serviceTaskId: string): Observable<any> {\n return this.http.delete<any>(`${this.valtimoApiConfig.endpointUri}openzaak/link/${id}/service-handler/${serviceTaskId}`);\n }\n\n upload(file: File, documentDefinitionName: string): Observable<OpenZaakResource> {\n const formData: FormData = new FormData();\n formData.append('file', file);\n formData.append('documentDefinitionName', documentDefinitionName);\n\n return this.http.post<OpenZaakResource>(`${this.valtimoApiConfig.endpointUri}resource/upload-open-zaak`, formData, {\n reportProgress: true,\n responseType: 'json'\n });\n }\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {ConfigService} from '@valtimo/config';\nimport {Observable} from 'rxjs';\nimport {OpenZaakResource, ResourceFile, UploadService, ResourceDto} from '@valtimo/contract';\nimport {OpenZaakService} from './open-zaak.service';\nimport {map} from 'rxjs/operators';\n\n@Injectable()\nexport class OpenZaakUploadService implements UploadService {\n\n private valtimoApiConfig: any;\n\n constructor(\n private readonly openZaakService: OpenZaakService,\n private http: HttpClient,\n private configService: ConfigService,\n ) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n uploadFile(file: File, documentDefinitionName: string): Observable<ResourceFile> {\n return this.openZaakService.upload(new File([file], file.name, {type: file.type}), documentDefinitionName).pipe(\n map(result => this.getResourceFile(result))\n );\n }\n\n getResource(resourceId: string): Observable<ResourceDto> {\n return this.openZaakService.getResource(resourceId);\n }\n\n private getResourceFile(result: OpenZaakResource): ResourceFile {\n return {\n customUpload: true,\n originalName: result.name,\n size: result.sizeInBytes,\n url: '/api/resource/' + result.resourceId + '/download',\n storage: 'openZaak',\n type: result.extension,\n data: {\n createdOn: result.createdOn as any as string,\n name: result.name,\n sizeInBytes: result.sizeInBytes,\n resourceId: result.resourceId,\n extension: result.extension\n }\n };\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient, HttpHeaders} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {ConfigService} from '@valtimo/config';\nimport {Resource, S3Resource, ResourceDto} from '@valtimo/contract';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class S3Service {\n private valtimoApiConfig: any;\n\n constructor(\n private http: HttpClient,\n private configService: ConfigService\n ) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n public getPreSignedUrl(fileName: string): Observable<string> {\n const headers = new HttpHeaders().set('Content-Type', 'text/plain; charset=utf-8');\n const options = {headers, responseType: 'text' as 'text'};\n return this.http.get(`${this.valtimoApiConfig.endpointUri}resource/pre-signed-url/${fileName}`, options);\n }\n\n public upload(url: URL, file: File): Observable<any> {\n const headers = new HttpHeaders()\n .set('Content-Type', file.type);\n return this.http.put(url.toString(), file, {headers: headers});\n }\n\n public registerResource(s3ResourceDTO: S3Resource): Observable<Resource> {\n return this.http.put<Resource>(`${this.valtimoApiConfig.endpointUri}resource`, s3ResourceDTO);\n }\n\n public get(resourceId: string): Observable<ResourceDto> {\n const headers = new HttpHeaders().set('Content-Type', 'application/json;charset=UTF-8');\n return this.http.get<ResourceDto>(`${this.valtimoApiConfig.endpointUri}resource/${resourceId}`, {headers: headers});\n }\n\n public delete(resourceId: string): Observable<any> {\n const headers = new HttpHeaders().set('Content-Type', 'application/json;charset=UTF-8');\n return this.http.delete(`${this.valtimoApiConfig.endpointUri}resource/${resourceId}`, {headers: headers});\n }\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Observable} from 'rxjs';\nimport {map, switchMap, tap} from 'rxjs/operators';\nimport {ResourceDto, ResourceFile, S3Resource, UploadService} from '@valtimo/contract';\nimport {Injectable} from '@angular/core';\nimport {v4 as uuidv4} from 'uuid';\nimport {S3Service} from './s3.service';\n\n@Injectable()\nexport class S3UploadService implements UploadService {\n\n constructor(\n private readonly s3Service: S3Service\n ) {\n }\n\n uploadFile(file: File): Observable<ResourceFile> {\n let resourceUrl: URL;\n const fileName = file.name;\n const splitFileName = fileName.split('.');\n const fileNameWithUUID = `${splitFileName[0]}-${uuidv4()}.${splitFileName[1]}`;\n const renamedFile = new File([file], fileNameWithUUID, {type: file.type});\n\n return this.s3Service.getPreSignedUrl(renamedFile.name).pipe(\n map((url) => new URL(url)),\n tap((url) => resourceUrl = url),\n switchMap((url) => this.s3Service.upload(url, renamedFile)),\n map(() => new S3Resource(file, resourceUrl)),\n switchMap((s3Resource) => this.s3Service.registerResource(s3Resource)),\n switchMap((s3Resource) => this.s3Service.get(s3Resource.id)),\n map((result) => ({...result, originalName: file.name})),\n map((result) => this.getResourceFile(result))\n );\n }\n\n getResource(resourceId: string): Observable<ResourceDto> {\n return this.s3Service.get(resourceId);\n }\n\n private getResourceFile(result: ResourceDto): ResourceFile {\n return {\n customUpload: true,\n originalName: result.originalName,\n url: result.url,\n size: result.resource.sizeInBytes,\n storage: 'url',\n type: result.resource.extension,\n data: {\n key: result.resource.key,\n bucketName: result.resource.name,\n createdOn: result.resource.createdOn as any as string,\n name: result.originalName,\n sizeInBytes: result.resource.sizeInBytes,\n resourceId: result.resource.id.split('ResourceId(id=')[1].slice(0, -1)\n }\n };\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable, Injector} from '@angular/core';\nimport {NGXLogger} from 'ngx-logger';\nimport {ResourceFile, UploadProvider, UploadService, ResourceDto} from '@valtimo/contract';\nimport {ConfigService} from '@valtimo/config';\nimport {Observable} from 'rxjs';\nimport {OpenZaakUploadService} from './open-zaak-upload.service';\nimport {S3UploadService} from './s3-upload.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UploadProviderService implements UploadService {\n\n private readonly uploadService: UploadService;\n\n constructor(\n private configService: ConfigService,\n private injector: Injector,\n private logger: NGXLogger\n ) {\n this.uploadService = configService.config.uploadProvider === UploadProvider.S3 ?\n injector.get<UploadService>(S3UploadService)\n : injector.get<UploadService>(OpenZaakUploadService);\n this.logger.debug('Loading UploadService as', this.uploadService);\n }\n\n uploadFile(file: File, documentDefinitionName?: string): Observable<ResourceFile> {\n return this.uploadService.uploadFile(file, documentDefinitionName);\n }\n\n getResource(resourceId: string): Observable<ResourceDto> {\n return this.uploadService.getResource(resourceId);\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 {Injectable} from '@angular/core';\nimport {ConfigService} from '@valtimo/config';\nimport {HttpClient} from '@angular/common/http';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DownloadService {\n\n constructor(\n private http: HttpClient,\n private configService: ConfigService\n ) { }\n\n downloadFile(url: string, name: string) {\n if (url.startsWith(this.configService.config.valtimoApi.endpointUri) || url.startsWith(window.location.origin)) {\n // if download url is on backend use angular to get the content so access token is used\n this.http.get(url, {responseType: 'blob'}).subscribe(content => {\n const downloadUrl = window.URL.createObjectURL(content);\n this.openDownloadLink(downloadUrl, name);\n });\n } else {\n // download links to external services (like amazon s3) open in a new window\n this.openDownloadLink(url, name);\n }\n }\n\n private openDownloadLink(url: string, name: string) {\n const link = document.createElement('a');\n link.href = url;\n link.download = name;\n link.target = '_blank';\n link.click();\n link.remove();\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';\nimport {OpenZaakUploadService} from './services/open-zaak-upload.service';\nimport {S3UploadService} from './services/s3-upload.service';\nimport {UploadProviderService} from './services/upload-provider.service';\nimport {OpenZaakService} from './services/open-zaak.service';\nimport {S3Service} from './services/s3.service';\nimport {DownloadService} from './services/download.service';\n\n@NgModule({\n declarations: [],\n imports: [\n ],\n exports: [],\n providers: [OpenZaakUploadService, S3UploadService, UploadProviderService, OpenZaakService, S3Service, DownloadService]\n})\nexport class ResourceModule { }\n","/*\n * Public API Surface of upload\n */\n\nexport * from './lib/resource.module';\nexport * from './lib/services/open-zaak.service';\nexport * from './lib/services/upload-provider.service';\nexport * from './lib/services/s3.service';\nexport * from './lib/services/download.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {OpenZaakUploadService as ɵa} from './lib/services/open-zaak-upload.service';\nexport {S3UploadService as ɵb} from './lib/services/s3-upload.service';"],"names":["Injectable","HttpClient","ConfigService","map","HttpHeaders","uuidv4","tap","switchMap","S3Resource","UploadProvider","Injector","NGXLogger","NgModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;QA8CE,yBACU,IAAgB,EAChB,aAA4B;YAD5B,SAAI,GAAJ,IAAI,CAAY;YAChB,kBAAa,GAAb,aAAa,CAAe;YAEpC,IAAI,CAAC,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC;YACxD,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;SAC1D;QAED,2CAAiB,GAAjB;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAoB,IAAI,CAAC,gBAAgB,CAAC,WAAW,oBAAiB,CAAC,CAAC;SAC7F;QAED,qCAAW,GAAX,UAAY,UAAkB;YAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAiB,IAAI,CAAC,gBAAgB,CAAC,WAAW,iBAAY,UAAY,CAAC,CAAC;SACjG;QAED,8CAAoB,GAApB,UAAqB,OAAoC;YACvD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAgC,IAAI,CAAC,gBAAgB,CAAC,WAAW,oBAAiB,EAAE,OAAO,CAAC,CAAC;SACnH;QAED,8CAAoB,GAApB,UAAqB,OAAoC;YACvD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAgC,IAAI,CAAC,gBAAgB,CAAC,WAAW,oBAAiB,EAAE,OAAO,CAAC,CAAC;SAClH;QAED,8CAAoB,GAApB;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAS,IAAI,CAAC,gBAAgB,CAAC,WAAW,oBAAiB,CAAC,CAAC;SACrF;QAED,sCAAY,GAAZ;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAgB,IAAI,CA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C,qBAAqB,EAAE,eAAe,EAAE,qBAAqB,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe,CAAC;iBACxH;;;IC9BD;;;;ICAA;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"valtimo-resource.umd.js","sources":["../../../../projects/valtimo/resource/src/lib/models/upload.model.ts","../../../../projects/valtimo/resource/src/lib/models/uploader.model.ts","../../../../projects/valtimo/resource/src/lib/models/open-zaak.model.ts","../../../../projects/valtimo/resource/src/lib/models/index.ts","../../../../projects/valtimo/resource/src/lib/services/open-zaak.service.ts","../../../../projects/valtimo/resource/src/lib/services/open-zaak-upload.service.ts","../../../../projects/valtimo/resource/src/lib/services/s3.service.ts","../../../../projects/valtimo/resource/src/lib/services/s3-upload.service.ts","../../../../projects/valtimo/resource/src/lib/services/upload-provider.service.ts","../../../../projects/valtimo/resource/src/lib/services/download.service.ts","../../../../projects/valtimo/resource/src/lib/resource.module.ts","../../../../projects/valtimo/resource/src/public-api.ts","../../../../projects/valtimo/resource/src/valtimo-resource.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Observable} from 'rxjs';\nimport {ResourceDto} from './uploader.model';\n\nexport interface ResourceFile {\n customUpload?: boolean;\n originalName: string;\n size: number;\n storage: string;\n type?: string;\n isLast?: boolean;\n url?: string;\n data: {\n baseUrl?: string;\n bucketName?: string;\n createdOn: string;\n extension?: string;\n form?: string;\n key?: string;\n name: string;\n project?: string;\n resourceId: string;\n sizeInBytes: number;\n };\n}\n\nexport interface UploadService {\n uploadFile(file: File, documentDefinitionName?: string): Observable<ResourceFile>;\n getResource(resourceId: string): Observable<ResourceDto>;\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 ResourceDto {\n url: string;\n resource: Resource;\n originalName?: string;\n}\n\nexport interface Resource {\n id?: string;\n key: string;\n name: string;\n sizeInBytes: number;\n extension?: string;\n createdOn?: Date;\n}\n\nexport interface OpenZaakResource {\n resourceId: string;\n informatieObjectUrl: string;\n createdOn: string;\n name: string;\n extension: string;\n sizeInBytes: number;\n}\n\nexport class S3Resource implements Resource {\n id?: string = null;\n key: string;\n name: string;\n sizeInBytes: number;\n extension?: string = null;\n createdOn?: Date = null;\n\n constructor(file: File, preSignedUrl: URL) {\n this.key = decodeURIComponent(preSignedUrl.pathname.substring(1));\n this.name = file.name;\n this.sizeInBytes = file.size;\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\nexport class OpenZaakConfig {\n id: string;\n url: string;\n clientId: string;\n secret: string;\n rsin: string;\n}\n\nexport interface ZaakType {\n url: string;\n omschrijving: string;\n omschrijvingGeneriek?: string;\n}\n\nexport interface InformatieObjectType {\n url: string;\n omschrijving: string;\n}\n\nexport interface InformatieObjectTypeLink {\n informatieObjectTypeLinkId: string;\n documentDefinitionName: string;\n zaakType: string;\n informatieObjectType: string;\n}\n\nexport interface ZaakTypeLink {\n id: string;\n documentDefinitionName: string;\n zaakTypeUrl: string;\n zaakInstanceLinks: ZaakInstanceLink[];\n serviceTaskHandlers: ServiceTaskHandlerRequest[];\n createWithDossier: boolean;\n}\n\nexport interface ZaakTypeRequest {\n zaaktype: string;\n}\n\nexport interface CreateZaakTypeLinkRequest {\n documentDefinitionName: string;\n zaakTypeUrl: string;\n createWithDossier: boolean;\n}\n\nexport interface CreateInformatieObjectTypeLinkRequest {\n documentDefinitionName: string;\n zaakType: string;\n informatieObjectType: string;\n}\n\nexport interface ZaakInstanceLink {\n zaakInstanceUrl: string;\n zaakInstanceId: string;\n documentId: string;\n}\n\nexport interface ServiceTaskHandlerRequest {\n processDefinitionKey: string;\n serviceTaskId: string;\n operation: Operation;\n parameter: string;\n}\n\nexport interface PreviousSelectedZaak {\n zaakTypeLink: ZaakTypeLink;\n zaakType: ZaakType;\n serviceTaskHandler: ServiceTaskHandlerRequest;\n}\n\nexport interface ZaakOperation {\n type: string;\n label: string;\n}\n\nexport interface ZaakStatusType {\n url?: string;\n omschrijving: string;\n omschrijvingGeneriek?: string;\n statustekst?: string;\n zaakType: string;\n volgnummer: number;\n isEindStatus?: boolean;\n informeren?: boolean;\n}\n\nexport interface ZaakResultType {\n url?: string;\n zaaktype: string;\n omschrijving: string;\n resultaattypeomschrijving: string;\n omschrijvingGeneriek?: string;\n selectielijstklasse: string;\n toelichting?: string;\n archiefnominatie?: Archiefnominatie;\n archiefactietermijn?: string;\n brondatumArchiefprocedure?: BrondatumArchiefprocedure;\n}\n\nexport interface BrondatumArchiefprocedure {\n afleidingswijze: Afleidingswijze;\n datumkenmerk?: string;\n einddatumBekend?: boolean;\n objecttype?: Objecttype;\n registratie?: string;\n procestermijn?: string;\n}\n\nexport enum Archiefnominatie {\n blijvend_bewaren = 'blijven_bewaren',\n vernietigen = 'vernietigen',\n}\n\nexport enum Afleidingswijze {\n afgehandeld = 'afgehandeld',\n ander_datumkenmerk = 'ander_datumkenmerk',\n eigenschap = 'eigenschap',\n gerelateerde_zaak = 'gerelateerde_zaak',\n hoofdzaak = 'hoofdzaak',\n ingangsdatum_besluit = 'ingangsdatum_besluit',\n termijn = 'termijn',\n vervaldatum_besluit = 'vervaldatum_besluit',\n zaakobject = 'zaakobject',\n}\n\nexport enum Objecttype {\n adres = 'adres',\n besluit = 'besluit',\n buurt = 'buurt',\n enkelvoudig_document = 'enkelvoudig_document',\n gemeente = 'gemeente',\n gemeentelijke_openbare_ruimte = 'gemeentelijke_openbare_ruimte',\n huishouden = 'huishouden',\n inrichtingselement = 'inrichtingselement',\n kadastrale_onroerende_zaak = 'kadastrale_onroerende_zaak',\n kunstwerkdeel = 'kunstwerkdeel',\n maatschappelijke_activiteit = 'maatschappelijke_activiteit',\n medewerker = 'medewerker',\n natuurlijk_persoon = 'natuurlijk_persoon',\n niet_natuurlijk_persoon = 'niet_natuurlijk_persoon',\n openbare_ruimte = 'openbare_ruimte',\n organisatorische_eenheid = 'organisatorische_eenheid',\n pand = 'pand',\n spoorbaandeel = 'spoorbaandeel',\n status = 'status',\n terreindeel = 'terreindeel',\n terrein_gebouwd_object = 'terrein_gebouwd_object',\n vestiging = 'vestiging',\n waterdeel = 'waterdeel',\n wegdeel = 'wegdeel',\n wijk = 'wijk',\n woonplaats = 'woonplaats',\n woz_deelobject = 'woz_deelobject',\n woz_object = 'woz_object',\n woz_waarde = 'woz_waarde',\n zakelijk_recht = 'zakelijk_recht',\n overige = 'overige',\n}\n\nexport enum Operation {\n CREATE_ZAAK = 'CREATE_ZAAK',\n SET_RESULTAAT = 'SET_RESULTAAT',\n SET_STATUS = 'SET_STATUS',\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 './upload.model';\nexport * from './uploader.model';\nexport * from './open-zaak.model';\n","/*\n * Copyright 2020 Dimpact.\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} from '@angular/common/http';\nimport {ConfigService} from '@valtimo/config';\nimport {Observable} from 'rxjs';\nimport {\n CreateInformatieObjectTypeLinkRequest,\n CreateZaakTypeLinkRequest,\n InformatieObjectType,\n InformatieObjectTypeLink,\n OpenZaakConfig,\n OpenZaakResource,\n ResourceDto,\n ServiceTaskHandlerRequest,\n ZaakType,\n ZaakTypeLink,\n ZaakTypeRequest,\n} from '../models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class OpenZaakService {\n private valtimoApiConfig: any;\n private catalogus: string;\n\n constructor(private http: HttpClient, private configService: ConfigService) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n this.catalogus = configService.config.openZaak.catalogus;\n }\n\n getOpenZaakConfig(): Observable<OpenZaakConfig> {\n return this.http.get<OpenZaakConfig>(`${this.valtimoApiConfig.endpointUri}openzaak/config`);\n }\n\n getResource(resourceId: string): Observable<ResourceDto> {\n return this.http.get<ResourceDto>(`${this.valtimoApiConfig.endpointUri}resource/${resourceId}`);\n }\n\n getZaakTypes(): Observable<ZaakType[]> {\n return this.http.get<ZaakType[]>(`${this.valtimoApiConfig.endpointUri}openzaak/zaaktype`);\n }\n\n getInformatieObjectTypes(): Observable<InformatieObjectType[]> {\n return this.http.get<InformatieObjectType[]>(\n `${this.valtimoApiConfig.endpointUri}openzaak/informatie-object-typen/${this.catalogus}`\n );\n }\n\n getZaakTypeLink(id: string): Observable<ZaakTypeLink> {\n return this.http.get<ZaakTypeLink>(`${this.valtimoApiConfig.endpointUri}openzaak/link/${id}`);\n }\n\n getInformatieObjectTypeLink(id: string): Observable<InformatieObjectTypeLink> {\n return this.http.get<InformatieObjectTypeLink>(\n `${this.valtimoApiConfig.endpointUri}openzaak/informatie-object-type-link/${id}`\n );\n }\n\n createZaakTypeLink(request: CreateZaakTypeLinkRequest): Observable<any> {\n return this.http.post<any>(`${this.valtimoApiConfig.endpointUri}openzaak/link`, request);\n }\n\n createInformatieObjectTypeLink(request: CreateInformatieObjectTypeLinkRequest): Observable<any> {\n return this.http.post<any>(\n `${this.valtimoApiConfig.endpointUri}openzaak/informatie-object-type-link`,\n request\n );\n }\n\n deleteZaakTypeLink(id: string): Observable<any> {\n return this.http.delete<any>(`${this.valtimoApiConfig.endpointUri}openzaak/link/${id}`);\n }\n\n deleteInformatieObjectTypeLink(id: string): Observable<any> {\n return this.http.delete<any>(\n `${this.valtimoApiConfig.endpointUri}openzaak/informatie-object-type-link/${id}`\n );\n }\n\n getZaakTypeLinkListByProcess(processDefinitionKey: string): Observable<any> {\n return this.http.get(\n `${this.valtimoApiConfig.endpointUri}openzaak/link/process/${processDefinitionKey}`\n );\n }\n\n getStatusTypes(zaakTypeRequest: ZaakTypeRequest): Observable<any> {\n return this.http.post(`${this.valtimoApiConfig.endpointUri}openzaak/status`, zaakTypeRequest);\n }\n\n getStatusResults(zaakTypeRequest): Observable<any> {\n return this.http.post(\n `${this.valtimoApiConfig.endpointUri}openzaak/resultaat`,\n zaakTypeRequest\n );\n }\n\n createServiceTaskHandler(id: string, request: ServiceTaskHandlerRequest): Observable<any> {\n return this.http.post<any>(\n `${this.valtimoApiConfig.endpointUri}openzaak/link/${id}/service-handler`,\n request\n );\n }\n\n modifyServiceTaskHandler(id: string, request: ServiceTaskHandlerRequest): Observable<any> {\n return this.http.put<any>(\n `${this.valtimoApiConfig.endpointUri}openzaak/link/${id}/service-handler`,\n request\n );\n }\n\n deleteServiceTaskHandler(\n id: string,\n processDefinitionKey: string,\n serviceTaskId: string\n ): Observable<any> {\n return this.http.delete<any>(\n `${this.valtimoApiConfig.endpointUri}openzaak/link/${id}/service-handler/${processDefinitionKey}/${serviceTaskId}`\n );\n }\n\n upload(file: File, documentDefinitionName: string): Observable<OpenZaakResource> {\n const formData: FormData = new FormData();\n formData.append('file', file);\n formData.append('documentDefinitionName', documentDefinitionName);\n\n return this.http.post<OpenZaakResource>(\n `${this.valtimoApiConfig.endpointUri}resource/upload-open-zaak`,\n formData,\n {\n reportProgress: true,\n responseType: 'json',\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {ConfigService} from '@valtimo/config';\nimport {Observable} from 'rxjs';\nimport {OpenZaakResource, ResourceFile, UploadService, ResourceDto} from '../models';\nimport {OpenZaakService} from './open-zaak.service';\nimport {map} from 'rxjs/operators';\n\n@Injectable()\nexport class OpenZaakUploadService implements UploadService {\n private valtimoApiConfig: any;\n\n constructor(\n private readonly openZaakService: OpenZaakService,\n private http: HttpClient,\n private configService: ConfigService\n ) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n uploadFile(file: File, documentDefinitionName: string): Observable<ResourceFile> {\n return this.openZaakService\n .upload(new File([file], file.name, {type: file.type}), documentDefinitionName)\n .pipe(map(result => this.getResourceFile(result)));\n }\n\n getResource(resourceId: string): Observable<ResourceDto> {\n return this.openZaakService.getResource(resourceId);\n }\n\n private getResourceFile(result: OpenZaakResource): ResourceFile {\n return {\n customUpload: true,\n originalName: result.name,\n size: result.sizeInBytes,\n url: '/api/resource/' + result.resourceId + '/download',\n storage: 'openZaak',\n type: result.extension,\n data: {\n createdOn: result.createdOn as any as string,\n name: result.name,\n sizeInBytes: result.sizeInBytes,\n resourceId: result.resourceId,\n extension: result.extension,\n },\n };\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient, HttpHeaders} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {ConfigService} from '@valtimo/config';\nimport {Resource, S3Resource, ResourceDto} from '../models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class S3Service {\n private valtimoApiConfig: any;\n\n constructor(private http: HttpClient, private configService: ConfigService) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n public getPreSignedUrl(fileName: string): Observable<string> {\n const headers = new HttpHeaders().set('Content-Type', 'text/plain; charset=utf-8');\n const options = {headers, responseType: 'text' as 'text'};\n return this.http.get(\n `${this.valtimoApiConfig.endpointUri}resource/pre-signed-url/${fileName}`,\n options\n );\n }\n\n public upload(url: URL, file: File): Observable<any> {\n const headers = new HttpHeaders().set('Content-Type', file.type);\n return this.http.put(url.toString(), file, {headers: headers});\n }\n\n public registerResource(s3ResourceDTO: S3Resource): Observable<Resource> {\n return this.http.put<Resource>(`${this.valtimoApiConfig.endpointUri}resource`, s3ResourceDTO);\n }\n\n public get(resourceId: string): Observable<ResourceDto> {\n const headers = new HttpHeaders().set('Content-Type', 'application/json;charset=UTF-8');\n return this.http.get<ResourceDto>(\n `${this.valtimoApiConfig.endpointUri}resource/${resourceId}`,\n {headers: headers}\n );\n }\n\n public delete(resourceId: string): Observable<any> {\n const headers = new HttpHeaders().set('Content-Type', 'application/json;charset=UTF-8');\n return this.http.delete(`${this.valtimoApiConfig.endpointUri}resource/${resourceId}`, {\n headers: headers,\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Observable} from 'rxjs';\nimport {map, switchMap, tap} from 'rxjs/operators';\nimport {ResourceDto, ResourceFile, S3Resource, UploadService} from '../models';\nimport {Injectable} from '@angular/core';\nimport {v4 as uuidv4} from 'uuid';\nimport {S3Service} from './s3.service';\n\n@Injectable()\nexport class S3UploadService implements UploadService {\n constructor(private readonly s3Service: S3Service) {}\n\n uploadFile(file: File): Observable<ResourceFile> {\n let resourceUrl: URL;\n const fileName = file.name;\n const splitFileName = fileName.split('.');\n const fileNameWithUUID = `${splitFileName[0]}-${uuidv4()}.${splitFileName[1]}`;\n const renamedFile = new File([file], fileNameWithUUID, {type: file.type});\n\n return this.s3Service.getPreSignedUrl(renamedFile.name).pipe(\n map(url => new URL(url)),\n tap(url => (resourceUrl = url)),\n switchMap(url => this.s3Service.upload(url, renamedFile)),\n map(() => new S3Resource(file, resourceUrl)),\n switchMap(s3Resource => this.s3Service.registerResource(s3Resource)),\n switchMap(s3Resource => this.s3Service.get(s3Resource.id)),\n map(result => ({...result, originalName: file.name})),\n map(result => this.getResourceFile(result))\n );\n }\n\n getResource(resourceId: string): Observable<ResourceDto> {\n return this.s3Service.get(resourceId);\n }\n\n private getResourceFile(result: ResourceDto): ResourceFile {\n return {\n customUpload: true,\n originalName: result.originalName,\n url: result.url,\n size: result.resource.sizeInBytes,\n storage: 'url',\n type: result.resource.extension,\n data: {\n key: result.resource.key,\n bucketName: result.resource.name,\n createdOn: result.resource.createdOn as any as string,\n name: result.originalName,\n sizeInBytes: result.resource.sizeInBytes,\n resourceId: result.resource.id.split('ResourceId(id=')[1].slice(0, -1),\n },\n };\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable, Injector} from '@angular/core';\nimport {NGXLogger} from 'ngx-logger';\nimport {ResourceFile, UploadService, ResourceDto} from '../models';\nimport {ConfigService, UploadProvider} from '@valtimo/config';\nimport {Observable} from 'rxjs';\nimport {OpenZaakUploadService} from './open-zaak-upload.service';\nimport {S3UploadService} from './s3-upload.service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UploadProviderService implements UploadService {\n private readonly uploadService: UploadService;\n\n constructor(\n private configService: ConfigService,\n private injector: Injector,\n private logger: NGXLogger\n ) {\n this.uploadService =\n configService.config.uploadProvider === UploadProvider.S3\n ? injector.get<UploadService>(S3UploadService)\n : injector.get<UploadService>(OpenZaakUploadService);\n this.logger.debug('Loading UploadService as', this.uploadService);\n }\n\n uploadFile(file: File, documentDefinitionName?: string): Observable<ResourceFile> {\n return this.uploadService.uploadFile(file, documentDefinitionName);\n }\n\n getResource(resourceId: string): Observable<ResourceDto> {\n return this.uploadService.getResource(resourceId);\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 {Injectable} from '@angular/core';\nimport {ConfigService} from '@valtimo/config';\nimport {HttpClient} from '@angular/common/http';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DownloadService {\n constructor(private http: HttpClient, private configService: ConfigService) {}\n\n downloadFile(url: string, name: string) {\n if (\n url.startsWith(this.configService.config.valtimoApi.endpointUri) ||\n url.startsWith(window.location.origin)\n ) {\n // if download url is on backend use angular to get the content so access token is used\n this.http.get(url, {responseType: 'blob'}).subscribe(content => {\n const downloadUrl = window.URL.createObjectURL(content);\n this.openDownloadLink(downloadUrl, name);\n });\n } else {\n // download links to external services (like amazon s3) open in a new window\n this.openDownloadLink(url, name);\n }\n }\n\n private openDownloadLink(url: string, name: string) {\n const link = document.createElement('a');\n link.href = url;\n link.download = name;\n link.target = '_blank';\n link.click();\n link.remove();\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';\nimport {OpenZaakUploadService} from './services/open-zaak-upload.service';\nimport {S3UploadService} from './services/s3-upload.service';\nimport {UploadProviderService} from './services/upload-provider.service';\nimport {OpenZaakService} from './services/open-zaak.service';\nimport {S3Service} from './services/s3.service';\nimport {DownloadService} from './services/download.service';\n\n@NgModule({\n declarations: [],\n imports: [],\n exports: [],\n providers: [\n OpenZaakUploadService,\n S3UploadService,\n UploadProviderService,\n OpenZaakService,\n S3Service,\n DownloadService,\n ],\n})\nexport class ResourceModule {}\n","/*\n * Public API Surface of upload\n */\n\nexport * from './lib/models';\nexport * from './lib/resource.module';\nexport * from './lib/services/open-zaak.service';\nexport * from './lib/services/upload-provider.service';\nexport * from './lib/services/s3.service';\nexport * from './lib/services/download.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {OpenZaakUploadService as ɵa} from './lib/services/open-zaak-upload.service';\nexport {S3UploadService as ɵb} from './lib/services/s3-upload.service';"],"names":["Archiefnominatie","Afleidingswijze","Objecttype","Operation","Injectable","HttpClient","ConfigService","map","HttpHeaders","uuidv4","tap","switchMap","UploadProvider","Injector","NGXLogger","NgModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;QAgDE,oBAAY,IAAU,EAAE,YAAiB;YAPzC,OAAE,GAAY,IAAI,CAAC;YAInB,cAAS,GAAY,IAAI,CAAC;YAC1B,cAAS,GAAU,IAAI,CAAC;YAGtB,IAAI,CAAC,GAAG,GAAG,kBAAkB,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;YAClE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAA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,CAAC,CAAC;oBACxD,KAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;iBAC1C,CAAC,CAAC;aACJ;iBAAM;;gBAEL,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;aAClC;SACF;QAEO,0CAAgB,GAAhB,UAAiB,GAAW,EAAE,IAAY;YAChD,IAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;YACzC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;YAChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACrB,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;YACvB,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,IAAI,CAAC,MAAM,EAAE,CAAC;SACf;;;;;gBA7BFV,aAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;gBAJOC,aAAU;gBADVC,gBAAa;;;ICjBrB;;;;;;;;;;;;;;;;QAqCA;;;;;gBAbCS,WAAQ,SAAC;oBACR,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,EAAE;oBACX,SAAS,EAAE;wBACT,qBAAqB;wBACrB,eAAe;wBACf,qBAAqB;wBACrB,eAAe;wBACf,SAAS;wBACT,eAAe;qBAChB;iBACF;;;ICpCD;;;;ICAA;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common/http"),require("@valtimo/config"),require("rxjs/operators"),require("@valtimo/contract"),require("uuid"),require("ngx-logger")):"function"==typeof define&&define.amd?define("@valtimo/resource",["exports","@angular/core","@angular/common/http","@valtimo/config","rxjs/operators","@valtimo/contract","uuid","ngx-logger"],t):t(((e=e||self).valtimo=e.valtimo||{},e.valtimo.resource={}),e.ng.core,e.ng.common.http,e.i2,e.rxjs.operators,e.contract,e.uuid,e.i2$1)}(this,(function(e,t,i,n,o,r,p,a){"use strict";var c=function(){function e(e,t){this.http=e,this.configService=t,this.valtimoApiConfig=t.config.valtimoApi,this.catalogus=t.config.openZaak.catalogus}return e.prototype.getOpenZaakConfig=function(){return this.http.get(this.valtimoApiConfig.endpointUri+"openzaak/config")},e.prototype.getResource=function(e){return this.http.get(this.valtimoApiConfig.endpointUri+"resource/"+e)},e.prototype.createOpenZaakConfig=function(e){return this.http.post(this.valtimoApiConfig.endpointUri+"openzaak/config",e)},e.prototype.modifyOpenZaakConfig=function(e){return this.http.put(this.valtimoApiConfig.endpointUri+"openzaak/config",e)},e.prototype.deleteOpenZaakConfig=function(){return this.http.delete(this.valtimoApiConfig.endpointUri+"openzaak/config")},e.prototype.getZaakTypes=function(){return this.http.get(this.valtimoApiConfig.endpointUri+"openzaak/zaaktype")},e.prototype.getInformatieObjectTypes=function(){return this.http.get(this.valtimoApiConfig.endpointUri+"openzaak/informatie-object-typen/"+this.catalogus)},e.prototype.getZaakTypeLink=function(e){return this.http.get(this.valtimoApiConfig.endpointUri+"openzaak/link/"+e)},e.prototype.getInformatieObjectTypeLink=function(e){return this.http.get(this.valtimoApiConfig.endpointUri+"openzaak/informatie-object-type-link/"+e)},e.prototype.createZaakTypeLink=function(e){return this.http.post(this.valtimoApiConfig.endpointUri+"openzaak/link",e)},e.prototype.createInformatieObjectTypeLink=function(e){return this.http.post(this.valtimoApiConfig.endpointUri+"openzaak/informatie-object-type-link",e)},e.prototype.deleteZaakTypeLink=function(e){return this.http.delete(this.valtimoApiConfig.endpointUri+"openzaak/link/"+e)},e.prototype.deleteInformatieObjectTypeLink=function(e){return this.http.delete(this.valtimoApiConfig.endpointUri+"openzaak/informatie-object-type-link/"+e)},e.prototype.getZaakTypeLinkListByProcess=function(e){return this.http.get(this.valtimoApiConfig.endpointUri+"openzaak/link/process/"+e)},e.prototype.getStatusTypes=function(e){return this.http.post(this.valtimoApiConfig.endpointUri+"openzaak/status",e)},e.prototype.getStatusResults=function(e){return this.http.post(this.valtimoApiConfig.endpointUri+"openzaak/resultaat",e)},e.prototype.createServiceTaskHandler=function(e,t){return this.http.post(this.valtimoApiConfig.endpointUri+"openzaak/link/"+e+"/service-handler",t)},e.prototype.modifyServiceTaskHandler=function(e,t){return this.http.put(this.valtimoApiConfig.endpointUri+"openzaak/link/"+e+"/service-handler",t)},e.prototype.deleteServiceTaskHandler=function(e,t){return this.http.delete(this.valtimoApiConfig.endpointUri+"openzaak/link/"+e+"/service-handler/"+t)},e.prototype.upload=function(e,t){var i=new FormData;return i.append("file",e),i.append("documentDefinitionName",t),this.http.post(this.valtimoApiConfig.endpointUri+"resource/upload-open-zaak",i,{reportProgress:!0,responseType:"json"})},e}();c.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new c(t.ɵɵinject(i.HttpClient),t.ɵɵinject(n.ConfigService))},token:c,providedIn:"root"}),c.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],c.ctorParameters=function(){return[{type:i.HttpClient},{type:n.ConfigService}]};var s=function(){function e(e,t,i){this.openZaakService=e,this.http=t,this.configService=i,this.valtimoApiConfig=i.config.valtimoApi}return e.prototype.uploadFile=function(e,t){var i=this;return this.openZaakService.upload(new File([e],e.name,{type:e.type}),t).pipe(o.map((function(e){return i.getResourceFile(e)})))},e.prototype.getResource=function(e){return this.openZaakService.getResource(e)},e.prototype.getResourceFile=function(e){return{customUpload:!0,originalName:e.name,size:e.sizeInBytes,url:"/api/resource/"+e.resourceId+"/download",storage:"openZaak",type:e.extension,data:{createdOn:e.createdOn,name:e.name,sizeInBytes:e.sizeInBytes,resourceId:e.resourceId,extension:e.extension}}},e}();s.decorators=[{type:t.Injectable}],s.ctorParameters=function(){return[{type:c},{type:i.HttpClient},{type:n.ConfigService}]};var u=function(){function e(e,t){this.http=e,this.configService=t,this.valtimoApiConfig=t.config.valtimoApi}return e.prototype.getPreSignedUrl=function(e){var t={headers:(new i.HttpHeaders).set("Content-Type","text/plain; charset=utf-8"),responseType:"text"};return this.http.get(this.valtimoApiConfig.endpointUri+"resource/pre-signed-url/"+e,t)},e.prototype.upload=function(e,t){var n=(new i.HttpHeaders).set("Content-Type",t.type);return this.http.put(e.toString(),t,{headers:n})},e.prototype.registerResource=function(e){return this.http.put(this.valtimoApiConfig.endpointUri+"resource",e)},e.prototype.get=function(e){var t=(new i.HttpHeaders).set("Content-Type","application/json;charset=UTF-8");return this.http.get(this.valtimoApiConfig.endpointUri+"resource/"+e,{headers:t})},e.prototype.delete=function(e){var t=(new i.HttpHeaders).set("Content-Type","application/json;charset=UTF-8");return this.http.delete(this.valtimoApiConfig.endpointUri+"resource/"+e,{headers:t})},e}();u.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new u(t.ɵɵinject(i.HttpClient),t.ɵɵinject(n.ConfigService))},token:u,providedIn:"root"}),u.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],u.ctorParameters=function(){return[{type:i.HttpClient},{type:n.ConfigService}]};var l=function(){function e(e){this.s3Service=e}return e.prototype.uploadFile=function(e){var t,i=this,n=e.name.split("."),a=n[0]+"-"+p.v4()+"."+n[1],c=new File([e],a,{type:e.type});return this.s3Service.getPreSignedUrl(c.name).pipe(o.map((function(e){return new URL(e)})),o.tap((function(e){return t=e})),o.switchMap((function(e){return i.s3Service.upload(e,c)})),o.map((function(){return new r.S3Resource(e,t)})),o.switchMap((function(e){return i.s3Service.registerResource(e)})),o.switchMap((function(e){return i.s3Service.get(e.id)})),o.map((function(t){return Object.assign(Object.assign({},t),{originalName:e.name})})),o.map((function(e){return i.getResourceFile(e)})))},e.prototype.getResource=function(e){return this.s3Service.get(e)},e.prototype.getResourceFile=function(e){return{customUpload:!0,originalName:e.originalName,url:e.url,size:e.resource.sizeInBytes,storage:"url",type:e.resource.extension,data:{key:e.resource.key,bucketName:e.resource.name,createdOn:e.resource.createdOn,name:e.originalName,sizeInBytes:e.resource.sizeInBytes,resourceId:e.resource.id.split("ResourceId(id=")[1].slice(0,-1)}}},e}();l.decorators=[{type:t.Injectable}],l.ctorParameters=function(){return[{type:u}]};var f=function(){function e(e,t,i){this.configService=e,this.injector=t,this.logger=i,this.uploadService=e.config.uploadProvider===r.UploadProvider.S3?t.get(l):t.get(s),this.logger.debug("Loading UploadService as",this.uploadService)}return e.prototype.uploadFile=function(e,t){return this.uploadService.uploadFile(e,t)},e.prototype.getResource=function(e){return this.uploadService.getResource(e)},e}();f.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new f(t.ɵɵinject(n.ConfigService),t.ɵɵinject(t.INJECTOR),t.ɵɵinject(a.NGXLogger))},token:f,providedIn:"root"}),f.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],f.ctorParameters=function(){return[{type:n.ConfigService},{type:t.Injector},{type:a.NGXLogger}]};var d=function(){function e(e,t){this.http=e,this.configService=t}return e.prototype.downloadFile=function(e,t){var i=this;e.startsWith(this.configService.config.valtimoApi.endpointUri)||e.startsWith(window.location.origin)?this.http.get(e,{responseType:"blob"}).subscribe((function(e){var n=window.URL.createObjectURL(e);i.openDownloadLink(n,t)})):this.openDownloadLink(e,t)},e.prototype.openDownloadLink=function(e,t){var i=document.createElement("a");i.href=e,i.download=t,i.target="_blank",i.click(),i.remove()},e}();d.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new d(t.ɵɵinject(i.HttpClient),t.ɵɵinject(n.ConfigService))},token:d,providedIn:"root"}),d.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],d.ctorParameters=function(){return[{type:i.HttpClient},{type:n.ConfigService}]};var g=function(){};g.decorators=[{type:t.NgModule,args:[{declarations:[],imports:[],exports:[],providers:[s,l,f,c,u,d]}]}],e.DownloadService=d,e.OpenZaakService=c,e.ResourceModule=g,e.S3Service=u,e.UploadProviderService=f,e.ɵa=s,e.ɵb=l,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common/http"),require("@valtimo/config"),require("rxjs/operators"),require("uuid"),require("ngx-logger")):"function"==typeof define&&define.amd?define("@valtimo/resource",["exports","@angular/core","@angular/common/http","@valtimo/config","rxjs/operators","uuid","ngx-logger"],t):t(((e=e||self).valtimo=e.valtimo||{},e.valtimo.resource={}),e.ng.core,e.ng.common.http,e.i2,e.rxjs.operators,e.uuid,e.i2$1)}(this,(function(e,t,n,i,o,r,a){"use strict";var p,s,c,u,l=function(e,t){this.id=null,this.extension=null,this.createdOn=null,this.key=decodeURIComponent(t.pathname.substring(1)),this.name=e.name,this.sizeInBytes=e.size},d=function(){};(p=e.Archiefnominatie||(e.Archiefnominatie={})).blijvend_bewaren="blijven_bewaren",p.vernietigen="vernietigen",(s=e.Afleidingswijze||(e.Afleidingswijze={})).afgehandeld="afgehandeld",s.ander_datumkenmerk="ander_datumkenmerk",s.eigenschap="eigenschap",s.gerelateerde_zaak="gerelateerde_zaak",s.hoofdzaak="hoofdzaak",s.ingangsdatum_besluit="ingangsdatum_besluit",s.termijn="termijn",s.vervaldatum_besluit="vervaldatum_besluit",s.zaakobject="zaakobject",(c=e.Objecttype||(e.Objecttype={})).adres="adres",c.besluit="besluit",c.buurt="buurt",c.enkelvoudig_document="enkelvoudig_document",c.gemeente="gemeente",c.gemeentelijke_openbare_ruimte="gemeentelijke_openbare_ruimte",c.huishouden="huishouden",c.inrichtingselement="inrichtingselement",c.kadastrale_onroerende_zaak="kadastrale_onroerende_zaak",c.kunstwerkdeel="kunstwerkdeel",c.maatschappelijke_activiteit="maatschappelijke_activiteit",c.medewerker="medewerker",c.natuurlijk_persoon="natuurlijk_persoon",c.niet_natuurlijk_persoon="niet_natuurlijk_persoon",c.openbare_ruimte="openbare_ruimte",c.organisatorische_eenheid="organisatorische_eenheid",c.pand="pand",c.spoorbaandeel="spoorbaandeel",c.status="status",c.terreindeel="terreindeel",c.terrein_gebouwd_object="terrein_gebouwd_object",c.vestiging="vestiging",c.waterdeel="waterdeel",c.wegdeel="wegdeel",c.wijk="wijk",c.woonplaats="woonplaats",c.woz_deelobject="woz_deelobject",c.woz_object="woz_object",c.woz_waarde="woz_waarde",c.zakelijk_recht="zakelijk_recht",c.overige="overige",(u=e.Operation||(e.Operation={})).CREATE_ZAAK="CREATE_ZAAK",u.SET_RESULTAAT="SET_RESULTAAT",u.SET_STATUS="SET_STATUS";var g=function(){function e(e,t){this.http=e,this.configService=t,this.valtimoApiConfig=t.config.valtimoApi,this.catalogus=t.config.openZaak.catalogus}return e.prototype.getOpenZaakConfig=function(){return this.http.get(this.valtimoApiConfig.endpointUri+"openzaak/config")},e.prototype.getResource=function(e){return this.http.get(this.valtimoApiConfig.endpointUri+"resource/"+e)},e.prototype.getZaakTypes=function(){return this.http.get(this.valtimoApiConfig.endpointUri+"openzaak/zaaktype")},e.prototype.getInformatieObjectTypes=function(){return this.http.get(this.valtimoApiConfig.endpointUri+"openzaak/informatie-object-typen/"+this.catalogus)},e.prototype.getZaakTypeLink=function(e){return this.http.get(this.valtimoApiConfig.endpointUri+"openzaak/link/"+e)},e.prototype.getInformatieObjectTypeLink=function(e){return this.http.get(this.valtimoApiConfig.endpointUri+"openzaak/informatie-object-type-link/"+e)},e.prototype.createZaakTypeLink=function(e){return this.http.post(this.valtimoApiConfig.endpointUri+"openzaak/link",e)},e.prototype.createInformatieObjectTypeLink=function(e){return this.http.post(this.valtimoApiConfig.endpointUri+"openzaak/informatie-object-type-link",e)},e.prototype.deleteZaakTypeLink=function(e){return this.http.delete(this.valtimoApiConfig.endpointUri+"openzaak/link/"+e)},e.prototype.deleteInformatieObjectTypeLink=function(e){return this.http.delete(this.valtimoApiConfig.endpointUri+"openzaak/informatie-object-type-link/"+e)},e.prototype.getZaakTypeLinkListByProcess=function(e){return this.http.get(this.valtimoApiConfig.endpointUri+"openzaak/link/process/"+e)},e.prototype.getStatusTypes=function(e){return this.http.post(this.valtimoApiConfig.endpointUri+"openzaak/status",e)},e.prototype.getStatusResults=function(e){return this.http.post(this.valtimoApiConfig.endpointUri+"openzaak/resultaat",e)},e.prototype.createServiceTaskHandler=function(e,t){return this.http.post(this.valtimoApiConfig.endpointUri+"openzaak/link/"+e+"/service-handler",t)},e.prototype.modifyServiceTaskHandler=function(e,t){return this.http.put(this.valtimoApiConfig.endpointUri+"openzaak/link/"+e+"/service-handler",t)},e.prototype.deleteServiceTaskHandler=function(e,t,n){return this.http.delete(this.valtimoApiConfig.endpointUri+"openzaak/link/"+e+"/service-handler/"+t+"/"+n)},e.prototype.upload=function(e,t){var n=new FormData;return n.append("file",e),n.append("documentDefinitionName",t),this.http.post(this.valtimoApiConfig.endpointUri+"resource/upload-open-zaak",n,{reportProgress:!0,responseType:"json"})},e}();g.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new g(t.ɵɵinject(n.HttpClient),t.ɵɵinject(i.ConfigService))},token:g,providedIn:"root"}),g.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],g.ctorParameters=function(){return[{type:n.HttpClient},{type:i.ConfigService}]};var f=function(){function e(e,t,n){this.openZaakService=e,this.http=t,this.configService=n,this.valtimoApiConfig=n.config.valtimoApi}return e.prototype.uploadFile=function(e,t){var n=this;return this.openZaakService.upload(new File([e],e.name,{type:e.type}),t).pipe(o.map((function(e){return n.getResourceFile(e)})))},e.prototype.getResource=function(e){return this.openZaakService.getResource(e)},e.prototype.getResourceFile=function(e){return{customUpload:!0,originalName:e.name,size:e.sizeInBytes,url:"/api/resource/"+e.resourceId+"/download",storage:"openZaak",type:e.extension,data:{createdOn:e.createdOn,name:e.name,sizeInBytes:e.sizeInBytes,resourceId:e.resourceId,extension:e.extension}}},e}();f.decorators=[{type:t.Injectable}],f.ctorParameters=function(){return[{type:g},{type:n.HttpClient},{type:i.ConfigService}]};var h=function(){function e(e,t){this.http=e,this.configService=t,this.valtimoApiConfig=t.config.valtimoApi}return e.prototype.getPreSignedUrl=function(e){var t={headers:(new n.HttpHeaders).set("Content-Type","text/plain; charset=utf-8"),responseType:"text"};return this.http.get(this.valtimoApiConfig.endpointUri+"resource/pre-signed-url/"+e,t)},e.prototype.upload=function(e,t){var i=(new n.HttpHeaders).set("Content-Type",t.type);return this.http.put(e.toString(),t,{headers:i})},e.prototype.registerResource=function(e){return this.http.put(this.valtimoApiConfig.endpointUri+"resource",e)},e.prototype.get=function(e){var t=(new n.HttpHeaders).set("Content-Type","application/json;charset=UTF-8");return this.http.get(this.valtimoApiConfig.endpointUri+"resource/"+e,{headers:t})},e.prototype.delete=function(e){var t=(new n.HttpHeaders).set("Content-Type","application/json;charset=UTF-8");return this.http.delete(this.valtimoApiConfig.endpointUri+"resource/"+e,{headers:t})},e}();h.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new h(t.ɵɵinject(n.HttpClient),t.ɵɵinject(i.ConfigService))},token:h,providedIn:"root"}),h.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],h.ctorParameters=function(){return[{type:n.HttpClient},{type:i.ConfigService}]};var v=function(){function e(e){this.s3Service=e}return e.prototype.uploadFile=function(e){var t,n=this,i=e.name.split("."),a=i[0]+"-"+r.v4()+"."+i[1],p=new File([e],a,{type:e.type});return this.s3Service.getPreSignedUrl(p.name).pipe(o.map((function(e){return new URL(e)})),o.tap((function(e){return t=e})),o.switchMap((function(e){return n.s3Service.upload(e,p)})),o.map((function(){return new l(e,t)})),o.switchMap((function(e){return n.s3Service.registerResource(e)})),o.switchMap((function(e){return n.s3Service.get(e.id)})),o.map((function(t){return Object.assign(Object.assign({},t),{originalName:e.name})})),o.map((function(e){return n.getResourceFile(e)})))},e.prototype.getResource=function(e){return this.s3Service.get(e)},e.prototype.getResourceFile=function(e){return{customUpload:!0,originalName:e.originalName,url:e.url,size:e.resource.sizeInBytes,storage:"url",type:e.resource.extension,data:{key:e.resource.key,bucketName:e.resource.name,createdOn:e.resource.createdOn,name:e.originalName,sizeInBytes:e.resource.sizeInBytes,resourceId:e.resource.id.split("ResourceId(id=")[1].slice(0,-1)}}},e}();v.decorators=[{type:t.Injectable}],v.ctorParameters=function(){return[{type:h}]};var m=function(){function e(e,t,n){this.configService=e,this.injector=t,this.logger=n,this.uploadService=e.config.uploadProvider===i.UploadProvider.S3?t.get(v):t.get(f),this.logger.debug("Loading UploadService as",this.uploadService)}return e.prototype.uploadFile=function(e,t){return this.uploadService.uploadFile(e,t)},e.prototype.getResource=function(e){return this.uploadService.getResource(e)},e}();m.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new m(t.ɵɵinject(i.ConfigService),t.ɵɵinject(t.INJECTOR),t.ɵɵinject(a.NGXLogger))},token:m,providedIn:"root"}),m.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],m.ctorParameters=function(){return[{type:i.ConfigService},{type:t.Injector},{type:a.NGXLogger}]};var y=function(){function e(e,t){this.http=e,this.configService=t}return e.prototype.downloadFile=function(e,t){var n=this;e.startsWith(this.configService.config.valtimoApi.endpointUri)||e.startsWith(window.location.origin)?this.http.get(e,{responseType:"blob"}).subscribe((function(e){var i=window.URL.createObjectURL(e);n.openDownloadLink(i,t)})):this.openDownloadLink(e,t)},e.prototype.openDownloadLink=function(e,t){var n=document.createElement("a");n.href=e,n.download=t,n.target="_blank",n.click(),n.remove()},e}();y.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new y(t.ɵɵinject(n.HttpClient),t.ɵɵinject(i.ConfigService))},token:y,providedIn:"root"}),y.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],y.ctorParameters=function(){return[{type:n.HttpClient},{type:i.ConfigService}]};var k=function(){};k.decorators=[{type:t.NgModule,args:[{declarations:[],imports:[],exports:[],providers:[f,v,m,g,h,y]}]}],e.DownloadService=y,e.OpenZaakConfig=d,e.OpenZaakService=g,e.ResourceModule=k,e.S3Resource=l,e.S3Service=h,e.UploadProviderService=m,e.ɵa=f,e.ɵb=v,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=valtimo-resource.umd.min.js.map