feat(api): jump + explore endpoints queue tasks with lead + helpers instead of resolving instantly (#44)

This commit is contained in:
2026-10-02 15:47:31 +00:00
parent d7faf739a9
commit 4e312d054f
10 changed files with 455 additions and 66 deletions
+12
View File
@@ -122,6 +122,12 @@ describe('OpenAPI spec', () => {
for (const status of ['400', '404', '409'] as const) {
expect(explore.responses[status].content['application/json'].schema.$ref).toBe('#/components/schemas/Error');
}
// The queued-scan request: the scan target plus the crew team (lead required, helpers optional).
const exploreReq = openApiSpec.components.schemas.ExploreRequest as { properties: Record<string, unknown>; required: string[] };
expect(Object.keys(exploreReq.properties)).toEqual(['planetId', 'leadCrewId', 'helperCrewIds']);
expect(exploreReq.required).toEqual(['planetId', 'leadCrewId']);
expect((exploreReq.properties.helperCrewIds as { items: { type: string } }).items.type).toBe('integer');
});
it('describes the world endpoints as WorldState in and out', () => {
@@ -134,6 +140,12 @@ describe('OpenAPI spec', () => {
for (const status of ['400', '404', '409'] as const) {
expect(jump.responses[status].content['application/json'].schema.$ref).toBe('#/components/schemas/Error');
}
// The queued-jump request: the jump target plus the crew team (lead required, helpers optional).
const jumpReq = openApiSpec.components.schemas.JumpRequest as { properties: Record<string, unknown>; required: string[] };
expect(Object.keys(jumpReq.properties)).toEqual(['systemId', 'leadCrewId', 'helperCrewIds']);
expect(jumpReq.required).toEqual(['systemId', 'leadCrewId']);
expect((jumpReq.properties.helperCrewIds as { items: { type: string } }).items.type).toBe('integer');
});
it('keeps info.version in sync with package.json', () => {