Something went wrong. Try again.
OpenAPI 3.0 compliant spec for TLE Community.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168import { operation, buildingBase, buildingCommonMethods, buildingView, requestBodySchema, response200, response500, security, statusSchema, tags,} from '../../chunks.ts';
const base = buildingBase('Observatory');
const buildingIdRequestBody = requestBodySchema({ type: 'object', required: ['building_id'], properties: { building_id: { type: 'integer', description: 'The unique id of the building.' } },});
const starSchema = { type: 'object', properties: { id: { type: 'integer' }, color: { type: 'string' }, name: { type: 'string' }, x: { type: 'integer' }, y: { type: 'integer' }, bodies: { type: 'array', items: { type: 'object', properties: { id: { type: 'integer' }, x: { type: 'number' }, y: { type: 'number' }, star_id: { type: 'integer' }, star_name: { type: 'string' }, orbit: { type: 'number' }, type: { type: 'string' }, name: { type: 'string' }, image: { type: 'string' }, size: { type: 'number' }, notes: { type: 'string' }, zone: { type: 'string' }, station: { type: 'object', properties: { id: { type: 'integer' }, x: { type: 'number' }, y: { type: 'number' }, name: { type: 'string' }, }, required: ['id', 'x', 'y', 'name'], }, }, required: [ 'id', 'x', 'y', 'star_id', 'star_name', 'orbit', 'type', 'name', 'image', 'size', 'notes', 'zone', ], }, }, }, required: ['id', 'color', 'name', 'x', 'y', 'bodies'],};
export const observatory = { ...buildingCommonMethods(base), ...buildingView(base),
[`${base}/get_probed_stars`]: { post: { ...tags(base), ...security(), ...operation( 'Get probed stars.', 'Returns a list of the stars that have been probed by this planet.' ), ...requestBodySchema({ type: 'object', required: ['building_id'], properties: { building_id: { type: 'integer', description: 'The unique id of the building.' }, page_number: { type: 'integer', description: 'Optional. Which page of probes to return. Defaults to 1. Up to 25 probes per page.', }, }, }), responses: { ...response200('Returns a list of the stars that have been probed by this planet.', { type: 'object', required: ['stars', 'star_count', 'max_probes', 'travelling', 'status'], properties: { stars: { type: 'array', items: starSchema }, star_count: { type: 'integer' }, max_probes: { type: 'integer' }, travelling: { type: 'integer' }, status: statusSchema(), }, }), ...response500(), }, }, },
[`${base}/abandon_probe`]: { post: { ...tags(base), ...security(), ...operation( 'Abandon probe.', 'Deactivates a single probe, allowing it to burn up in the star.' ), ...requestBodySchema({ type: 'object', required: ['building_id', 'star_id'], properties: { building_id: { type: 'integer', description: 'The unique id of the building.' }, star_id: { type: 'integer', description: 'The unique id of the star the probe is attached to.', }, }, }), responses: { ...response200('Deactivates a single probe, allowing it to burn up in the star.', { type: 'object', required: ['status'], properties: { status: statusSchema() }, }), ...response500(), }, }, },
[`${base}/abandon_all_probes`]: { post: { ...tags(base), ...security(), ...operation( 'Abandon all probes.', 'Deactivates all probes controlled by this observatory, allowing them to burn up in the stars.' ), ...buildingIdRequestBody, responses: { ...response200( 'Deactivates all probes controlled by this observatory, allowing them to burn up in the stars.', { type: 'object', required: ['status'], properties: { status: statusSchema() } } ), ...response500(), }, }, },};