Skip to main content

Plan Combined Task Detail Documentation Design

Goal​

Complete the bilingual OpenAPI V3 documentation for planFusionTaskExternal and planFusionTaskMain, so callers can understand their nested fields and copy a representative payload without consulting the backend implementation.

Source of truth​

The contract is based on the actual schedule-plan response supplied for this request and the Fusion DTOs in sch-tasks-server-v5:

  • FusionTaskExternalDTO, FusionTaskMapDTO, and FusionTaskMapResourceDTO define the external task metadata, map list, and resource list.
  • FusionTaskMainDTO, FusionTaskAdvanceConfigDTO, FusionSiteInfoDTO, FusionSubTaskDTO, and FusionWorkModeDTO define the main task payload.
  • The response example keeps the public field name robotSn; downstream productId is not reintroduced into the platform documentation.

The two JSON objects are opaque JsonNode values at the plan API boundary, so the documentation describes the stable fields emitted by the current Fusion task implementation. Fields that are absent for a task type remain optional; tasks[].workMode may be null for position-style or otherwise unconfigured subtasks.

Scope​

Update the following existing sources in both zh_CN and en_US:

  1. Standard schedule-plan create and update request definitions and examples: Create Schedule Plan and Update Schedule Plan.
  2. Schedule-plan query response definitions and examples: Get Schedule Plan, List Schedule Plans, and List Schedule Pre Tasks By Day.

The simple schedule-plan APIs, calendar API, backend repositories, generated Swagger files, navigation, and API rendering components are out of scope.

Data contract​

planFusionTaskExternal​

The schema is an object with these fields:

FieldTypeMeaning
fusionTaskIdstringCombined Task UUID.
fusionTaskTypeintegerCombined Task kind: 1 persistent temporary task, 2 schedule task, 3 temporary task.
taskAPIVersionstringCombined Task API version when returned by the task service.
siteIdstringSite UUID; empty for a non-site task.
siteNamestringSite name; empty for a non-site task.
mapListobject[]Maps and their selected resources.
mapList[].mapIdstringMap UUID.
mapList[].mapNamestringMap name.
mapList[].floorIndexintegerFloor index in the map data.
mapList[].floorNamestringFloor name.
mapList[].mapResourceListobject[]Resources used by the task on the map.
mapList[].mapResourceList[].mapResourceIdstringRegion or path UUID.
mapList[].mapResourceList[].mapResourceTypestringResource type: region or path.
mapList[].mapResourceList[].mapResourceNamestringRegion or path name.
mapList[].mapResourceList[].mapResourceAreaIdstringLegacy region/area identifier; empty for paths.

planFusionTaskMain​

The schema is an object with task metadata, execution settings, and task selection:

FieldTypeMeaning
fusionTaskIdstringCombined Task UUID.
fusionTaskTypeintegerCombined Task kind.
taskAPIVersionstringCombined Task API version when returned by the task service.
fusionNamestringCombined Task name.
relatedTaskIdstringSource temporary-task ID when a schedule task is copied from one.
userstringUser who created the task.
createdAtintegerCreation timestamp in seconds.
updatedUserstringUser who last updated the task.
updatedAtintegerUpdate timestamp in seconds.
loopCountintegerNumber of task loops; defaults to 1.
persistencebooleanWhether the task is persisted.
taskAdvanceConfigobjectOptional advanced execution settings.
taskAdvanceConfig.activeCleanSwitchbooleanWhether active cleaning is enabled.
taskAdvanceConfig.activeCleanModeintegerActive-cleaning mode: 0 regular, 1 dirt-first, 2 path-first.
taskAdvanceConfig.autoPlanningbooleanWhether the robot plans the route automatically.
taskAdvanceConfig.coverageModestringCoverage mode, such as standard, efficiency, coverage, or extreme_efficiency.
taskAdvanceConfig.taskRunningModestringRun mode: normal or trial.
taskAdvanceConfig.walkingPatternstringWalking pattern: 0 adaptive, 1 bow-shaped, 2 back-and-forth.
taskAdvanceConfig.subTaskModebooleanWhether subtask mode is enabled.
taskAdvanceConfig.tempTaskPrioritybooleanWhether temporary tasks take priority over this schedule.
siteInfo.siteIdstringSite UUID; empty for a non-site task.
tasksobject[]Ordered subtask list.
tasks[].idstringSubtask UUID.
tasks[].mapResourceIdstringSelected map-resource UUID.
tasks[].mapIdstringMap UUID.
tasks[].typestringSubtask type, such as region or path.
tasks[].workModeobject/nullOptional subtask work-mode configuration.
tasks[].workMode.idstringWork-mode UUID.
tasks[].workMode.namestringWork-mode name.
tasks[].workMode.strengthstringWork strength, such as high, middle, low, or custom.
tasks[].workMode.subTypestringWork-mode subtype.
tasks[].workMode.typeintegerWork-mode type code.
workModeobjectTask-level work-mode configuration with the same five fields as tasks[].workMode.

Documentation shape​

The nested schemas will use the repository's existing YApi format:

  • objects use properties;
  • arrays use items with nested properties;
  • every documented leaf has type, example, description, and required;
  • Chinese and English files have identical keys and types, with localized titles and descriptions.

The Markdown examples will use the supplied plan response as the canonical shape. The list example will place one plan object in data; the detail example will place the same object directly in data; the day-list example will place it under data.preTasks. Create and update request examples will show the two objects with representative IDs, map resources, advanced settings, subtasks, and work-mode values.

Validation​

Before implementation, a Node.js assertion will fail because the target nested objects are currently empty or only contain fusionTaskId. After implementation the same assertion will verify:

  • all localized JSON sources parse;
  • every target endpoint exposes the complete nested key paths;
  • the three response shapes place the detailed plan at the correct location;
  • request examples contain both detailed objects;
  • Chinese and English schemas have matching structural keys and types.

Run git diff --check and yarn build in open-platform as the final documentation regression gates. No backend unit-test source is added because the change is limited to documentation data and Markdown examples.

Non-goals​

  • Do not change the Combined Task runtime contract.
  • Do not add unsupported legacy fields such as planTasks, switchStatus, or isFusionTask to the public V3 query examples.
  • Do not change the API template or introduce $ref-based shared schemas.