@valtimo/resource 4.15.2-next-main.13 → 4.15.2-next-main.14

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.
@@ -32,15 +32,6 @@
32
32
  OpenZaakService.prototype.getResource = function (resourceId) {
33
33
  return this.http.get(this.valtimoApiConfig.endpointUri + "resource/" + resourceId);
34
34
  };
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
35
  OpenZaakService.prototype.getZaakTypes = function () {
45
36
  return this.http.get(this.valtimoApiConfig.endpointUri + "openzaak/zaaktype");
46
37
  };
@@ -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, 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":["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,IA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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;;;;;gBA9BFX,aAAU,SAAC;oBACV,UAAU,EAAE,MAAM;iBACnB;;;gBAJOC,aAAU;gBADVC,gBAAa;;;ICjBrB;;;;;;;;;;;;;;;;QA+BA;;;;;gBAPCU,WAAQ,SAAC;oBACR,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,EACR;oBACD,OAAO,EAAE,EAAE;oBACX,SAAS,EAAE,CAAC,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/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":["Injectable","HttpClient","ConfigService","map","HttpHeaders","uuidv4","tap","switchMap","S3Resource","UploadProvider","Injector","NGXLogger","NgModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;QA0CE,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,sCAAY,GAAZ;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAgB,IAAI,CAAC,gBAAgB,CAAC,WAAW,sBAAmB,CAAC,CAAC;SAC3F;QAED,kDAAwB,GAAxB;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA4B,IAAI,CAAC,gBAAgB,CAAC,WAAW,yCAAoC,IAAI,CAAC,SAAW,CAAC,CAAC;SACxI;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==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,i){return this.http.delete(this.valtimoApiConfig.endpointUri+"openzaak/link/"+e+"/service-handler/"+t+"/"+i)},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("@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.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,i){return this.http.delete(this.valtimoApiConfig.endpointUri+"openzaak/link/"+e+"/service-handler/"+t+"/"+i)},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})}));
2
2
  //# sourceMappingURL=valtimo-resource.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"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"],"names":["OpenZaakService","http","configService","this","valtimoApiConfig","config","valtimoApi","catalogus","openZaak","prototype","getOpenZaakConfig","get","endpointUri","getResource","resourceId","createOpenZaakConfig","request","post","modifyOpenZaakConfig","put","deleteOpenZaakConfig","delete","getZaakTypes","getInformatieObjectTypes","getZaakTypeLink","id","getInformatieObjectTypeLink","createZaakTypeLink","createInformatieObjectTypeLink","deleteZaakTypeLink","deleteInformatieObjectTypeLink","getZaakTypeLinkListByProcess","processDefinitionKey","getStatusTypes","zaakTypeRequest","getStatusResults","createServiceTaskHandler","modifyServiceTaskHandler","deleteServiceTaskHandler","serviceTaskId","upload","file","documentDefinitionName","formData","FormData","append","reportProgress","responseType","Injectable","args","providedIn","HttpClient","ConfigService","OpenZaakUploadService","openZaakService","uploadFile","_this","File","name","type","pipe","map","result","getResourceFile","customUpload","originalName","size","sizeInBytes","url","storage","extension","data","createdOn","S3Service","getPreSignedUrl","fileName","options","headers","HttpHeaders","set","toString","registerResource","s3ResourceDTO","S3UploadService","s3Service","resourceUrl","splitFileName","split","fileNameWithUUID","uuidv4","renamedFile","URL","tap","switchMap","S3Resource","s3Resource","Object","assign","resource","key","bucketName","slice","UploadProviderService","injector","logger","uploadService","uploadProvider","UploadProvider","S3","debug","Injector","NGXLogger","DownloadService","downloadFile","startsWith","window","location","origin","subscribe","content","downloadUrl","createObjectURL","openDownloadLink","link","document","createElement","href","download","target","click","remove","NgModule","declarations","imports","exports","providers"],"mappings":"woBA8CE,SAAAA,EACUC,EACAC,GADAC,KAAAF,KAAAA,EACAE,KAAAD,cAAAA,EAERC,KAAKC,iBAAmBF,EAAcG,OAAOC,WAC7CH,KAAKI,UAAYL,EAAcG,OAAOG,SAASD,iBAGjDP,EAAAS,UAAAC,kBAAA,WACE,OAAOP,KAAKF,KAAKU,IAAuBR,KAAKC,iBAAiBQ,YAAW,oBAG3EZ,EAAAS,UAAAI,YAAA,SAAYC,GACV,OAAOX,KAAKF,KAAKU,IAAoBR,KAAKC,iBAAiBQ,YAAW,YAAYE,IAGpFd,EAAAS,UAAAM,qBAAA,SAAqBC,GACnB,OAAOb,KAAKF,KAAKgB,KAAoCd,KAAKC,iBAAiBQ,YAAW,kBAAmBI,IAG3GhB,EAAAS,UAAAS,qBAAA,SAAqBF,GACnB,OAAOb,KAAKF,KAAKkB,IAAmChB,KAAKC,iBAAiBQ,YAAW,kBAAmBI,IAG1GhB,EAAAS,UAAAW,qBAAA,WACE,OAAOjB,KAAKF,KAAKoB,OAAelB,KAAKC,iBAAiBQ,YAAW,oBAGnEZ,EAAAS,UAAAa,aAAA,WACE,OAAOnB,KAAKF,KAAKU,IAAmBR,KAAKC,iBAAiBQ,YAAW,sBAGvEZ,EAAAS,UAAAc,yBAAA,WACE,OAAOpB,KAAKF,KAAKU,IAA+BR,KAAKC,iBAAiBQ,YAAW,oCAAoCT,KAAKI,YAG5HP,EAAAS,UAAAe,gBAAA,SAAgBC,GACd,OAAOtB,KAAKF,KAAKU,IAAqBR,KAAKC,iBAAiBQ,YAAW,iBAAiBa,IAG1FzB,EAAA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uBCcR,iCAPC+E,EAAAA,SAAQlF,KAAA,CAAC,CACRmF,aAAc,GACdC,QAAS,GAETC,QAAS,GACTC,UAAW,CAAClF,EAAuB8B,EAAiBmB,EAAuBtG,EAAiByE,EAAWuC","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, 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"]}
1
+ {"version":3,"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"],"names":["OpenZaakService","http","configService","this","valtimoApiConfig","config","valtimoApi","catalogus","openZaak","prototype","getOpenZaakConfig","get","endpointUri","getResource","resourceId","getZaakTypes","getInformatieObjectTypes","getZaakTypeLink","id","getInformatieObjectTypeLink","createZaakTypeLink","request","post","createInformatieObjectTypeLink","deleteZaakTypeLink","delete","deleteInformatieObjectTypeLink","getZaakTypeLinkListByProcess","processDefinitionKey","getStatusTypes","zaakTypeRequest","getStatusResults","createServiceTaskHandler","modifyServiceTaskHandler","put","deleteServiceTaskHandler","serviceTaskId","upload","file","documentDefinitionName","formData","FormData","append","reportProgress","responseType","Injectable","args","providedIn","HttpClient","ConfigService","OpenZaakUploadService","openZaakService","uploadFile","_this","File","name","type","pipe","map","result","getResourceFile","customUpload","originalName","size","sizeInBytes","url","storage","extension","data","createdOn","S3Service","getPreSignedUrl","fileName","options","headers","HttpHeaders","set","toString","registerResource","s3ResourceDTO","S3UploadService","s3Service","resourceUrl","splitFileName","split","fileNameWithUUID","uuidv4","renamedFile","URL","tap","switchMap","S3Resource","s3Resource","Object","assign","resource","key","bucketName","slice","UploadProviderService","injector","logger","uploadService","uploadProvider","UploadProvider","S3","debug","Injector","NGXLogger","DownloadService","downloadFile","startsWith","window","location","origin","subscribe","content","downloadUrl","createObjectURL","openDownloadLink","link","document","createElement","href","download","target","click","remove","NgModule","declarations","imports","exports","providers"],"mappings":"woBA0CE,SAAAA,EACUC,EACAC,GADAC,KAAAF,KAAAA,EACAE,KAAAD,cAAAA,EAERC,KAAKC,iBAAmBF,EAAcG,OAAOC,WAC7CH,KAAKI,UAAYL,EAAcG,OAAOG,SAASD,iBAGjDP,EAAAS,UAAAC,kBAAA,WACE,OAAOP,KAAKF,KAAKU,IAAuBR,KAAKC,iBAAiBQ,YAAW,oBAG3EZ,EAAAS,UAAAI,YAAA,SAAYC,GACV,OAAOX,KAAKF,KAAKU,IAAoBR,KAAKC,iBAAiBQ,YAAW,YAAYE,IAGpFd,EAAAS,UAAAM,aAAA,WACE,OAAOZ,KAAKF,KAAKU,IAAmBR,KAAKC,iBAAiBQ,YAAW,sBAGvEZ,EAAAS,UAAAO,yBAAA,WACE,OAAOb,KAAKF,KAAKU,IAA+BR,KAAKC,iBAAiBQ,YAAW,oCAAoCT,KAAKI,YAG5HP,EAAAS,UAA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S,SACdL,EAAKM,QACLN,EAAKO,oLA7BRlF,EAAAA,WAAUC,KAAA,CAAC,CACVC,WAAY,oDAHNC,EAAAA,kBADAC,EAAAA,uBCcR,iCAPC+E,EAAAA,SAAQlF,KAAA,CAAC,CACRmF,aAAc,GACdC,QAAS,GAETC,QAAS,GACTC,UAAW,CAAClF,EAAuB8B,EAAiBmB,EAAuBnG,EAAiBsE,EAAWuC","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"]}
@@ -32,15 +32,6 @@ export class OpenZaakService {
32
32
  getResource(resourceId) {
33
33
  return this.http.get(`${this.valtimoApiConfig.endpointUri}resource/${resourceId}`);
34
34
  }
35
- createOpenZaakConfig(request) {
36
- return this.http.post(`${this.valtimoApiConfig.endpointUri}openzaak/config`, request);
37
- }
38
- modifyOpenZaakConfig(request) {
39
- return this.http.put(`${this.valtimoApiConfig.endpointUri}openzaak/config`, request);
40
- }
41
- deleteOpenZaakConfig() {
42
- return this.http.delete(`${this.valtimoApiConfig.endpointUri}openzaak/config`);
43
- }
44
35
  getZaakTypes() {
45
36
  return this.http.get(`${this.valtimoApiConfig.endpointUri}openzaak/zaaktype`);
46
37
  }
@@ -103,4 +94,4 @@ OpenZaakService.ctorParameters = () => [
103
94
  { type: HttpClient },
104
95
  { type: ConfigService }
105
96
  ];
106
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3Blbi16YWFrLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy92YWx0aW1vL3Jlc291cmNlL3NyYy9saWIvc2VydmljZXMvb3Blbi16YWFrLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5nc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7cHJvY2Vzc0RlZmluaXRpb25LZXl9LyR7c2VydmljZVRhc2tJZH1gKTtcbiAgfVxuXG4gIHVwbG9hZChmaWxlOiBGaWxlLCBkb2N1bWVudERlZmluaXRpb25OYW1lOiBzdHJpbmcpOiBPYnNlcnZhYmxlPE9wZW5aYWFrUmVzb3VyY2U+IHtcbiAgICBjb25zdCBmb3JtRGF0YTogRm9ybURhdGEgPSBuZXcgRm9ybURhdGEoKTtcbiAgICBmb3JtRGF0YS5hcHBlbmQoJ2ZpbGUnLCBmaWxlKTtcbiAgICBmb3JtRGF0YS5hcHBlbmQoJ2RvY3VtZW50RGVmaW5pdGlvbk5hbWUnLCBkb2N1bWVudERlZmluaXRpb25OYW1lKTtcblxuICAgIHJldHVybiB0aGlzLmh0dHAucG9zdDxPcGVuWmFha1Jlc291cmNlPihgJHt0aGlzLnZhbHRpbW9BcGlDb25maWcuZW5kcG9pbnRVcml9cmVzb3VyY2UvdXBsb2FkLW9wZW4temFha2AsIGZvcm1EYXRhLCB7XG4gICAgICByZXBvcnRQcm9ncmVzczogdHJ1ZSxcbiAgICAgIHJlc3BvbnNlVHlwZTogJ2pzb24nXG4gICAgfSk7XG4gIH1cblxufVxuIl19
@@ -34,15 +34,6 @@ class OpenZaakService {
34
34
  getResource(resourceId) {
35
35
  return this.http.get(`${this.valtimoApiConfig.endpointUri}resource/${resourceId}`);
36
36
  }
37
- createOpenZaakConfig(request) {
38
- return this.http.post(`${this.valtimoApiConfig.endpointUri}openzaak/config`, request);
39
- }
40
- modifyOpenZaakConfig(request) {
41
- return this.http.put(`${this.valtimoApiConfig.endpointUri}openzaak/config`, request);
42
- }
43
- deleteOpenZaakConfig() {
44
- return this.http.delete(`${this.valtimoApiConfig.endpointUri}openzaak/config`);
45
- }
46
37
  getZaakTypes() {
47
38
  return this.http.get(`${this.valtimoApiConfig.endpointUri}openzaak/zaaktype`);
48
39
  }
@@ -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 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, 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":";;;;;;;;AAAA;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,SAAS,CAAC,OAAO;gBAC1D,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;gBACxD,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;aAC1C,CAAC,CAAC;SACJ;aAAM;;YAEL,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;SAClC;KACF;IAEO,gBAAgB,CAAC,GAAW,EAAE,IAAY;QAChD,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,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/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":";;;;;;;;AAAA;;;;;;;;;;;;;;;MAqCa,eAAe;IAK1B,YACU,IAAgB,EAChB,aAA4B;QAD5B,SAAI,GAAJ,IAAI,CAAY;QAChB,kBAAa,GAAb,aAAa,CAAe;QAEpC,IAAI,CAAC,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC;QACxD,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;KAC1D;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,iBAAiB,CAAC,CAAC;KAC7F;IAED,WAAW,CAAC,UAAkB;QAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,YAAY,UAAU,EAAE,CAAC,CAAC;KACjG;IAED,YAAY;QACV,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,WAAW,mBAAmB,CAAC,CAAC;KAC3F;IAED,wBAAwB;QAC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EAAE;;YAE9G,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAC,YAAY,EAAE,MAAM,EAAC,CAAC,CAAC,SAAS,CAAC,OAAO;gBAC1D,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;gBACxD,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;aAC1C,CAAC,CAAC;SACJ;aAAM;;YAEL,IAAI,CAAC,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;SAClC;KACF;IAEO,gBAAgB,CAAC,GAAW,EAAE,IAAY;QAChD,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,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,7 +1,7 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { ConfigService } from '@valtimo/config';
3
3
  import { Observable } from 'rxjs';
4
- import { CreateInformatieObjectTypeLinkRequest, CreateOpenZaakConfigRequest, CreateOpenZaakConfigResult, CreateZaakTypeLinkRequest, InformatieObjectType, InformatieObjectTypeLink, ModifyOpenZaakConfigRequest, ModifyOpenZaakConfigResult, OpenZaakConfig, OpenZaakResource, ResourceDto, ServiceTaskHandlerRequest, ZaakType, ZaakTypeLink, ZaakTypeRequest } from '@valtimo/contract';
4
+ import { CreateInformatieObjectTypeLinkRequest, CreateZaakTypeLinkRequest, InformatieObjectType, InformatieObjectTypeLink, OpenZaakConfig, OpenZaakResource, ResourceDto, ServiceTaskHandlerRequest, ZaakType, ZaakTypeLink, ZaakTypeRequest } from '@valtimo/contract';
5
5
  export declare class OpenZaakService {
6
6
  private http;
7
7
  private configService;
@@ -10,9 +10,6 @@ export declare class OpenZaakService {
10
10
  constructor(http: HttpClient, configService: ConfigService);
11
11
  getOpenZaakConfig(): Observable<OpenZaakConfig>;
12
12
  getResource(resourceId: string): Observable<ResourceDto>;
13
- createOpenZaakConfig(request: CreateOpenZaakConfigRequest): Observable<CreateOpenZaakConfigResult>;
14
- modifyOpenZaakConfig(request: ModifyOpenZaakConfigRequest): Observable<ModifyOpenZaakConfigResult>;
15
- deleteOpenZaakConfig(): Observable<any>;
16
13
  getZaakTypes(): Observable<ZaakType[]>;
17
14
  getInformatieObjectTypes(): Observable<InformatieObjectType[]>;
18
15
  getZaakTypeLink(id: string): Observable<ZaakTypeLink>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@valtimo/resource",
3
3
  "license": "EUPL-1.2",
4
- "version": "4.15.2-next-main.13",
4
+ "version": "4.15.2-next-main.14",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^10.0.11",
7
7
  "@angular/core": "^10.0.11"
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"ResourceModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":24,"character":1},"arguments":[{"declarations":[],"imports":[],"exports":[],"providers":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"UploadProviderService"},{"__symbolic":"reference","name":"OpenZaakService"},{"__symbolic":"reference","name":"S3Service"},{"__symbolic":"reference","name":"DownloadService"}]}]}],"members":{}},"OpenZaakService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":38,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":47,"character":18},{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":48,"character":27}]}],"getOpenZaakConfig":[{"__symbolic":"method"}],"getResource":[{"__symbolic":"method"}],"createOpenZaakConfig":[{"__symbolic":"method"}],"modifyOpenZaakConfig":[{"__symbolic":"method"}],"deleteOpenZaakConfig":[{"__symbolic":"method"}],"getZaakTypes":[{"__symbolic":"method"}],"getInformatieObjectTypes":[{"__symbolic":"method"}],"getZaakTypeLink":[{"__symbolic":"method"}],"getInformatieObjectTypeLink":[{"__symbolic":"method"}],"createZaakTypeLink":[{"__symbolic":"method"}],"createInformatieObjectTypeLink":[{"__symbolic":"method"}],"deleteZaakTypeLink":[{"__symbolic":"method"}],"deleteInformatieObjectTypeLink":[{"__symbolic":"method"}],"getZaakTypeLinkListByProcess":[{"__symbolic":"method"}],"getStatusTypes":[{"__symbolic":"method"}],"getStatusResults":[{"__symbolic":"method"}],"createServiceTaskHandler":[{"__symbolic":"method"}],"modifyServiceTaskHandler":[{"__symbolic":"method"}],"deleteServiceTaskHandler":[{"__symbolic":"method"}],"upload":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"UploadProviderService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":24,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":32,"character":27},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":33,"character":22},{"__symbolic":"reference","module":"ngx-logger","name":"NGXLogger","line":34,"character":20}]}],"uploadFile":[{"__symbolic":"method"}],"getResource":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"S3Service":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":22,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":29,"character":18},{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":30,"character":27}]}],"getPreSignedUrl":[{"__symbolic":"method"}],"upload":[{"__symbolic":"method"}],"registerResource":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}],"delete":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"DownloadService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":20,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":26,"character":18},{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":27,"character":27}]}],"downloadFile":[{"__symbolic":"method"}],"openDownloadLink":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":24,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"OpenZaakService"},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":31,"character":18},{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":32,"character":27}]}],"uploadFile":[{"__symbolic":"method"}],"getResource":[{"__symbolic":"method"}],"getResourceFile":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":23,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"S3Service"}]}],"uploadFile":[{"__symbolic":"method"}],"getResource":[{"__symbolic":"method"}],"getResourceFile":[{"__symbolic":"method"}]}}},"origins":{"ResourceModule":"./lib/resource.module","OpenZaakService":"./lib/services/open-zaak.service","UploadProviderService":"./lib/services/upload-provider.service","S3Service":"./lib/services/s3.service","DownloadService":"./lib/services/download.service","ɵa":"./lib/services/open-zaak-upload.service","ɵb":"./lib/services/s3-upload.service"},"importAs":"@valtimo/resource"}
1
+ {"__symbolic":"module","version":4,"metadata":{"ResourceModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":24,"character":1},"arguments":[{"declarations":[],"imports":[],"exports":[],"providers":[{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"UploadProviderService"},{"__symbolic":"reference","name":"OpenZaakService"},{"__symbolic":"reference","name":"S3Service"},{"__symbolic":"reference","name":"DownloadService"}]}]}],"members":{}},"OpenZaakService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":34,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":43,"character":18},{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":44,"character":27}]}],"getOpenZaakConfig":[{"__symbolic":"method"}],"getResource":[{"__symbolic":"method"}],"getZaakTypes":[{"__symbolic":"method"}],"getInformatieObjectTypes":[{"__symbolic":"method"}],"getZaakTypeLink":[{"__symbolic":"method"}],"getInformatieObjectTypeLink":[{"__symbolic":"method"}],"createZaakTypeLink":[{"__symbolic":"method"}],"createInformatieObjectTypeLink":[{"__symbolic":"method"}],"deleteZaakTypeLink":[{"__symbolic":"method"}],"deleteInformatieObjectTypeLink":[{"__symbolic":"method"}],"getZaakTypeLinkListByProcess":[{"__symbolic":"method"}],"getStatusTypes":[{"__symbolic":"method"}],"getStatusResults":[{"__symbolic":"method"}],"createServiceTaskHandler":[{"__symbolic":"method"}],"modifyServiceTaskHandler":[{"__symbolic":"method"}],"deleteServiceTaskHandler":[{"__symbolic":"method"}],"upload":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"UploadProviderService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":24,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":32,"character":27},{"__symbolic":"reference","module":"@angular/core","name":"Injector","line":33,"character":22},{"__symbolic":"reference","module":"ngx-logger","name":"NGXLogger","line":34,"character":20}]}],"uploadFile":[{"__symbolic":"method"}],"getResource":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"S3Service":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":22,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":29,"character":18},{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":30,"character":27}]}],"getPreSignedUrl":[{"__symbolic":"method"}],"upload":[{"__symbolic":"method"}],"registerResource":[{"__symbolic":"method"}],"get":[{"__symbolic":"method"}],"delete":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"DownloadService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":20,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":26,"character":18},{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":27,"character":27}]}],"downloadFile":[{"__symbolic":"method"}],"openDownloadLink":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":24,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"OpenZaakService"},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":31,"character":18},{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":32,"character":27}]}],"uploadFile":[{"__symbolic":"method"}],"getResource":[{"__symbolic":"method"}],"getResourceFile":[{"__symbolic":"method"}]}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":23,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"S3Service"}]}],"uploadFile":[{"__symbolic":"method"}],"getResource":[{"__symbolic":"method"}],"getResourceFile":[{"__symbolic":"method"}]}}},"origins":{"ResourceModule":"./lib/resource.module","OpenZaakService":"./lib/services/open-zaak.service","UploadProviderService":"./lib/services/upload-provider.service","S3Service":"./lib/services/s3.service","DownloadService":"./lib/services/download.service","ɵa":"./lib/services/open-zaak-upload.service","ɵb":"./lib/services/s3-upload.service"},"importAs":"@valtimo/resource"}