import{n as e}from"./apiClient-DAywyO4-.js";var t=`/api/v1/design-workflow`,n={list:n=>e.get(`${t}/workflows/`,{params:n}),get:n=>e.get(`${t}/workflows/${n}/`),create:n=>e.post(`${t}/workflows/`,n),update:(n,r)=>e.patch(`${t}/workflows/${n}/`,r),delete:n=>e.delete(`${t}/workflows/${n}/`),getLinkDefinitions:n=>e.get(`${t}/workflows/${n}/link_definitions/`),publishPreview:n=>e.get(`${t}/workflows/${n}/publish_preview/`),publish:n=>e.post(`${t}/workflows/${n}/publish/`),unpublish:n=>e.post(`${t}/workflows/${n}/unpublish/`),deprecate:n=>e.post(`${t}/workflows/${n}/deprecate/`),clone:(n,r)=>e.post(`${t}/workflows/${n}/clone/`,r),toDraft:n=>e.post(`${t}/workflows/${n}/to-draft/`),getVersions:n=>e.get(`${t}/workflows/${n}/versions/`),createVersion:(n,r)=>e.post(`${t}/workflows/${n}/create-version/`,r),migrateDocuments:(n,r)=>e.post(`${t}/workflows/${n}/migrate-documents/`,r),unpublishForce:n=>e.post(`${t}/workflows/${n}/unpublish/`,{force:!0}),restoreVersionDryRun:(n,r)=>e.post(`${t}/workflows/${n}/restore-version/`,{version_id:r,dry_run:!0}),restoreVersion:(n,r)=>e.post(`${t}/workflows/${n}/restore-version/`,{version_id:r}),discardPendingDraft:n=>e.delete(`${t}/workflows/${n}/pending-draft/`)},r=`/api/v1/design-workflow`,i={list:t=>e.get(`${r}/link-definitions/`,{params:t}),get:t=>e.get(`${r}/link-definitions/${t}/`),create:t=>e.post(`${r}/link-definitions/`,t),update:(t,n)=>e.patch(`${r}/link-definitions/${t}/`,n),delete:t=>e.delete(`${r}/link-definitions/${t}/`),getAvailableSources:(t,n)=>e.get(`${r}/link-definitions/${t}/available-sources/`,{params:n}),getLinkHistory:(t,n)=>e.get(`${r}/link-definitions/${t}/link-history/`,{params:{source_id:n}}),getOpenTracking:t=>e.get(`${r}/link-definitions/${t}/open-tracking/`),closeAllTracking:t=>e.post(`${r}/link-definitions/${t}/close-all-tracking/`)},a=`/api/v1/design-workflow`,o={list:t=>{let n=new URLSearchParams;t?.search&&n.set(`search`,t.search),t?.page&&n.set(`page`,String(t.page)),t?.page_size&&n.set(`page_size`,String(t.page_size)),t?.module&&n.set(`module`,t.module);let r=n.toString();return e.get(`${a}/screens/${r?`?${r}`:``}`)},getFields:(t,n)=>{let r=new URLSearchParams;n?.fk_only&&r.set(`fk_only`,`true`);let i=r.toString();return e.get(`${a}/screens/${t}/fields/${i?`?${i}`:``}`)}},s=`/api/v1/design-workflow`,c={list:t=>e.get(`${s}/key-fields/`,{params:t}),getByLink:t=>e.get(`${s}/key-fields/by_link/`,{params:{link_definition:t}}),get:t=>e.get(`${s}/key-fields/${t}/`),create:t=>e.post(`${s}/key-fields/`,t),bulkCreate:t=>e.post(`${s}/key-fields/bulk_create/`,t),update:(t,n)=>e.patch(`${s}/key-fields/${t}/`,n),delete:t=>e.delete(`${s}/key-fields/${t}/`),validate:t=>e.post(`${s}/key-fields/validate/`,t)},l=`/api/v1/design-workflow`,u={list:t=>e.get(`${l}/field-mappings/`,{params:t}),getByLink:t=>e.get(`${l}/field-mappings/by_link/`,{params:{link_definition:t}}),get:t=>e.get(`${l}/field-mappings/${t}/`),create:t=>e.post(`${l}/field-mappings/`,t),bulkCreate:t=>e.post(`${l}/field-mappings/bulk_create/`,t),update:(t,n)=>e.patch(`${l}/field-mappings/${t}/`,n),delete:t=>e.delete(`${l}/field-mappings/${t}/`),execute:(t,n)=>e.post(`${l}/field-mappings/${t}/execute/`,n)};export{n as a,i,c as n,o as r,u as t};