import{n as s,t as r}from"./chunk-B7bLvSFs.js";import{Gr as re,I as He,In as bd,Ln as be,St as Pv,Vr as qe,fi as vE,vi as wd}from"./chunk-DR8zdE1B.js";import{Z as fe,w as No,x as Ie}from"./chunk-MsEEQtoP.js";import{t as d}from"./chunk-BxwW_nba.js";import{t as e}from"./chunk-11TDjXx7.js";var O=(()=>{class n{constructor(t){this.http=t,this.baseUrl=e.apiBaseUrl+`/api/v1`}upload(){let t={state:`PENDING`,progress:0},e=(s,r)=>this.isHttpProgressEvent(r)?{progress:r.total?Math.round(100*r.loaded/r.total):s.progress,state:`IN_PROGRESS`}:this.isHttpResponse(r)?{progress:100,state:`DONE`,body:r.body}:s;return s=>s.pipe(vE(e,t))}isHttpResponse(t){return t.type===Ie.Response}isHttpProgressEvent(t){return t.type===Ie.UploadProgress}createSubscription(t){return this.http.post(`${this.baseUrl}/subscriptions`,t)}updateSubscription(t,e){return this.http.patch(`${this.baseUrl}/subscriptions/${t}`,e)}cancelSubscription(t){return this.http.delete(`${this.baseUrl}/subscriptions/${t}`)}listOrganisations(){return this.http.get(`${this.baseUrl}/organisations`)}getOrganisationById(t){return this.http.get(`${this.baseUrl}/organisations/${t}`)}setGebiedsinformatieAanvragenScheduleEnabled(t,e){return this.http.put(`${this.baseUrl}/organisations/${t}/gebiedsinformatie-aanvragen/schedule`,{enabled:e})}startGebiedsinformatieAanvragenBackfill(t){return this.http.post(`${this.baseUrl}/organisations/${t}/jobs/gebiedsinformatie-aanvragen/backfill`,{})}getOrganisationUsageStatistics(t){return this.http.get(`${this.baseUrl}/organisations/${t}/usage-statistics`)}updateOrganisation(t,e,s$1){return this.http.put(`${this.baseUrl}/organisations/${t}`,s(r({},e),{fileIds:s$1}))}updateMoneybirdContactId(t,e){return this.http.put(`${this.baseUrl}/organisations/${t}/moneybird-contact-id`,{moneybirdContactId:e})}listUploadsForOrganisation(t){let e=r({},t.params);return e.statusses&&(e.statusses=e.statusses.join(`,`)),this.http.get(`${this.baseUrl}/organisations/${t.organisationId}/uploads`,{params:e})}getUpload(t){return this.http.get(`${this.baseUrl}/organisations/${t.organisationId}/uploads/${t.uploadId}`)}requestUploadsExcelExport(t){let e=s(r({},t.params),{emailTo:t.emailTo,userName:t.userName});return e.statusses&&(e.statusses=e.statusses.join(`,`)),this.http.get(`${this.baseUrl}/organisations/${t.organisationId}/uploads-export`,{params:e})}listUsersInOrganisation(t){return this.http.get(`${this.baseUrl}/organisations/${t.organisationId}/users`)}listProjectsInOrganisation(t){return this.http.get(`${this.baseUrl}/organisations/${t.organisationId}/projects`)}createProjectInOrganisation(t,e){return this.http.post(`${this.baseUrl}/organisations/${t}/projects`,e)}updateProjectInOrganisation(t,e){return this.http.put(`${this.baseUrl}/organisations/${t}/projects/${e.id}`,{name:e.name,code:e.code,description:e.description,department_name:e.department,fileIds:e.fileIds,chief_executor_id:e.chief_executor_id})}deleteProjectInOrganisation(t,e){return this.http.delete(`${this.baseUrl}/organisations/${t}/projects/${e}`)}renameDepartment(t,e,s){return this.http.put(`${this.baseUrl}/organisations/${t}/departments/${e}`,{name:s})}deleteDepartment(t,e){return this.http.delete(`${this.baseUrl}/organisations/${t}/departments/${e}`)}listDepartments(t){return this.http.get(`${this.baseUrl}/organisations/${t}/departments`)}createDepartment(t,e){return this.http.post(`${this.baseUrl}/organisations/${t}/departments`,{name:e})}getProjectDesign(t,e){return this.http.get(`${this.baseUrl}/organisations/${t}/projects/${e}/designs`)}createProjectDesign(t){return this.http.post(`${this.baseUrl}/organisations/${t.organisationId}/projects/${t.projectId}/designs`,{featureCollection:t.featureCollection})}listProjectDesignLayers(t,e){return this.http.get(`${this.baseUrl}/organisations/${t}/projects/${e}/design-layers`)}createProjectDesignLayer(t,e,s,r){return this.http.post(`${this.baseUrl}/organisations/${t}/projects/${e}/design-layers`,{name:s,color:r})}updateProjectDesignLayer(t,e,s,r,i){return this.http.put(`${this.baseUrl}/organisations/${t}/projects/${e}/design-layers/${s}`,{name:r,color:i})}deleteProjectDesignLayer(t,e,s){return this.http.delete(`${this.baseUrl}/organisations/${t}/projects/${e}/design-layers/${s}`)}saveProjectDesignLayerFeatures(t,e,s,r){return this.http.post(`${this.baseUrl}/organisations/${t}/projects/${e}/design-layers/${s}/designs`,{featureCollection:r})}requestOrganisationsSubscription(t){return this.http.post(`${this.baseUrl}/organisations/${t.organisationId}/subscriptions`,t)}listOrderItemsInOrganisation(t){return this.http.get(`${this.baseUrl}/organisations/${t.organisationId}/order-items`)}getOrganisationRiskAssessment(t){return this.http.get(`${this.baseUrl}/organisations/${t}/risk-assessment`)}createOrganisationRiskAssessment(t,e){return this.http.post(`${this.baseUrl}/organisations/${t}/risk-assessment`,{riskAssessment:e})}updateOrganisationRiskAssessment(t){return this.http.put(`${this.baseUrl}/organisations/${t.organisationId}/risk-assessment`,{riskAssessmentId:t.riskAssessmentId,riskAssessment:t.riskAssessment})}validateKadasterLogin(t,e){return this.http.post(`${this.baseUrl}/organisations/${t.id}/kadaster-login-validation`,{organisation:t,user:e})}getCreditBalance(t){return this.http.get(`${this.baseUrl}/organisations/${t}/credit-balance`)}getMoneybirdContact(t){return this.http.get(`${this.baseUrl}/organisations/${t}/moneybird-contact`)}addCredits(t,e){return this.http.post(`${this.baseUrl}/organisations/${t}/credits`,{credits:e})}topUpCredits(t,e){return this.http.post(`${this.baseUrl}/organisations/${t}/credits/top-up`,{amount:e})}getCreditUsageForCurrentPeriod(t){return this.http.get(`${this.baseUrl}/organisations/${t}/credit-usage`)}getEntraIdConfig(t){return this.http.get(`${this.baseUrl}/organisations/${t}/entra-id-config`)}saveEntraIdConfig(t,e){return this.http.put(`${this.baseUrl}/organisations/${t}/entra-id-config`,{tenantId:e})}deleteEntraIdConfig(t){return this.http.delete(`${this.baseUrl}/organisations/${t}/entra-id-config`)}listSubscriptionTypes(){return this.http.get(`${this.baseUrl}/subscription-types`)}listRoles(){return this.http.get(`${this.baseUrl}/roles`)}listUsers(){return this.http.get(`${this.baseUrl}/users`)}createUser(t){return this.http.post(`${this.baseUrl}/users`,t)}updateUser(t,e){return this.http.put(`${this.baseUrl}/users/${t}`,e)}updateLoginPhoneNumber(t){return this.http.put(`${this.baseUrl}/users/login-phone-number`,{token:t})}deleteUser(t){return this.http.delete(`${this.baseUrl}/users/${t}`)}getUserById(t){return this.http.get(`${this.baseUrl}/users/${t}`)}emailExists(t){return this.http.get(`${this.baseUrl}/users/email/${t}`)}listUploadsForAdmin(t){return this.http.get(`${this.baseUrl}/uploads`,{params:t})}listUploadSourcesForOrganisation(t){return this.http.get(`${this.baseUrl}/organisations/${t}/upload-sources`)}listJobsByUploadId(t){return this.http.get(`${this.baseUrl}/uploads/${t}/jobs`)}deleteUpload(t){return this.http.delete(`${this.baseUrl}/uploads/${t}`)}archiveUpload(t){return this.http.put(`${this.baseUrl}/uploads/${t}/archive`,{})}unarchiveUpload(t){return this.http.put(`${this.baseUrl}/uploads/${t}/unarchive`,{})}retryLastFailedJob(t){return this.http.put(`${this.baseUrl}/uploads/${t}/jobs/retry-last-failed`,{})}assignUploadToProject(t){return this.http.post(`${this.baseUrl}/uploads/${t.uploadId}/projects/${t.projectId}`,null)}updateUpload(t){return this.http.put(`${this.baseUrl}/uploads/${t.uploadId}`,t.uploadAttributes)}createUpload(t,e){return this.http.post(`${this.baseUrl}/uploads`,{name:t,projectId:e})}uploadKlicFileToS3(t,e){new FormData().append(`file`,t);let r=new fe({"Content-Type":t.type});return this.http.put(e,t,{headers:r,reportProgress:!0,observe:`events`}).pipe(this.upload())}uploadS3Done(t){return this.http.post(`${this.baseUrl}/uploads/done`,{uploadId:t})}async getDesignLayerNames(t,e){let s=new FormData;return s.append(`file`,t),Pv(this.http.post(`${this.baseUrl}/uploads/designs/layers?type=${e}`,s))}async uploadDesign(t,e,s,r){let i=`${this.baseUrl}/uploads/designs?type=${e}`;s&&s.length>0&&(i+=`&layers=${encodeURIComponent(JSON.stringify(s))}`),r&&(i+=`&fmeFileRef=${encodeURIComponent(r)}`);let p=t?(()=>{let g=new FormData;return g.append(`file`,t),g})():{};return await Pv(this.http.post(i,p))}listVeiligGravenItemsForMap(t,e){return this.http.get(`${this.baseUrl}/uploads/${t}/veilig-graven-items-intersecting-point`,{params:e})}listOtherActiveUploadsInProject(t,e){return this.http.get(`${this.baseUrl}/uploads/${t}/other-active-uploads`,{params:e})}createAndSendShareUrl(t,e){return this.http.post(`${this.baseUrl}/uploads/${t}/share-url`,r({},e))}listKlicAttachments(t){return this.http.get(`${this.baseUrl}/klic/${t}/klic-attachments`)}listKlicExtraDetails(t){return this.http.get(`${this.baseUrl}/klic/${t}/klic-extra-detail`)}listKlicMetaData(t){return this.http.get(`${this.baseUrl}/klic/${t}/metadata`)}listProjectReportData(t,e){return this.http.get(`${this.baseUrl}/organisations/${t}/projects/${e}/report-data`)}listKlicNetworkObjects(t,e){return this.http.get(`${this.baseUrl}/klic/${t}/network-objects`,{params:e})}getBasemapUrl(t){return`${this.baseUrl}/uploads/${t.uploadId}/basemap`}getBasemapDownloadUrl(t){return`${this.baseUrl}/uploads/${t.uploadId}/basemap_compressed`}getLeveringsbriefDownloadUrl(t){return`${this.baseUrl}/uploads/${t.uploadId}/leveringsbrief`}getKlicFileDownloadUrl(t){return`${this.baseUrl}/uploads/${t.uploadId}/download/${t.fileId}/attachment`}getKlicDownloadUrl(t){return this.http.get(`${e.apiBaseUrl}/api/v1/uploads/${t}/download`,{responseType:`blob`})}getKlicFilesZipUrl(t){return`${this.baseUrl}/klic/${t}/files`}listUploadLogs(t,e){return this.http.get(`${this.baseUrl}/uploads/${t}/logs`,{params:{actionTypes:e}})}getUserLogsByUploadId(t,e){return this.http.get(`${this.baseUrl}/organisations/${t}/uploads/${e}/user-logs`)}getUserLogsByProjectId(t,e){return this.http.get(`${this.baseUrl}/organisations/${t}/projects/${e}/user-logs`)}getExportsUrl(t){return t.uploadId?`${e.apiBaseUrl}/exports/${t.organisationApiKey}/uploads/${t.uploadId}/klic/${t.urlType}`:t.projectId?`${e.apiBaseUrl}/exports/${t.organisationApiKey}/projects/${t.projectId}/klic/${t.urlType}`:`${e.apiBaseUrl}/exports/${t.organisationApiKey}/klic/${t.urlType}?`}getLeveringDownloadUrlForUpload(t){return this.http.get(`${this.baseUrl}/organisations/${t.organisationId}/uploads/${t.uploadId}/offline`,{})}searchKvkCompanies(t){return this.http.get(`${this.baseUrl}/kvk`,{params:{searchTerm:t.searchTerm}})}getKvkCompanyAddress(t){return this.http.get(`${this.baseUrl}/kvk/${t.vestigingsnummer}/address`)}export(t){return this.http.get(`${t}`,{responseType:`blob`})}emailFileExport(t){if(t.selectedUploadId)return this.http.get(`${this.baseUrl}/uploads/${t.selectedUploadId}/download-fme`,{params:r({outputFormat:t.outputFormat,emailTo:t.emailTo,exportType:t.exportType,exportConfiguration:t.exportConfiguration||``,exportFilters:t.exportFilters||[],userName:t.userName,veiligGravenContent:t.veiligGravenContent||``},t.groupByNetbeheerder!==void 0?{GROUP_BY_NETBEHEERDER:t.groupByNetbeheerder}:{})});if(t.projectId&&t.organisationId)return this.http.get(`${this.baseUrl}/organisations/${t.organisationId}/projects/${t.projectId}/download-fme`,{params:r({outputFormat:t.outputFormat,emailTo:t.emailTo,exportType:t.exportType,exportConfiguration:t.exportConfiguration||``,exportFilters:t.exportFilters||[],userName:t.userName,veiligGravenContent:t.veiligGravenContent||``},t.groupByNetbeheerder!==void 0?{GROUP_BY_NETBEHEERDER:t.groupByNetbeheerder}:{})});throw new Error(`Either selectedUploadId or both projectId and organisationId must be provided`)}emailProjectAreaExport(t){return this.http.get(`${this.baseUrl}/organisations/${t.organisationId}/projects/${t.projectId}/project-area`,{params:{outputFormat:t.outputFormat,email:t.emailTo,userName:t.userName}})}createRiskGrid(t){return this.http.post(`${this.baseUrl}/uploads/${t}/risk-grid`,{})}deleteRiskGrid(t){return this.http.delete(`${this.baseUrl}/uploads/${t}/risk-grid`)}createOrder(t){return this.http.post(`${this.baseUrl}/orders`,t)}getOrder(t){return this.http.get(`${this.baseUrl}/orders/${t}`)}async buildPolygon(t){return await Pv(this.http.post(`${this.baseUrl}/orders/request-area`,{featureCollection:t}))}async chopArea(t,e,s){return await Pv(this.http.post(`${this.baseUrl}/orders/chopped-request-area`,{featureCollection:t,size:e,snap_to_area:s}))}listOrderItems(t,e,s,r){let i={};return t!==void 0&&(i.limit=t),e!==void 0&&(i.page=e),s!==void 0&&(i.q=s),r!==void 0&&(i.status=r),this.http.get(`${this.baseUrl}/order-items`,{params:i})}getOrderItem(t){return this.http.get(`${this.baseUrl}/order-items/${t}`)}deleteOrderItem(t){return this.http.delete(`${this.baseUrl}/order-items/${t}`)}updateOrderItemPostdata(t,e){return this.http.patch(`${this.baseUrl}/order-items/${t}/postdata`,{postdata:e})}triggerKadasterRequest(t){return this.http.get(`${this.baseUrl}/order-items/${t}/trigger-kadaster-request`)}getOrderItemByUploadId(t){return this.http.get(`${this.baseUrl}/uploads/${t}/order-items`)}uploadFile(t){let e=new FormData;return e.append(`file`,t),/iPad|iPhone|iPod/.test(navigator.userAgent)?He(t.arrayBuffer()).pipe(bd(r=>{let i=t.name.includes(`.`)?t.name.split(`.`).pop():`jpg`,p=t.name===`image.jpg`||t.name===`image.png`||t.name===`image.heic`?`foto-${Date.now()}.${i}`:t.name,h=new FormData;return h.append(`file`,new Blob([r],{type:t.type}),p),this.http.post(`${this.baseUrl}/files`,h)}),be(r=>({state:`DONE`,progress:100,body:r})),wd({state:`PENDING`,progress:0})):this.http.post(`${this.baseUrl}/files`,e,{reportProgress:!0,observe:`events`}).pipe(this.upload())}deleteFile(t){return this.http.delete(`${this.baseUrl}/files/${t}`)}getFileDownloadUrl(t){return`${this.baseUrl}/files/${t}`}referral(t){return this.http.post(`${this.baseUrl}/referral`,t)}logActivity(t){return this.http.post(`${this.baseUrl}/users/${t}/activity`,{})}getExportExampleUrl(t){return`${this.baseUrl}/example-files?exportFormat=${t}`}getAddressesByBbox(t){let e={minLat:t.minLat.toString(),minLon:t.minLon.toString(),maxLat:t.maxLat.toString(),maxLon:t.maxLon.toString()};return t.start!==void 0&&(e.start=t.start.toString()),t.rows!==void 0&&(e.rows=t.rows.toString()),this.http.get(`${this.baseUrl}/house-connections`,{params:e})}createOpenKlicLog(t){return this.http.post(`${this.baseUrl}/logs/open-klic-melding`,t)}createGeolocationLog(t){return this.http.post(`${this.baseUrl}/logs/geolocation-klic-viewer`,t)}sendPhoneNumberVerificationSMS(t,e){return this.http.post(`${this.baseUrl}/auth/user/${t}/send-verification-sms`,e)}getVeiligheidsgebieden(){return this.http.get(`${this.baseUrl}/veiligheidsgebieden`)}static{this.ɵfac=function(e){return new(e||n)(qe(No))}}static{this.ɵprov=re({token:n,factory:n.ɵfac,providedIn:d})}}return n})();export{O as t};
//# debugId=24104380-bcc0-5c30-bdcc-1643430b913a
//# sourceMappingURL=chunk-YEoapGtr.js.map