{"version":3,"file":"apply.cjs","names":[],"sources":["../../../../src/rest/commands/schema/apply.ts"],"sourcesContent":["import type { RestCommand } from '../../types.js';\nimport type { SchemaDiffOutput } from './diff.js';\n\n/**\n * Update the instance's schema by passing the diff previously retrieved via /schema/diff endpoint in the request body. This endpoint is only available to admin users.\n * @param diff JSON object containing hash and diffs of collections, fields, and relations to apply.\n * @returns Empty body.\n */\nexport const schemaApply =\n\t<Schema>(diff: SchemaDiffOutput, force = false): RestCommand<void, Schema> =>\n\t() => ({\n\t\tmethod: 'POST',\n\t\tpath: '/schema/apply',\n\t\tparams: force ? { force } : {},\n\t\tbody: JSON.stringify(diff),\n\t});\n"],"mappings":"AAQA,MAAa,GACH,EAAwB,EAAQ,UAClC,CACN,OAAQ,OACR,KAAM,gBACN,OAAQ,EAAQ,CAAE,QAAO,CAAG,EAAE,CAC9B,KAAM,KAAK,UAAU,EAAK,CAC1B"}