{"version":3,"file":"sort.cjs","names":[],"sources":["../../../../src/rest/commands/utils/sort.ts"],"sourcesContent":["import type { RestCommand } from '../../types.js';\n\n/**\n * If a collection has a sort field, this util can be used to move items in that manual order.\n * @param collection The collection to sort\n * @param item Id of the item to move\n * @param to Id of the item to move to\n * @returns Nothing\n */\nexport const utilitySort =\n\t<Schema>(collection: keyof Schema, item: string | number, to: string | number): RestCommand<void, Schema> =>\n\t() => ({\n\t\tmethod: 'POST',\n\t\tpath: `/utils/sort/${collection as string}`,\n\t\tbody: JSON.stringify({ item, to }),\n\t});\n"],"mappings":"AASA,MAAa,GACH,EAA0B,EAAuB,SACnD,CACN,OAAQ,OACR,KAAM,eAAe,IACrB,KAAM,KAAK,UAAU,CAAE,OAAM,KAAI,CAAC,CAClC"}