import { operation, buildingBase, buildingCommonMethods, buildingView, requestBodySchema, response200, response500, security, statusSchema, tags, } from '../../chunks.ts'; const base = buildingBase('OreStorage'); export const oreStorage = { ...buildingCommonMethods(base), ...buildingView(base, { ore_stored: { type: 'object', description: 'Keyed by ore type.', additionalProperties: { type: 'integer' }, }, }), [`${base}/dump`]: { post: { ...tags(base), ...security(), ...operation('Dump ore as waste.', 'Converts ore into waste.'), ...requestBodySchema({ type: 'object', required: ['building_id', 'type', 'amount'], properties: { building_id: { type: 'integer', description: 'The unique id of the building.' }, type: { type: 'string', description: 'Ore type to convert into waste, e.g. gold, bauxite, galena.', }, amount: { type: 'integer', description: 'The amount to convert into waste.' }, }, }), responses: { ...response200('Converts ore into waste.', { type: 'object', required: ['status'], properties: { status: statusSchema() }, }), ...response500(), }, }, }, };