import{H as a,Y as s,e0 as y,M as m,dv as d,cp as f}from"./app-k0jcl5PQ.js";const g={videos(e,o,r){const{VIDEO_COLLECTION:u,CLIP_COLLECTION:p,INTERACTIVE:v}=y,t=`videos[${u}]{libraries.typeid:${m.WorkspaceCollection}}`,l=`clips[${p}]{status:${d.Published}}`,n=`interactives[${v}]{status:[${d.Published},${d.Draft}]}`,i=[];r!=null&&r.length?(r.includes("video")&&i.push(t),r.includes("clip")&&i.push(l),r.includes("interactive")&&i.push(n)):i.push(t,l,n);const c={query:`(${i.join("|")}){orderbydesc:timestamp}`,permissionFilterOption:f.StripMetadata};return o&&(c.cursor=o),{url:s.urlBuilder(`{gateway}/v1/objects/${e}/members`,c),key:`my:videos:${e}:${o}${r?`:${Array.isArray(r)?r.join(":"):r}`:""}`}},workspaceWithCategories(){return{url:s.urlBuilder("/api/domain/v2/me/libraries",{type:["workspace"],maxCategoryDepth:6}),key:"workspace:folders",normalize:!1}},exchangeWithCategories(){return{url:s.urlBuilder("/api/domain/v2/me/libraries",{type:["exchange"],maxCategoryDepth:5}),key:"exchange:folders",normalize:!1}},addFolder(e){let o=`/api/domain/v2/collections/${e.collectionId}/categories`;return e.parentCategoryId&&(o=s.urlBuilder(o,{parentCategoryId:e.parentCategoryId})),{url:o,key:"add:folder",type:a.POST,data:{name:e.name},invalidationKeys:["workspace","folder"]}},deleteFolder(e){return{url:`{gateway}/v1/objects/${e}`,key:"delete:folder",type:a.DELETE,invalidationKeys:["workspace","folder"]}},moveFolder(e){return{url:"/api/domain/v2/objects/move",key:"move:folder",type:a.POST,data:{assocType:"has",newCollectionId:e.newFolderId,oldCollectionId:e.oldFolderId,objectIds:[e.moveFolderId]},invalidationKeys:["workspace","folder"]}},updateFolder(e,o){return{url:`{gateway}/v1/objects/${e}`,key:"rename:folder",type:a.PUT,data:{name:o},invalidationKeys:["workspace","folder"]}},videoFolders(e,o){return{url:`/api/domain/v2/objects/${e}/categories?query=libraries{id:${o}}`,key:`video:folders:${e}`}},moveVideo(e){const o={newCollectionId:e.newFolderId,oldCollectionId:e.oldFolderId,objectIds:e.videoId};return{url:"/api/domain/v3/objects/move",key:`move:folder:${o.objectIds.join(",")}`,type:a.POST,data:o,invalidationKeys:["video"]}},addToExchange(e){return{url:"{gateway}/v1/users/me/videos/exchange",key:"add:to:exchange",type:a.POST,data:e}}};export{g as M};
//# sourceMappingURL=BKH_iZiB.chunk.js.map
