@valtimo/resource 4.15.3-next-main.14 → 4.16.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.
- package/README.md +13 -6
- package/bundles/valtimo-resource.umd.js +172 -23
- package/bundles/valtimo-resource.umd.js.map +1 -1
- package/bundles/valtimo-resource.umd.min.js +1 -1
- package/bundles/valtimo-resource.umd.min.js.map +1 -1
- package/esm2015/lib/models/index.js +21 -0
- package/esm2015/lib/models/open-zaak.model.js +75 -0
- package/esm2015/lib/models/upload.model.js +16 -0
- package/esm2015/lib/models/uploader.model.js +26 -0
- package/esm2015/lib/resource.module.js +9 -2
- package/esm2015/lib/services/download.service.js +4 -3
- package/esm2015/lib/services/open-zaak-upload.service.js +6 -4
- package/esm2015/lib/services/open-zaak.service.js +3 -3
- package/esm2015/lib/services/s3-upload.service.js +5 -5
- package/esm2015/lib/services/s3.service.js +6 -5
- package/esm2015/lib/services/upload-provider.service.js +7 -7
- package/esm2015/public-api.js +2 -1
- package/esm2015/valtimo-resource.js +1 -1
- package/fesm2015/valtimo-resource.js +168 -22
- package/fesm2015/valtimo-resource.js.map +1 -1
- package/lib/models/index.d.ts +3 -0
- package/lib/models/open-zaak.model.d.ts +146 -0
- package/lib/models/upload.model.d.ts +27 -0
- package/lib/models/uploader.model.d.ts +30 -0
- package/lib/services/open-zaak-upload.service.d.ts +1 -1
- package/lib/services/open-zaak.service.d.ts +1 -1
- package/lib/services/s3-upload.service.d.ts +1 -1
- package/lib/services/s3.service.d.ts +1 -1
- package/lib/services/upload-provider.service.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/valtimo-resource.metadata.json +1 -1
|
@@ -31,8 +31,7 @@ export class S3Service {
|
|
|
31
31
|
return this.http.get(`${this.valtimoApiConfig.endpointUri}resource/pre-signed-url/${fileName}`, options);
|
|
32
32
|
}
|
|
33
33
|
upload(url, file) {
|
|
34
|
-
const headers = new HttpHeaders()
|
|
35
|
-
.set('Content-Type', file.type);
|
|
34
|
+
const headers = new HttpHeaders().set('Content-Type', file.type);
|
|
36
35
|
return this.http.put(url.toString(), file, { headers: headers });
|
|
37
36
|
}
|
|
38
37
|
registerResource(s3ResourceDTO) {
|
|
@@ -44,17 +43,19 @@ export class S3Service {
|
|
|
44
43
|
}
|
|
45
44
|
delete(resourceId) {
|
|
46
45
|
const headers = new HttpHeaders().set('Content-Type', 'application/json;charset=UTF-8');
|
|
47
|
-
return this.http.delete(`${this.valtimoApiConfig.endpointUri}resource/${resourceId}`, {
|
|
46
|
+
return this.http.delete(`${this.valtimoApiConfig.endpointUri}resource/${resourceId}`, {
|
|
47
|
+
headers: headers,
|
|
48
|
+
});
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
S3Service.ɵprov = i0.ɵɵdefineInjectable({ factory: function S3Service_Factory() { return new S3Service(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.ConfigService)); }, token: S3Service, providedIn: "root" });
|
|
51
52
|
S3Service.decorators = [
|
|
52
53
|
{ type: Injectable, args: [{
|
|
53
|
-
providedIn: 'root'
|
|
54
|
+
providedIn: 'root',
|
|
54
55
|
},] }
|
|
55
56
|
];
|
|
56
57
|
S3Service.ctorParameters = () => [
|
|
57
58
|
{ type: HttpClient },
|
|
58
59
|
{ type: ConfigService }
|
|
59
60
|
];
|
|
60
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
61
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiczMuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIvdG1wL2plbmtpbnMtNGMzYmI3NzAvd29ya3NwYWNlL1ZhbHRpbW9fLV9Bbmd1bGFyX0xpYnJhcmllc19tYWluL3Byb2plY3RzL3ZhbHRpbW8vcmVzb3VyY2Uvc3JjLyIsInNvdXJjZXMiOlsibGliL3NlcnZpY2VzL3MzLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI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7XG4gICAgICBoZWFkZXJzOiBoZWFkZXJzLFxuICAgIH0pO1xuICB9XG59XG4iXX0=
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { Injectable, Injector } from '@angular/core';
|
|
17
17
|
import { NGXLogger } from 'ngx-logger';
|
|
18
|
-
import { UploadProvider } from '@valtimo/
|
|
19
|
-
import { ConfigService } from '@valtimo/config';
|
|
18
|
+
import { ConfigService, UploadProvider } from '@valtimo/config';
|
|
20
19
|
import { OpenZaakUploadService } from './open-zaak-upload.service';
|
|
21
20
|
import { S3UploadService } from './s3-upload.service';
|
|
22
21
|
import * as i0 from "@angular/core";
|
|
@@ -27,9 +26,10 @@ export class UploadProviderService {
|
|
|
27
26
|
this.configService = configService;
|
|
28
27
|
this.injector = injector;
|
|
29
28
|
this.logger = logger;
|
|
30
|
-
this.uploadService =
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
this.uploadService =
|
|
30
|
+
configService.config.uploadProvider === UploadProvider.S3
|
|
31
|
+
? injector.get(S3UploadService)
|
|
32
|
+
: injector.get(OpenZaakUploadService);
|
|
33
33
|
this.logger.debug('Loading UploadService as', this.uploadService);
|
|
34
34
|
}
|
|
35
35
|
uploadFile(file, documentDefinitionName) {
|
|
@@ -42,7 +42,7 @@ export class UploadProviderService {
|
|
|
42
42
|
UploadProviderService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UploadProviderService_Factory() { return new UploadProviderService(i0.ɵɵinject(i1.ConfigService), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i2.NGXLogger)); }, token: UploadProviderService, providedIn: "root" });
|
|
43
43
|
UploadProviderService.decorators = [
|
|
44
44
|
{ type: Injectable, args: [{
|
|
45
|
-
providedIn: 'root'
|
|
45
|
+
providedIn: 'root',
|
|
46
46
|
},] }
|
|
47
47
|
];
|
|
48
48
|
UploadProviderService.ctorParameters = () => [
|
|
@@ -50,4 +50,4 @@ UploadProviderService.ctorParameters = () => [
|
|
|
50
50
|
{ type: Injector },
|
|
51
51
|
{ type: NGXLogger }
|
|
52
52
|
];
|
|
53
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBsb2FkLXByb3ZpZGVyLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiL3RtcC9qZW5raW5zLTRjM2JiNzcwL3dvcmtzcGFjZS9WYWx0aW1vXy1fQW5ndWxhcl9MaWJyYXJpZXNfbWFpbi9wcm9qZWN0cy92YWx0aW1vL3Jlc291cmNlL3NyYy8iLCJzb3VyY2VzIjpbImxpYi9zZXJ2aWNlcy91cGxvYWQtcHJvdmlkZXIuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUVILE9BQU8sRUFBQyxVQUFVLEVBQUUsUUFBUSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ25ELE9BQU8sRUFBQyxTQUFTLEVBQUMsTUFBTSxZQUFZLENBQUM7QUFFckMsT0FBTyxFQUFDLGFBQWEsRUFBRSxjQUFjLEVBQUMsTUFBTSxpQkFBaUIsQ0FBQztBQUU5RCxPQUFPLEVBQUMscUJBQXFCLEVBQUMsTUFBTSw0QkFBNEIsQ0FBQztBQUNqRSxPQUFPLEVBQUMsZUFBZSxFQUFDLE1BQU0scUJBQXFCLENBQUM7Ozs7QUFLcEQsTUFBTSxPQUFPLHFCQUFxQjtJQUdoQyxZQUNVLGFBQTRCLEVBQzVCLFFBQWtCLEVBQ2xCLE1BQWlCO1FBRmpCLGtCQUFhLEdBQWIsYUFBYSxDQUFlO1FBQzVCLGFBQVEsR0FBUixRQUFRLENBQVU7UUFDbEIsV0FBTSxHQUFOLE1BQU0sQ0FBVztRQUV6QixJQUFJLENBQUMsYUFBYTtZQUNoQixhQUFhLENBQUMsTUFBTSxDQUFDLGNBQWMsS0FBSyxjQUFjLENB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esm2015/public-api.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Public API Surface of upload
|
|
3
3
|
*/
|
|
4
|
+
export * from './lib/models';
|
|
4
5
|
export * from './lib/resource.module';
|
|
5
6
|
export * from './lib/services/open-zaak.service';
|
|
6
7
|
export * from './lib/services/upload-provider.service';
|
|
7
8
|
export * from './lib/services/s3.service';
|
|
8
9
|
export * from './lib/services/download.service';
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIvdG1wL2plbmtpbnMtNGMzYmI3NzAvd29ya3NwYWNlL1ZhbHRpbW9fLV9Bbmd1bGFyX0xpYnJhcmllc19tYWluL3Byb2plY3RzL3ZhbHRpbW8vcmVzb3VyY2Uvc3JjLyIsInNvdXJjZXMiOlsicHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDO0FBQzdCLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYyxrQ0FBa0MsQ0FBQztBQUNqRCxjQUFjLHdDQUF3QyxDQUFDO0FBQ3ZELGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsY0FBYyxpQ0FBaUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgdXBsb2FkXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvbW9kZWxzJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3Jlc291cmNlLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9zZXJ2aWNlcy9vcGVuLXphYWsuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9zZXJ2aWNlcy91cGxvYWQtcHJvdmlkZXIuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9zZXJ2aWNlcy9zMy5zZXJ2aWNlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3NlcnZpY2VzL2Rvd25sb2FkLnNlcnZpY2UnO1xuIl19
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
export * from './public-api';
|
|
5
5
|
export { OpenZaakUploadService as ɵa } from './lib/services/open-zaak-upload.service';
|
|
6
6
|
export { S3UploadService as ɵb } from './lib/services/s3-upload.service';
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsdGltby1yZXNvdXJjZS5qcyIsInNvdXJjZVJvb3QiOiIvdG1wL2plbmtpbnMtNGMzYmI3NzAvd29ya3NwYWNlL1ZhbHRpbW9fLV9Bbmd1bGFyX0xpYnJhcmllc19tYWluL3Byb2plY3RzL3ZhbHRpbW8vcmVzb3VyY2Uvc3JjLyIsInNvdXJjZXMiOlsidmFsdGltby1yZXNvdXJjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsY0FBYyxDQUFDO0FBRTdCLE9BQU8sRUFBQyxxQkFBcUIsSUFBSSxFQUFFLEVBQUMsTUFBTSx5Q0FBeUMsQ0FBQztBQUNwRixPQUFPLEVBQUMsZUFBZSxJQUFJLEVBQUUsRUFBQyxNQUFNLGtDQUFrQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL3B1YmxpYy1hcGknO1xuXG5leHBvcnQge09wZW5aYWFrVXBsb2FkU2VydmljZSBhcyDJtWF9IGZyb20gJy4vbGliL3NlcnZpY2VzL29wZW4temFhay11cGxvYWQuc2VydmljZSc7XG5leHBvcnQge1MzVXBsb2FkU2VydmljZSBhcyDJtWJ9IGZyb20gJy4vbGliL3NlcnZpY2VzL3MzLXVwbG9hZC5zZXJ2aWNlJzsiXX0=
|
|
@@ -1,11 +1,145 @@
|
|
|
1
1
|
import { ɵɵdefineInjectable, ɵɵinject, Injectable, INJECTOR, Injector, NgModule } from '@angular/core';
|
|
2
2
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
3
|
-
import { ConfigService } from '@valtimo/config';
|
|
3
|
+
import { ConfigService, UploadProvider } from '@valtimo/config';
|
|
4
4
|
import { map, tap, switchMap } from 'rxjs/operators';
|
|
5
|
-
import { S3Resource, UploadProvider } from '@valtimo/contract';
|
|
6
5
|
import { v4 } from 'uuid';
|
|
7
6
|
import { NGXLogger } from 'ngx-logger';
|
|
8
7
|
|
|
8
|
+
/*
|
|
9
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
10
|
+
*
|
|
11
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
12
|
+
* you may not use this file except in compliance with the License.
|
|
13
|
+
* You may obtain a copy of the License at
|
|
14
|
+
*
|
|
15
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
19
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
+
* See the License for the specific language governing permissions and
|
|
21
|
+
* limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
26
|
+
*
|
|
27
|
+
* Licensed under EUPL, Version 1.2 (the "License");
|
|
28
|
+
* you may not use this file except in compliance with the License.
|
|
29
|
+
* You may obtain a copy of the License at
|
|
30
|
+
*
|
|
31
|
+
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
32
|
+
*
|
|
33
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
34
|
+
* distributed under the License is distributed on an "AS IS" basis,
|
|
35
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
36
|
+
* See the License for the specific language governing permissions and
|
|
37
|
+
* limitations under the License.
|
|
38
|
+
*/
|
|
39
|
+
class S3Resource {
|
|
40
|
+
constructor(file, preSignedUrl) {
|
|
41
|
+
this.id = null;
|
|
42
|
+
this.extension = null;
|
|
43
|
+
this.createdOn = null;
|
|
44
|
+
this.key = decodeURIComponent(preSignedUrl.pathname.substring(1));
|
|
45
|
+
this.name = file.name;
|
|
46
|
+
this.sizeInBytes = file.size;
|
|
47
|
+
}
|
|
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
|
+
class OpenZaakConfig {
|
|
66
|
+
}
|
|
67
|
+
var Archiefnominatie;
|
|
68
|
+
(function (Archiefnominatie) {
|
|
69
|
+
Archiefnominatie["blijvend_bewaren"] = "blijven_bewaren";
|
|
70
|
+
Archiefnominatie["vernietigen"] = "vernietigen";
|
|
71
|
+
})(Archiefnominatie || (Archiefnominatie = {}));
|
|
72
|
+
var Afleidingswijze;
|
|
73
|
+
(function (Afleidingswijze) {
|
|
74
|
+
Afleidingswijze["afgehandeld"] = "afgehandeld";
|
|
75
|
+
Afleidingswijze["ander_datumkenmerk"] = "ander_datumkenmerk";
|
|
76
|
+
Afleidingswijze["eigenschap"] = "eigenschap";
|
|
77
|
+
Afleidingswijze["gerelateerde_zaak"] = "gerelateerde_zaak";
|
|
78
|
+
Afleidingswijze["hoofdzaak"] = "hoofdzaak";
|
|
79
|
+
Afleidingswijze["ingangsdatum_besluit"] = "ingangsdatum_besluit";
|
|
80
|
+
Afleidingswijze["termijn"] = "termijn";
|
|
81
|
+
Afleidingswijze["vervaldatum_besluit"] = "vervaldatum_besluit";
|
|
82
|
+
Afleidingswijze["zaakobject"] = "zaakobject";
|
|
83
|
+
})(Afleidingswijze || (Afleidingswijze = {}));
|
|
84
|
+
var Objecttype;
|
|
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
|
+
})(Objecttype || (Objecttype = {}));
|
|
118
|
+
var Operation;
|
|
119
|
+
(function (Operation) {
|
|
120
|
+
Operation["CREATE_ZAAK"] = "CREATE_ZAAK";
|
|
121
|
+
Operation["SET_RESULTAAT"] = "SET_RESULTAAT";
|
|
122
|
+
Operation["SET_STATUS"] = "SET_STATUS";
|
|
123
|
+
})(Operation || (Operation = {}));
|
|
124
|
+
|
|
125
|
+
/*
|
|
126
|
+
*
|
|
127
|
+
* * Copyright 2015-2020 Ritense BV, the Netherlands.
|
|
128
|
+
* *
|
|
129
|
+
* * Licensed under EUPL, Version 1.2 (the "License");
|
|
130
|
+
* * you may not use this file except in compliance with the License.
|
|
131
|
+
* * You may obtain a copy of the License at
|
|
132
|
+
* *
|
|
133
|
+
* * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
|
|
134
|
+
* *
|
|
135
|
+
* * Unless required by applicable law or agreed to in writing, software
|
|
136
|
+
* * distributed under the License is distributed on an "AS IS" basis,
|
|
137
|
+
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
138
|
+
* * See the License for the specific language governing permissions and
|
|
139
|
+
* * limitations under the License.
|
|
140
|
+
*
|
|
141
|
+
*/
|
|
142
|
+
|
|
9
143
|
/*
|
|
10
144
|
* Copyright 2020 Dimpact.
|
|
11
145
|
*
|
|
@@ -82,14 +216,14 @@ class OpenZaakService {
|
|
|
82
216
|
formData.append('documentDefinitionName', documentDefinitionName);
|
|
83
217
|
return this.http.post(`${this.valtimoApiConfig.endpointUri}resource/upload-open-zaak`, formData, {
|
|
84
218
|
reportProgress: true,
|
|
85
|
-
responseType: 'json'
|
|
219
|
+
responseType: 'json',
|
|
86
220
|
});
|
|
87
221
|
}
|
|
88
222
|
}
|
|
89
223
|
OpenZaakService.ɵprov = ɵɵdefineInjectable({ factory: function OpenZaakService_Factory() { return new OpenZaakService(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: OpenZaakService, providedIn: "root" });
|
|
90
224
|
OpenZaakService.decorators = [
|
|
91
225
|
{ type: Injectable, args: [{
|
|
92
|
-
providedIn: 'root'
|
|
226
|
+
providedIn: 'root',
|
|
93
227
|
},] }
|
|
94
228
|
];
|
|
95
229
|
OpenZaakService.ctorParameters = () => [
|
|
@@ -120,7 +254,9 @@ class OpenZaakUploadService {
|
|
|
120
254
|
this.valtimoApiConfig = configService.config.valtimoApi;
|
|
121
255
|
}
|
|
122
256
|
uploadFile(file, documentDefinitionName) {
|
|
123
|
-
return this.openZaakService
|
|
257
|
+
return this.openZaakService
|
|
258
|
+
.upload(new File([file], file.name, { type: file.type }), documentDefinitionName)
|
|
259
|
+
.pipe(map(result => this.getResourceFile(result)));
|
|
124
260
|
}
|
|
125
261
|
getResource(resourceId) {
|
|
126
262
|
return this.openZaakService.getResource(resourceId);
|
|
@@ -138,8 +274,8 @@ class OpenZaakUploadService {
|
|
|
138
274
|
name: result.name,
|
|
139
275
|
sizeInBytes: result.sizeInBytes,
|
|
140
276
|
resourceId: result.resourceId,
|
|
141
|
-
extension: result.extension
|
|
142
|
-
}
|
|
277
|
+
extension: result.extension,
|
|
278
|
+
},
|
|
143
279
|
};
|
|
144
280
|
}
|
|
145
281
|
}
|
|
@@ -179,8 +315,7 @@ class S3Service {
|
|
|
179
315
|
return this.http.get(`${this.valtimoApiConfig.endpointUri}resource/pre-signed-url/${fileName}`, options);
|
|
180
316
|
}
|
|
181
317
|
upload(url, file) {
|
|
182
|
-
const headers = new HttpHeaders()
|
|
183
|
-
.set('Content-Type', file.type);
|
|
318
|
+
const headers = new HttpHeaders().set('Content-Type', file.type);
|
|
184
319
|
return this.http.put(url.toString(), file, { headers: headers });
|
|
185
320
|
}
|
|
186
321
|
registerResource(s3ResourceDTO) {
|
|
@@ -192,13 +327,15 @@ class S3Service {
|
|
|
192
327
|
}
|
|
193
328
|
delete(resourceId) {
|
|
194
329
|
const headers = new HttpHeaders().set('Content-Type', 'application/json;charset=UTF-8');
|
|
195
|
-
return this.http.delete(`${this.valtimoApiConfig.endpointUri}resource/${resourceId}`, {
|
|
330
|
+
return this.http.delete(`${this.valtimoApiConfig.endpointUri}resource/${resourceId}`, {
|
|
331
|
+
headers: headers,
|
|
332
|
+
});
|
|
196
333
|
}
|
|
197
334
|
}
|
|
198
335
|
S3Service.ɵprov = ɵɵdefineInjectable({ factory: function S3Service_Factory() { return new S3Service(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: S3Service, providedIn: "root" });
|
|
199
336
|
S3Service.decorators = [
|
|
200
337
|
{ type: Injectable, args: [{
|
|
201
|
-
providedIn: 'root'
|
|
338
|
+
providedIn: 'root',
|
|
202
339
|
},] }
|
|
203
340
|
];
|
|
204
341
|
S3Service.ctorParameters = () => [
|
|
@@ -231,7 +368,7 @@ class S3UploadService {
|
|
|
231
368
|
const splitFileName = fileName.split('.');
|
|
232
369
|
const fileNameWithUUID = `${splitFileName[0]}-${v4()}.${splitFileName[1]}`;
|
|
233
370
|
const renamedFile = new File([file], fileNameWithUUID, { type: file.type });
|
|
234
|
-
return this.s3Service.getPreSignedUrl(renamedFile.name).pipe(map(
|
|
371
|
+
return this.s3Service.getPreSignedUrl(renamedFile.name).pipe(map(url => new URL(url)), tap(url => (resourceUrl = url)), switchMap(url => this.s3Service.upload(url, renamedFile)), map(() => new S3Resource(file, resourceUrl)), switchMap(s3Resource => this.s3Service.registerResource(s3Resource)), switchMap(s3Resource => this.s3Service.get(s3Resource.id)), map(result => (Object.assign(Object.assign({}, result), { originalName: file.name }))), map(result => this.getResourceFile(result)));
|
|
235
372
|
}
|
|
236
373
|
getResource(resourceId) {
|
|
237
374
|
return this.s3Service.get(resourceId);
|
|
@@ -250,8 +387,8 @@ class S3UploadService {
|
|
|
250
387
|
createdOn: result.resource.createdOn,
|
|
251
388
|
name: result.originalName,
|
|
252
389
|
sizeInBytes: result.resource.sizeInBytes,
|
|
253
|
-
resourceId: result.resource.id.split('ResourceId(id=')[1].slice(0, -1)
|
|
254
|
-
}
|
|
390
|
+
resourceId: result.resource.id.split('ResourceId(id=')[1].slice(0, -1),
|
|
391
|
+
},
|
|
255
392
|
};
|
|
256
393
|
}
|
|
257
394
|
}
|
|
@@ -282,9 +419,10 @@ class UploadProviderService {
|
|
|
282
419
|
this.configService = configService;
|
|
283
420
|
this.injector = injector;
|
|
284
421
|
this.logger = logger;
|
|
285
|
-
this.uploadService =
|
|
286
|
-
|
|
287
|
-
|
|
422
|
+
this.uploadService =
|
|
423
|
+
configService.config.uploadProvider === UploadProvider.S3
|
|
424
|
+
? injector.get(S3UploadService)
|
|
425
|
+
: injector.get(OpenZaakUploadService);
|
|
288
426
|
this.logger.debug('Loading UploadService as', this.uploadService);
|
|
289
427
|
}
|
|
290
428
|
uploadFile(file, documentDefinitionName) {
|
|
@@ -297,7 +435,7 @@ class UploadProviderService {
|
|
|
297
435
|
UploadProviderService.ɵprov = ɵɵdefineInjectable({ factory: function UploadProviderService_Factory() { return new UploadProviderService(ɵɵinject(ConfigService), ɵɵinject(INJECTOR), ɵɵinject(NGXLogger)); }, token: UploadProviderService, providedIn: "root" });
|
|
298
436
|
UploadProviderService.decorators = [
|
|
299
437
|
{ type: Injectable, args: [{
|
|
300
|
-
providedIn: 'root'
|
|
438
|
+
providedIn: 'root',
|
|
301
439
|
},] }
|
|
302
440
|
];
|
|
303
441
|
UploadProviderService.ctorParameters = () => [
|
|
@@ -327,7 +465,8 @@ class DownloadService {
|
|
|
327
465
|
this.configService = configService;
|
|
328
466
|
}
|
|
329
467
|
downloadFile(url, name) {
|
|
330
|
-
if (url.startsWith(this.configService.config.valtimoApi.endpointUri) ||
|
|
468
|
+
if (url.startsWith(this.configService.config.valtimoApi.endpointUri) ||
|
|
469
|
+
url.startsWith(window.location.origin)) {
|
|
331
470
|
// if download url is on backend use angular to get the content so access token is used
|
|
332
471
|
this.http.get(url, { responseType: 'blob' }).subscribe(content => {
|
|
333
472
|
const downloadUrl = window.URL.createObjectURL(content);
|
|
@@ -351,7 +490,7 @@ class DownloadService {
|
|
|
351
490
|
DownloadService.ɵprov = ɵɵdefineInjectable({ factory: function DownloadService_Factory() { return new DownloadService(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: DownloadService, providedIn: "root" });
|
|
352
491
|
DownloadService.decorators = [
|
|
353
492
|
{ type: Injectable, args: [{
|
|
354
|
-
providedIn: 'root'
|
|
493
|
+
providedIn: 'root',
|
|
355
494
|
},] }
|
|
356
495
|
];
|
|
357
496
|
DownloadService.ctorParameters = () => [
|
|
@@ -381,7 +520,14 @@ ResourceModule.decorators = [
|
|
|
381
520
|
declarations: [],
|
|
382
521
|
imports: [],
|
|
383
522
|
exports: [],
|
|
384
|
-
providers: [
|
|
523
|
+
providers: [
|
|
524
|
+
OpenZaakUploadService,
|
|
525
|
+
S3UploadService,
|
|
526
|
+
UploadProviderService,
|
|
527
|
+
OpenZaakService,
|
|
528
|
+
S3Service,
|
|
529
|
+
DownloadService,
|
|
530
|
+
],
|
|
385
531
|
},] }
|
|
386
532
|
];
|
|
387
533
|
|
|
@@ -393,5 +539,5 @@ ResourceModule.decorators = [
|
|
|
393
539
|
* Generated bundle index. Do not edit.
|
|
394
540
|
*/
|
|
395
541
|
|
|
396
|
-
export { DownloadService, OpenZaakService, ResourceModule, S3Service, UploadProviderService, OpenZaakUploadService as ɵa, S3UploadService as ɵb };
|
|
542
|
+
export { Afleidingswijze, Archiefnominatie, DownloadService, Objecttype, OpenZaakConfig, OpenZaakService, Operation, ResourceModule, S3Resource, S3Service, UploadProviderService, OpenZaakUploadService as ɵa, S3UploadService as ɵb };
|
|
397
543
|
//# sourceMappingURL=valtimo-resource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valtimo-resource.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 CreateZaakTypeLinkRequest,\n InformatieObjectType,\n InformatieObjectTypeLink,\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 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, processDefinitionKey: string, serviceTaskId: string): Observable<any> {\n return this.http.delete<any>(`${this.valtimoApiConfig.endpointUri}openzaak/link/${id}/service-handler/${processDefinitionKey}/${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":["uuidv4"],"mappings":";;;;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ChB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;QACvB,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,EAAE,CAAC;KACf;;;;YA9BF,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;YAJO,UAAU;YADV,aAAa;;;ACjBrB;;;;;;;;;;;;;;;MA+Ba,cAAc;;;YAP1B,QAAQ,SAAC;gBACR,YAAY,EAAE,EAAE;gBAChB,OAAO,EAAE,EACR;gBACD,OAAO,EAAE,EAAE;gBACX,SAAS,EAAE,CAAC,qBAAqB,EAAE,eAAe,EAAE,qBAAqB,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe,CAAC;aACxH;;;AC9BD;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"valtimo-resource.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":["uuidv4"],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;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