import{x as e}from"./assetDetailsContext-C5OMsT3l.js";var t=`docs_cmms`,n=async n=>{let r=new e,i=[];return n.TreeId===0?i.push({name:`TreeId`,value:null}):i.push({name:`TreeId`,value:Number.parseInt(n.TreeId)}),i.push({name:`Search`,value:n.Search}),i.push({name:`IncludeHistory`,value:n.IncludeHistory}),i.push({name:`IncludeObsolete`,value:n.IsObsolete}),await r.callV2(`[${t}].[DOCS].[GetDocumentsWeb]`,i)},r=async(n,r)=>{let i=new e,a=[];a.push({name:`TreeId`,value:n}),a.push({name:`Title`,value:r});try{return{ok:!0,data:await i.call(`[${t}].[DOCS].[CreateDocument]`,a)}}catch(e){return{ok:!1,message:e.toString()}}},i=async(n,r,i,a,o,s,c,l)=>{let u=new e,d=[];return d.push({name:`DocumentId`,value:n}),d.push({name:`Title`,value:r}),d.push({name:`VendorName`,value:i}),d.push({name:`VendorDatetime`,value:a}),d.push({name:`VendorVersion`,value:o}),d.push({name:`VendorDocument`,value:s}),d.push({name:`DocumentNumber`,value:c}),d.push({name:`TreeId`,value:l}),await u.callV2(`[${t}].[DOCS].[UpdateDocumentMetadata]`,d)},a=async(n,r,i,a)=>{let o=new e,s=[];return s.push({name:`DocumentId`,value:n}),s.push({name:`UploadedFullPath`,value:r}),s.push({name:`FileTimestamp`,value:a}),s.push({name:`FileSize`,value:i}),await o.callV2(`[${t}].[DOCS].[CreateVersion]`,s)},o=async n=>{let r=new e,i=[];return i.push({name:`DocumentId`,value:n}),await r.callV2(`[${t}].[DOCS].[GetCurrentVersion]`,i)},s=async n=>{let r=new e,i=[];return i.push({name:`DocumentId`,value:n}),await r.callV2(`[${t}].[DOCS].[GetVersions]`,i)},c=async n=>{let r=new e,i=[];return i.push({name:`DocumentId`,value:n}),await r.callV2(`[${t}].[DOCS].[DeleteDocument]`,i)},l=async n=>{let r=new e,i=[];return i.push({name:`VersionId`,value:n}),await r.callV2(`[${t}].[DOCS].[DeleteVersion]`,i)},u=async(n,r,i)=>{let a=new e,o=[];return o.push({name:`DocumentId`,value:n}),o.push({name:`FlagValue`,value:r}),o.push({name:`UpdatingComment`,value:i}),await a.callV2(`[${t}].[DOCS].[FlagDocument]`,o)},d=async(n,r)=>{let i=new e,a=[];return a.push({name:`DocumentId`,value:n}),a.push({name:`IsObsolete`,value:r}),await i.callV2(`[${t}].[DOCS].[UpdateDocumentIsObsolete]`,a)},f=async()=>await new e().callV2(`[${t}].[DOCS].[GetTree]`,[]),p=async t=>{let n=new e,r=[];return r.push({name:`AssetId`,value:Number.parseInt(t)}),await n.callV2(`[MMS].[GetAssetExtensionData]`,r)},m=async n=>{let r=new e,i=[];return i.push({name:`DocumentId`,value:n}),await r.callV2(`[${t}].[DOCS].[GetPartsDataFromWarehouse]`,i)},h=async(t=null)=>{let n=new e,r=[];return r.push({name:`Search`,value:t}),await n.callV2(`[MMS].[GetPartsInventory]`,r)},g=async n=>{let r=new e,i=[];return i.push({name:`DocumentId`,value:n}),await r.callV2(`[${t}].[DOCS].[GetDocumentsPartsByDocumentId]`,i)},_=async(n,r)=>{let i=new e,a=r.map(e=>e.PartId).join(`,`),o=[];return o.push({name:`DocumentId`,value:n}),o.push({name:`PartIds`,value:a}),await i.callV2(`[${t}].[DOCS].[UpsertDocumentParts]`,o)},v=async t=>{let n=new e,r=[];return r.push({name:`DocumentName`,value:t}),await n.callV2(`[MMS].[GetAssetDrawings]`,r)},y=async(t,n)=>{let r=new e,i=[];return i.push({name:`AssetIdsToAdd`,value:t.join(`,`)}),i.push({name:`DocumentName`,value:n}),await r.callV2(`[MMS].[UpsertAssetDrawings]`,i)},b=async(n,r)=>{let i=new e,a=[];return a.push({name:`VersionId`,value:n}),a.push({name:`PDFPath`,value:r}),await i.callV2(`[${t}].[DOCS].[UpdatePDFVersion]`,a)};export{i as _,l as a,p as c,n as d,h as f,d as g,s as h,c as i,o as l,f as m,r as n,u as o,m as p,a as r,v as s,y as t,g as u,b as v,_ as y};
//# sourceMappingURL=DocumentsRepositorie-Bsq53EC2.js.map