Something went wrong. Try again.
OpenAPI 3.0 compliant spec for TLE Community.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173import { operation, buildingBase, buildingCommonMethods, buildingView, requestBodySchema, response200, response500, security, statusSchema, tags,} from '../../chunks.ts';
const base = buildingBase('Security');
const buildingIdRequestBody = requestBodySchema({ type: 'object', required: ['building_id'], properties: { building_id: { type: 'integer', description: 'The unique id of the building.' } },});
const prisonerIdRequestBody = requestBodySchema({ type: 'object', required: ['building_id', 'prisoner_id'], properties: { building_id: { type: 'integer', description: 'The unique id of the building.' }, prisoner_id: { type: 'integer', description: 'The unique id of a captured prisoner. See view_prisoners.', }, },});
export const security_ = { ...buildingCommonMethods(base), ...buildingView(base),
[`${base}/view_prisoners`]: { post: { ...tags(base), ...security(), ...operation('View prisoners.', 'Displays a list of the spies that have been captured.'), ...requestBodySchema({ type: 'object', required: ['building_id'], properties: { building_id: { type: 'integer', description: 'The unique id of the building.' }, page_number: { type: 'integer', description: 'Defaults to 1. Each page contains 25 spies.', }, }, }), responses: { ...response200('Displays a list of the spies that have been captured.', { type: 'object', required: ['status', 'prisoners', 'captured_count'], properties: { status: statusSchema(), captured_count: { type: 'integer', description: 'Total captured spies across all pages (the pager is sized from this).', }, prisoners: { type: 'array', items: { type: 'object', required: ['id', 'name', 'level', 'task', 'sentence_expires'], properties: { id: { type: 'integer' }, name: { type: 'string' }, level: { type: 'integer' }, task: { type: 'string', enum: ['Captured', 'Prisoner Transport'] }, sentence_expires: { type: 'string' }, }, }, }, }, }), ...response500(), }, }, },
[`${base}/execute_prisoner`]: { post: { ...tags(base), ...security(), ...operation( 'Execute prisoner.', "Executes a prisoner rather than letting them serve out their sentence. Costs 10,000 times the prisoner's level in happiness from your planet." ), ...prisonerIdRequestBody, responses: { ...response200( "Executes a prisoner rather than letting them serve out their sentence. Costs 10,000 times the prisoner's level in happiness from your planet.", { type: 'object', required: ['status'], properties: { status: statusSchema() } } ), ...response500(), }, }, },
[`${base}/release_prisoner`]: { post: { ...tags(base), ...security(), ...operation('Release prisoner.', 'Releases a captured prisoner.'), ...prisonerIdRequestBody, responses: { ...response200('Releases a captured prisoner.', { type: 'object', required: ['status'], properties: { status: statusSchema() }, }), ...response500(), }, }, },
[`${base}/view_foreign_spies`]: { post: { ...tags(base), ...security(), ...operation( 'View foreign spies.', 'Displays a list of the spies that are on your planet and have a level lower than your security ministry.' ), ...requestBodySchema({ type: 'object', required: ['building_id'], properties: { building_id: { type: 'integer', description: 'The unique id of the building.' }, page_number: { type: 'integer', description: 'Defaults to 1. Each page contains 25 spies.', }, }, }), responses: { ...response200( 'Displays a list of the spies that are on your planet and have a level lower than your security ministry.', { type: 'object', required: ['status', 'spies', 'spy_count'], properties: { status: statusSchema(), spy_count: { type: 'integer', description: 'Total foreign spies across all pages (the pager is sized from this).', }, spies: { type: 'array', items: { type: 'object', required: ['name', 'level', 'task', 'next_mission'], properties: { name: { type: 'string' }, level: { type: 'integer' }, task: { type: 'string' }, next_mission: { type: 'string' }, }, }, }, }, } ), ...response500(), }, }, },};