shared-ritm 1.3.139 → 1.3.140

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.
@@ -19974,6 +19974,9 @@ class bE extends sn {
19974
19974
  createPurchase(t) {
19975
19975
  return this.post("purchase/create", t);
19976
19976
  }
19977
+ getPurchaseCard(t, n) {
19978
+ return this.get(`/purchase/${t}/stages/${n}/card`);
19979
+ }
19977
19980
  // public async exitVisitorLog(id: string): Promise<Api_Visitor_Dto> {
19978
19981
  // return await this.post(`exit_visitor_log/${id}`, {})
19979
19982
  // }
@@ -7,7 +7,7 @@
7
7
  `);return E===-1?"":w.stack.slice(E+1)})();try{if(!Q.stack)Q.stack=C;else if(C){const E=C.indexOf(`
8
8
  `),e=E===-1?-1:C.indexOf(`
9
9
  `,E+1),t=e===-1?"":C.slice(e+1);String(Q.stack).endsWith(t)||(Q.stack+=`
10
- `+C)}}catch{}}throw Q}}_request(B,g){typeof B=="string"?(g=g||{},g.url=B):g=B||{},g=$Q(this.defaults,g);const{transitional:Q,paramsSerializer:w,headers:C}=g;Q!==void 0&&ie.assertOptions(Q,{silentJSONParsing:wg.transitional(wg.boolean),forcedJSONParsing:wg.transitional(wg.boolean),clarifyTimeoutError:wg.transitional(wg.boolean),legacyInterceptorReqResOrdering:wg.transitional(wg.boolean),advertiseZstdAcceptEncoding:wg.transitional(wg.boolean),validateStatusUndefinedResolves:wg.transitional(wg.boolean)},!1),w!=null&&(V.isFunction(w)?g.paramsSerializer={serialize:w}:ie.assertOptions(w,{encode:wg.function,serialize:wg.function},!0)),g.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?g.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:g.allowAbsoluteUrls=!0),ie.assertOptions(g,{baseUrl:wg.spelling("baseURL"),withXsrfToken:wg.spelling("withXSRFToken")},!0),g.method=(g.method||this.defaults.method||"get").toLowerCase();let E=C&&V.merge(C.common,C[g.method]);C&&V.forEach(["delete","get","head","post","put","patch","query","common"],Y=>{delete C[Y]}),g.headers=Qg.concat(E,C);const e=[];let t=!0;this.interceptors.request.forEach(function(D){if(typeof D.runWhen=="function"&&D.runWhen(g)===!1)return;t=t&&D.synchronous;const r=g.transitional||ko;r&&r.legacyInterceptorReqResOrdering?e.unshift(D.fulfilled,D.rejected):e.push(D.fulfilled,D.rejected)});const n=[];this.interceptors.response.forEach(function(D){n.push(D.fulfilled,D.rejected)});let I,i=0,c;if(!t){const Y=[YY.bind(this),void 0];for(Y.unshift(...e),Y.push(...n),c=Y.length,I=Promise.resolve(g);i<c;)I=I.then(Y[i++],Y[i++]);return I}c=e.length;let M=g;for(;i<c;){const Y=e[i++],D=e[i++];try{M=Y(M)}catch(r){D.call(this,r);break}}try{I=YY.call(this,M)}catch(Y){return Promise.reject(Y)}for(i=0,c=n.length;i<c;)I=I.then(n[i++],n[i++]);return I}getUri(B){B=$Q(this.defaults,B);const g=CY(B.baseURL,B.url,B.allowAbsoluteUrls,B);return OM(g,B.params,B.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(B){Aw.prototype[B]=function(g,Q){return this.request($Q(Q||{},{method:B,url:g,data:Q&&V.hasOwnProp(Q,"data")?Q.data:void 0}))}}),V.forEach(["post","put","patch","query"],function(B){function g(Q){return function(C,E,e){return this.request($Q(e||{},{method:B,headers:Q?{"Content-Type":"multipart/form-data"}:{},url:C,data:E}))}}Aw.prototype[B]=g(),B!=="query"&&(Aw.prototype[B+"Form"]=g(!0))});let xf=class Sa{constructor(B){if(typeof B!="function")throw new TypeError("executor must be a function.");let g;this.promise=new Promise(function(C){g=C});const Q=this;this.promise.then(w=>{if(!Q._listeners)return;let C=Q._listeners.length;for(;C-- >0;)Q._listeners[C](w);Q._listeners=null}),this.promise.then=w=>{let C;const E=new Promise(e=>{Q.subscribe(e),C=e}).then(w);return E.cancel=function(){Q.unsubscribe(C)},E},B(function(C,E,e){Q.reason||(Q.reason=new SC(C,E,e),g(Q.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(B){if(this.reason){B(this.reason);return}this._listeners?this._listeners.push(B):this._listeners=[B]}unsubscribe(B){if(!this._listeners)return;const g=this._listeners.indexOf(B);g!==-1&&this._listeners.splice(g,1)}toAbortSignal(){const B=new AbortController,g=Q=>{B.abort(Q)};return this.subscribe(g),B.signal.unsubscribe=()=>this.unsubscribe(g),B.signal}static source(){let B;return{token:new Sa(function(w){B=w}),cancel:B}}};function Xf(A){return function(g){return A.apply(null,g)}}function Of(A){return V.isObject(A)&&A.isAxiosError===!0}const bo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(bo).forEach(([A,B])=>{bo[B]=A});function DY(A){const B=new Aw(A),g=RM(Aw.prototype.request,B);return V.extend(g,Aw.prototype,B,{allOwnKeys:!0}),V.extend(g,B,null,{allOwnKeys:!0}),g.create=function(w){return DY($Q(A,w))},g}const NB=DY(bC);NB.Axios=Aw,NB.CanceledError=SC,NB.CancelToken=xf,NB.isCancel=AY,NB.VERSION=po,NB.toFormData=ee,NB.AxiosError=aA,NB.Cancel=NB.CanceledError,NB.all=function(B){return Promise.all(B)},NB.spread=Xf,NB.isAxiosError=Of,NB.mergeConfig=$Q,NB.AxiosHeaders=Qg,NB.formToJSON=A=>$M(V.isHTMLForm(A)?new FormData(A):A),NB.getAdapter=MY.getAdapter,NB.HttpStatusCode=bo,NB.default=NB;const{Axios:LT,AxiosError:VT,CanceledError:KT,isCancel:xT,CancelToken:XT,VERSION:OT,all:ZT,Cancel:qT,isAxiosError:_T,spread:$T,toFormData:Aj,AxiosHeaders:Bj,HttpStatusCode:gj,formToJSON:Qj,getAdapter:wj,mergeConfig:Cj,create:Ej}=NB;var ce=!1,So=[];class TB{constructor(){Wa(this,"axiosInstance");this.axiosInstance=NB.create({baseURL:window.__ENV__.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"},withCredentials:!0}),this.axiosInstance.interceptors.request.use(B=>(B.headers.Authorization=`Bearer ${this.getAccessToken()}`,B),B=>Promise.reject(B)),this.axiosInstance.interceptors.response.use(B=>B.data,async B=>{var Q;const g=B.config;if(((Q=B.response)==null?void 0:Q.status)!==401||g.url==="/v2/auth/refresh"||g.url==="/v2/login"||g._retry)return Promise.reject(B);if(g._retry=!0,ce)return new Promise(w=>{this.subscribeTokenRefresh(()=>w(this.axiosInstance(g)))});ce=!0;try{const C=(await this.refresh()).accessToken;return C?(this.setAccessToken(C),this.onRefreshed(),ce=!1,this.axiosInstance(g)):(this.logoutUser(),Promise.reject(B))}catch(w){return this.logoutUser(),Promise.reject(w)}})}setAccessToken(B){localStorage.setItem("token",B)}getAccessToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}subscribeTokenRefresh(B){So.push(B)}refresh(){return this.post("/v2/auth/refresh",null)}onRefreshed(){So.forEach(B=>B()),So=[]}logoutUser(){ce=!1,this.post("/v2/logout",null),this.removeToken(),window.location.href="/sign-in"}handleError(B){B.response?console.error("API Error:",B.response.status,B.response.data):B.request?console.error("No response received:",B.request):console.error("Error during request setup:",B.message)}async get(B,g){try{const Q=await this.axiosInstance.get(B,g);return(Q==null?void 0:Q.data)===!1?!1:(Q==null?void 0:Q.data)??Q}catch(Q){const w=Q;throw this.handleError(w),Q}}async delete(B,g){try{return await this.axiosInstance.delete(B,g)}catch(Q){const w=Q;throw this.handleError(w),Q}}async post(B,g,Q){try{const w=await this.axiosInstance.post(B,g,Q);return(w==null?void 0:w.data)===!1?!1:(w==null?void 0:w.data)||w}catch(w){const C=w;throw this.handleError(C),w}}async patch(B,g,Q){try{return(await this.axiosInstance.patch(B,g,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}async put(B,g,Q){try{return(await this.axiosInstance.put(B,g,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}}class Zf extends TB{async fetchCriticalPathTasks(B){return await this.get(`gantt/get_list_task_on_critical_path?${B}`)}async fetchGanttList(B){return await this.get(`/list/tasks/search?${B}&gantt=1`)}async setFixPlan(B){const g=new URLSearchParams;return g.append("projects[0]",B),g.append("filter[state]","1"),await this.post(`/gantt/set-planned-date?${g.toString()}`,null)}getLinksByProject(B){return this.get(`gantt/${B}/links/list`)}createLink(B){return this.post("gantt/task/link",B)}editLink(B,g){return this.put(`gantt/task/link/${B}`,g)}deleteLink(B){return this.delete(`gantt/task/link/${B}`)}recalculateLinks(B){return this.post("gantt/project/links/recalculate",B)}}let Lo;function qf(){return Lo||(Lo=new Zf),Lo}class _f extends TB{async fetchPieProjects(B){return await this.get("repairs/pie/projects?"+B)}async fetchPieTasks(B){return await this.get("repairs/pie/tasks?"+B)}async fetchPiePersonnel(B){return await this.get("repairs/metrics/get_list_position?"+B)}async fetchPersonnelData(B){return await this.get("repairs/metrics/list_position_intersection_group_by_status?"+B)}async fetchPersonnelInfo(B){return await this.get(`repairs/metrics/list_position_intersection_details?${B}`)}async fetchPersonnelDataNew(B){return await this.get("repairs/metrics/v2/list_position_intersection_group_by_status?"+B)}async fetchPersonnelInfoNew(B){return await this.get(`repairs/metrics/v2/list_position_intersection_details?${B}`)}async fetchPersonnelUnused(B){return await this.get("repairs/metrics/v2/unused_brigade_personnel",{params:B})}async fetchPiePersonnelInfo(B){return await this.get(`repairs/metrics/get_list_user_by_position?${B}`)}async fetchPieCriticalPath(B){return await this.get("repairs/metrics/get_critical_path_group_by_status?"+B)}async fetchPieCriticalPathInfo(B){return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${B}`)}async fetchPieTmc(B){return await this.get("repairs/metrics/get_list_instrument_type?"+B)}downloadInstruments(B){return this.get("repairs/metrics/get_list_instrument_type",{params:B,responseType:"blob"})}async fetchPieTmcInfo(B){return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${B}`)}async fetchPieUntimelyClosedTask(B){return await this.get("repairs/metrics/get_list_comment_type?"+B)}async fetchPieUntimelyClosedTaskInfo(B){return await this.get(`repairs/metrics/get_list_task_by_comment_type?${B}`)}async fetchPieAdditionalTasks(B){return await this.get("repairs/metrics/get_list_task_after_plan_fixate_group_by_status?"+B)}async fetchPieAdditionalTasksInfo(B){return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${B}`)}async fetchPersonnel(B){return await this.get("repairs/statistic/personnel?"+B)}async fetchPieExpired(B){return await this.get("repairs/metrics/get_list_task_expired_group_by_status?"+B)}async fetchPieExpiredInfo(B){return await this.get(`repairs/metrics/get_list_task_expired?${B}`)}async fetchEconomicsPerformance(B){return await this.get(`repairs/metrics/get_economic_performance?${B}`)}async fetchEconomicsInfo(B){return await this.get(`repairs/metrics/get_list_task_economic_performance?${B}`)}async fetchQualityMetrics(B){return await this.get(`repairs/metrics/get_quality_metrics?${B}`)}async fetchQualityInfo(B){return await this.get(`repairs/metrics/get_list_task_by_quality?${B}`)}async fetchPieWorkZone(B){return await this.get("repairs/metrics/get_statistics_on_controller_zones?"+B)}async fetchWorkZoneInfo(B){return await this.get("exposed_equipment_zones/list?"+B)}async fetchPieAllTasks(B){return await this.get("repairs/metrics/get_list_task_group_by_status?"+B)}async fetchPieAllTasksInfo(B){return await this.get("repairs/metrics/get_list_task_by_status",{params:B})}async exportAllTasksInfo(B){return await this.get("repairs/metrics/get_list_task_by_status",{params:B,responseType:"blob"})}fetchPersonnelPlan(B){return this.get("repairs/metrics/personnel_plan",{params:B})}fetchPersonnelPlanProjects(B){return this.post("repairs/metrics/projects_with_personnel_plan",B)}fetchInstrumentsPlan(B){return this.get("repairs/metrics/instruments_plan",{params:B})}fetchPerformanceAssigned(B){return this.get(`repairs/get_performance_assigned/${B}`)}fetchTasksByStatusProjects(B){return this.get("repairs/metrics/get_list_task_by_status/projects",{params:B})}async fetchWarehouseByCompliance(B){return await this.get(`repairs/metrics/get_warehouse_by_compliance?${B}`)}async fetchWarehouseByComplianceDetails(B){return await this.get(`repairs/metrics/get_warehouse_by_compliance/details?${B}`)}async fetchEquipmentTree(B){return await this.get(`repairs/equipments/get_equipment_tree_repaired_not_repaired?${B}`)}}let Vo;function $f(){return Vo||(Vo=new _f),Vo}class Am extends TB{async fetchProjectById(B){return this.get(`/projects/${B}`)}createProject(B){return this.post("/projects",B)}editProject(B,g){return this.put(`/projects/${B}`,g)}fetchProjects(B){return this.get("/search/projects",{params:B})}cloneProject(B){return this.post(`projects/${B.id}/clone`,B)}archiveProject(B,g){return this.put(`/projects/${B}`,g)}unArchiveProject(B,g){return this.put(`/projects/${B}`,g)}moveAprProject(B){return this.post("repairs/move_plan_to_real",{repairs:[B]})}restoreProject(B){return this.post("/restore_project",{projects_ids:[B]})}importTasks(B){return this.post("tasks/import",B)}importKtd(B){return this.post("/parse_ktd",B,{headers:{"Content-Type":"multipart/form-data"}})}checkStatusParser(B){return this.post("/check_parse_ktd",B)}fetchProjectTeamList(B){return this.put(`/projects/${B}`,null)}deleteProject(B){return this.delete(`/projects/${B}`)}getDynamicProgressWidget(B){return this.get(`repairs/get_repair_list_dynamics_performance?repair_id_list[]=${B}`)}removeRootIntervals(){return this.post("/delete/fake/projects",null)}addRootIntervals(B,g){return this.post(`/set/fake/projects/${B}`,g)}}let Ko;function Bm(){return Ko||(Ko=new Am),Ko}class gm extends TB{fetchFilters(B){return this.get(`get_list_repair?smart=1&${B}`)}fetchRepairs(B,g,Q,w,C){return this.get("get_list_repair"+(B?`${g}&per_page=100000${C?"&"+C:""}&${Q?"":w}`:`?per_page=100000${C?"&"+C:""}&${w}`))}fetchRepairTemplates(B){return this.get("repairs/get_repair_template_list",{params:B})}createRepair(B){return this.post("/repairs/equipments",B)}createRepairFromTemplate(B){return this.post("/repairs/create_repair_from_repair_template",B)}startRepair(B){return this.post(`/repairs/${B}/start`,null)}finishRepair(B){return this.post("/repairs/complete_repair_list",{repairIdList:[B]})}finishPreparationProject(B){return this.post(`/repairs/${B}/finish_preparation`,null)}moveRepairToCurrent(B){return this.post("/repairs/transfer_repair_plan_to_current",{repairs:[B]})}moveArchiveToCurrent(B){return this.post("/repairs/transfer_repair_archive_to_current",{repairs_ids:[B]})}moveRepairToApr(B){return this.post("/repairs/transfer_repair_current_to_plan",{repairs:[B]})}moveRepairToArchive(B){return this.post("/repairs/transfer_repair_current_to_archive",{repairs_ids:[B]})}restoreRepair(B){return this.post("/restore_repair",{repairs_ids:[B]})}updateRepair(B,g){return this.put(`/repairs/${g}`,B)}copyRepair(B){return this.post(`/repairs/${B}/clone`,null)}deleteRepair(B){return this.delete(`/repairs/${B}`)}fetchIntersection(B){return this.get(`v3/repairs/${B}/personnel/intersection`)}}let xo;function Qm(){return xo||(xo=new gm),xo}class wm extends TB{fetchTaskById(B){return this.get(`/tasks/${B}`)}fetchTasksList(B){return this.get("/list/tasks/search",{params:B})}fetchSubtasksList(B){return this.get(`/task/${B}/subtasks/list`)}fetchIntersectionsList(B){return this.get(`/tasks/${B}/intersections`)}fetchTaskBranch(B){return this.get(`/get_list_task_branch?task_id=${B}`)}fetchInstrumentsList(B){return this.get("admin/instruments",{params:B})}fetchInstrumentTypeListWithPreparedWarehouse(B){return this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:B})}downloadInstrumentTypeListWithPreparedWarehouse(B){return this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{responseType:"blob",params:B})}fetchInstrumentsEquivalentList(B){return this.get("tasks/instrument/list",{params:B})}fetchDiffInstruments(B){return this.get(`tasks/${B.taskId}/fill/module`,{params:B})}replaceInstruments(B){return this.post("/instruments/equivalent/attach",B)}fetchTaskUsagePersonal(B){return this.get(`tasks/${B}/usage/users`)}fetchTaskUsageInstrument(B){return this.get(`tasks/${B}/usage/instruments`)}fetchEquipment(B){return this.get("repairs/equipment/list",{params:B})}fetchTaskVideoSources(B){return this.get("work_zone/get_list_video_source",{params:B})}fetchTaskVideoSourcesStream(B){return this.get("horizon/video-source",{params:B})}createWorkZone(B){return this.post("admin/work-zones",B)}createTask(B){return this.post("tasks",B)}editTask(B,g){return this.put(`tasks/${B}`,g)}mergeTask(B){return this.post("tasks/merge",B)}cloneTask(B,g){return this.post(`gantt/${B}/clone`,g)}deleteTask(B){return this.delete(`tasks/${B}`)}changeStatus(B,g){return this.put(`task/${B}/change-status`,{status_id:g})}saveMetrics(B){return this.put("/update_quality_metrics",B)}checkReasonForStatus(B){return this.post("/tasks/check_reason_for_task",{task_id:B})}verifyTaskStatus(B,g){return this.get(`/task/${B}/change-status/verification`,{params:{status_id:g}})}checkBranchBeforeCloseTask(B){return this.post("/check_branch_before_close_task",{task_id:B})}}let Xo;function Cm(){return Xo||(Xo=new wm),Xo}class Em extends TB{login(B,g){return this.post("/v2/login",{email:B,password:g})}loginPhoto(B){return this.post("/login/from_photo",{photo:B})}loginVideo(B){return this.post("/login/video",B,{transformRequest:g=>g})}logout(){return this.logoutUser()}userInfo(){return this.get("/users/auth")}configs(){return this.get("/v2/configs")}changePassword(B,g,Q){return this.put(`/v2/auth/users/${B}/password`,{password:g,password_confirmation:Q})}changePasswordAndActivate(B,g,Q,w){return this.post("/v2/auth/users/activate",{email:B,currentPassword:g,password:Q,passwordConfirmation:w})}}let Oo;function em(){return Oo||(Oo=new Em),Oo}class tm extends TB{uploadFile(B){return this.post("/upload-file",B,{headers:{"Content-Type":"multipart/form-data"}})}}let Zo;function om(){return Zo||(Zo=new tm),Zo}class nm extends TB{async startVideoAnalytics(){return await this.post("/statanly/start",null)}reloadVideoAnalytics(B){return this.post("/horizon/video-source/reload",{video_source_ids:B})}hardReloadStream(){return this.post("horizon/video-source/streams/add",null)}async fetchWorkZones(B){return await this.get("/search/work_zones",{params:B})}async fetchWorkZone(B){return await this.get(`/work_zone/get_work_zone/${B}`)}async editWorkZone(B,g){return await this.put(`/admin/work-zones/${B}`,g)}async deleteWorkZone(B){return await this.delete(`/admin/work-zones/${B}`)}async fetchVideoSources(B){return await this.get("/search/video_sources/list",{params:B})}async fetchVideoSourceEconomics(B){return await this.get("horizon/video-source/economics",{params:B})}async createVideoSource(B){return await this.post("horizon/video-source",B)}async editVideoSource(B,g){return await this.put(`/horizon/video-source/${B}`,g)}async deleteVideoSource(B){await this.delete(`/horizon/video-source/${B}`)}async fetchListRepairsVideoSource(B){return await this.get("work_zone/get_list_video_source_by_repair",{params:B})}async sendCombination(B){return await this.post("horizon/video-source/training",B)}async saveCombination(B){return await this.post("horizon/video-source/bind",B)}async fetchCombination(B){return await this.get("horizon/video-source/bind/show",{params:B})}async startTraining(B){return await this.post("horizon/video-source/training/start",B)}async stopTraining(B){return await this.post("horizon/video-source/training/stop",B)}async fetchTrainingInfo(B){return await this.get("horizon/video-source/training/info",{params:B})}async fetchTrainingStatus(B){return await this.get("horizon/video-source/training/status",{params:B})}async fetchVisualizationDataLink(B){return await this.get("horizon/video-source/link/video/training",{params:B})}async updateVisualizationData(B){return await this.get("horizon/video-source/download/video/training",{params:B})}async deleteFrameFromVideo(B){await this.delete(`horizon/video-source/delete/fragment/video/training/${B}`)}async sendEvent(B){return await this.post("alerts_callback_url",B)}}let qo;function Im(){return qo||(qo=new nm),qo}class im extends TB{async editUser({id:B,model:g}){return await this.put(`/admin/users/${B}`,g)}async getUser(B){return await this.get(`/admin/users/${B}`)}async changeUserPassword(B){return await this.patch("/v2/auth/users/password",B)}async getUserWarehouses(B){return await this.get("users/get_warehouse_list_by_user",{params:B})}async createUser(B){return await this.post("/admin/users",B)}async deleteUser({user_id:B,archive_reason:g}){return await this.post("/users/archive_user",{user_id:B,archive_reason:g})}async deleteUserPhotos({user_id:B,photos:g}){return await this.post("/users/photos/delete",{user_id:B,photos:g})}async restoreUser(B){return await this.post("/users/restore_user",{user_id:B})}async getRoles(B){return await this.get("/search/roles",{params:B})}async getPositions(B){return await this.get("/search/positions",{params:B})}async createPosition(B){return await this.post("/admin/positions",B)}async editPosition(B,g){return await this.put(`/admin/positions/${B}`,g)}async deletePosition(B){return await this.delete(`/admin/positions/${B}`)}async getTeams(B){return await this.get("/search/teams",{params:B})}async createTeam(B){return await this.post("/teams",B)}async editTeam(B,g){return await this.patch(`/teams/${B}`,g)}async deleteTeam(B){return await this.delete(`/teams/${B}`)}async checkUserVectors(B){return await this.get(`/user/get-vectors/${B}`)}async checkArchiveUserVectors(B){return await this.get(`/users/get_vector_count_by_user?user_id=${B}`)}async addUserVectors(B){return await this.post("/user/add-vector",B,{headers:{"Content-Type":"multipart/form-data"}})}async removeUserVectors(B){return await this.delete(`/user/delete-vectors/${B}`)}async deleteUserPasses(B){return await this.post("admin/delete/passes",B)}async checkUserBeforeArchive(B){return await this.post("users/check_user_before_archive",B)}async getListVisitorLog(B){return await this.get("get_list_visitor_log",{params:B})}entryVisitorLog(B){return this.post("entry_visitor_log",B)}async exitVisitorLog(B){return await this.post(`exit_visitor_log/${B}`,{})}async deleteVisitorLog(B=[]){return await this.post("delete_not_in_zone_visitor_log",{visitor_log_list_id:B})}async getListVisitorHistories(B){return await this.get("get_list_visitor_log_histories",{params:B})}findUserByVideo(B){return this.post("/user/recognition",B,{transformRequest:g=>g})}}let _o;function cm(){return _o||(_o=new im),_o}class Mm extends TB{async fetchUserInstrumentsHistory(B,g){const Q={status:"issued",page:g,desc:"desc",column:"issued_in"};return await this.get(`users/${B}/instruments`,{params:Q})}async fetchDiscardWarehouses(B){return await this.get("v2/search/discards",{params:B})}async fetchWarehouses(B){return await this.get("search/warehouses",{params:B})}async fetchWarehouse(B){return await this.get(`admin/warehouses/${B}`)}async fetchStatusHistory(B){return await this.get(`warehouses/${B}/history/status`)}async createWarehouse(B){return await this.post("admin/warehouses",B)}async editWarehouse({id:B,model:g}){return await this.put(`admin/warehouses/${B}`,g)}deleteWarehouse(B){return this.delete(`admin/warehouses/${B}`)}changeStatusWarehouse(B){return this.put("v2/warehouses/status",B)}async unsetWarehouseRfid(B){return await this.post("warehouses/unset-rfid",B)}async searchInstruments(B){return await this.get("search/instruments",{params:B})}}let $o;function Ym(){return $o||($o=new Mm),$o}class rm extends TB{fetchControlZones(B){return this.get("/frame/list",{params:B})}async fetchControlZone(B){return this.get(`/frame/${B}`)}createControlZone(B){return this.post("/frame",B)}editControlZone(B,g){return this.put(`/frame/${B}`,g)}deleteControlZone(B){return this.delete(`/frame/${B}`)}fetchControlLogs(B){return this.get("/exposed_equipment_zones/list_for_controller",{params:B})}fetchControllers(B){return this.get("/frame/controllers/list",{params:B})}fetchUsersWithPasses(){return this.get("inspector/users-with-passes")}fetchWarehousesList(){return this.get("tasks/warehouse/list?only_outside_exposed_equipment_zone=1")}manualEntry(B){return this.post("exposed_equipment_zones/hand/enter",B)}manualExit(B){return this.post("exposed_equipment_zones/hand/exit",B)}deleteControlLogs(B){return this.delete("exposed_equipment_zones",B)}fetchInstrumentTypeList(B){return this.get("search/instrument_types",{params:B})}fetchInstrumentCategoryList(B={}){return this.get("instrument_category/list",{params:B})}createInstrumentType(B){return this.post("admin/instruments",B)}editInstrumentType(B,g){return this.put(`admin/instruments/${B}`,g)}deleteInstrumentType(B){return this.delete(`admin/instruments/${B}`)}fetchRpdzLogList(B){return this.get("exposed_equipment_zones_history/list",{params:B})}exportRpdzLogList(B){return this.get("exposed_equipment_zones_history/list/export",{params:B,responseType:"blob"})}editControlLog(B,g){return this.put(`exposed_equipment_zones/${B}`,g)}}let An;function Dm(){return An||(An=new rm),An}class am extends TB{fetchSearchUsers(B){return this.get("search/users",{params:B})}fetchSearchInstruments(B){return this.get("search/instrument_type",{params:B})}fetchSearchModules(B){return this.get("search/modules",{params:B})}}let Bn;function Fm(){return Bn||(Bn=new am),Bn}class sm extends TB{async detectModule(B){return await this.get(`module/${B}/detect`)}async createModule(B){return await this.post("admin/modules",B)}async editModule({id:B,model:g}){return await this.put(`admin/modules/${B}`,g)}deleteModule(B){return this.delete(`admin/modules/${B}`)}}let gn;function um(){return gn||(gn=new sm),gn}class lm extends TB{async uploadComment(B){return await this.post("comments",B)}async deleteComment(B){return await this.delete(`comments/${B}`)}async editComment(B,g){return await this.put(`comments/${B}`,g)}}let Qn;function hm(){return Qn||(Qn=new lm),Qn}class Um extends TB{fetchEquipmentById(B){return this.get(`repairs/equipment/${B}`)}fetchEquipment(B){return this.get("repairs/equipment/list",{params:B})}fetchEquipmentTree(B){return this.get(`repairs/equipments/get_tree_by_equipment/${B}`)}createEquipment(B){return this.post("repairs/equipment",B)}editEquipment(B,g){return this.put(`repairs/equipment/${B}`,g)}deleteEquipment(B){return this.delete(`repairs/equipment/${B}`)}fetchEquipmentTypeList(B){return this.get("repairs/equipments/get_equipment_type_list",{params:B})}fetchEquipmentType(B){return this.get(`repairs/equipments/get_equipment_type/${B}`)}createEquipmentType(B){return this.post("repairs/equipments/create_equipment_type",B)}editEquipmentType(B,g){return this.put(`repairs/equipments/update_equipment_type/${B}`,g)}deleteEquipmentType(B){return this.delete(`repairs/equipments/delete_equipment_type/${B}`)}checkEquipmentInChildTasks(B){return this.post("repairs/check_equipment_in_child_tasks",{task_id:B})}}let wn;function Gm(){return wn||(wn=new Um),wn}class dm extends TB{fetchBrigades(B){return this.get("/search/brigades",{params:B})}editBrigade({id:B,model:g}){return this.put(`/brigades/${B}`,g)}getBrigade(B){return this.get(`/brigades/${B}`)}createBrigade(B){return this.post("/brigades",B)}deleteBrigade(B){return this.delete(`/brigades/${B}`)}}let Cn;function Hm(){return Cn||(Cn=new dm),Cn}class fm extends TB{fetchScheduleConfig(){return this.get("schedule/config")}fetchSchedule(B){return this.get(`schedule/${B}`)}fetchScheduleTable(B){return this.get(`schedule/${B}/get_brigades_table`)}fetchBrigadesToSwap(B,g){return this.get(`schedule/${B}/selection_brigades_for_swap_shift_template`,{params:g})}completeBrigadeSchedule(B,g){return this.post(`schedule/${B}/complete_brigade_schedule`,g)}autocompleteBrigadesSchedule(B,g){return this.post(`schedule/${B}/autocomplete`,g)}addBrigadeShift(B,g){return this.post(`schedule/${B}/shifts`,g)}swapBrigadeShifts(B,g){return this.patch(`schedule/${B}/shifts/switch_shift_templates`,g)}editBrigadeShifts(B,g){return this.patch(`schedule/${B}/shifts`,g)}deleteBrigadeShifts(B,g){return this.delete(`schedule/${B}/shifts`,{data:{shift_ids:g}})}deleteBrigadesFromSchedule(B,g){return this.patch(`schedule/${B}/delete_brigades`,{brigade_ids:g})}}let En;function mm(){return En||(En=new fm),En}class Jm extends TB{async getPurchaseList(B){return await this.get("purchase/list",{params:B})}getPurchaseValue(B){return this.get("purchase/value",{params:B})}createPurchase(B){return this.post("purchase/create",B)}}let en;function Nm(){return en||(en=new Jm),en}class Rm extends TB{createUserIssue(B){return this.post("user_issue",B,{headers:{"Content-Type":"multipart/form-data"}})}getUserIssue(B){return this.get(`user_issue/${B}`)}getUserIssueList(B){return this.get("user_issue/list",{params:B})}getProperties(){return this.get("user_issue/properties")}deleteUserIssue(B){return this.delete(`user_issue/${B}`)}}let tn;function Pm(){return tn||(tn=new Rm),tn}/**
10
+ `+C)}}catch{}}throw Q}}_request(B,g){typeof B=="string"?(g=g||{},g.url=B):g=B||{},g=$Q(this.defaults,g);const{transitional:Q,paramsSerializer:w,headers:C}=g;Q!==void 0&&ie.assertOptions(Q,{silentJSONParsing:wg.transitional(wg.boolean),forcedJSONParsing:wg.transitional(wg.boolean),clarifyTimeoutError:wg.transitional(wg.boolean),legacyInterceptorReqResOrdering:wg.transitional(wg.boolean),advertiseZstdAcceptEncoding:wg.transitional(wg.boolean),validateStatusUndefinedResolves:wg.transitional(wg.boolean)},!1),w!=null&&(V.isFunction(w)?g.paramsSerializer={serialize:w}:ie.assertOptions(w,{encode:wg.function,serialize:wg.function},!0)),g.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?g.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:g.allowAbsoluteUrls=!0),ie.assertOptions(g,{baseUrl:wg.spelling("baseURL"),withXsrfToken:wg.spelling("withXSRFToken")},!0),g.method=(g.method||this.defaults.method||"get").toLowerCase();let E=C&&V.merge(C.common,C[g.method]);C&&V.forEach(["delete","get","head","post","put","patch","query","common"],Y=>{delete C[Y]}),g.headers=Qg.concat(E,C);const e=[];let t=!0;this.interceptors.request.forEach(function(D){if(typeof D.runWhen=="function"&&D.runWhen(g)===!1)return;t=t&&D.synchronous;const r=g.transitional||ko;r&&r.legacyInterceptorReqResOrdering?e.unshift(D.fulfilled,D.rejected):e.push(D.fulfilled,D.rejected)});const n=[];this.interceptors.response.forEach(function(D){n.push(D.fulfilled,D.rejected)});let I,i=0,c;if(!t){const Y=[YY.bind(this),void 0];for(Y.unshift(...e),Y.push(...n),c=Y.length,I=Promise.resolve(g);i<c;)I=I.then(Y[i++],Y[i++]);return I}c=e.length;let M=g;for(;i<c;){const Y=e[i++],D=e[i++];try{M=Y(M)}catch(r){D.call(this,r);break}}try{I=YY.call(this,M)}catch(Y){return Promise.reject(Y)}for(i=0,c=n.length;i<c;)I=I.then(n[i++],n[i++]);return I}getUri(B){B=$Q(this.defaults,B);const g=CY(B.baseURL,B.url,B.allowAbsoluteUrls,B);return OM(g,B.params,B.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(B){Aw.prototype[B]=function(g,Q){return this.request($Q(Q||{},{method:B,url:g,data:Q&&V.hasOwnProp(Q,"data")?Q.data:void 0}))}}),V.forEach(["post","put","patch","query"],function(B){function g(Q){return function(C,E,e){return this.request($Q(e||{},{method:B,headers:Q?{"Content-Type":"multipart/form-data"}:{},url:C,data:E}))}}Aw.prototype[B]=g(),B!=="query"&&(Aw.prototype[B+"Form"]=g(!0))});let xf=class Sa{constructor(B){if(typeof B!="function")throw new TypeError("executor must be a function.");let g;this.promise=new Promise(function(C){g=C});const Q=this;this.promise.then(w=>{if(!Q._listeners)return;let C=Q._listeners.length;for(;C-- >0;)Q._listeners[C](w);Q._listeners=null}),this.promise.then=w=>{let C;const E=new Promise(e=>{Q.subscribe(e),C=e}).then(w);return E.cancel=function(){Q.unsubscribe(C)},E},B(function(C,E,e){Q.reason||(Q.reason=new SC(C,E,e),g(Q.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(B){if(this.reason){B(this.reason);return}this._listeners?this._listeners.push(B):this._listeners=[B]}unsubscribe(B){if(!this._listeners)return;const g=this._listeners.indexOf(B);g!==-1&&this._listeners.splice(g,1)}toAbortSignal(){const B=new AbortController,g=Q=>{B.abort(Q)};return this.subscribe(g),B.signal.unsubscribe=()=>this.unsubscribe(g),B.signal}static source(){let B;return{token:new Sa(function(w){B=w}),cancel:B}}};function Xf(A){return function(g){return A.apply(null,g)}}function Of(A){return V.isObject(A)&&A.isAxiosError===!0}const bo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(bo).forEach(([A,B])=>{bo[B]=A});function DY(A){const B=new Aw(A),g=RM(Aw.prototype.request,B);return V.extend(g,Aw.prototype,B,{allOwnKeys:!0}),V.extend(g,B,null,{allOwnKeys:!0}),g.create=function(w){return DY($Q(A,w))},g}const NB=DY(bC);NB.Axios=Aw,NB.CanceledError=SC,NB.CancelToken=xf,NB.isCancel=AY,NB.VERSION=po,NB.toFormData=ee,NB.AxiosError=aA,NB.Cancel=NB.CanceledError,NB.all=function(B){return Promise.all(B)},NB.spread=Xf,NB.isAxiosError=Of,NB.mergeConfig=$Q,NB.AxiosHeaders=Qg,NB.formToJSON=A=>$M(V.isHTMLForm(A)?new FormData(A):A),NB.getAdapter=MY.getAdapter,NB.HttpStatusCode=bo,NB.default=NB;const{Axios:LT,AxiosError:VT,CanceledError:KT,isCancel:xT,CancelToken:XT,VERSION:OT,all:ZT,Cancel:qT,isAxiosError:_T,spread:$T,toFormData:Aj,AxiosHeaders:Bj,HttpStatusCode:gj,formToJSON:Qj,getAdapter:wj,mergeConfig:Cj,create:Ej}=NB;var ce=!1,So=[];class TB{constructor(){Wa(this,"axiosInstance");this.axiosInstance=NB.create({baseURL:window.__ENV__.VUE_APP_BACKEND,headers:{"Content-Type":"application/json",Accept:"application/json"},withCredentials:!0}),this.axiosInstance.interceptors.request.use(B=>(B.headers.Authorization=`Bearer ${this.getAccessToken()}`,B),B=>Promise.reject(B)),this.axiosInstance.interceptors.response.use(B=>B.data,async B=>{var Q;const g=B.config;if(((Q=B.response)==null?void 0:Q.status)!==401||g.url==="/v2/auth/refresh"||g.url==="/v2/login"||g._retry)return Promise.reject(B);if(g._retry=!0,ce)return new Promise(w=>{this.subscribeTokenRefresh(()=>w(this.axiosInstance(g)))});ce=!0;try{const C=(await this.refresh()).accessToken;return C?(this.setAccessToken(C),this.onRefreshed(),ce=!1,this.axiosInstance(g)):(this.logoutUser(),Promise.reject(B))}catch(w){return this.logoutUser(),Promise.reject(w)}})}setAccessToken(B){localStorage.setItem("token",B)}getAccessToken(){return localStorage.getItem("token")}removeToken(){localStorage.removeItem("token")}subscribeTokenRefresh(B){So.push(B)}refresh(){return this.post("/v2/auth/refresh",null)}onRefreshed(){So.forEach(B=>B()),So=[]}logoutUser(){ce=!1,this.post("/v2/logout",null),this.removeToken(),window.location.href="/sign-in"}handleError(B){B.response?console.error("API Error:",B.response.status,B.response.data):B.request?console.error("No response received:",B.request):console.error("Error during request setup:",B.message)}async get(B,g){try{const Q=await this.axiosInstance.get(B,g);return(Q==null?void 0:Q.data)===!1?!1:(Q==null?void 0:Q.data)??Q}catch(Q){const w=Q;throw this.handleError(w),Q}}async delete(B,g){try{return await this.axiosInstance.delete(B,g)}catch(Q){const w=Q;throw this.handleError(w),Q}}async post(B,g,Q){try{const w=await this.axiosInstance.post(B,g,Q);return(w==null?void 0:w.data)===!1?!1:(w==null?void 0:w.data)||w}catch(w){const C=w;throw this.handleError(C),w}}async patch(B,g,Q){try{return(await this.axiosInstance.patch(B,g,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}async put(B,g,Q){try{return(await this.axiosInstance.put(B,g,Q)).data}catch(w){const C=w;throw this.handleError(C),w}}}class Zf extends TB{async fetchCriticalPathTasks(B){return await this.get(`gantt/get_list_task_on_critical_path?${B}`)}async fetchGanttList(B){return await this.get(`/list/tasks/search?${B}&gantt=1`)}async setFixPlan(B){const g=new URLSearchParams;return g.append("projects[0]",B),g.append("filter[state]","1"),await this.post(`/gantt/set-planned-date?${g.toString()}`,null)}getLinksByProject(B){return this.get(`gantt/${B}/links/list`)}createLink(B){return this.post("gantt/task/link",B)}editLink(B,g){return this.put(`gantt/task/link/${B}`,g)}deleteLink(B){return this.delete(`gantt/task/link/${B}`)}recalculateLinks(B){return this.post("gantt/project/links/recalculate",B)}}let Lo;function qf(){return Lo||(Lo=new Zf),Lo}class _f extends TB{async fetchPieProjects(B){return await this.get("repairs/pie/projects?"+B)}async fetchPieTasks(B){return await this.get("repairs/pie/tasks?"+B)}async fetchPiePersonnel(B){return await this.get("repairs/metrics/get_list_position?"+B)}async fetchPersonnelData(B){return await this.get("repairs/metrics/list_position_intersection_group_by_status?"+B)}async fetchPersonnelInfo(B){return await this.get(`repairs/metrics/list_position_intersection_details?${B}`)}async fetchPersonnelDataNew(B){return await this.get("repairs/metrics/v2/list_position_intersection_group_by_status?"+B)}async fetchPersonnelInfoNew(B){return await this.get(`repairs/metrics/v2/list_position_intersection_details?${B}`)}async fetchPersonnelUnused(B){return await this.get("repairs/metrics/v2/unused_brigade_personnel",{params:B})}async fetchPiePersonnelInfo(B){return await this.get(`repairs/metrics/get_list_user_by_position?${B}`)}async fetchPieCriticalPath(B){return await this.get("repairs/metrics/get_critical_path_group_by_status?"+B)}async fetchPieCriticalPathInfo(B){return await this.get(`repairs/metrics/get_list_task_critical_path_by_status?${B}`)}async fetchPieTmc(B){return await this.get("repairs/metrics/get_list_instrument_type?"+B)}downloadInstruments(B){return this.get("repairs/metrics/get_list_instrument_type",{params:B,responseType:"blob"})}async fetchPieTmcInfo(B){return await this.get(`repairs/metrics/get_list_warehouse_by_instrument_type?${B}`)}async fetchPieUntimelyClosedTask(B){return await this.get("repairs/metrics/get_list_comment_type?"+B)}async fetchPieUntimelyClosedTaskInfo(B){return await this.get(`repairs/metrics/get_list_task_by_comment_type?${B}`)}async fetchPieAdditionalTasks(B){return await this.get("repairs/metrics/get_list_task_after_plan_fixate_group_by_status?"+B)}async fetchPieAdditionalTasksInfo(B){return await this.get(`repairs/metrics/get_list_task_after_plan_fixate_by_status?${B}`)}async fetchPersonnel(B){return await this.get("repairs/statistic/personnel?"+B)}async fetchPieExpired(B){return await this.get("repairs/metrics/get_list_task_expired_group_by_status?"+B)}async fetchPieExpiredInfo(B){return await this.get(`repairs/metrics/get_list_task_expired?${B}`)}async fetchEconomicsPerformance(B){return await this.get(`repairs/metrics/get_economic_performance?${B}`)}async fetchEconomicsInfo(B){return await this.get(`repairs/metrics/get_list_task_economic_performance?${B}`)}async fetchQualityMetrics(B){return await this.get(`repairs/metrics/get_quality_metrics?${B}`)}async fetchQualityInfo(B){return await this.get(`repairs/metrics/get_list_task_by_quality?${B}`)}async fetchPieWorkZone(B){return await this.get("repairs/metrics/get_statistics_on_controller_zones?"+B)}async fetchWorkZoneInfo(B){return await this.get("exposed_equipment_zones/list?"+B)}async fetchPieAllTasks(B){return await this.get("repairs/metrics/get_list_task_group_by_status?"+B)}async fetchPieAllTasksInfo(B){return await this.get("repairs/metrics/get_list_task_by_status",{params:B})}async exportAllTasksInfo(B){return await this.get("repairs/metrics/get_list_task_by_status",{params:B,responseType:"blob"})}fetchPersonnelPlan(B){return this.get("repairs/metrics/personnel_plan",{params:B})}fetchPersonnelPlanProjects(B){return this.post("repairs/metrics/projects_with_personnel_plan",B)}fetchInstrumentsPlan(B){return this.get("repairs/metrics/instruments_plan",{params:B})}fetchPerformanceAssigned(B){return this.get(`repairs/get_performance_assigned/${B}`)}fetchTasksByStatusProjects(B){return this.get("repairs/metrics/get_list_task_by_status/projects",{params:B})}async fetchWarehouseByCompliance(B){return await this.get(`repairs/metrics/get_warehouse_by_compliance?${B}`)}async fetchWarehouseByComplianceDetails(B){return await this.get(`repairs/metrics/get_warehouse_by_compliance/details?${B}`)}async fetchEquipmentTree(B){return await this.get(`repairs/equipments/get_equipment_tree_repaired_not_repaired?${B}`)}}let Vo;function $f(){return Vo||(Vo=new _f),Vo}class Am extends TB{async fetchProjectById(B){return this.get(`/projects/${B}`)}createProject(B){return this.post("/projects",B)}editProject(B,g){return this.put(`/projects/${B}`,g)}fetchProjects(B){return this.get("/search/projects",{params:B})}cloneProject(B){return this.post(`projects/${B.id}/clone`,B)}archiveProject(B,g){return this.put(`/projects/${B}`,g)}unArchiveProject(B,g){return this.put(`/projects/${B}`,g)}moveAprProject(B){return this.post("repairs/move_plan_to_real",{repairs:[B]})}restoreProject(B){return this.post("/restore_project",{projects_ids:[B]})}importTasks(B){return this.post("tasks/import",B)}importKtd(B){return this.post("/parse_ktd",B,{headers:{"Content-Type":"multipart/form-data"}})}checkStatusParser(B){return this.post("/check_parse_ktd",B)}fetchProjectTeamList(B){return this.put(`/projects/${B}`,null)}deleteProject(B){return this.delete(`/projects/${B}`)}getDynamicProgressWidget(B){return this.get(`repairs/get_repair_list_dynamics_performance?repair_id_list[]=${B}`)}removeRootIntervals(){return this.post("/delete/fake/projects",null)}addRootIntervals(B,g){return this.post(`/set/fake/projects/${B}`,g)}}let Ko;function Bm(){return Ko||(Ko=new Am),Ko}class gm extends TB{fetchFilters(B){return this.get(`get_list_repair?smart=1&${B}`)}fetchRepairs(B,g,Q,w,C){return this.get("get_list_repair"+(B?`${g}&per_page=100000${C?"&"+C:""}&${Q?"":w}`:`?per_page=100000${C?"&"+C:""}&${w}`))}fetchRepairTemplates(B){return this.get("repairs/get_repair_template_list",{params:B})}createRepair(B){return this.post("/repairs/equipments",B)}createRepairFromTemplate(B){return this.post("/repairs/create_repair_from_repair_template",B)}startRepair(B){return this.post(`/repairs/${B}/start`,null)}finishRepair(B){return this.post("/repairs/complete_repair_list",{repairIdList:[B]})}finishPreparationProject(B){return this.post(`/repairs/${B}/finish_preparation`,null)}moveRepairToCurrent(B){return this.post("/repairs/transfer_repair_plan_to_current",{repairs:[B]})}moveArchiveToCurrent(B){return this.post("/repairs/transfer_repair_archive_to_current",{repairs_ids:[B]})}moveRepairToApr(B){return this.post("/repairs/transfer_repair_current_to_plan",{repairs:[B]})}moveRepairToArchive(B){return this.post("/repairs/transfer_repair_current_to_archive",{repairs_ids:[B]})}restoreRepair(B){return this.post("/restore_repair",{repairs_ids:[B]})}updateRepair(B,g){return this.put(`/repairs/${g}`,B)}copyRepair(B){return this.post(`/repairs/${B}/clone`,null)}deleteRepair(B){return this.delete(`/repairs/${B}`)}fetchIntersection(B){return this.get(`v3/repairs/${B}/personnel/intersection`)}}let xo;function Qm(){return xo||(xo=new gm),xo}class wm extends TB{fetchTaskById(B){return this.get(`/tasks/${B}`)}fetchTasksList(B){return this.get("/list/tasks/search",{params:B})}fetchSubtasksList(B){return this.get(`/task/${B}/subtasks/list`)}fetchIntersectionsList(B){return this.get(`/tasks/${B}/intersections`)}fetchTaskBranch(B){return this.get(`/get_list_task_branch?task_id=${B}`)}fetchInstrumentsList(B){return this.get("admin/instruments",{params:B})}fetchInstrumentTypeListWithPreparedWarehouse(B){return this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{params:B})}downloadInstrumentTypeListWithPreparedWarehouse(B){return this.get("/instrument_type/get_instrument_type_list_with_prepared_warehouse",{responseType:"blob",params:B})}fetchInstrumentsEquivalentList(B){return this.get("tasks/instrument/list",{params:B})}fetchDiffInstruments(B){return this.get(`tasks/${B.taskId}/fill/module`,{params:B})}replaceInstruments(B){return this.post("/instruments/equivalent/attach",B)}fetchTaskUsagePersonal(B){return this.get(`tasks/${B}/usage/users`)}fetchTaskUsageInstrument(B){return this.get(`tasks/${B}/usage/instruments`)}fetchEquipment(B){return this.get("repairs/equipment/list",{params:B})}fetchTaskVideoSources(B){return this.get("work_zone/get_list_video_source",{params:B})}fetchTaskVideoSourcesStream(B){return this.get("horizon/video-source",{params:B})}createWorkZone(B){return this.post("admin/work-zones",B)}createTask(B){return this.post("tasks",B)}editTask(B,g){return this.put(`tasks/${B}`,g)}mergeTask(B){return this.post("tasks/merge",B)}cloneTask(B,g){return this.post(`gantt/${B}/clone`,g)}deleteTask(B){return this.delete(`tasks/${B}`)}changeStatus(B,g){return this.put(`task/${B}/change-status`,{status_id:g})}saveMetrics(B){return this.put("/update_quality_metrics",B)}checkReasonForStatus(B){return this.post("/tasks/check_reason_for_task",{task_id:B})}verifyTaskStatus(B,g){return this.get(`/task/${B}/change-status/verification`,{params:{status_id:g}})}checkBranchBeforeCloseTask(B){return this.post("/check_branch_before_close_task",{task_id:B})}}let Xo;function Cm(){return Xo||(Xo=new wm),Xo}class Em extends TB{login(B,g){return this.post("/v2/login",{email:B,password:g})}loginPhoto(B){return this.post("/login/from_photo",{photo:B})}loginVideo(B){return this.post("/login/video",B,{transformRequest:g=>g})}logout(){return this.logoutUser()}userInfo(){return this.get("/users/auth")}configs(){return this.get("/v2/configs")}changePassword(B,g,Q){return this.put(`/v2/auth/users/${B}/password`,{password:g,password_confirmation:Q})}changePasswordAndActivate(B,g,Q,w){return this.post("/v2/auth/users/activate",{email:B,currentPassword:g,password:Q,passwordConfirmation:w})}}let Oo;function em(){return Oo||(Oo=new Em),Oo}class tm extends TB{uploadFile(B){return this.post("/upload-file",B,{headers:{"Content-Type":"multipart/form-data"}})}}let Zo;function om(){return Zo||(Zo=new tm),Zo}class nm extends TB{async startVideoAnalytics(){return await this.post("/statanly/start",null)}reloadVideoAnalytics(B){return this.post("/horizon/video-source/reload",{video_source_ids:B})}hardReloadStream(){return this.post("horizon/video-source/streams/add",null)}async fetchWorkZones(B){return await this.get("/search/work_zones",{params:B})}async fetchWorkZone(B){return await this.get(`/work_zone/get_work_zone/${B}`)}async editWorkZone(B,g){return await this.put(`/admin/work-zones/${B}`,g)}async deleteWorkZone(B){return await this.delete(`/admin/work-zones/${B}`)}async fetchVideoSources(B){return await this.get("/search/video_sources/list",{params:B})}async fetchVideoSourceEconomics(B){return await this.get("horizon/video-source/economics",{params:B})}async createVideoSource(B){return await this.post("horizon/video-source",B)}async editVideoSource(B,g){return await this.put(`/horizon/video-source/${B}`,g)}async deleteVideoSource(B){await this.delete(`/horizon/video-source/${B}`)}async fetchListRepairsVideoSource(B){return await this.get("work_zone/get_list_video_source_by_repair",{params:B})}async sendCombination(B){return await this.post("horizon/video-source/training",B)}async saveCombination(B){return await this.post("horizon/video-source/bind",B)}async fetchCombination(B){return await this.get("horizon/video-source/bind/show",{params:B})}async startTraining(B){return await this.post("horizon/video-source/training/start",B)}async stopTraining(B){return await this.post("horizon/video-source/training/stop",B)}async fetchTrainingInfo(B){return await this.get("horizon/video-source/training/info",{params:B})}async fetchTrainingStatus(B){return await this.get("horizon/video-source/training/status",{params:B})}async fetchVisualizationDataLink(B){return await this.get("horizon/video-source/link/video/training",{params:B})}async updateVisualizationData(B){return await this.get("horizon/video-source/download/video/training",{params:B})}async deleteFrameFromVideo(B){await this.delete(`horizon/video-source/delete/fragment/video/training/${B}`)}async sendEvent(B){return await this.post("alerts_callback_url",B)}}let qo;function Im(){return qo||(qo=new nm),qo}class im extends TB{async editUser({id:B,model:g}){return await this.put(`/admin/users/${B}`,g)}async getUser(B){return await this.get(`/admin/users/${B}`)}async changeUserPassword(B){return await this.patch("/v2/auth/users/password",B)}async getUserWarehouses(B){return await this.get("users/get_warehouse_list_by_user",{params:B})}async createUser(B){return await this.post("/admin/users",B)}async deleteUser({user_id:B,archive_reason:g}){return await this.post("/users/archive_user",{user_id:B,archive_reason:g})}async deleteUserPhotos({user_id:B,photos:g}){return await this.post("/users/photos/delete",{user_id:B,photos:g})}async restoreUser(B){return await this.post("/users/restore_user",{user_id:B})}async getRoles(B){return await this.get("/search/roles",{params:B})}async getPositions(B){return await this.get("/search/positions",{params:B})}async createPosition(B){return await this.post("/admin/positions",B)}async editPosition(B,g){return await this.put(`/admin/positions/${B}`,g)}async deletePosition(B){return await this.delete(`/admin/positions/${B}`)}async getTeams(B){return await this.get("/search/teams",{params:B})}async createTeam(B){return await this.post("/teams",B)}async editTeam(B,g){return await this.patch(`/teams/${B}`,g)}async deleteTeam(B){return await this.delete(`/teams/${B}`)}async checkUserVectors(B){return await this.get(`/user/get-vectors/${B}`)}async checkArchiveUserVectors(B){return await this.get(`/users/get_vector_count_by_user?user_id=${B}`)}async addUserVectors(B){return await this.post("/user/add-vector",B,{headers:{"Content-Type":"multipart/form-data"}})}async removeUserVectors(B){return await this.delete(`/user/delete-vectors/${B}`)}async deleteUserPasses(B){return await this.post("admin/delete/passes",B)}async checkUserBeforeArchive(B){return await this.post("users/check_user_before_archive",B)}async getListVisitorLog(B){return await this.get("get_list_visitor_log",{params:B})}entryVisitorLog(B){return this.post("entry_visitor_log",B)}async exitVisitorLog(B){return await this.post(`exit_visitor_log/${B}`,{})}async deleteVisitorLog(B=[]){return await this.post("delete_not_in_zone_visitor_log",{visitor_log_list_id:B})}async getListVisitorHistories(B){return await this.get("get_list_visitor_log_histories",{params:B})}findUserByVideo(B){return this.post("/user/recognition",B,{transformRequest:g=>g})}}let _o;function cm(){return _o||(_o=new im),_o}class Mm extends TB{async fetchUserInstrumentsHistory(B,g){const Q={status:"issued",page:g,desc:"desc",column:"issued_in"};return await this.get(`users/${B}/instruments`,{params:Q})}async fetchDiscardWarehouses(B){return await this.get("v2/search/discards",{params:B})}async fetchWarehouses(B){return await this.get("search/warehouses",{params:B})}async fetchWarehouse(B){return await this.get(`admin/warehouses/${B}`)}async fetchStatusHistory(B){return await this.get(`warehouses/${B}/history/status`)}async createWarehouse(B){return await this.post("admin/warehouses",B)}async editWarehouse({id:B,model:g}){return await this.put(`admin/warehouses/${B}`,g)}deleteWarehouse(B){return this.delete(`admin/warehouses/${B}`)}changeStatusWarehouse(B){return this.put("v2/warehouses/status",B)}async unsetWarehouseRfid(B){return await this.post("warehouses/unset-rfid",B)}async searchInstruments(B){return await this.get("search/instruments",{params:B})}}let $o;function Ym(){return $o||($o=new Mm),$o}class rm extends TB{fetchControlZones(B){return this.get("/frame/list",{params:B})}async fetchControlZone(B){return this.get(`/frame/${B}`)}createControlZone(B){return this.post("/frame",B)}editControlZone(B,g){return this.put(`/frame/${B}`,g)}deleteControlZone(B){return this.delete(`/frame/${B}`)}fetchControlLogs(B){return this.get("/exposed_equipment_zones/list_for_controller",{params:B})}fetchControllers(B){return this.get("/frame/controllers/list",{params:B})}fetchUsersWithPasses(){return this.get("inspector/users-with-passes")}fetchWarehousesList(){return this.get("tasks/warehouse/list?only_outside_exposed_equipment_zone=1")}manualEntry(B){return this.post("exposed_equipment_zones/hand/enter",B)}manualExit(B){return this.post("exposed_equipment_zones/hand/exit",B)}deleteControlLogs(B){return this.delete("exposed_equipment_zones",B)}fetchInstrumentTypeList(B){return this.get("search/instrument_types",{params:B})}fetchInstrumentCategoryList(B={}){return this.get("instrument_category/list",{params:B})}createInstrumentType(B){return this.post("admin/instruments",B)}editInstrumentType(B,g){return this.put(`admin/instruments/${B}`,g)}deleteInstrumentType(B){return this.delete(`admin/instruments/${B}`)}fetchRpdzLogList(B){return this.get("exposed_equipment_zones_history/list",{params:B})}exportRpdzLogList(B){return this.get("exposed_equipment_zones_history/list/export",{params:B,responseType:"blob"})}editControlLog(B,g){return this.put(`exposed_equipment_zones/${B}`,g)}}let An;function Dm(){return An||(An=new rm),An}class am extends TB{fetchSearchUsers(B){return this.get("search/users",{params:B})}fetchSearchInstruments(B){return this.get("search/instrument_type",{params:B})}fetchSearchModules(B){return this.get("search/modules",{params:B})}}let Bn;function Fm(){return Bn||(Bn=new am),Bn}class sm extends TB{async detectModule(B){return await this.get(`module/${B}/detect`)}async createModule(B){return await this.post("admin/modules",B)}async editModule({id:B,model:g}){return await this.put(`admin/modules/${B}`,g)}deleteModule(B){return this.delete(`admin/modules/${B}`)}}let gn;function um(){return gn||(gn=new sm),gn}class lm extends TB{async uploadComment(B){return await this.post("comments",B)}async deleteComment(B){return await this.delete(`comments/${B}`)}async editComment(B,g){return await this.put(`comments/${B}`,g)}}let Qn;function hm(){return Qn||(Qn=new lm),Qn}class Um extends TB{fetchEquipmentById(B){return this.get(`repairs/equipment/${B}`)}fetchEquipment(B){return this.get("repairs/equipment/list",{params:B})}fetchEquipmentTree(B){return this.get(`repairs/equipments/get_tree_by_equipment/${B}`)}createEquipment(B){return this.post("repairs/equipment",B)}editEquipment(B,g){return this.put(`repairs/equipment/${B}`,g)}deleteEquipment(B){return this.delete(`repairs/equipment/${B}`)}fetchEquipmentTypeList(B){return this.get("repairs/equipments/get_equipment_type_list",{params:B})}fetchEquipmentType(B){return this.get(`repairs/equipments/get_equipment_type/${B}`)}createEquipmentType(B){return this.post("repairs/equipments/create_equipment_type",B)}editEquipmentType(B,g){return this.put(`repairs/equipments/update_equipment_type/${B}`,g)}deleteEquipmentType(B){return this.delete(`repairs/equipments/delete_equipment_type/${B}`)}checkEquipmentInChildTasks(B){return this.post("repairs/check_equipment_in_child_tasks",{task_id:B})}}let wn;function Gm(){return wn||(wn=new Um),wn}class dm extends TB{fetchBrigades(B){return this.get("/search/brigades",{params:B})}editBrigade({id:B,model:g}){return this.put(`/brigades/${B}`,g)}getBrigade(B){return this.get(`/brigades/${B}`)}createBrigade(B){return this.post("/brigades",B)}deleteBrigade(B){return this.delete(`/brigades/${B}`)}}let Cn;function Hm(){return Cn||(Cn=new dm),Cn}class fm extends TB{fetchScheduleConfig(){return this.get("schedule/config")}fetchSchedule(B){return this.get(`schedule/${B}`)}fetchScheduleTable(B){return this.get(`schedule/${B}/get_brigades_table`)}fetchBrigadesToSwap(B,g){return this.get(`schedule/${B}/selection_brigades_for_swap_shift_template`,{params:g})}completeBrigadeSchedule(B,g){return this.post(`schedule/${B}/complete_brigade_schedule`,g)}autocompleteBrigadesSchedule(B,g){return this.post(`schedule/${B}/autocomplete`,g)}addBrigadeShift(B,g){return this.post(`schedule/${B}/shifts`,g)}swapBrigadeShifts(B,g){return this.patch(`schedule/${B}/shifts/switch_shift_templates`,g)}editBrigadeShifts(B,g){return this.patch(`schedule/${B}/shifts`,g)}deleteBrigadeShifts(B,g){return this.delete(`schedule/${B}/shifts`,{data:{shift_ids:g}})}deleteBrigadesFromSchedule(B,g){return this.patch(`schedule/${B}/delete_brigades`,{brigade_ids:g})}}let En;function mm(){return En||(En=new fm),En}class Jm extends TB{async getPurchaseList(B){return await this.get("purchase/list",{params:B})}getPurchaseValue(B){return this.get("purchase/value",{params:B})}createPurchase(B){return this.post("purchase/create",B)}getPurchaseCard(B,g){return this.get(`/purchase/${B}/stages/${g}/card`)}}let en;function Nm(){return en||(en=new Jm),en}class Rm extends TB{createUserIssue(B){return this.post("user_issue",B,{headers:{"Content-Type":"multipart/form-data"}})}getUserIssue(B){return this.get(`user_issue/${B}`)}getUserIssueList(B){return this.get("user_issue/list",{params:B})}getProperties(){return this.get("user_issue/properties")}deleteUserIssue(B){return this.delete(`user_issue/${B}`)}}let tn;function Pm(){return tn||(tn=new Rm),tn}/**
11
11
  * @license
12
12
  * Copyright 2020 Google LLC. All Rights Reserved.
13
13
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -6,6 +6,7 @@ declare class PurchaseService extends ApiService {
6
6
  getPurchaseList(params: Record<string, any>): Promise<ResponseApi<Api_Visitor_Dto[]>>;
7
7
  getPurchaseValue(params?: Record<string, any>): Promise<Api_Visitor_Dto>;
8
8
  createPurchase(body: Api_Payload_Create_Purchase_Dto): Promise<Api_Visitor_Dto>;
9
+ getPurchaseCard(purchaseId: string, stageId: string): Promise<any>;
9
10
  }
10
11
  export default function usePurchaseService(): PurchaseService;
11
12
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.3.139",
3
+ "version": "1.3.140",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -16,6 +16,10 @@ class PurchaseService extends ApiService {
16
16
  public createPurchase(body: Api_Payload_Create_Purchase_Dto): Promise<Api_Visitor_Dto> {
17
17
  return this.post('purchase/create', body)
18
18
  }
19
+
20
+ public getPurchaseCard(purchaseId: string, stageId: string): Promise<any> {
21
+ return this.get(`/purchase/${purchaseId}/stages/${stageId}/card`)
22
+ }
19
23
  // public async exitVisitorLog(id: string): Promise<Api_Visitor_Dto> {
20
24
  // return await this.post(`exit_visitor_log/${id}`, {})
21
25
  // }