Skip to content

Commit

Permalink
Description of TaskBookingLabel
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <[email protected]>
  • Loading branch information
aaronchongth committed May 6, 2024
1 parent 3f9a874 commit 24ddad5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/api-client/lib/openapi/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2377,7 +2377,7 @@ export interface Task {
description_schema?: object;
}
/**
*
* This label is to be populated by any frontend during a task dispatch, by being added to TaskRequest.labels, which in turn populates TaskState.booking.labels, and can be used to display relevant information needed for any frontends.
* @export
* @interface TaskBookingLabel
*/
Expand All @@ -2390,7 +2390,7 @@ export interface TaskBookingLabel {
description: TaskBookingLabelDescription;
}
/**
*
* This description holds several fields that could be useful for frontend dashboards when dispatching a task, to then be identified or rendered accordingly back on the same frontend.
* @export
* @interface TaskBookingLabelDescription
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/api-client/lib/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { version as rmfModelVer } from 'rmf-models';

export const version = {
rmfModels: rmfModelVer,
rmfServer: '6e3c9301f2d3c5f44ae8f08aad9d00d8ba60749d',
rmfServer: '3f9a874f93b41160098ebccd780c237e07589011',
openapiGenerator: '6.2.1',
};
4 changes: 4 additions & 0 deletions packages/api-client/schema/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3633,6 +3633,8 @@ export default {
required: ['description'],
type: 'object',
properties: { description: { $ref: '#/components/schemas/TaskBookingLabelDescription' } },
description:
'This label is to be populated by any frontend during a task dispatch, by\nbeing added to TaskRequest.labels, which in turn populates\nTaskState.booking.labels, and can be used to display relevant information\nneeded for any frontends.',
},
TaskBookingLabelDescription: {
title: 'TaskBookingLabelDescription',
Expand All @@ -3644,6 +3646,8 @@ export default {
destination: { title: 'Destination', type: 'string' },
cart_id: { title: 'Cart Id', type: 'string' },
},
description:
'This description holds several fields that could be useful for frontend\ndashboards when dispatching a task, to then be identified or rendered\naccordingly back on the same frontend.',
},
TaskCancelResponse: {
title: 'TaskCancelResponse',
Expand Down
13 changes: 13 additions & 0 deletions packages/api-server/api_server/models/task_booking_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@


class TaskBookingLabelDescription(BaseModel):
"""
This description holds several fields that could be useful for frontend
dashboards when dispatching a task, to then be identified or rendered
accordingly back on the same frontend.
"""

task_name: Optional[str]
unix_millis_warn_time: Optional[int]
pickup: Optional[str]
Expand All @@ -23,6 +29,13 @@ def from_json_string(json_str: str) -> Optional["TaskBookingLabelDescription"]:


class TaskBookingLabel(BaseModel):
"""
This label is to be populated by any frontend during a task dispatch, by
being added to TaskRequest.labels, which in turn populates
TaskState.booking.labels, and can be used to display relevant information
needed for any frontends.
"""

description: TaskBookingLabelDescription

@staticmethod
Expand Down

0 comments on commit 24ddad5

Please sign in to comment.