diff --git a/packages/api-client/lib/openapi/api.ts b/packages/api-client/lib/openapi/api.ts index 6e9353747..54371dacc 100644 --- a/packages/api-client/lib/openapi/api.ts +++ b/packages/api-client/lib/openapi/api.ts @@ -727,6 +727,12 @@ export interface DeliveryAlert { */ message: string; } +/** + * + * @export + * @interface Description + */ +export interface Description {} /** * Detailed information about a task, phase, or event * @export @@ -2403,47 +2409,10 @@ export interface Task { export interface TaskBookingLabel { /** * - * @type {TaskBookingLabelDescription} + * @type {{ [key: string]: Description; }} * @memberof 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 - */ -export interface TaskBookingLabelDescription { - /** - * - * @type {string} - * @memberof TaskBookingLabelDescription - */ - task_definition_id: string; - /** - * - * @type {number} - * @memberof TaskBookingLabelDescription - */ - unix_millis_warn_time?: number; - /** - * - * @type {string} - * @memberof TaskBookingLabelDescription - */ - pickup?: string; - /** - * - * @type {string} - * @memberof TaskBookingLabelDescription - */ - destination?: string; - /** - * - * @type {string} - * @memberof TaskBookingLabelDescription - */ - cart_id?: string; + description: { [key: string]: Description }; } /** * Response to a request to cancel a task @@ -9529,15 +9498,16 @@ export const TasksApiAxiosParamCreator = function (configuration?: Configuration }; }, /** - * + * Note that sorting by `pickup` and `destination` is mutually exclusive and sorting by either of them will filter only tasks which has those labels. * @summary Query Task States * @param {string} [taskId] comma separated list of task ids * @param {string} [category] comma separated list of task categories * @param {string} [requester] comma separated list of requester names - * @param {string} [pickup] comma separated list of pickup names - * @param {string} [destination] comma separated list of destination names + * @param {string} [pickup] comma separated list of pickup names. [deprecated] use `label` instead + * @param {string} [destination] comma separated list of destination names, [deprecated] use `label` instead * @param {string} [assignedTo] comma separated list of assigned robot names * @param {string} [status] comma separated list of statuses + * @param {string} [label] comma separated list of labels, each item must be in the form <key>=<value>, multiple items will filter tasks with all the labels * @param {string} [requestTimeBetween] The period of request time to fetch, in unix millis. This must be a comma separated string, \'X,Y\' to fetch between X millis and Y millis inclusive. Example: \"1000,2000\" - Fetches logs between unix millis 1000 and 2000. * @param {string} [startTimeBetween] The period of starting time to fetch, in unix millis. This must be a comma separated string, \'X,Y\' to fetch between X millis and Y millis inclusive. Example: \"1000,2000\" - Fetches logs between unix millis 1000 and 2000. * @param {string} [finishTimeBetween] The period of finishing time to fetch, in unix millis. This must be a comma separated string, \'X,Y\' to fetch between X millis and Y millis inclusive. Example: \"1000,2000\" - Fetches logs between unix millis 1000 and 2000. \"-60000\" - Fetches logs in the last minute. @@ -9555,6 +9525,7 @@ export const TasksApiAxiosParamCreator = function (configuration?: Configuration destination?: string, assignedTo?: string, status?: string, + label?: string, requestTimeBetween?: string, startTimeBetween?: string, finishTimeBetween?: string, @@ -9603,6 +9574,10 @@ export const TasksApiAxiosParamCreator = function (configuration?: Configuration localVarQueryParameter['status'] = status; } + if (label !== undefined) { + localVarQueryParameter['label'] = label; + } + if (requestTimeBetween !== undefined) { localVarQueryParameter['request_time_between'] = requestTimeBetween; } @@ -10163,15 +10138,16 @@ export const TasksApiFp = function (configuration?: Configuration) { return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** - * + * Note that sorting by `pickup` and `destination` is mutually exclusive and sorting by either of them will filter only tasks which has those labels. * @summary Query Task States * @param {string} [taskId] comma separated list of task ids * @param {string} [category] comma separated list of task categories * @param {string} [requester] comma separated list of requester names - * @param {string} [pickup] comma separated list of pickup names - * @param {string} [destination] comma separated list of destination names + * @param {string} [pickup] comma separated list of pickup names. [deprecated] use `label` instead + * @param {string} [destination] comma separated list of destination names, [deprecated] use `label` instead * @param {string} [assignedTo] comma separated list of assigned robot names * @param {string} [status] comma separated list of statuses + * @param {string} [label] comma separated list of labels, each item must be in the form <key>=<value>, multiple items will filter tasks with all the labels * @param {string} [requestTimeBetween] The period of request time to fetch, in unix millis. This must be a comma separated string, \'X,Y\' to fetch between X millis and Y millis inclusive. Example: \"1000,2000\" - Fetches logs between unix millis 1000 and 2000. * @param {string} [startTimeBetween] The period of starting time to fetch, in unix millis. This must be a comma separated string, \'X,Y\' to fetch between X millis and Y millis inclusive. Example: \"1000,2000\" - Fetches logs between unix millis 1000 and 2000. * @param {string} [finishTimeBetween] The period of finishing time to fetch, in unix millis. This must be a comma separated string, \'X,Y\' to fetch between X millis and Y millis inclusive. Example: \"1000,2000\" - Fetches logs between unix millis 1000 and 2000. \"-60000\" - Fetches logs in the last minute. @@ -10189,6 +10165,7 @@ export const TasksApiFp = function (configuration?: Configuration) { destination?: string, assignedTo?: string, status?: string, + label?: string, requestTimeBetween?: string, startTimeBetween?: string, finishTimeBetween?: string, @@ -10205,6 +10182,7 @@ export const TasksApiFp = function (configuration?: Configuration) { destination, assignedTo, status, + label, requestTimeBetween, startTimeBetween, finishTimeBetween, @@ -10625,15 +10603,16 @@ export const TasksApiFactory = function ( .then((request) => request(axios, basePath)); }, /** - * + * Note that sorting by `pickup` and `destination` is mutually exclusive and sorting by either of them will filter only tasks which has those labels. * @summary Query Task States * @param {string} [taskId] comma separated list of task ids * @param {string} [category] comma separated list of task categories * @param {string} [requester] comma separated list of requester names - * @param {string} [pickup] comma separated list of pickup names - * @param {string} [destination] comma separated list of destination names + * @param {string} [pickup] comma separated list of pickup names. [deprecated] use `label` instead + * @param {string} [destination] comma separated list of destination names, [deprecated] use `label` instead * @param {string} [assignedTo] comma separated list of assigned robot names * @param {string} [status] comma separated list of statuses + * @param {string} [label] comma separated list of labels, each item must be in the form <key>=<value>, multiple items will filter tasks with all the labels * @param {string} [requestTimeBetween] The period of request time to fetch, in unix millis. This must be a comma separated string, \'X,Y\' to fetch between X millis and Y millis inclusive. Example: \"1000,2000\" - Fetches logs between unix millis 1000 and 2000. * @param {string} [startTimeBetween] The period of starting time to fetch, in unix millis. This must be a comma separated string, \'X,Y\' to fetch between X millis and Y millis inclusive. Example: \"1000,2000\" - Fetches logs between unix millis 1000 and 2000. * @param {string} [finishTimeBetween] The period of finishing time to fetch, in unix millis. This must be a comma separated string, \'X,Y\' to fetch between X millis and Y millis inclusive. Example: \"1000,2000\" - Fetches logs between unix millis 1000 and 2000. \"-60000\" - Fetches logs in the last minute. @@ -10651,6 +10630,7 @@ export const TasksApiFactory = function ( destination?: string, assignedTo?: string, status?: string, + label?: string, requestTimeBetween?: string, startTimeBetween?: string, finishTimeBetween?: string, @@ -10668,6 +10648,7 @@ export const TasksApiFactory = function ( destination, assignedTo, status, + label, requestTimeBetween, startTimeBetween, finishTimeBetween, @@ -11114,15 +11095,16 @@ export class TasksApi extends BaseAPI { } /** - * + * Note that sorting by `pickup` and `destination` is mutually exclusive and sorting by either of them will filter only tasks which has those labels. * @summary Query Task States * @param {string} [taskId] comma separated list of task ids * @param {string} [category] comma separated list of task categories * @param {string} [requester] comma separated list of requester names - * @param {string} [pickup] comma separated list of pickup names - * @param {string} [destination] comma separated list of destination names + * @param {string} [pickup] comma separated list of pickup names. [deprecated] use `label` instead + * @param {string} [destination] comma separated list of destination names, [deprecated] use `label` instead * @param {string} [assignedTo] comma separated list of assigned robot names * @param {string} [status] comma separated list of statuses + * @param {string} [label] comma separated list of labels, each item must be in the form <key>=<value>, multiple items will filter tasks with all the labels * @param {string} [requestTimeBetween] The period of request time to fetch, in unix millis. This must be a comma separated string, \'X,Y\' to fetch between X millis and Y millis inclusive. Example: \"1000,2000\" - Fetches logs between unix millis 1000 and 2000. * @param {string} [startTimeBetween] The period of starting time to fetch, in unix millis. This must be a comma separated string, \'X,Y\' to fetch between X millis and Y millis inclusive. Example: \"1000,2000\" - Fetches logs between unix millis 1000 and 2000. * @param {string} [finishTimeBetween] The period of finishing time to fetch, in unix millis. This must be a comma separated string, \'X,Y\' to fetch between X millis and Y millis inclusive. Example: \"1000,2000\" - Fetches logs between unix millis 1000 and 2000. \"-60000\" - Fetches logs in the last minute. @@ -11141,6 +11123,7 @@ export class TasksApi extends BaseAPI { destination?: string, assignedTo?: string, status?: string, + label?: string, requestTimeBetween?: string, startTimeBetween?: string, finishTimeBetween?: string, @@ -11158,6 +11141,7 @@ export class TasksApi extends BaseAPI { destination, assignedTo, status, + label, requestTimeBetween, startTimeBetween, finishTimeBetween, diff --git a/packages/api-client/lib/version.ts b/packages/api-client/lib/version.ts index d44ff17a7..8f08dd1f7 100644 --- a/packages/api-client/lib/version.ts +++ b/packages/api-client/lib/version.ts @@ -3,6 +3,6 @@ import { version as rmfModelVer } from 'rmf-models'; export const version = { rmfModels: rmfModelVer, - rmfServer: '98741b14ceca74208ca98e4bb0c3ca9e41ca1e3c', + rmfServer: 'd536f9525f277088015d827b6b7198035d1a856b', openapiGenerator: '6.2.1', }; diff --git a/packages/api-client/schema/index.ts b/packages/api-client/schema/index.ts index 37ea1f1b5..9d0215111 100644 --- a/packages/api-client/schema/index.ts +++ b/packages/api-client/schema/index.ts @@ -709,6 +709,8 @@ export default { get: { tags: ['Tasks'], summary: 'Query Task States', + description: + 'Note that sorting by `pickup` and `destination` is mutually exclusive and sorting\nby either of them will filter only tasks which has those labels.', operationId: 'query_task_states_tasks_get', parameters: [ { @@ -745,23 +747,27 @@ export default { in: 'query', }, { - description: 'comma separated list of pickup names', + description: 'comma separated list of pickup names. [deprecated] use `label` instead', required: false, + deprecated: true, schema: { title: 'Pickup', type: 'string', - description: 'comma separated list of pickup names', + description: 'comma separated list of pickup names. [deprecated] use `label` instead', }, name: 'pickup', in: 'query', }, { - description: 'comma separated list of destination names', + description: + 'comma separated list of destination names, [deprecated] use `label` instead', required: false, + deprecated: true, schema: { title: 'Destination', type: 'string', - description: 'comma separated list of destination names', + description: + 'comma separated list of destination names, [deprecated] use `label` instead', }, name: 'destination', in: 'query', @@ -788,6 +794,19 @@ export default { name: 'status', in: 'query', }, + { + description: + 'comma separated list of labels, each item must be in the form =, multiple items will filter tasks with all the labels', + required: false, + schema: { + title: 'Label', + type: 'string', + description: + 'comma separated list of labels, each item must be in the form =, multiple items will filter tasks with all the labels', + }, + name: 'label', + in: 'query', + }, { description: '\n The period of request time to fetch, in unix millis.\n\n This must be a comma separated string, \'X,Y\' to fetch between X millis and Y millis inclusive.\n\n Example:\n "1000,2000" - Fetches logs between unix millis 1000 and 2000.\n ', @@ -3675,23 +3694,17 @@ export default { title: 'TaskBookingLabel', 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', - required: ['task_definition_id'], - type: 'object', properties: { - task_definition_id: { title: 'Task Definition Id', type: 'string' }, - unix_millis_warn_time: { title: 'Unix Millis Warn Time', type: 'integer' }, - pickup: { title: 'Pickup', type: 'string' }, - destination: { title: 'Destination', type: 'string' }, - cart_id: { title: 'Cart Id', type: 'string' }, + description: { + title: 'Description', + type: 'object', + additionalProperties: { + anyOf: [{ type: 'string' }, { type: 'integer' }, { type: 'number' }], + }, + }, }, 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.', + '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.', }, TaskCancelResponse: { title: 'TaskCancelResponse',