diff --git a/packages/api-client/lib/index.ts b/packages/api-client/lib/index.ts index 423ecb6ac..7d2ca7b13 100644 --- a/packages/api-client/lib/index.ts +++ b/packages/api-client/lib/index.ts @@ -1,7 +1,8 @@ import Debug from 'debug'; import { io, Socket } from 'socket.io-client'; import { - Alert, + AlertRequest, + AlertResponse, BeaconState, BuildingMap, DeliveryAlert, @@ -101,8 +102,12 @@ export class SioClient { return this.subscribe(`/tasks/${taskId}/log`, listener); } - subscribeAlerts(listener: Listener): Subscription { - return this.subscribe(`/alerts`, listener); + subscribeAlertRequests(listener: Listener): Subscription { + return this.subscribe(`/alerts/requests`, listener); + } + + subscribeAlertResponses(listener: Listener): Subscription { + return this.subscribe(`/alerts/responses`, listener); } subscribeDeliveryAlerts(listener: Listener): Subscription { diff --git a/packages/api-client/lib/openapi/api.ts b/packages/api-client/lib/openapi/api.ts index a6b128624..6ec053bb0 100644 --- a/packages/api-client/lib/openapi/api.ts +++ b/packages/api-client/lib/openapi/api.ts @@ -172,46 +172,129 @@ export interface AffineImage { /** * * @export - * @interface Alert + * @interface AlertParameter */ -export interface Alert { +export interface AlertParameter { /** * * @type {string} - * @memberof Alert + * @memberof AlertParameter */ - id: string; + name: string; /** * * @type {string} - * @memberof Alert + * @memberof AlertParameter */ - original_id: string; + value: string; +} +/** + * + * @export + * @interface AlertRequest + */ +export interface AlertRequest { /** * - * @type {ApiServerModelsTortoiseModelsAlertsAlertCategory} - * @memberof Alert + * @type {string} + * @memberof AlertRequest */ - category: ApiServerModelsTortoiseModelsAlertsAlertCategory; + id: string; /** * * @type {number} - * @memberof Alert + * @memberof AlertRequest + */ + unix_millis_alert_time: number; + /** + * + * @type {string} + * @memberof AlertRequest */ - unix_millis_created_time: number; + title: string; /** * * @type {string} - * @memberof Alert + * @memberof AlertRequest + */ + subtitle: string; + /** + * + * @type {string} + * @memberof AlertRequest + */ + message: string; + /** + * + * @type {boolean} + * @memberof AlertRequest + */ + display: boolean; + /** + * + * @type {ApiServerModelsAlertsAlertRequestTier} + * @memberof AlertRequest */ - acknowledged_by: string; + tier: ApiServerModelsAlertsAlertRequestTier; + /** + * + * @type {Array} + * @memberof AlertRequest + */ + responses_available: Array; + /** + * + * @type {Array} + * @memberof AlertRequest + */ + alert_parameters: Array; + /** + * + * @type {string} + * @memberof AlertRequest + */ + task_id: string | null; +} + +/** + * + * @export + * @interface AlertResponse + */ +export interface AlertResponse { + /** + * + * @type {string} + * @memberof AlertResponse + */ + id: string; /** * * @type {number} - * @memberof Alert + * @memberof AlertResponse */ - unix_millis_acknowledged_time: number; + unix_millis_response_time: number; + /** + * + * @type {string} + * @memberof AlertResponse + */ + response: string; } +/** + * + * @export + * @enum {string} + */ + +export const ApiServerModelsAlertsAlertRequestTier = { + Info: 'info', + Warning: 'warning', + Error: 'error', +} as const; + +export type ApiServerModelsAlertsAlertRequestTier = + (typeof ApiServerModelsAlertsAlertRequestTier)[keyof typeof ApiServerModelsAlertsAlertRequestTier]; /** * @@ -302,22 +385,6 @@ export const ApiServerModelsRmfApiTaskStateStatus = { export type ApiServerModelsRmfApiTaskStateStatus = (typeof ApiServerModelsRmfApiTaskStateStatus)[keyof typeof ApiServerModelsRmfApiTaskStateStatus]; -/** - * - * @export - * @enum {string} - */ - -export const ApiServerModelsTortoiseModelsAlertsAlertCategory = { - Default: 'default', - Task: 'task', - Fleet: 'fleet', - Robot: 'robot', -} as const; - -export type ApiServerModelsTortoiseModelsAlertsAlertCategory = - (typeof ApiServerModelsTortoiseModelsAlertsAlertCategory)[keyof typeof ApiServerModelsTortoiseModelsAlertsAlertCategory]; - /** * * @export @@ -1520,6 +1587,31 @@ export interface MutexGroups { */ requesting?: Array | null; } +/** + * + * @export + * @interface Pagination + */ +export interface Pagination { + /** + * + * @type {number} + * @memberof Pagination + */ + limit: number; + /** + * + * @type {number} + * @memberof Pagination + */ + offset: number; + /** + * + * @type {Array} + * @memberof Pagination + */ + order_by: Array; +} /** * * @export @@ -3210,19 +3302,6 @@ export interface TaskStateOutput { killed?: Killed | null; } -/** - * - * @export - * @enum {string} - */ - -export const TierInput = { - Warning: 'warning', - Error: 'error', -} as const; - -export type TierInput = (typeof TierInput)[keyof typeof TierInput]; - /** * * @export @@ -5233,21 +5312,72 @@ export class AdminApi extends BaseAPI { export const AlertsApiAxiosParamCreator = function (configuration?: Configuration) { return { /** - * - * @summary Acknowledge Alert + * Creates a new alert. + * @summary Create New Alert + * @param {AlertRequest} alertRequest + * @param {string | null} [authorization] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createNewAlertAlertsRequestPost: async ( + alertRequest: AlertRequest, + authorization?: string | null, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'alertRequest' is not null or undefined + assertParamExists('createNewAlertAlertsRequestPost', 'alertRequest', alertRequest); + const localVarPath = `/alerts/request`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (authorization != null) { + localVarHeaderParameter['authorization'] = String(authorization); + } + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + alertRequest, + localVarRequestOptions, + configuration, + ); + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Gets an alert based on the alert ID. + * @summary Get Alert * @param {string} alertId * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - acknowledgeAlertAlertsAlertIdPost: async ( + getAlertAlertsRequestAlertIdGet: async ( alertId: string, authorization?: string | null, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'alertId' is not null or undefined - assertParamExists('acknowledgeAlertAlertsAlertIdPost', 'alertId', alertId); - const localVarPath = `/alerts/{alert_id}`.replace( + assertParamExists('getAlertAlertsRequestAlertIdGet', 'alertId', alertId); + const localVarPath = `/alerts/request/{alert_id}`.replace( `{${'alert_id'}}`, encodeURIComponent(String(alertId)), ); @@ -5258,7 +5388,7 @@ export const AlertsApiAxiosParamCreator = function (configuration?: Configuratio baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; @@ -5280,25 +5410,24 @@ export const AlertsApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * - * @summary Create Alert + * Gets the response to the alert based on the alert ID. + * @summary Get Alert Response * @param {string} alertId - * @param {string} category * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createAlertAlertsPost: async ( + getAlertResponseAlertsRequestAlertIdResponseGet: async ( alertId: string, - category: string, authorization?: string | null, options: RawAxiosRequestConfig = {}, ): Promise => { // verify required parameter 'alertId' is not null or undefined - assertParamExists('createAlertAlertsPost', 'alertId', alertId); - // verify required parameter 'category' is not null or undefined - assertParamExists('createAlertAlertsPost', 'category', category); - const localVarPath = `/alerts`; + assertParamExists('getAlertResponseAlertsRequestAlertIdResponseGet', 'alertId', alertId); + const localVarPath = `/alerts/request/{alert_id}/response`.replace( + `{${'alert_id'}}`, + encodeURIComponent(String(alertId)), + ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -5306,16 +5435,61 @@ export const AlertsApiAxiosParamCreator = function (configuration?: Configuratio baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - if (alertId !== undefined) { - localVarQueryParameter['alert_id'] = alertId; + if (authorization != null) { + localVarHeaderParameter['authorization'] = String(authorization); } - if (category !== undefined) { - localVarQueryParameter['category'] = category; + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns all the alerts associated to a task ID. Provides the option to only return alerts that have not been responded to yet. + * @summary Get Alerts Of Task + * @param {string} taskId + * @param {boolean} [unresponded] + * @param {string | null} [authorization] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAlertsOfTaskAlertsRequestsTaskTaskIdGet: async ( + taskId: string, + unresponded?: boolean, + authorization?: string | null, + options: RawAxiosRequestConfig = {}, + ): Promise => { + // verify required parameter 'taskId' is not null or undefined + assertParamExists('getAlertsOfTaskAlertsRequestsTaskTaskIdGet', 'taskId', taskId); + const localVarPath = `/alerts/requests/task/{task_id}`.replace( + `{${'task_id'}}`, + encodeURIComponent(String(taskId)), + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (unresponded !== undefined) { + localVarQueryParameter['unresponded'] = unresponded; } if (authorization != null) { @@ -5336,24 +5510,19 @@ export const AlertsApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * - * @summary Get Alert - * @param {string} alertId + * Returns the list of alert IDs that have yet to be responded to, while a response was required. + * @summary Get Unresponded Alerts * @param {string | null} [authorization] + * @param {Pagination} [pagination] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAlertAlertsAlertIdGet: async ( - alertId: string, + getUnrespondedAlertsAlertsUnrespondedRequestsGet: async ( authorization?: string | null, + pagination?: Pagination, options: RawAxiosRequestConfig = {}, ): Promise => { - // verify required parameter 'alertId' is not null or undefined - assertParamExists('getAlertAlertsAlertIdGet', 'alertId', alertId); - const localVarPath = `/alerts/{alert_id}`.replace( - `{${'alert_id'}}`, - encodeURIComponent(String(alertId)), - ); + const localVarPath = `/alerts/unresponded_requests`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -5369,6 +5538,8 @@ export const AlertsApiAxiosParamCreator = function (configuration?: Configuratio localVarHeaderParameter['authorization'] = String(authorization); } + localVarHeaderParameter['Content-Type'] = 'application/json'; + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { @@ -5376,6 +5547,11 @@ export const AlertsApiAxiosParamCreator = function (configuration?: Configuratio ...headersFromBaseOptions, ...options.headers, }; + localVarRequestOptions.data = serializeDataIfNeeded( + pagination, + localVarRequestOptions, + configuration, + ); return { url: toPathString(localVarUrlObj), @@ -5383,17 +5559,28 @@ export const AlertsApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * - * @summary Get Alerts + * Responds to an existing alert. The response must be one of the available responses listed in the alert. + * @summary Respond To Alert + * @param {string} alertId + * @param {string} response * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAlertsAlertsGet: async ( + respondToAlertAlertsRequestAlertIdRespondPost: async ( + alertId: string, + response: string, authorization?: string | null, options: RawAxiosRequestConfig = {}, ): Promise => { - const localVarPath = `/alerts`; + // verify required parameter 'alertId' is not null or undefined + assertParamExists('respondToAlertAlertsRequestAlertIdRespondPost', 'alertId', alertId); + // verify required parameter 'response' is not null or undefined + assertParamExists('respondToAlertAlertsRequestAlertIdRespondPost', 'response', response); + const localVarPath = `/alerts/request/{alert_id}/respond`.replace( + `{${'alert_id'}}`, + encodeURIComponent(String(alertId)), + ); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -5401,10 +5588,14 @@ export const AlertsApiAxiosParamCreator = function (configuration?: Configuratio baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; + if (response !== undefined) { + localVarQueryParameter['response'] = response; + } + if (authorization != null) { localVarHeaderParameter['authorization'] = String(authorization); } @@ -5433,26 +5624,26 @@ export const AlertsApiFp = function (configuration?: Configuration) { const localVarAxiosParamCreator = AlertsApiAxiosParamCreator(configuration); return { /** - * - * @summary Acknowledge Alert - * @param {string} alertId + * Creates a new alert. + * @summary Create New Alert + * @param {AlertRequest} alertRequest * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async acknowledgeAlertAlertsAlertIdPost( - alertId: string, + async createNewAlertAlertsRequestPost( + alertRequest: AlertRequest, authorization?: string | null, options?: RawAxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.acknowledgeAlertAlertsAlertIdPost( - alertId, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createNewAlertAlertsRequestPost( + alertRequest, authorization, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = - operationServerMap['AlertsApi.acknowledgeAlertAlertsAlertIdPost']?.[ + operationServerMap['AlertsApi.createNewAlertAlertsRequestPost']?.[ localVarOperationServerIndex ]?.url; return (axios, basePath) => @@ -5464,29 +5655,28 @@ export const AlertsApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath); }, /** - * - * @summary Create Alert + * Gets an alert based on the alert ID. + * @summary Get Alert * @param {string} alertId - * @param {string} category * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async createAlertAlertsPost( + async getAlertAlertsRequestAlertIdGet( alertId: string, - category: string, authorization?: string | null, options?: RawAxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.createAlertAlertsPost( + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getAlertAlertsRequestAlertIdGet( alertId, - category, authorization, options, ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = - operationServerMap['AlertsApi.createAlertAlertsPost']?.[localVarOperationServerIndex]?.url; + operationServerMap['AlertsApi.getAlertAlertsRequestAlertIdGet']?.[ + localVarOperationServerIndex + ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, @@ -5496,27 +5686,29 @@ export const AlertsApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath); }, /** - * - * @summary Get Alert + * Gets the response to the alert based on the alert ID. + * @summary Get Alert Response * @param {string} alertId * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAlertAlertsAlertIdGet( + async getAlertResponseAlertsRequestAlertIdResponseGet( alertId: string, authorization?: string | null, options?: RawAxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAlertAlertsAlertIdGet( - alertId, - authorization, - options, - ); + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getAlertResponseAlertsRequestAlertIdResponseGet( + alertId, + authorization, + options, + ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = - operationServerMap['AlertsApi.getAlertAlertsAlertIdGet']?.[localVarOperationServerIndex] - ?.url; + operationServerMap['AlertsApi.getAlertResponseAlertsRequestAlertIdResponseGet']?.[ + localVarOperationServerIndex + ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, @@ -5526,23 +5718,99 @@ export const AlertsApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath); }, /** - * - * @summary Get Alerts + * Returns all the alerts associated to a task ID. Provides the option to only return alerts that have not been responded to yet. + * @summary Get Alerts Of Task + * @param {string} taskId + * @param {boolean} [unresponded] * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getAlertsAlertsGet( + async getAlertsOfTaskAlertsRequestsTaskTaskIdGet( + taskId: string, + unresponded?: boolean, authorization?: string | null, options?: RawAxiosRequestConfig, - ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getAlertsAlertsGet( - authorization, - options, - ); + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getAlertsOfTaskAlertsRequestsTaskTaskIdGet( + taskId, + unresponded, + authorization, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['AlertsApi.getAlertsOfTaskAlertsRequestsTaskTaskIdGet']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns the list of alert IDs that have yet to be responded to, while a response was required. + * @summary Get Unresponded Alerts + * @param {string | null} [authorization] + * @param {Pagination} [pagination] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getUnrespondedAlertsAlertsUnrespondedRequestsGet( + authorization?: string | null, + pagination?: Pagination, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getUnrespondedAlertsAlertsUnrespondedRequestsGet( + authorization, + pagination, + options, + ); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = + operationServerMap['AlertsApi.getUnrespondedAlertsAlertsUnrespondedRequestsGet']?.[ + localVarOperationServerIndex + ]?.url; + return (axios, basePath) => + createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration, + )(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Responds to an existing alert. The response must be one of the available responses listed in the alert. + * @summary Respond To Alert + * @param {string} alertId + * @param {string} response + * @param {string | null} [authorization] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async respondToAlertAlertsRequestAlertIdRespondPost( + alertId: string, + response: string, + authorization?: string | null, + options?: RawAxiosRequestConfig, + ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = + await localVarAxiosParamCreator.respondToAlertAlertsRequestAlertIdRespondPost( + alertId, + response, + authorization, + options, + ); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = - operationServerMap['AlertsApi.getAlertsAlertsGet']?.[localVarOperationServerIndex]?.url; + operationServerMap['AlertsApi.respondToAlertAlertsRequestAlertIdRespondPost']?.[ + localVarOperationServerIndex + ]?.url; return (axios, basePath) => createRequestFunction( localVarAxiosArgs, @@ -5566,68 +5834,109 @@ export const AlertsApiFactory = function ( const localVarFp = AlertsApiFp(configuration); return { /** - * - * @summary Acknowledge Alert - * @param {string} alertId + * Creates a new alert. + * @summary Create New Alert + * @param {AlertRequest} alertRequest * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - acknowledgeAlertAlertsAlertIdPost( - alertId: string, + createNewAlertAlertsRequestPost( + alertRequest: AlertRequest, authorization?: string | null, options?: any, - ): AxiosPromise { + ): AxiosPromise { return localVarFp - .acknowledgeAlertAlertsAlertIdPost(alertId, authorization, options) + .createNewAlertAlertsRequestPost(alertRequest, authorization, options) .then((request) => request(axios, basePath)); }, /** - * - * @summary Create Alert + * Gets an alert based on the alert ID. + * @summary Get Alert * @param {string} alertId - * @param {string} category * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - createAlertAlertsPost( + getAlertAlertsRequestAlertIdGet( alertId: string, - category: string, authorization?: string | null, options?: any, - ): AxiosPromise { + ): AxiosPromise { return localVarFp - .createAlertAlertsPost(alertId, category, authorization, options) + .getAlertAlertsRequestAlertIdGet(alertId, authorization, options) .then((request) => request(axios, basePath)); }, /** - * - * @summary Get Alert + * Gets the response to the alert based on the alert ID. + * @summary Get Alert Response * @param {string} alertId * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAlertAlertsAlertIdGet( + getAlertResponseAlertsRequestAlertIdResponseGet( alertId: string, authorization?: string | null, options?: any, - ): AxiosPromise { + ): AxiosPromise { return localVarFp - .getAlertAlertsAlertIdGet(alertId, authorization, options) + .getAlertResponseAlertsRequestAlertIdResponseGet(alertId, authorization, options) .then((request) => request(axios, basePath)); }, /** - * - * @summary Get Alerts + * Returns all the alerts associated to a task ID. Provides the option to only return alerts that have not been responded to yet. + * @summary Get Alerts Of Task + * @param {string} taskId + * @param {boolean} [unresponded] + * @param {string | null} [authorization] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getAlertsOfTaskAlertsRequestsTaskTaskIdGet( + taskId: string, + unresponded?: boolean, + authorization?: string | null, + options?: any, + ): AxiosPromise> { + return localVarFp + .getAlertsOfTaskAlertsRequestsTaskTaskIdGet(taskId, unresponded, authorization, options) + .then((request) => request(axios, basePath)); + }, + /** + * Returns the list of alert IDs that have yet to be responded to, while a response was required. + * @summary Get Unresponded Alerts + * @param {string | null} [authorization] + * @param {Pagination} [pagination] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUnrespondedAlertsAlertsUnrespondedRequestsGet( + authorization?: string | null, + pagination?: Pagination, + options?: any, + ): AxiosPromise> { + return localVarFp + .getUnrespondedAlertsAlertsUnrespondedRequestsGet(authorization, pagination, options) + .then((request) => request(axios, basePath)); + }, + /** + * Responds to an existing alert. The response must be one of the available responses listed in the alert. + * @summary Respond To Alert + * @param {string} alertId + * @param {string} response * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getAlertsAlertsGet(authorization?: string | null, options?: any): AxiosPromise> { + respondToAlertAlertsRequestAlertIdRespondPost( + alertId: string, + response: string, + authorization?: string | null, + options?: any, + ): AxiosPromise { return localVarFp - .getAlertsAlertsGet(authorization, options) + .respondToAlertAlertsRequestAlertIdRespondPost(alertId, response, authorization, options) .then((request) => request(axios, basePath)); }, }; @@ -5641,75 +5950,120 @@ export const AlertsApiFactory = function ( */ export class AlertsApi extends BaseAPI { /** - * - * @summary Acknowledge Alert - * @param {string} alertId + * Creates a new alert. + * @summary Create New Alert + * @param {AlertRequest} alertRequest * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AlertsApi */ - public acknowledgeAlertAlertsAlertIdPost( - alertId: string, + public createNewAlertAlertsRequestPost( + alertRequest: AlertRequest, authorization?: string | null, options?: RawAxiosRequestConfig, ) { return AlertsApiFp(this.configuration) - .acknowledgeAlertAlertsAlertIdPost(alertId, authorization, options) + .createNewAlertAlertsRequestPost(alertRequest, authorization, options) .then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Create Alert + * Gets an alert based on the alert ID. + * @summary Get Alert * @param {string} alertId - * @param {string} category * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AlertsApi */ - public createAlertAlertsPost( + public getAlertAlertsRequestAlertIdGet( alertId: string, - category: string, authorization?: string | null, options?: RawAxiosRequestConfig, ) { return AlertsApiFp(this.configuration) - .createAlertAlertsPost(alertId, category, authorization, options) + .getAlertAlertsRequestAlertIdGet(alertId, authorization, options) .then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Get Alert + * Gets the response to the alert based on the alert ID. + * @summary Get Alert Response * @param {string} alertId * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AlertsApi */ - public getAlertAlertsAlertIdGet( + public getAlertResponseAlertsRequestAlertIdResponseGet( alertId: string, authorization?: string | null, options?: RawAxiosRequestConfig, ) { return AlertsApiFp(this.configuration) - .getAlertAlertsAlertIdGet(alertId, authorization, options) + .getAlertResponseAlertsRequestAlertIdResponseGet(alertId, authorization, options) .then((request) => request(this.axios, this.basePath)); } /** - * - * @summary Get Alerts + * Returns all the alerts associated to a task ID. Provides the option to only return alerts that have not been responded to yet. + * @summary Get Alerts Of Task + * @param {string} taskId + * @param {boolean} [unresponded] + * @param {string | null} [authorization] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlertsApi + */ + public getAlertsOfTaskAlertsRequestsTaskTaskIdGet( + taskId: string, + unresponded?: boolean, + authorization?: string | null, + options?: RawAxiosRequestConfig, + ) { + return AlertsApiFp(this.configuration) + .getAlertsOfTaskAlertsRequestsTaskTaskIdGet(taskId, unresponded, authorization, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns the list of alert IDs that have yet to be responded to, while a response was required. + * @summary Get Unresponded Alerts + * @param {string | null} [authorization] + * @param {Pagination} [pagination] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AlertsApi + */ + public getUnrespondedAlertsAlertsUnrespondedRequestsGet( + authorization?: string | null, + pagination?: Pagination, + options?: RawAxiosRequestConfig, + ) { + return AlertsApiFp(this.configuration) + .getUnrespondedAlertsAlertsUnrespondedRequestsGet(authorization, pagination, options) + .then((request) => request(this.axios, this.basePath)); + } + + /** + * Responds to an existing alert. The response must be one of the available responses listed in the alert. + * @summary Respond To Alert + * @param {string} alertId + * @param {string} response * @param {string | null} [authorization] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AlertsApi */ - public getAlertsAlertsGet(authorization?: string | null, options?: RawAxiosRequestConfig) { + public respondToAlertAlertsRequestAlertIdRespondPost( + alertId: string, + response: string, + authorization?: string | null, + options?: RawAxiosRequestConfig, + ) { return AlertsApiFp(this.configuration) - .getAlertsAlertsGet(authorization, options) + .respondToAlertAlertsRequestAlertIdRespondPost(alertId, response, authorization, options) .then((request) => request(this.axios, this.basePath)); } } @@ -6615,7 +6969,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati }; }, /** - * # NOTE: This endpoint is here for documentation purposes only, this is _not_ a REST endpoint. ## About This exposes a minimal pubsub system built on top of socket.io. It works similar to a normal socket.io endpoint, except that are 2 special rooms which control subscriptions. ## Rooms ### subscribe Clients must send a message to this room to start receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### unsubscribe Clients can send a message to this room to stop receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### /alerts ``` { \"$defs\": { \"Category\": { \"enum\": [ \"default\", \"task\", \"fleet\", \"robot\" ], \"title\": \"Category\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"original_id\": { \"title\": \"Original Id\", \"type\": \"string\" }, \"category\": { \"$ref\": \"#/$defs/Category\" }, \"unix_millis_created_time\": { \"title\": \"Unix Millis Created Time\", \"type\": \"integer\" }, \"acknowledged_by\": { \"title\": \"Acknowledged By\", \"type\": \"string\" }, \"unix_millis_acknowledged_time\": { \"title\": \"Unix Millis Acknowledged Time\", \"type\": \"integer\" } }, \"required\": [ \"id\", \"original_id\", \"category\", \"unix_millis_created_time\", \"acknowledged_by\", \"unix_millis_acknowledged_time\" ], \"title\": \"Alert\", \"type\": \"object\" } ``` ### /beacons ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"online\": { \"title\": \"Online\", \"type\": \"boolean\" }, \"category\": { \"title\": \"Category\", \"type\": \"string\" }, \"activated\": { \"title\": \"Activated\", \"type\": \"boolean\" }, \"level\": { \"title\": \"Level\", \"type\": \"string\" } }, \"required\": [ \"id\", \"online\", \"category\", \"activated\", \"level\" ], \"title\": \"BeaconState\", \"type\": \"object\" } ``` ### /building_map ``` { \"$defs\": { \"AffineImage\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x_offset\": { \"title\": \"X Offset\", \"type\": \"number\" }, \"y_offset\": { \"title\": \"Y Offset\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"scale\": { \"title\": \"Scale\", \"type\": \"number\" }, \"encoding\": { \"title\": \"Encoding\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"string\" } }, \"required\": [ \"name\", \"x_offset\", \"y_offset\", \"yaw\", \"scale\", \"encoding\", \"data\" ], \"title\": \"AffineImage\", \"type\": \"object\" }, \"Door\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"v1_x\": { \"title\": \"V1 X\", \"type\": \"number\" }, \"v1_y\": { \"title\": \"V1 Y\", \"type\": \"number\" }, \"v2_x\": { \"title\": \"V2 X\", \"type\": \"number\" }, \"v2_y\": { \"title\": \"V2 Y\", \"type\": \"number\" }, \"door_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door Type\", \"type\": \"integer\" }, \"motion_range\": { \"title\": \"Motion Range\", \"type\": \"number\" }, \"motion_direction\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Motion Direction\", \"type\": \"integer\" } }, \"required\": [ \"name\", \"v1_x\", \"v1_y\", \"v2_x\", \"v2_y\", \"door_type\", \"motion_range\", \"motion_direction\" ], \"title\": \"Door\", \"type\": \"object\" }, \"Graph\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"vertices\": { \"items\": { \"$ref\": \"#/$defs/GraphNode\" }, \"title\": \"Vertices\", \"type\": \"array\" }, \"edges\": { \"items\": { \"$ref\": \"#/$defs/GraphEdge\" }, \"title\": \"Edges\", \"type\": \"array\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"name\", \"vertices\", \"edges\", \"params\" ], \"title\": \"Graph\", \"type\": \"object\" }, \"GraphEdge\": { \"properties\": { \"v1_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V1 Idx\", \"type\": \"integer\" }, \"v2_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V2 Idx\", \"type\": \"integer\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" }, \"edge_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Edge Type\", \"type\": \"integer\" } }, \"required\": [ \"v1_idx\", \"v2_idx\", \"params\", \"edge_type\" ], \"title\": \"GraphEdge\", \"type\": \"object\" }, \"GraphNode\": { \"properties\": { \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"x\", \"y\", \"name\", \"params\" ], \"title\": \"GraphNode\", \"type\": \"object\" }, \"Level\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"elevation\": { \"title\": \"Elevation\", \"type\": \"number\" }, \"images\": { \"items\": { \"$ref\": \"#/$defs/AffineImage\" }, \"title\": \"Images\", \"type\": \"array\" }, \"places\": { \"items\": { \"$ref\": \"#/$defs/Place\" }, \"title\": \"Places\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"nav_graphs\": { \"items\": { \"$ref\": \"#/$defs/Graph\" }, \"title\": \"Nav Graphs\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" } }, \"required\": [ \"name\", \"elevation\", \"images\", \"places\", \"doors\", \"nav_graphs\", \"wall_graph\" ], \"title\": \"Level\", \"type\": \"object\" }, \"Lift\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"type\": \"string\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" }, \"ref_x\": { \"title\": \"Ref X\", \"type\": \"number\" }, \"ref_y\": { \"title\": \"Ref Y\", \"type\": \"number\" }, \"ref_yaw\": { \"title\": \"Ref Yaw\", \"type\": \"number\" }, \"width\": { \"title\": \"Width\", \"type\": \"number\" }, \"depth\": { \"title\": \"Depth\", \"type\": \"number\" } }, \"required\": [ \"name\", \"levels\", \"doors\", \"wall_graph\", \"ref_x\", \"ref_y\", \"ref_yaw\", \"width\", \"depth\" ], \"title\": \"Lift\", \"type\": \"object\" }, \"Param\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"type\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Type\", \"type\": \"integer\" }, \"value_int\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Value Int\", \"type\": \"integer\" }, \"value_float\": { \"title\": \"Value Float\", \"type\": \"number\" }, \"value_string\": { \"title\": \"Value String\", \"type\": \"string\" }, \"value_bool\": { \"title\": \"Value Bool\", \"type\": \"boolean\" } }, \"required\": [ \"name\", \"type\", \"value_int\", \"value_float\", \"value_string\", \"value_bool\" ], \"title\": \"Param\", \"type\": \"object\" }, \"Place\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"position_tolerance\": { \"title\": \"Position Tolerance\", \"type\": \"number\" }, \"yaw_tolerance\": { \"title\": \"Yaw Tolerance\", \"type\": \"number\" } }, \"required\": [ \"name\", \"x\", \"y\", \"yaw\", \"position_tolerance\", \"yaw_tolerance\" ], \"title\": \"Place\", \"type\": \"object\" } }, \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"$ref\": \"#/$defs/Level\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"lifts\": { \"items\": { \"$ref\": \"#/$defs/Lift\" }, \"title\": \"Lifts\", \"type\": \"array\" } }, \"required\": [ \"name\", \"levels\", \"lifts\" ], \"title\": \"BuildingMap\", \"type\": \"object\" } ``` ### /building_map/fire_alarm_trigger ``` { \"properties\": { \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"trigger\": { \"title\": \"Trigger\", \"type\": \"boolean\" } }, \"required\": [ \"unix_millis_time\", \"trigger\" ], \"title\": \"FireAlarmTriggerState\", \"type\": \"object\" } ``` ### /delivery_alerts ``` { \"$defs\": { \"Action\": { \"enum\": [ \"waiting\", \"cancel\", \"override\", \"resume\" ], \"title\": \"Action\", \"type\": \"string\" }, \"Category\": { \"enum\": [ \"missing\", \"wrong\", \"obstructed\", \"cancelled\" ], \"title\": \"Category\", \"type\": \"string\" }, \"Tier\": { \"enum\": [ \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"category\": { \"$ref\": \"#/$defs/Category\" }, \"tier\": { \"$ref\": \"#/$defs/Tier\" }, \"action\": { \"$ref\": \"#/$defs/Action\" }, \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"message\": { \"title\": \"Message\", \"type\": \"string\" } }, \"required\": [ \"id\", \"category\", \"tier\", \"action\", \"task_id\", \"message\" ], \"title\": \"DeliveryAlert\", \"type\": \"object\" } ``` ### /doors/{door_name}/state ``` { \"$defs\": { \"DoorMode\": { \"properties\": { \"value\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Value\", \"type\": \"integer\" } }, \"required\": [ \"value\" ], \"title\": \"DoorMode\", \"type\": \"object\" }, \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"door_time\": { \"$ref\": \"#/$defs/Time\" }, \"door_name\": { \"title\": \"Door Name\", \"type\": \"string\" }, \"current_mode\": { \"$ref\": \"#/$defs/DoorMode\" } }, \"required\": [ \"door_time\", \"door_name\", \"current_mode\" ], \"title\": \"DoorState\", \"type\": \"object\" } ``` ### /lifts/{lift_name}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"lift_time\": { \"$ref\": \"#/$defs/Time\" }, \"lift_name\": { \"title\": \"Lift Name\", \"type\": \"string\" }, \"available_floors\": { \"items\": { \"type\": \"string\" }, \"title\": \"Available Floors\", \"type\": \"array\" }, \"current_floor\": { \"title\": \"Current Floor\", \"type\": \"string\" }, \"destination_floor\": { \"title\": \"Destination Floor\", \"type\": \"string\" }, \"door_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door State\", \"type\": \"integer\" }, \"motion_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Motion State\", \"type\": \"integer\" }, \"available_modes\": { \"items\": { \"type\": \"integer\" }, \"title\": \"Available Modes\", \"type\": \"array\" }, \"current_mode\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Current Mode\", \"type\": \"integer\" }, \"session_id\": { \"title\": \"Session Id\", \"type\": \"string\" } }, \"required\": [ \"lift_time\", \"lift_name\", \"available_floors\", \"current_floor\", \"destination_floor\", \"door_state\", \"motion_state\", \"available_modes\", \"current_mode\", \"session_id\" ], \"title\": \"LiftState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/state ``` { \"$defs\": { \"AssignedTo\": { \"properties\": { \"group\": { \"title\": \"Group\", \"type\": \"string\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" } }, \"required\": [ \"group\", \"name\" ], \"title\": \"AssignedTo\", \"type\": \"object\" }, \"Assignment\": { \"properties\": { \"fleet_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Fleet Name\" }, \"expected_robot_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Expected Robot Name\" } }, \"title\": \"Assignment\", \"type\": \"object\" }, \"Booking\": { \"properties\": { \"id\": { \"description\": \"The unique identifier for this task\", \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_earliest_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Earliest Start Time\" }, \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Request Time\" }, \"priority\": { \"anyOf\": [ { \"type\": \"object\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Priority information about this task\", \"title\": \"Priority\" }, \"labels\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about how and why this task was booked, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"title\": \"Labels\" }, \"requester\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"(Optional) An identifier for the entity that requested this task\", \"title\": \"Requester\" } }, \"required\": [ \"id\" ], \"title\": \"Booking\", \"type\": \"object\" }, \"Cancellation\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the cancel request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Cancellation\", \"type\": \"object\" }, \"Category\": { \"description\": \"The category of this task or phase\", \"title\": \"Category\", \"type\": \"string\" }, \"Detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" } ], \"description\": \"Detailed information about a task, phase, or event\", \"title\": \"Detail\" }, \"Dispatch\": { \"properties\": { \"status\": { \"$ref\": \"#/$defs/Status2\" }, \"assignment\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Assignment\" }, { \"type\": \"null\" } ], \"default\": null }, \"errors\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Error\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Errors\" } }, \"required\": [ \"status\" ], \"title\": \"Dispatch\", \"type\": \"object\" }, \"Error\": { \"properties\": { \"code\": { \"anyOf\": [ { \"minimum\": 0, \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A standard code for the kind of error that has occurred\", \"title\": \"Code\" }, \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The category of the error\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Details about the error\", \"title\": \"Detail\" } }, \"title\": \"Error\", \"type\": \"object\" }, \"EstimateMillis\": { \"description\": \"An estimate, in milliseconds, of how long the subject will take to complete\", \"minimum\": 0, \"title\": \"EstimateMillis\", \"type\": \"integer\" }, \"EventState\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The brief name of the event\", \"title\": \"Name\" }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the event\" }, \"deps\": { \"anyOf\": [ { \"items\": { \"minimum\": 0, \"type\": \"integer\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"This event may depend on other events. This array contains the IDs of those other event dependencies.\", \"title\": \"Deps\" } }, \"required\": [ \"id\" ], \"title\": \"EventState\", \"type\": \"object\" }, \"Id\": { \"minimum\": 0, \"title\": \"Id\", \"type\": \"integer\" }, \"Interruption\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the interruption request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the interruption, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"resumed_by\": { \"anyOf\": [ { \"$ref\": \"#/$defs/ResumedBy\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the resume request that ended this interruption. This field will be missing if the interruption is still active.\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Interruption\", \"type\": \"object\" }, \"Killed\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the kill request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Killed\", \"type\": \"object\" }, \"Phase\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"final_event_id\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/EventState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of events for this phase. The keys (property names) are the event IDs, which are integers.\", \"title\": \"Events\" }, \"skip_requests\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/SkipPhaseRequest\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about any skip requests that have been received\", \"title\": \"Skip Requests\" } }, \"required\": [ \"id\" ], \"title\": \"Phase\", \"type\": \"object\" }, \"ResumedBy\": { \"properties\": { \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The time that the resume request arrived\", \"title\": \"Unix Millis Request Time\" }, \"labels\": { \"description\": \"Labels to describe the resume request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"labels\" ], \"title\": \"ResumedBy\", \"type\": \"object\" }, \"SkipPhaseRequest\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"undo\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Undo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about an undo skip request that applied to this request\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"SkipPhaseRequest\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"blocked\", \"error\", \"failed\", \"queued\", \"standby\", \"underway\", \"delayed\", \"skipped\", \"canceled\", \"killed\", \"completed\" ], \"title\": \"Status\", \"type\": \"string\" }, \"Status2\": { \"enum\": [ \"queued\", \"selected\", \"dispatched\", \"failed_to_assign\", \"canceled_in_flight\" ], \"title\": \"Status2\", \"type\": \"string\" }, \"Undo\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the undo skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the undo skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Undo\", \"type\": \"object\" } }, \"properties\": { \"booking\": { \"$ref\": \"#/$defs/Booking\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"assigned_to\": { \"anyOf\": [ { \"$ref\": \"#/$defs/AssignedTo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Which agent (robot) is the task assigned to\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"dispatch\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Dispatch\" }, { \"type\": \"null\" } ], \"default\": null }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phase\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the phases of the task. The keys (property names) are phase IDs, which are integers.\", \"title\": \"Phases\" }, \"completed\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the IDs of completed phases of this task\", \"title\": \"Completed\" }, \"active\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the active phase for this task\" }, \"pending\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the pending phases of this task\", \"title\": \"Pending\" }, \"interruptions\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Interruption\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of interruptions that have been applied to this task. The keys (property names) are the unique token of the interruption request.\", \"title\": \"Interruptions\" }, \"cancellation\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Cancellation\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was cancelled, this will describe information about the request.\" }, \"killed\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Killed\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was killed, this will describe information about the request.\" } }, \"required\": [ \"booking\" ], \"title\": \"TaskState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Phases\": { \"additionalProperties\": false, \"properties\": { \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall phase\", \"title\": \"Log\" }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of an event in the phase\", \"title\": \"Events\" } }, \"title\": \"Phases\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"additionalProperties\": false, \"properties\": { \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall task\", \"title\": \"Log\" }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phases\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of a phase\", \"title\": \"Phases\" } }, \"required\": [ \"task_id\" ], \"title\": \"TaskEventLog\", \"type\": \"object\" } ``` ### /dispensers/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"DispenserState\", \"type\": \"object\" } ``` ### /ingestors/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"IngestorState\", \"type\": \"object\" } ``` ### /fleets/{name}/state ``` { \"$defs\": { \"Commission\": { \"properties\": { \"dispatch_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept dispatched tasks, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Dispatch Tasks\" }, \"direct_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept direct task requests, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Direct Tasks\" }, \"idle_behavior\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot perform its idle behavior, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Idle Behavior\" } }, \"title\": \"Commission\", \"type\": \"object\" }, \"Issue\": { \"properties\": { \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Category of the robot\'s issue\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the issue\", \"title\": \"Detail\" } }, \"title\": \"Issue\", \"type\": \"object\" }, \"Location2D\": { \"properties\": { \"map\": { \"title\": \"Map\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" } }, \"required\": [ \"map\", \"x\", \"y\", \"yaw\" ], \"title\": \"Location2D\", \"type\": \"object\" }, \"MutexGroups\": { \"properties\": { \"locked\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of mutex groups that this robot has currently locked\", \"title\": \"Locked\" }, \"requesting\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of the mutex groups that this robot is currently requesting but has not lockd yet\", \"title\": \"Requesting\" } }, \"title\": \"MutexGroups\", \"type\": \"object\" }, \"RobotState\": { \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A simple token representing the status of the robot\" }, \"task_id\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the task this robot is currently working on. Empty string if the robot is not working on a task.\", \"title\": \"Task Id\" }, \"unix_millis_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Time\" }, \"location\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Location2D\" }, { \"type\": \"null\" } ], \"default\": null }, \"battery\": { \"anyOf\": [ { \"maximum\": 1.0, \"minimum\": 0.0, \"type\": \"number\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"State of charge of the battery. Values range from 0.0 (depleted) to 1.0 (fully charged)\", \"title\": \"Battery\" }, \"issues\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Issue\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of issues with the robot that operators need to address\", \"title\": \"Issues\" }, \"commission\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Commission\" }, { \"type\": \"null\" } ], \"default\": null }, \"mutex_groups\": { \"anyOf\": [ { \"$ref\": \"#/$defs/MutexGroups\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the mutex groups that this robot is interacting with\" } }, \"title\": \"RobotState\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"offline\", \"shutdown\", \"idle\", \"charging\", \"working\", \"error\" ], \"title\": \"Status\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/RobotState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the robots that belong to this fleet\", \"title\": \"Robots\" } }, \"title\": \"FleetState\", \"type\": \"object\" } ``` ### /fleets/{name}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log for the overall fleet\", \"title\": \"Log\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Dictionary of logs for the individual robots. The keys (property names) are the robot names.\", \"title\": \"Robots\" } }, \"title\": \"FleetLog\", \"type\": \"object\" } ``` ### /rios ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"type\": { \"title\": \"Type\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"object\" } }, \"required\": [ \"id\", \"type\", \"data\" ], \"title\": \"Rio\", \"type\": \"object\" } ``` + * # NOTE: This endpoint is here for documentation purposes only, this is _not_ a REST endpoint. ## About This exposes a minimal pubsub system built on top of socket.io. It works similar to a normal socket.io endpoint, except that are 2 special rooms which control subscriptions. ## Rooms ### subscribe Clients must send a message to this room to start receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### unsubscribe Clients can send a message to this room to stop receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### /alerts/requests ``` { \"$defs\": { \"AlertParameter\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"value\": { \"title\": \"Value\", \"type\": \"string\" } }, \"required\": [ \"name\", \"value\" ], \"title\": \"AlertParameter\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_alert_time\": { \"title\": \"Unix Millis Alert Time\", \"type\": \"integer\" }, \"title\": { \"title\": \"Title\", \"type\": \"string\" }, \"subtitle\": { \"title\": \"Subtitle\", \"type\": \"string\" }, \"message\": { \"title\": \"Message\", \"type\": \"string\" }, \"display\": { \"title\": \"Display\", \"type\": \"boolean\" }, \"tier\": { \"$ref\": \"#/$defs/Tier\" }, \"responses_available\": { \"items\": { \"type\": \"string\" }, \"title\": \"Responses Available\", \"type\": \"array\" }, \"alert_parameters\": { \"items\": { \"$ref\": \"#/$defs/AlertParameter\" }, \"title\": \"Alert Parameters\", \"type\": \"array\" }, \"task_id\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"title\": \"Task Id\" } }, \"required\": [ \"id\", \"unix_millis_alert_time\", \"title\", \"subtitle\", \"message\", \"display\", \"tier\", \"responses_available\", \"alert_parameters\", \"task_id\" ], \"title\": \"AlertRequest\", \"type\": \"object\" } ``` ### /alerts/responses ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_response_time\": { \"title\": \"Unix Millis Response Time\", \"type\": \"integer\" }, \"response\": { \"title\": \"Response\", \"type\": \"string\" } }, \"required\": [ \"id\", \"unix_millis_response_time\", \"response\" ], \"title\": \"AlertResponse\", \"type\": \"object\" } ``` ### /beacons ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"online\": { \"title\": \"Online\", \"type\": \"boolean\" }, \"category\": { \"title\": \"Category\", \"type\": \"string\" }, \"activated\": { \"title\": \"Activated\", \"type\": \"boolean\" }, \"level\": { \"title\": \"Level\", \"type\": \"string\" } }, \"required\": [ \"id\", \"online\", \"category\", \"activated\", \"level\" ], \"title\": \"BeaconState\", \"type\": \"object\" } ``` ### /building_map ``` { \"$defs\": { \"AffineImage\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x_offset\": { \"title\": \"X Offset\", \"type\": \"number\" }, \"y_offset\": { \"title\": \"Y Offset\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"scale\": { \"title\": \"Scale\", \"type\": \"number\" }, \"encoding\": { \"title\": \"Encoding\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"string\" } }, \"required\": [ \"name\", \"x_offset\", \"y_offset\", \"yaw\", \"scale\", \"encoding\", \"data\" ], \"title\": \"AffineImage\", \"type\": \"object\" }, \"Door\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"v1_x\": { \"title\": \"V1 X\", \"type\": \"number\" }, \"v1_y\": { \"title\": \"V1 Y\", \"type\": \"number\" }, \"v2_x\": { \"title\": \"V2 X\", \"type\": \"number\" }, \"v2_y\": { \"title\": \"V2 Y\", \"type\": \"number\" }, \"door_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door Type\", \"type\": \"integer\" }, \"motion_range\": { \"title\": \"Motion Range\", \"type\": \"number\" }, \"motion_direction\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Motion Direction\", \"type\": \"integer\" } }, \"required\": [ \"name\", \"v1_x\", \"v1_y\", \"v2_x\", \"v2_y\", \"door_type\", \"motion_range\", \"motion_direction\" ], \"title\": \"Door\", \"type\": \"object\" }, \"Graph\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"vertices\": { \"items\": { \"$ref\": \"#/$defs/GraphNode\" }, \"title\": \"Vertices\", \"type\": \"array\" }, \"edges\": { \"items\": { \"$ref\": \"#/$defs/GraphEdge\" }, \"title\": \"Edges\", \"type\": \"array\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"name\", \"vertices\", \"edges\", \"params\" ], \"title\": \"Graph\", \"type\": \"object\" }, \"GraphEdge\": { \"properties\": { \"v1_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V1 Idx\", \"type\": \"integer\" }, \"v2_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V2 Idx\", \"type\": \"integer\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" }, \"edge_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Edge Type\", \"type\": \"integer\" } }, \"required\": [ \"v1_idx\", \"v2_idx\", \"params\", \"edge_type\" ], \"title\": \"GraphEdge\", \"type\": \"object\" }, \"GraphNode\": { \"properties\": { \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"x\", \"y\", \"name\", \"params\" ], \"title\": \"GraphNode\", \"type\": \"object\" }, \"Level\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"elevation\": { \"title\": \"Elevation\", \"type\": \"number\" }, \"images\": { \"items\": { \"$ref\": \"#/$defs/AffineImage\" }, \"title\": \"Images\", \"type\": \"array\" }, \"places\": { \"items\": { \"$ref\": \"#/$defs/Place\" }, \"title\": \"Places\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"nav_graphs\": { \"items\": { \"$ref\": \"#/$defs/Graph\" }, \"title\": \"Nav Graphs\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" } }, \"required\": [ \"name\", \"elevation\", \"images\", \"places\", \"doors\", \"nav_graphs\", \"wall_graph\" ], \"title\": \"Level\", \"type\": \"object\" }, \"Lift\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"type\": \"string\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" }, \"ref_x\": { \"title\": \"Ref X\", \"type\": \"number\" }, \"ref_y\": { \"title\": \"Ref Y\", \"type\": \"number\" }, \"ref_yaw\": { \"title\": \"Ref Yaw\", \"type\": \"number\" }, \"width\": { \"title\": \"Width\", \"type\": \"number\" }, \"depth\": { \"title\": \"Depth\", \"type\": \"number\" } }, \"required\": [ \"name\", \"levels\", \"doors\", \"wall_graph\", \"ref_x\", \"ref_y\", \"ref_yaw\", \"width\", \"depth\" ], \"title\": \"Lift\", \"type\": \"object\" }, \"Param\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"type\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Type\", \"type\": \"integer\" }, \"value_int\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Value Int\", \"type\": \"integer\" }, \"value_float\": { \"title\": \"Value Float\", \"type\": \"number\" }, \"value_string\": { \"title\": \"Value String\", \"type\": \"string\" }, \"value_bool\": { \"title\": \"Value Bool\", \"type\": \"boolean\" } }, \"required\": [ \"name\", \"type\", \"value_int\", \"value_float\", \"value_string\", \"value_bool\" ], \"title\": \"Param\", \"type\": \"object\" }, \"Place\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"position_tolerance\": { \"title\": \"Position Tolerance\", \"type\": \"number\" }, \"yaw_tolerance\": { \"title\": \"Yaw Tolerance\", \"type\": \"number\" } }, \"required\": [ \"name\", \"x\", \"y\", \"yaw\", \"position_tolerance\", \"yaw_tolerance\" ], \"title\": \"Place\", \"type\": \"object\" } }, \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"$ref\": \"#/$defs/Level\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"lifts\": { \"items\": { \"$ref\": \"#/$defs/Lift\" }, \"title\": \"Lifts\", \"type\": \"array\" } }, \"required\": [ \"name\", \"levels\", \"lifts\" ], \"title\": \"BuildingMap\", \"type\": \"object\" } ``` ### /building_map/fire_alarm_trigger ``` { \"properties\": { \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"trigger\": { \"title\": \"Trigger\", \"type\": \"boolean\" } }, \"required\": [ \"unix_millis_time\", \"trigger\" ], \"title\": \"FireAlarmTriggerState\", \"type\": \"object\" } ``` ### /delivery_alerts ``` { \"$defs\": { \"Action\": { \"enum\": [ \"waiting\", \"cancel\", \"override\", \"resume\" ], \"title\": \"Action\", \"type\": \"string\" }, \"Category\": { \"enum\": [ \"missing\", \"wrong\", \"obstructed\", \"cancelled\" ], \"title\": \"Category\", \"type\": \"string\" }, \"Tier\": { \"enum\": [ \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"category\": { \"$ref\": \"#/$defs/Category\" }, \"tier\": { \"$ref\": \"#/$defs/Tier\" }, \"action\": { \"$ref\": \"#/$defs/Action\" }, \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"message\": { \"title\": \"Message\", \"type\": \"string\" } }, \"required\": [ \"id\", \"category\", \"tier\", \"action\", \"task_id\", \"message\" ], \"title\": \"DeliveryAlert\", \"type\": \"object\" } ``` ### /doors/{door_name}/state ``` { \"$defs\": { \"DoorMode\": { \"properties\": { \"value\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Value\", \"type\": \"integer\" } }, \"required\": [ \"value\" ], \"title\": \"DoorMode\", \"type\": \"object\" }, \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"door_time\": { \"$ref\": \"#/$defs/Time\" }, \"door_name\": { \"title\": \"Door Name\", \"type\": \"string\" }, \"current_mode\": { \"$ref\": \"#/$defs/DoorMode\" } }, \"required\": [ \"door_time\", \"door_name\", \"current_mode\" ], \"title\": \"DoorState\", \"type\": \"object\" } ``` ### /lifts/{lift_name}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"lift_time\": { \"$ref\": \"#/$defs/Time\" }, \"lift_name\": { \"title\": \"Lift Name\", \"type\": \"string\" }, \"available_floors\": { \"items\": { \"type\": \"string\" }, \"title\": \"Available Floors\", \"type\": \"array\" }, \"current_floor\": { \"title\": \"Current Floor\", \"type\": \"string\" }, \"destination_floor\": { \"title\": \"Destination Floor\", \"type\": \"string\" }, \"door_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door State\", \"type\": \"integer\" }, \"motion_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Motion State\", \"type\": \"integer\" }, \"available_modes\": { \"items\": { \"type\": \"integer\" }, \"title\": \"Available Modes\", \"type\": \"array\" }, \"current_mode\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Current Mode\", \"type\": \"integer\" }, \"session_id\": { \"title\": \"Session Id\", \"type\": \"string\" } }, \"required\": [ \"lift_time\", \"lift_name\", \"available_floors\", \"current_floor\", \"destination_floor\", \"door_state\", \"motion_state\", \"available_modes\", \"current_mode\", \"session_id\" ], \"title\": \"LiftState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/state ``` { \"$defs\": { \"AssignedTo\": { \"properties\": { \"group\": { \"title\": \"Group\", \"type\": \"string\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" } }, \"required\": [ \"group\", \"name\" ], \"title\": \"AssignedTo\", \"type\": \"object\" }, \"Assignment\": { \"properties\": { \"fleet_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Fleet Name\" }, \"expected_robot_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Expected Robot Name\" } }, \"title\": \"Assignment\", \"type\": \"object\" }, \"Booking\": { \"properties\": { \"id\": { \"description\": \"The unique identifier for this task\", \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_earliest_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Earliest Start Time\" }, \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Request Time\" }, \"priority\": { \"anyOf\": [ { \"type\": \"object\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Priority information about this task\", \"title\": \"Priority\" }, \"labels\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about how and why this task was booked, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"title\": \"Labels\" }, \"requester\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"(Optional) An identifier for the entity that requested this task\", \"title\": \"Requester\" } }, \"required\": [ \"id\" ], \"title\": \"Booking\", \"type\": \"object\" }, \"Cancellation\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the cancel request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Cancellation\", \"type\": \"object\" }, \"Category\": { \"description\": \"The category of this task or phase\", \"title\": \"Category\", \"type\": \"string\" }, \"Detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" } ], \"description\": \"Detailed information about a task, phase, or event\", \"title\": \"Detail\" }, \"Dispatch\": { \"properties\": { \"status\": { \"$ref\": \"#/$defs/Status2\" }, \"assignment\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Assignment\" }, { \"type\": \"null\" } ], \"default\": null }, \"errors\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Error\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Errors\" } }, \"required\": [ \"status\" ], \"title\": \"Dispatch\", \"type\": \"object\" }, \"Error\": { \"properties\": { \"code\": { \"anyOf\": [ { \"minimum\": 0, \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A standard code for the kind of error that has occurred\", \"title\": \"Code\" }, \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The category of the error\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Details about the error\", \"title\": \"Detail\" } }, \"title\": \"Error\", \"type\": \"object\" }, \"EstimateMillis\": { \"description\": \"An estimate, in milliseconds, of how long the subject will take to complete\", \"minimum\": 0, \"title\": \"EstimateMillis\", \"type\": \"integer\" }, \"EventState\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The brief name of the event\", \"title\": \"Name\" }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the event\" }, \"deps\": { \"anyOf\": [ { \"items\": { \"minimum\": 0, \"type\": \"integer\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"This event may depend on other events. This array contains the IDs of those other event dependencies.\", \"title\": \"Deps\" } }, \"required\": [ \"id\" ], \"title\": \"EventState\", \"type\": \"object\" }, \"Id\": { \"minimum\": 0, \"title\": \"Id\", \"type\": \"integer\" }, \"Interruption\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the interruption request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the interruption, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"resumed_by\": { \"anyOf\": [ { \"$ref\": \"#/$defs/ResumedBy\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the resume request that ended this interruption. This field will be missing if the interruption is still active.\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Interruption\", \"type\": \"object\" }, \"Killed\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the kill request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Killed\", \"type\": \"object\" }, \"Phase\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"final_event_id\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/EventState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of events for this phase. The keys (property names) are the event IDs, which are integers.\", \"title\": \"Events\" }, \"skip_requests\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/SkipPhaseRequest\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about any skip requests that have been received\", \"title\": \"Skip Requests\" } }, \"required\": [ \"id\" ], \"title\": \"Phase\", \"type\": \"object\" }, \"ResumedBy\": { \"properties\": { \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The time that the resume request arrived\", \"title\": \"Unix Millis Request Time\" }, \"labels\": { \"description\": \"Labels to describe the resume request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"labels\" ], \"title\": \"ResumedBy\", \"type\": \"object\" }, \"SkipPhaseRequest\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"undo\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Undo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about an undo skip request that applied to this request\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"SkipPhaseRequest\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"blocked\", \"error\", \"failed\", \"queued\", \"standby\", \"underway\", \"delayed\", \"skipped\", \"canceled\", \"killed\", \"completed\" ], \"title\": \"Status\", \"type\": \"string\" }, \"Status2\": { \"enum\": [ \"queued\", \"selected\", \"dispatched\", \"failed_to_assign\", \"canceled_in_flight\" ], \"title\": \"Status2\", \"type\": \"string\" }, \"Undo\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the undo skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the undo skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Undo\", \"type\": \"object\" } }, \"properties\": { \"booking\": { \"$ref\": \"#/$defs/Booking\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"assigned_to\": { \"anyOf\": [ { \"$ref\": \"#/$defs/AssignedTo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Which agent (robot) is the task assigned to\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"dispatch\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Dispatch\" }, { \"type\": \"null\" } ], \"default\": null }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phase\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the phases of the task. The keys (property names) are phase IDs, which are integers.\", \"title\": \"Phases\" }, \"completed\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the IDs of completed phases of this task\", \"title\": \"Completed\" }, \"active\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the active phase for this task\" }, \"pending\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the pending phases of this task\", \"title\": \"Pending\" }, \"interruptions\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Interruption\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of interruptions that have been applied to this task. The keys (property names) are the unique token of the interruption request.\", \"title\": \"Interruptions\" }, \"cancellation\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Cancellation\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was cancelled, this will describe information about the request.\" }, \"killed\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Killed\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was killed, this will describe information about the request.\" } }, \"required\": [ \"booking\" ], \"title\": \"TaskState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Phases\": { \"additionalProperties\": false, \"properties\": { \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall phase\", \"title\": \"Log\" }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of an event in the phase\", \"title\": \"Events\" } }, \"title\": \"Phases\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"additionalProperties\": false, \"properties\": { \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall task\", \"title\": \"Log\" }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phases\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of a phase\", \"title\": \"Phases\" } }, \"required\": [ \"task_id\" ], \"title\": \"TaskEventLog\", \"type\": \"object\" } ``` ### /dispensers/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"DispenserState\", \"type\": \"object\" } ``` ### /ingestors/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"IngestorState\", \"type\": \"object\" } ``` ### /fleets/{name}/state ``` { \"$defs\": { \"Commission\": { \"properties\": { \"dispatch_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept dispatched tasks, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Dispatch Tasks\" }, \"direct_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept direct task requests, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Direct Tasks\" }, \"idle_behavior\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot perform its idle behavior, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Idle Behavior\" } }, \"title\": \"Commission\", \"type\": \"object\" }, \"Issue\": { \"properties\": { \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Category of the robot\'s issue\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the issue\", \"title\": \"Detail\" } }, \"title\": \"Issue\", \"type\": \"object\" }, \"Location2D\": { \"properties\": { \"map\": { \"title\": \"Map\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" } }, \"required\": [ \"map\", \"x\", \"y\", \"yaw\" ], \"title\": \"Location2D\", \"type\": \"object\" }, \"MutexGroups\": { \"properties\": { \"locked\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of mutex groups that this robot has currently locked\", \"title\": \"Locked\" }, \"requesting\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of the mutex groups that this robot is currently requesting but has not lockd yet\", \"title\": \"Requesting\" } }, \"title\": \"MutexGroups\", \"type\": \"object\" }, \"RobotState\": { \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A simple token representing the status of the robot\" }, \"task_id\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the task this robot is currently working on. Empty string if the robot is not working on a task.\", \"title\": \"Task Id\" }, \"unix_millis_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Time\" }, \"location\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Location2D\" }, { \"type\": \"null\" } ], \"default\": null }, \"battery\": { \"anyOf\": [ { \"maximum\": 1.0, \"minimum\": 0.0, \"type\": \"number\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"State of charge of the battery. Values range from 0.0 (depleted) to 1.0 (fully charged)\", \"title\": \"Battery\" }, \"issues\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Issue\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of issues with the robot that operators need to address\", \"title\": \"Issues\" }, \"commission\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Commission\" }, { \"type\": \"null\" } ], \"default\": null }, \"mutex_groups\": { \"anyOf\": [ { \"$ref\": \"#/$defs/MutexGroups\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the mutex groups that this robot is interacting with\" } }, \"title\": \"RobotState\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"offline\", \"shutdown\", \"idle\", \"charging\", \"working\", \"error\" ], \"title\": \"Status\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/RobotState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the robots that belong to this fleet\", \"title\": \"Robots\" } }, \"title\": \"FleetState\", \"type\": \"object\" } ``` ### /fleets/{name}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log for the overall fleet\", \"title\": \"Log\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Dictionary of logs for the individual robots. The keys (property names) are the robot names.\", \"title\": \"Robots\" } }, \"title\": \"FleetLog\", \"type\": \"object\" } ``` ### /rios ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"type\": { \"title\": \"Type\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"object\" } }, \"required\": [ \"id\", \"type\", \"data\" ], \"title\": \"Rio\", \"type\": \"object\" } ``` * @summary Socket.io endpoint * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -6733,7 +7087,7 @@ export const DefaultApiFp = function (configuration?: Configuration) { )(axios, localVarOperationServerBasePath || basePath); }, /** - * # NOTE: This endpoint is here for documentation purposes only, this is _not_ a REST endpoint. ## About This exposes a minimal pubsub system built on top of socket.io. It works similar to a normal socket.io endpoint, except that are 2 special rooms which control subscriptions. ## Rooms ### subscribe Clients must send a message to this room to start receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### unsubscribe Clients can send a message to this room to stop receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### /alerts ``` { \"$defs\": { \"Category\": { \"enum\": [ \"default\", \"task\", \"fleet\", \"robot\" ], \"title\": \"Category\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"original_id\": { \"title\": \"Original Id\", \"type\": \"string\" }, \"category\": { \"$ref\": \"#/$defs/Category\" }, \"unix_millis_created_time\": { \"title\": \"Unix Millis Created Time\", \"type\": \"integer\" }, \"acknowledged_by\": { \"title\": \"Acknowledged By\", \"type\": \"string\" }, \"unix_millis_acknowledged_time\": { \"title\": \"Unix Millis Acknowledged Time\", \"type\": \"integer\" } }, \"required\": [ \"id\", \"original_id\", \"category\", \"unix_millis_created_time\", \"acknowledged_by\", \"unix_millis_acknowledged_time\" ], \"title\": \"Alert\", \"type\": \"object\" } ``` ### /beacons ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"online\": { \"title\": \"Online\", \"type\": \"boolean\" }, \"category\": { \"title\": \"Category\", \"type\": \"string\" }, \"activated\": { \"title\": \"Activated\", \"type\": \"boolean\" }, \"level\": { \"title\": \"Level\", \"type\": \"string\" } }, \"required\": [ \"id\", \"online\", \"category\", \"activated\", \"level\" ], \"title\": \"BeaconState\", \"type\": \"object\" } ``` ### /building_map ``` { \"$defs\": { \"AffineImage\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x_offset\": { \"title\": \"X Offset\", \"type\": \"number\" }, \"y_offset\": { \"title\": \"Y Offset\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"scale\": { \"title\": \"Scale\", \"type\": \"number\" }, \"encoding\": { \"title\": \"Encoding\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"string\" } }, \"required\": [ \"name\", \"x_offset\", \"y_offset\", \"yaw\", \"scale\", \"encoding\", \"data\" ], \"title\": \"AffineImage\", \"type\": \"object\" }, \"Door\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"v1_x\": { \"title\": \"V1 X\", \"type\": \"number\" }, \"v1_y\": { \"title\": \"V1 Y\", \"type\": \"number\" }, \"v2_x\": { \"title\": \"V2 X\", \"type\": \"number\" }, \"v2_y\": { \"title\": \"V2 Y\", \"type\": \"number\" }, \"door_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door Type\", \"type\": \"integer\" }, \"motion_range\": { \"title\": \"Motion Range\", \"type\": \"number\" }, \"motion_direction\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Motion Direction\", \"type\": \"integer\" } }, \"required\": [ \"name\", \"v1_x\", \"v1_y\", \"v2_x\", \"v2_y\", \"door_type\", \"motion_range\", \"motion_direction\" ], \"title\": \"Door\", \"type\": \"object\" }, \"Graph\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"vertices\": { \"items\": { \"$ref\": \"#/$defs/GraphNode\" }, \"title\": \"Vertices\", \"type\": \"array\" }, \"edges\": { \"items\": { \"$ref\": \"#/$defs/GraphEdge\" }, \"title\": \"Edges\", \"type\": \"array\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"name\", \"vertices\", \"edges\", \"params\" ], \"title\": \"Graph\", \"type\": \"object\" }, \"GraphEdge\": { \"properties\": { \"v1_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V1 Idx\", \"type\": \"integer\" }, \"v2_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V2 Idx\", \"type\": \"integer\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" }, \"edge_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Edge Type\", \"type\": \"integer\" } }, \"required\": [ \"v1_idx\", \"v2_idx\", \"params\", \"edge_type\" ], \"title\": \"GraphEdge\", \"type\": \"object\" }, \"GraphNode\": { \"properties\": { \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"x\", \"y\", \"name\", \"params\" ], \"title\": \"GraphNode\", \"type\": \"object\" }, \"Level\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"elevation\": { \"title\": \"Elevation\", \"type\": \"number\" }, \"images\": { \"items\": { \"$ref\": \"#/$defs/AffineImage\" }, \"title\": \"Images\", \"type\": \"array\" }, \"places\": { \"items\": { \"$ref\": \"#/$defs/Place\" }, \"title\": \"Places\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"nav_graphs\": { \"items\": { \"$ref\": \"#/$defs/Graph\" }, \"title\": \"Nav Graphs\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" } }, \"required\": [ \"name\", \"elevation\", \"images\", \"places\", \"doors\", \"nav_graphs\", \"wall_graph\" ], \"title\": \"Level\", \"type\": \"object\" }, \"Lift\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"type\": \"string\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" }, \"ref_x\": { \"title\": \"Ref X\", \"type\": \"number\" }, \"ref_y\": { \"title\": \"Ref Y\", \"type\": \"number\" }, \"ref_yaw\": { \"title\": \"Ref Yaw\", \"type\": \"number\" }, \"width\": { \"title\": \"Width\", \"type\": \"number\" }, \"depth\": { \"title\": \"Depth\", \"type\": \"number\" } }, \"required\": [ \"name\", \"levels\", \"doors\", \"wall_graph\", \"ref_x\", \"ref_y\", \"ref_yaw\", \"width\", \"depth\" ], \"title\": \"Lift\", \"type\": \"object\" }, \"Param\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"type\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Type\", \"type\": \"integer\" }, \"value_int\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Value Int\", \"type\": \"integer\" }, \"value_float\": { \"title\": \"Value Float\", \"type\": \"number\" }, \"value_string\": { \"title\": \"Value String\", \"type\": \"string\" }, \"value_bool\": { \"title\": \"Value Bool\", \"type\": \"boolean\" } }, \"required\": [ \"name\", \"type\", \"value_int\", \"value_float\", \"value_string\", \"value_bool\" ], \"title\": \"Param\", \"type\": \"object\" }, \"Place\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"position_tolerance\": { \"title\": \"Position Tolerance\", \"type\": \"number\" }, \"yaw_tolerance\": { \"title\": \"Yaw Tolerance\", \"type\": \"number\" } }, \"required\": [ \"name\", \"x\", \"y\", \"yaw\", \"position_tolerance\", \"yaw_tolerance\" ], \"title\": \"Place\", \"type\": \"object\" } }, \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"$ref\": \"#/$defs/Level\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"lifts\": { \"items\": { \"$ref\": \"#/$defs/Lift\" }, \"title\": \"Lifts\", \"type\": \"array\" } }, \"required\": [ \"name\", \"levels\", \"lifts\" ], \"title\": \"BuildingMap\", \"type\": \"object\" } ``` ### /building_map/fire_alarm_trigger ``` { \"properties\": { \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"trigger\": { \"title\": \"Trigger\", \"type\": \"boolean\" } }, \"required\": [ \"unix_millis_time\", \"trigger\" ], \"title\": \"FireAlarmTriggerState\", \"type\": \"object\" } ``` ### /delivery_alerts ``` { \"$defs\": { \"Action\": { \"enum\": [ \"waiting\", \"cancel\", \"override\", \"resume\" ], \"title\": \"Action\", \"type\": \"string\" }, \"Category\": { \"enum\": [ \"missing\", \"wrong\", \"obstructed\", \"cancelled\" ], \"title\": \"Category\", \"type\": \"string\" }, \"Tier\": { \"enum\": [ \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"category\": { \"$ref\": \"#/$defs/Category\" }, \"tier\": { \"$ref\": \"#/$defs/Tier\" }, \"action\": { \"$ref\": \"#/$defs/Action\" }, \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"message\": { \"title\": \"Message\", \"type\": \"string\" } }, \"required\": [ \"id\", \"category\", \"tier\", \"action\", \"task_id\", \"message\" ], \"title\": \"DeliveryAlert\", \"type\": \"object\" } ``` ### /doors/{door_name}/state ``` { \"$defs\": { \"DoorMode\": { \"properties\": { \"value\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Value\", \"type\": \"integer\" } }, \"required\": [ \"value\" ], \"title\": \"DoorMode\", \"type\": \"object\" }, \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"door_time\": { \"$ref\": \"#/$defs/Time\" }, \"door_name\": { \"title\": \"Door Name\", \"type\": \"string\" }, \"current_mode\": { \"$ref\": \"#/$defs/DoorMode\" } }, \"required\": [ \"door_time\", \"door_name\", \"current_mode\" ], \"title\": \"DoorState\", \"type\": \"object\" } ``` ### /lifts/{lift_name}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"lift_time\": { \"$ref\": \"#/$defs/Time\" }, \"lift_name\": { \"title\": \"Lift Name\", \"type\": \"string\" }, \"available_floors\": { \"items\": { \"type\": \"string\" }, \"title\": \"Available Floors\", \"type\": \"array\" }, \"current_floor\": { \"title\": \"Current Floor\", \"type\": \"string\" }, \"destination_floor\": { \"title\": \"Destination Floor\", \"type\": \"string\" }, \"door_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door State\", \"type\": \"integer\" }, \"motion_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Motion State\", \"type\": \"integer\" }, \"available_modes\": { \"items\": { \"type\": \"integer\" }, \"title\": \"Available Modes\", \"type\": \"array\" }, \"current_mode\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Current Mode\", \"type\": \"integer\" }, \"session_id\": { \"title\": \"Session Id\", \"type\": \"string\" } }, \"required\": [ \"lift_time\", \"lift_name\", \"available_floors\", \"current_floor\", \"destination_floor\", \"door_state\", \"motion_state\", \"available_modes\", \"current_mode\", \"session_id\" ], \"title\": \"LiftState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/state ``` { \"$defs\": { \"AssignedTo\": { \"properties\": { \"group\": { \"title\": \"Group\", \"type\": \"string\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" } }, \"required\": [ \"group\", \"name\" ], \"title\": \"AssignedTo\", \"type\": \"object\" }, \"Assignment\": { \"properties\": { \"fleet_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Fleet Name\" }, \"expected_robot_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Expected Robot Name\" } }, \"title\": \"Assignment\", \"type\": \"object\" }, \"Booking\": { \"properties\": { \"id\": { \"description\": \"The unique identifier for this task\", \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_earliest_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Earliest Start Time\" }, \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Request Time\" }, \"priority\": { \"anyOf\": [ { \"type\": \"object\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Priority information about this task\", \"title\": \"Priority\" }, \"labels\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about how and why this task was booked, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"title\": \"Labels\" }, \"requester\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"(Optional) An identifier for the entity that requested this task\", \"title\": \"Requester\" } }, \"required\": [ \"id\" ], \"title\": \"Booking\", \"type\": \"object\" }, \"Cancellation\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the cancel request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Cancellation\", \"type\": \"object\" }, \"Category\": { \"description\": \"The category of this task or phase\", \"title\": \"Category\", \"type\": \"string\" }, \"Detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" } ], \"description\": \"Detailed information about a task, phase, or event\", \"title\": \"Detail\" }, \"Dispatch\": { \"properties\": { \"status\": { \"$ref\": \"#/$defs/Status2\" }, \"assignment\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Assignment\" }, { \"type\": \"null\" } ], \"default\": null }, \"errors\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Error\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Errors\" } }, \"required\": [ \"status\" ], \"title\": \"Dispatch\", \"type\": \"object\" }, \"Error\": { \"properties\": { \"code\": { \"anyOf\": [ { \"minimum\": 0, \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A standard code for the kind of error that has occurred\", \"title\": \"Code\" }, \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The category of the error\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Details about the error\", \"title\": \"Detail\" } }, \"title\": \"Error\", \"type\": \"object\" }, \"EstimateMillis\": { \"description\": \"An estimate, in milliseconds, of how long the subject will take to complete\", \"minimum\": 0, \"title\": \"EstimateMillis\", \"type\": \"integer\" }, \"EventState\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The brief name of the event\", \"title\": \"Name\" }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the event\" }, \"deps\": { \"anyOf\": [ { \"items\": { \"minimum\": 0, \"type\": \"integer\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"This event may depend on other events. This array contains the IDs of those other event dependencies.\", \"title\": \"Deps\" } }, \"required\": [ \"id\" ], \"title\": \"EventState\", \"type\": \"object\" }, \"Id\": { \"minimum\": 0, \"title\": \"Id\", \"type\": \"integer\" }, \"Interruption\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the interruption request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the interruption, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"resumed_by\": { \"anyOf\": [ { \"$ref\": \"#/$defs/ResumedBy\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the resume request that ended this interruption. This field will be missing if the interruption is still active.\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Interruption\", \"type\": \"object\" }, \"Killed\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the kill request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Killed\", \"type\": \"object\" }, \"Phase\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"final_event_id\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/EventState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of events for this phase. The keys (property names) are the event IDs, which are integers.\", \"title\": \"Events\" }, \"skip_requests\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/SkipPhaseRequest\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about any skip requests that have been received\", \"title\": \"Skip Requests\" } }, \"required\": [ \"id\" ], \"title\": \"Phase\", \"type\": \"object\" }, \"ResumedBy\": { \"properties\": { \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The time that the resume request arrived\", \"title\": \"Unix Millis Request Time\" }, \"labels\": { \"description\": \"Labels to describe the resume request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"labels\" ], \"title\": \"ResumedBy\", \"type\": \"object\" }, \"SkipPhaseRequest\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"undo\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Undo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about an undo skip request that applied to this request\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"SkipPhaseRequest\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"blocked\", \"error\", \"failed\", \"queued\", \"standby\", \"underway\", \"delayed\", \"skipped\", \"canceled\", \"killed\", \"completed\" ], \"title\": \"Status\", \"type\": \"string\" }, \"Status2\": { \"enum\": [ \"queued\", \"selected\", \"dispatched\", \"failed_to_assign\", \"canceled_in_flight\" ], \"title\": \"Status2\", \"type\": \"string\" }, \"Undo\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the undo skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the undo skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Undo\", \"type\": \"object\" } }, \"properties\": { \"booking\": { \"$ref\": \"#/$defs/Booking\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"assigned_to\": { \"anyOf\": [ { \"$ref\": \"#/$defs/AssignedTo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Which agent (robot) is the task assigned to\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"dispatch\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Dispatch\" }, { \"type\": \"null\" } ], \"default\": null }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phase\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the phases of the task. The keys (property names) are phase IDs, which are integers.\", \"title\": \"Phases\" }, \"completed\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the IDs of completed phases of this task\", \"title\": \"Completed\" }, \"active\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the active phase for this task\" }, \"pending\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the pending phases of this task\", \"title\": \"Pending\" }, \"interruptions\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Interruption\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of interruptions that have been applied to this task. The keys (property names) are the unique token of the interruption request.\", \"title\": \"Interruptions\" }, \"cancellation\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Cancellation\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was cancelled, this will describe information about the request.\" }, \"killed\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Killed\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was killed, this will describe information about the request.\" } }, \"required\": [ \"booking\" ], \"title\": \"TaskState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Phases\": { \"additionalProperties\": false, \"properties\": { \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall phase\", \"title\": \"Log\" }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of an event in the phase\", \"title\": \"Events\" } }, \"title\": \"Phases\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"additionalProperties\": false, \"properties\": { \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall task\", \"title\": \"Log\" }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phases\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of a phase\", \"title\": \"Phases\" } }, \"required\": [ \"task_id\" ], \"title\": \"TaskEventLog\", \"type\": \"object\" } ``` ### /dispensers/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"DispenserState\", \"type\": \"object\" } ``` ### /ingestors/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"IngestorState\", \"type\": \"object\" } ``` ### /fleets/{name}/state ``` { \"$defs\": { \"Commission\": { \"properties\": { \"dispatch_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept dispatched tasks, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Dispatch Tasks\" }, \"direct_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept direct task requests, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Direct Tasks\" }, \"idle_behavior\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot perform its idle behavior, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Idle Behavior\" } }, \"title\": \"Commission\", \"type\": \"object\" }, \"Issue\": { \"properties\": { \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Category of the robot\'s issue\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the issue\", \"title\": \"Detail\" } }, \"title\": \"Issue\", \"type\": \"object\" }, \"Location2D\": { \"properties\": { \"map\": { \"title\": \"Map\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" } }, \"required\": [ \"map\", \"x\", \"y\", \"yaw\" ], \"title\": \"Location2D\", \"type\": \"object\" }, \"MutexGroups\": { \"properties\": { \"locked\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of mutex groups that this robot has currently locked\", \"title\": \"Locked\" }, \"requesting\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of the mutex groups that this robot is currently requesting but has not lockd yet\", \"title\": \"Requesting\" } }, \"title\": \"MutexGroups\", \"type\": \"object\" }, \"RobotState\": { \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A simple token representing the status of the robot\" }, \"task_id\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the task this robot is currently working on. Empty string if the robot is not working on a task.\", \"title\": \"Task Id\" }, \"unix_millis_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Time\" }, \"location\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Location2D\" }, { \"type\": \"null\" } ], \"default\": null }, \"battery\": { \"anyOf\": [ { \"maximum\": 1.0, \"minimum\": 0.0, \"type\": \"number\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"State of charge of the battery. Values range from 0.0 (depleted) to 1.0 (fully charged)\", \"title\": \"Battery\" }, \"issues\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Issue\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of issues with the robot that operators need to address\", \"title\": \"Issues\" }, \"commission\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Commission\" }, { \"type\": \"null\" } ], \"default\": null }, \"mutex_groups\": { \"anyOf\": [ { \"$ref\": \"#/$defs/MutexGroups\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the mutex groups that this robot is interacting with\" } }, \"title\": \"RobotState\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"offline\", \"shutdown\", \"idle\", \"charging\", \"working\", \"error\" ], \"title\": \"Status\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/RobotState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the robots that belong to this fleet\", \"title\": \"Robots\" } }, \"title\": \"FleetState\", \"type\": \"object\" } ``` ### /fleets/{name}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log for the overall fleet\", \"title\": \"Log\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Dictionary of logs for the individual robots. The keys (property names) are the robot names.\", \"title\": \"Robots\" } }, \"title\": \"FleetLog\", \"type\": \"object\" } ``` ### /rios ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"type\": { \"title\": \"Type\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"object\" } }, \"required\": [ \"id\", \"type\", \"data\" ], \"title\": \"Rio\", \"type\": \"object\" } ``` + * # NOTE: This endpoint is here for documentation purposes only, this is _not_ a REST endpoint. ## About This exposes a minimal pubsub system built on top of socket.io. It works similar to a normal socket.io endpoint, except that are 2 special rooms which control subscriptions. ## Rooms ### subscribe Clients must send a message to this room to start receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### unsubscribe Clients can send a message to this room to stop receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### /alerts/requests ``` { \"$defs\": { \"AlertParameter\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"value\": { \"title\": \"Value\", \"type\": \"string\" } }, \"required\": [ \"name\", \"value\" ], \"title\": \"AlertParameter\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_alert_time\": { \"title\": \"Unix Millis Alert Time\", \"type\": \"integer\" }, \"title\": { \"title\": \"Title\", \"type\": \"string\" }, \"subtitle\": { \"title\": \"Subtitle\", \"type\": \"string\" }, \"message\": { \"title\": \"Message\", \"type\": \"string\" }, \"display\": { \"title\": \"Display\", \"type\": \"boolean\" }, \"tier\": { \"$ref\": \"#/$defs/Tier\" }, \"responses_available\": { \"items\": { \"type\": \"string\" }, \"title\": \"Responses Available\", \"type\": \"array\" }, \"alert_parameters\": { \"items\": { \"$ref\": \"#/$defs/AlertParameter\" }, \"title\": \"Alert Parameters\", \"type\": \"array\" }, \"task_id\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"title\": \"Task Id\" } }, \"required\": [ \"id\", \"unix_millis_alert_time\", \"title\", \"subtitle\", \"message\", \"display\", \"tier\", \"responses_available\", \"alert_parameters\", \"task_id\" ], \"title\": \"AlertRequest\", \"type\": \"object\" } ``` ### /alerts/responses ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_response_time\": { \"title\": \"Unix Millis Response Time\", \"type\": \"integer\" }, \"response\": { \"title\": \"Response\", \"type\": \"string\" } }, \"required\": [ \"id\", \"unix_millis_response_time\", \"response\" ], \"title\": \"AlertResponse\", \"type\": \"object\" } ``` ### /beacons ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"online\": { \"title\": \"Online\", \"type\": \"boolean\" }, \"category\": { \"title\": \"Category\", \"type\": \"string\" }, \"activated\": { \"title\": \"Activated\", \"type\": \"boolean\" }, \"level\": { \"title\": \"Level\", \"type\": \"string\" } }, \"required\": [ \"id\", \"online\", \"category\", \"activated\", \"level\" ], \"title\": \"BeaconState\", \"type\": \"object\" } ``` ### /building_map ``` { \"$defs\": { \"AffineImage\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x_offset\": { \"title\": \"X Offset\", \"type\": \"number\" }, \"y_offset\": { \"title\": \"Y Offset\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"scale\": { \"title\": \"Scale\", \"type\": \"number\" }, \"encoding\": { \"title\": \"Encoding\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"string\" } }, \"required\": [ \"name\", \"x_offset\", \"y_offset\", \"yaw\", \"scale\", \"encoding\", \"data\" ], \"title\": \"AffineImage\", \"type\": \"object\" }, \"Door\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"v1_x\": { \"title\": \"V1 X\", \"type\": \"number\" }, \"v1_y\": { \"title\": \"V1 Y\", \"type\": \"number\" }, \"v2_x\": { \"title\": \"V2 X\", \"type\": \"number\" }, \"v2_y\": { \"title\": \"V2 Y\", \"type\": \"number\" }, \"door_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door Type\", \"type\": \"integer\" }, \"motion_range\": { \"title\": \"Motion Range\", \"type\": \"number\" }, \"motion_direction\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Motion Direction\", \"type\": \"integer\" } }, \"required\": [ \"name\", \"v1_x\", \"v1_y\", \"v2_x\", \"v2_y\", \"door_type\", \"motion_range\", \"motion_direction\" ], \"title\": \"Door\", \"type\": \"object\" }, \"Graph\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"vertices\": { \"items\": { \"$ref\": \"#/$defs/GraphNode\" }, \"title\": \"Vertices\", \"type\": \"array\" }, \"edges\": { \"items\": { \"$ref\": \"#/$defs/GraphEdge\" }, \"title\": \"Edges\", \"type\": \"array\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"name\", \"vertices\", \"edges\", \"params\" ], \"title\": \"Graph\", \"type\": \"object\" }, \"GraphEdge\": { \"properties\": { \"v1_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V1 Idx\", \"type\": \"integer\" }, \"v2_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V2 Idx\", \"type\": \"integer\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" }, \"edge_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Edge Type\", \"type\": \"integer\" } }, \"required\": [ \"v1_idx\", \"v2_idx\", \"params\", \"edge_type\" ], \"title\": \"GraphEdge\", \"type\": \"object\" }, \"GraphNode\": { \"properties\": { \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"x\", \"y\", \"name\", \"params\" ], \"title\": \"GraphNode\", \"type\": \"object\" }, \"Level\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"elevation\": { \"title\": \"Elevation\", \"type\": \"number\" }, \"images\": { \"items\": { \"$ref\": \"#/$defs/AffineImage\" }, \"title\": \"Images\", \"type\": \"array\" }, \"places\": { \"items\": { \"$ref\": \"#/$defs/Place\" }, \"title\": \"Places\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"nav_graphs\": { \"items\": { \"$ref\": \"#/$defs/Graph\" }, \"title\": \"Nav Graphs\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" } }, \"required\": [ \"name\", \"elevation\", \"images\", \"places\", \"doors\", \"nav_graphs\", \"wall_graph\" ], \"title\": \"Level\", \"type\": \"object\" }, \"Lift\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"type\": \"string\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" }, \"ref_x\": { \"title\": \"Ref X\", \"type\": \"number\" }, \"ref_y\": { \"title\": \"Ref Y\", \"type\": \"number\" }, \"ref_yaw\": { \"title\": \"Ref Yaw\", \"type\": \"number\" }, \"width\": { \"title\": \"Width\", \"type\": \"number\" }, \"depth\": { \"title\": \"Depth\", \"type\": \"number\" } }, \"required\": [ \"name\", \"levels\", \"doors\", \"wall_graph\", \"ref_x\", \"ref_y\", \"ref_yaw\", \"width\", \"depth\" ], \"title\": \"Lift\", \"type\": \"object\" }, \"Param\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"type\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Type\", \"type\": \"integer\" }, \"value_int\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Value Int\", \"type\": \"integer\" }, \"value_float\": { \"title\": \"Value Float\", \"type\": \"number\" }, \"value_string\": { \"title\": \"Value String\", \"type\": \"string\" }, \"value_bool\": { \"title\": \"Value Bool\", \"type\": \"boolean\" } }, \"required\": [ \"name\", \"type\", \"value_int\", \"value_float\", \"value_string\", \"value_bool\" ], \"title\": \"Param\", \"type\": \"object\" }, \"Place\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"position_tolerance\": { \"title\": \"Position Tolerance\", \"type\": \"number\" }, \"yaw_tolerance\": { \"title\": \"Yaw Tolerance\", \"type\": \"number\" } }, \"required\": [ \"name\", \"x\", \"y\", \"yaw\", \"position_tolerance\", \"yaw_tolerance\" ], \"title\": \"Place\", \"type\": \"object\" } }, \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"$ref\": \"#/$defs/Level\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"lifts\": { \"items\": { \"$ref\": \"#/$defs/Lift\" }, \"title\": \"Lifts\", \"type\": \"array\" } }, \"required\": [ \"name\", \"levels\", \"lifts\" ], \"title\": \"BuildingMap\", \"type\": \"object\" } ``` ### /building_map/fire_alarm_trigger ``` { \"properties\": { \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"trigger\": { \"title\": \"Trigger\", \"type\": \"boolean\" } }, \"required\": [ \"unix_millis_time\", \"trigger\" ], \"title\": \"FireAlarmTriggerState\", \"type\": \"object\" } ``` ### /delivery_alerts ``` { \"$defs\": { \"Action\": { \"enum\": [ \"waiting\", \"cancel\", \"override\", \"resume\" ], \"title\": \"Action\", \"type\": \"string\" }, \"Category\": { \"enum\": [ \"missing\", \"wrong\", \"obstructed\", \"cancelled\" ], \"title\": \"Category\", \"type\": \"string\" }, \"Tier\": { \"enum\": [ \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"category\": { \"$ref\": \"#/$defs/Category\" }, \"tier\": { \"$ref\": \"#/$defs/Tier\" }, \"action\": { \"$ref\": \"#/$defs/Action\" }, \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"message\": { \"title\": \"Message\", \"type\": \"string\" } }, \"required\": [ \"id\", \"category\", \"tier\", \"action\", \"task_id\", \"message\" ], \"title\": \"DeliveryAlert\", \"type\": \"object\" } ``` ### /doors/{door_name}/state ``` { \"$defs\": { \"DoorMode\": { \"properties\": { \"value\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Value\", \"type\": \"integer\" } }, \"required\": [ \"value\" ], \"title\": \"DoorMode\", \"type\": \"object\" }, \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"door_time\": { \"$ref\": \"#/$defs/Time\" }, \"door_name\": { \"title\": \"Door Name\", \"type\": \"string\" }, \"current_mode\": { \"$ref\": \"#/$defs/DoorMode\" } }, \"required\": [ \"door_time\", \"door_name\", \"current_mode\" ], \"title\": \"DoorState\", \"type\": \"object\" } ``` ### /lifts/{lift_name}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"lift_time\": { \"$ref\": \"#/$defs/Time\" }, \"lift_name\": { \"title\": \"Lift Name\", \"type\": \"string\" }, \"available_floors\": { \"items\": { \"type\": \"string\" }, \"title\": \"Available Floors\", \"type\": \"array\" }, \"current_floor\": { \"title\": \"Current Floor\", \"type\": \"string\" }, \"destination_floor\": { \"title\": \"Destination Floor\", \"type\": \"string\" }, \"door_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door State\", \"type\": \"integer\" }, \"motion_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Motion State\", \"type\": \"integer\" }, \"available_modes\": { \"items\": { \"type\": \"integer\" }, \"title\": \"Available Modes\", \"type\": \"array\" }, \"current_mode\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Current Mode\", \"type\": \"integer\" }, \"session_id\": { \"title\": \"Session Id\", \"type\": \"string\" } }, \"required\": [ \"lift_time\", \"lift_name\", \"available_floors\", \"current_floor\", \"destination_floor\", \"door_state\", \"motion_state\", \"available_modes\", \"current_mode\", \"session_id\" ], \"title\": \"LiftState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/state ``` { \"$defs\": { \"AssignedTo\": { \"properties\": { \"group\": { \"title\": \"Group\", \"type\": \"string\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" } }, \"required\": [ \"group\", \"name\" ], \"title\": \"AssignedTo\", \"type\": \"object\" }, \"Assignment\": { \"properties\": { \"fleet_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Fleet Name\" }, \"expected_robot_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Expected Robot Name\" } }, \"title\": \"Assignment\", \"type\": \"object\" }, \"Booking\": { \"properties\": { \"id\": { \"description\": \"The unique identifier for this task\", \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_earliest_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Earliest Start Time\" }, \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Request Time\" }, \"priority\": { \"anyOf\": [ { \"type\": \"object\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Priority information about this task\", \"title\": \"Priority\" }, \"labels\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about how and why this task was booked, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"title\": \"Labels\" }, \"requester\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"(Optional) An identifier for the entity that requested this task\", \"title\": \"Requester\" } }, \"required\": [ \"id\" ], \"title\": \"Booking\", \"type\": \"object\" }, \"Cancellation\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the cancel request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Cancellation\", \"type\": \"object\" }, \"Category\": { \"description\": \"The category of this task or phase\", \"title\": \"Category\", \"type\": \"string\" }, \"Detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" } ], \"description\": \"Detailed information about a task, phase, or event\", \"title\": \"Detail\" }, \"Dispatch\": { \"properties\": { \"status\": { \"$ref\": \"#/$defs/Status2\" }, \"assignment\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Assignment\" }, { \"type\": \"null\" } ], \"default\": null }, \"errors\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Error\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Errors\" } }, \"required\": [ \"status\" ], \"title\": \"Dispatch\", \"type\": \"object\" }, \"Error\": { \"properties\": { \"code\": { \"anyOf\": [ { \"minimum\": 0, \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A standard code for the kind of error that has occurred\", \"title\": \"Code\" }, \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The category of the error\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Details about the error\", \"title\": \"Detail\" } }, \"title\": \"Error\", \"type\": \"object\" }, \"EstimateMillis\": { \"description\": \"An estimate, in milliseconds, of how long the subject will take to complete\", \"minimum\": 0, \"title\": \"EstimateMillis\", \"type\": \"integer\" }, \"EventState\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The brief name of the event\", \"title\": \"Name\" }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the event\" }, \"deps\": { \"anyOf\": [ { \"items\": { \"minimum\": 0, \"type\": \"integer\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"This event may depend on other events. This array contains the IDs of those other event dependencies.\", \"title\": \"Deps\" } }, \"required\": [ \"id\" ], \"title\": \"EventState\", \"type\": \"object\" }, \"Id\": { \"minimum\": 0, \"title\": \"Id\", \"type\": \"integer\" }, \"Interruption\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the interruption request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the interruption, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"resumed_by\": { \"anyOf\": [ { \"$ref\": \"#/$defs/ResumedBy\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the resume request that ended this interruption. This field will be missing if the interruption is still active.\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Interruption\", \"type\": \"object\" }, \"Killed\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the kill request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Killed\", \"type\": \"object\" }, \"Phase\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"final_event_id\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/EventState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of events for this phase. The keys (property names) are the event IDs, which are integers.\", \"title\": \"Events\" }, \"skip_requests\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/SkipPhaseRequest\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about any skip requests that have been received\", \"title\": \"Skip Requests\" } }, \"required\": [ \"id\" ], \"title\": \"Phase\", \"type\": \"object\" }, \"ResumedBy\": { \"properties\": { \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The time that the resume request arrived\", \"title\": \"Unix Millis Request Time\" }, \"labels\": { \"description\": \"Labels to describe the resume request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"labels\" ], \"title\": \"ResumedBy\", \"type\": \"object\" }, \"SkipPhaseRequest\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"undo\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Undo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about an undo skip request that applied to this request\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"SkipPhaseRequest\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"blocked\", \"error\", \"failed\", \"queued\", \"standby\", \"underway\", \"delayed\", \"skipped\", \"canceled\", \"killed\", \"completed\" ], \"title\": \"Status\", \"type\": \"string\" }, \"Status2\": { \"enum\": [ \"queued\", \"selected\", \"dispatched\", \"failed_to_assign\", \"canceled_in_flight\" ], \"title\": \"Status2\", \"type\": \"string\" }, \"Undo\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the undo skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the undo skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Undo\", \"type\": \"object\" } }, \"properties\": { \"booking\": { \"$ref\": \"#/$defs/Booking\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"assigned_to\": { \"anyOf\": [ { \"$ref\": \"#/$defs/AssignedTo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Which agent (robot) is the task assigned to\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"dispatch\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Dispatch\" }, { \"type\": \"null\" } ], \"default\": null }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phase\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the phases of the task. The keys (property names) are phase IDs, which are integers.\", \"title\": \"Phases\" }, \"completed\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the IDs of completed phases of this task\", \"title\": \"Completed\" }, \"active\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the active phase for this task\" }, \"pending\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the pending phases of this task\", \"title\": \"Pending\" }, \"interruptions\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Interruption\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of interruptions that have been applied to this task. The keys (property names) are the unique token of the interruption request.\", \"title\": \"Interruptions\" }, \"cancellation\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Cancellation\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was cancelled, this will describe information about the request.\" }, \"killed\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Killed\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was killed, this will describe information about the request.\" } }, \"required\": [ \"booking\" ], \"title\": \"TaskState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Phases\": { \"additionalProperties\": false, \"properties\": { \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall phase\", \"title\": \"Log\" }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of an event in the phase\", \"title\": \"Events\" } }, \"title\": \"Phases\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"additionalProperties\": false, \"properties\": { \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall task\", \"title\": \"Log\" }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phases\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of a phase\", \"title\": \"Phases\" } }, \"required\": [ \"task_id\" ], \"title\": \"TaskEventLog\", \"type\": \"object\" } ``` ### /dispensers/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"DispenserState\", \"type\": \"object\" } ``` ### /ingestors/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"IngestorState\", \"type\": \"object\" } ``` ### /fleets/{name}/state ``` { \"$defs\": { \"Commission\": { \"properties\": { \"dispatch_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept dispatched tasks, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Dispatch Tasks\" }, \"direct_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept direct task requests, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Direct Tasks\" }, \"idle_behavior\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot perform its idle behavior, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Idle Behavior\" } }, \"title\": \"Commission\", \"type\": \"object\" }, \"Issue\": { \"properties\": { \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Category of the robot\'s issue\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the issue\", \"title\": \"Detail\" } }, \"title\": \"Issue\", \"type\": \"object\" }, \"Location2D\": { \"properties\": { \"map\": { \"title\": \"Map\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" } }, \"required\": [ \"map\", \"x\", \"y\", \"yaw\" ], \"title\": \"Location2D\", \"type\": \"object\" }, \"MutexGroups\": { \"properties\": { \"locked\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of mutex groups that this robot has currently locked\", \"title\": \"Locked\" }, \"requesting\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of the mutex groups that this robot is currently requesting but has not lockd yet\", \"title\": \"Requesting\" } }, \"title\": \"MutexGroups\", \"type\": \"object\" }, \"RobotState\": { \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A simple token representing the status of the robot\" }, \"task_id\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the task this robot is currently working on. Empty string if the robot is not working on a task.\", \"title\": \"Task Id\" }, \"unix_millis_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Time\" }, \"location\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Location2D\" }, { \"type\": \"null\" } ], \"default\": null }, \"battery\": { \"anyOf\": [ { \"maximum\": 1.0, \"minimum\": 0.0, \"type\": \"number\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"State of charge of the battery. Values range from 0.0 (depleted) to 1.0 (fully charged)\", \"title\": \"Battery\" }, \"issues\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Issue\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of issues with the robot that operators need to address\", \"title\": \"Issues\" }, \"commission\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Commission\" }, { \"type\": \"null\" } ], \"default\": null }, \"mutex_groups\": { \"anyOf\": [ { \"$ref\": \"#/$defs/MutexGroups\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the mutex groups that this robot is interacting with\" } }, \"title\": \"RobotState\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"offline\", \"shutdown\", \"idle\", \"charging\", \"working\", \"error\" ], \"title\": \"Status\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/RobotState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the robots that belong to this fleet\", \"title\": \"Robots\" } }, \"title\": \"FleetState\", \"type\": \"object\" } ``` ### /fleets/{name}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log for the overall fleet\", \"title\": \"Log\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Dictionary of logs for the individual robots. The keys (property names) are the robot names.\", \"title\": \"Robots\" } }, \"title\": \"FleetLog\", \"type\": \"object\" } ``` ### /rios ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"type\": { \"title\": \"Type\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"object\" } }, \"required\": [ \"id\", \"type\", \"data\" ], \"title\": \"Rio\", \"type\": \"object\" } ``` * @summary Socket.io endpoint * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -6804,7 +7158,7 @@ export const DefaultApiFactory = function ( .then((request) => request(axios, basePath)); }, /** - * # NOTE: This endpoint is here for documentation purposes only, this is _not_ a REST endpoint. ## About This exposes a minimal pubsub system built on top of socket.io. It works similar to a normal socket.io endpoint, except that are 2 special rooms which control subscriptions. ## Rooms ### subscribe Clients must send a message to this room to start receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### unsubscribe Clients can send a message to this room to stop receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### /alerts ``` { \"$defs\": { \"Category\": { \"enum\": [ \"default\", \"task\", \"fleet\", \"robot\" ], \"title\": \"Category\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"original_id\": { \"title\": \"Original Id\", \"type\": \"string\" }, \"category\": { \"$ref\": \"#/$defs/Category\" }, \"unix_millis_created_time\": { \"title\": \"Unix Millis Created Time\", \"type\": \"integer\" }, \"acknowledged_by\": { \"title\": \"Acknowledged By\", \"type\": \"string\" }, \"unix_millis_acknowledged_time\": { \"title\": \"Unix Millis Acknowledged Time\", \"type\": \"integer\" } }, \"required\": [ \"id\", \"original_id\", \"category\", \"unix_millis_created_time\", \"acknowledged_by\", \"unix_millis_acknowledged_time\" ], \"title\": \"Alert\", \"type\": \"object\" } ``` ### /beacons ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"online\": { \"title\": \"Online\", \"type\": \"boolean\" }, \"category\": { \"title\": \"Category\", \"type\": \"string\" }, \"activated\": { \"title\": \"Activated\", \"type\": \"boolean\" }, \"level\": { \"title\": \"Level\", \"type\": \"string\" } }, \"required\": [ \"id\", \"online\", \"category\", \"activated\", \"level\" ], \"title\": \"BeaconState\", \"type\": \"object\" } ``` ### /building_map ``` { \"$defs\": { \"AffineImage\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x_offset\": { \"title\": \"X Offset\", \"type\": \"number\" }, \"y_offset\": { \"title\": \"Y Offset\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"scale\": { \"title\": \"Scale\", \"type\": \"number\" }, \"encoding\": { \"title\": \"Encoding\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"string\" } }, \"required\": [ \"name\", \"x_offset\", \"y_offset\", \"yaw\", \"scale\", \"encoding\", \"data\" ], \"title\": \"AffineImage\", \"type\": \"object\" }, \"Door\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"v1_x\": { \"title\": \"V1 X\", \"type\": \"number\" }, \"v1_y\": { \"title\": \"V1 Y\", \"type\": \"number\" }, \"v2_x\": { \"title\": \"V2 X\", \"type\": \"number\" }, \"v2_y\": { \"title\": \"V2 Y\", \"type\": \"number\" }, \"door_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door Type\", \"type\": \"integer\" }, \"motion_range\": { \"title\": \"Motion Range\", \"type\": \"number\" }, \"motion_direction\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Motion Direction\", \"type\": \"integer\" } }, \"required\": [ \"name\", \"v1_x\", \"v1_y\", \"v2_x\", \"v2_y\", \"door_type\", \"motion_range\", \"motion_direction\" ], \"title\": \"Door\", \"type\": \"object\" }, \"Graph\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"vertices\": { \"items\": { \"$ref\": \"#/$defs/GraphNode\" }, \"title\": \"Vertices\", \"type\": \"array\" }, \"edges\": { \"items\": { \"$ref\": \"#/$defs/GraphEdge\" }, \"title\": \"Edges\", \"type\": \"array\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"name\", \"vertices\", \"edges\", \"params\" ], \"title\": \"Graph\", \"type\": \"object\" }, \"GraphEdge\": { \"properties\": { \"v1_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V1 Idx\", \"type\": \"integer\" }, \"v2_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V2 Idx\", \"type\": \"integer\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" }, \"edge_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Edge Type\", \"type\": \"integer\" } }, \"required\": [ \"v1_idx\", \"v2_idx\", \"params\", \"edge_type\" ], \"title\": \"GraphEdge\", \"type\": \"object\" }, \"GraphNode\": { \"properties\": { \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"x\", \"y\", \"name\", \"params\" ], \"title\": \"GraphNode\", \"type\": \"object\" }, \"Level\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"elevation\": { \"title\": \"Elevation\", \"type\": \"number\" }, \"images\": { \"items\": { \"$ref\": \"#/$defs/AffineImage\" }, \"title\": \"Images\", \"type\": \"array\" }, \"places\": { \"items\": { \"$ref\": \"#/$defs/Place\" }, \"title\": \"Places\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"nav_graphs\": { \"items\": { \"$ref\": \"#/$defs/Graph\" }, \"title\": \"Nav Graphs\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" } }, \"required\": [ \"name\", \"elevation\", \"images\", \"places\", \"doors\", \"nav_graphs\", \"wall_graph\" ], \"title\": \"Level\", \"type\": \"object\" }, \"Lift\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"type\": \"string\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" }, \"ref_x\": { \"title\": \"Ref X\", \"type\": \"number\" }, \"ref_y\": { \"title\": \"Ref Y\", \"type\": \"number\" }, \"ref_yaw\": { \"title\": \"Ref Yaw\", \"type\": \"number\" }, \"width\": { \"title\": \"Width\", \"type\": \"number\" }, \"depth\": { \"title\": \"Depth\", \"type\": \"number\" } }, \"required\": [ \"name\", \"levels\", \"doors\", \"wall_graph\", \"ref_x\", \"ref_y\", \"ref_yaw\", \"width\", \"depth\" ], \"title\": \"Lift\", \"type\": \"object\" }, \"Param\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"type\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Type\", \"type\": \"integer\" }, \"value_int\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Value Int\", \"type\": \"integer\" }, \"value_float\": { \"title\": \"Value Float\", \"type\": \"number\" }, \"value_string\": { \"title\": \"Value String\", \"type\": \"string\" }, \"value_bool\": { \"title\": \"Value Bool\", \"type\": \"boolean\" } }, \"required\": [ \"name\", \"type\", \"value_int\", \"value_float\", \"value_string\", \"value_bool\" ], \"title\": \"Param\", \"type\": \"object\" }, \"Place\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"position_tolerance\": { \"title\": \"Position Tolerance\", \"type\": \"number\" }, \"yaw_tolerance\": { \"title\": \"Yaw Tolerance\", \"type\": \"number\" } }, \"required\": [ \"name\", \"x\", \"y\", \"yaw\", \"position_tolerance\", \"yaw_tolerance\" ], \"title\": \"Place\", \"type\": \"object\" } }, \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"$ref\": \"#/$defs/Level\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"lifts\": { \"items\": { \"$ref\": \"#/$defs/Lift\" }, \"title\": \"Lifts\", \"type\": \"array\" } }, \"required\": [ \"name\", \"levels\", \"lifts\" ], \"title\": \"BuildingMap\", \"type\": \"object\" } ``` ### /building_map/fire_alarm_trigger ``` { \"properties\": { \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"trigger\": { \"title\": \"Trigger\", \"type\": \"boolean\" } }, \"required\": [ \"unix_millis_time\", \"trigger\" ], \"title\": \"FireAlarmTriggerState\", \"type\": \"object\" } ``` ### /delivery_alerts ``` { \"$defs\": { \"Action\": { \"enum\": [ \"waiting\", \"cancel\", \"override\", \"resume\" ], \"title\": \"Action\", \"type\": \"string\" }, \"Category\": { \"enum\": [ \"missing\", \"wrong\", \"obstructed\", \"cancelled\" ], \"title\": \"Category\", \"type\": \"string\" }, \"Tier\": { \"enum\": [ \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"category\": { \"$ref\": \"#/$defs/Category\" }, \"tier\": { \"$ref\": \"#/$defs/Tier\" }, \"action\": { \"$ref\": \"#/$defs/Action\" }, \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"message\": { \"title\": \"Message\", \"type\": \"string\" } }, \"required\": [ \"id\", \"category\", \"tier\", \"action\", \"task_id\", \"message\" ], \"title\": \"DeliveryAlert\", \"type\": \"object\" } ``` ### /doors/{door_name}/state ``` { \"$defs\": { \"DoorMode\": { \"properties\": { \"value\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Value\", \"type\": \"integer\" } }, \"required\": [ \"value\" ], \"title\": \"DoorMode\", \"type\": \"object\" }, \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"door_time\": { \"$ref\": \"#/$defs/Time\" }, \"door_name\": { \"title\": \"Door Name\", \"type\": \"string\" }, \"current_mode\": { \"$ref\": \"#/$defs/DoorMode\" } }, \"required\": [ \"door_time\", \"door_name\", \"current_mode\" ], \"title\": \"DoorState\", \"type\": \"object\" } ``` ### /lifts/{lift_name}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"lift_time\": { \"$ref\": \"#/$defs/Time\" }, \"lift_name\": { \"title\": \"Lift Name\", \"type\": \"string\" }, \"available_floors\": { \"items\": { \"type\": \"string\" }, \"title\": \"Available Floors\", \"type\": \"array\" }, \"current_floor\": { \"title\": \"Current Floor\", \"type\": \"string\" }, \"destination_floor\": { \"title\": \"Destination Floor\", \"type\": \"string\" }, \"door_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door State\", \"type\": \"integer\" }, \"motion_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Motion State\", \"type\": \"integer\" }, \"available_modes\": { \"items\": { \"type\": \"integer\" }, \"title\": \"Available Modes\", \"type\": \"array\" }, \"current_mode\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Current Mode\", \"type\": \"integer\" }, \"session_id\": { \"title\": \"Session Id\", \"type\": \"string\" } }, \"required\": [ \"lift_time\", \"lift_name\", \"available_floors\", \"current_floor\", \"destination_floor\", \"door_state\", \"motion_state\", \"available_modes\", \"current_mode\", \"session_id\" ], \"title\": \"LiftState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/state ``` { \"$defs\": { \"AssignedTo\": { \"properties\": { \"group\": { \"title\": \"Group\", \"type\": \"string\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" } }, \"required\": [ \"group\", \"name\" ], \"title\": \"AssignedTo\", \"type\": \"object\" }, \"Assignment\": { \"properties\": { \"fleet_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Fleet Name\" }, \"expected_robot_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Expected Robot Name\" } }, \"title\": \"Assignment\", \"type\": \"object\" }, \"Booking\": { \"properties\": { \"id\": { \"description\": \"The unique identifier for this task\", \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_earliest_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Earliest Start Time\" }, \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Request Time\" }, \"priority\": { \"anyOf\": [ { \"type\": \"object\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Priority information about this task\", \"title\": \"Priority\" }, \"labels\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about how and why this task was booked, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"title\": \"Labels\" }, \"requester\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"(Optional) An identifier for the entity that requested this task\", \"title\": \"Requester\" } }, \"required\": [ \"id\" ], \"title\": \"Booking\", \"type\": \"object\" }, \"Cancellation\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the cancel request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Cancellation\", \"type\": \"object\" }, \"Category\": { \"description\": \"The category of this task or phase\", \"title\": \"Category\", \"type\": \"string\" }, \"Detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" } ], \"description\": \"Detailed information about a task, phase, or event\", \"title\": \"Detail\" }, \"Dispatch\": { \"properties\": { \"status\": { \"$ref\": \"#/$defs/Status2\" }, \"assignment\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Assignment\" }, { \"type\": \"null\" } ], \"default\": null }, \"errors\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Error\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Errors\" } }, \"required\": [ \"status\" ], \"title\": \"Dispatch\", \"type\": \"object\" }, \"Error\": { \"properties\": { \"code\": { \"anyOf\": [ { \"minimum\": 0, \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A standard code for the kind of error that has occurred\", \"title\": \"Code\" }, \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The category of the error\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Details about the error\", \"title\": \"Detail\" } }, \"title\": \"Error\", \"type\": \"object\" }, \"EstimateMillis\": { \"description\": \"An estimate, in milliseconds, of how long the subject will take to complete\", \"minimum\": 0, \"title\": \"EstimateMillis\", \"type\": \"integer\" }, \"EventState\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The brief name of the event\", \"title\": \"Name\" }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the event\" }, \"deps\": { \"anyOf\": [ { \"items\": { \"minimum\": 0, \"type\": \"integer\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"This event may depend on other events. This array contains the IDs of those other event dependencies.\", \"title\": \"Deps\" } }, \"required\": [ \"id\" ], \"title\": \"EventState\", \"type\": \"object\" }, \"Id\": { \"minimum\": 0, \"title\": \"Id\", \"type\": \"integer\" }, \"Interruption\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the interruption request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the interruption, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"resumed_by\": { \"anyOf\": [ { \"$ref\": \"#/$defs/ResumedBy\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the resume request that ended this interruption. This field will be missing if the interruption is still active.\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Interruption\", \"type\": \"object\" }, \"Killed\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the kill request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Killed\", \"type\": \"object\" }, \"Phase\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"final_event_id\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/EventState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of events for this phase. The keys (property names) are the event IDs, which are integers.\", \"title\": \"Events\" }, \"skip_requests\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/SkipPhaseRequest\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about any skip requests that have been received\", \"title\": \"Skip Requests\" } }, \"required\": [ \"id\" ], \"title\": \"Phase\", \"type\": \"object\" }, \"ResumedBy\": { \"properties\": { \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The time that the resume request arrived\", \"title\": \"Unix Millis Request Time\" }, \"labels\": { \"description\": \"Labels to describe the resume request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"labels\" ], \"title\": \"ResumedBy\", \"type\": \"object\" }, \"SkipPhaseRequest\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"undo\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Undo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about an undo skip request that applied to this request\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"SkipPhaseRequest\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"blocked\", \"error\", \"failed\", \"queued\", \"standby\", \"underway\", \"delayed\", \"skipped\", \"canceled\", \"killed\", \"completed\" ], \"title\": \"Status\", \"type\": \"string\" }, \"Status2\": { \"enum\": [ \"queued\", \"selected\", \"dispatched\", \"failed_to_assign\", \"canceled_in_flight\" ], \"title\": \"Status2\", \"type\": \"string\" }, \"Undo\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the undo skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the undo skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Undo\", \"type\": \"object\" } }, \"properties\": { \"booking\": { \"$ref\": \"#/$defs/Booking\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"assigned_to\": { \"anyOf\": [ { \"$ref\": \"#/$defs/AssignedTo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Which agent (robot) is the task assigned to\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"dispatch\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Dispatch\" }, { \"type\": \"null\" } ], \"default\": null }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phase\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the phases of the task. The keys (property names) are phase IDs, which are integers.\", \"title\": \"Phases\" }, \"completed\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the IDs of completed phases of this task\", \"title\": \"Completed\" }, \"active\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the active phase for this task\" }, \"pending\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the pending phases of this task\", \"title\": \"Pending\" }, \"interruptions\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Interruption\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of interruptions that have been applied to this task. The keys (property names) are the unique token of the interruption request.\", \"title\": \"Interruptions\" }, \"cancellation\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Cancellation\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was cancelled, this will describe information about the request.\" }, \"killed\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Killed\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was killed, this will describe information about the request.\" } }, \"required\": [ \"booking\" ], \"title\": \"TaskState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Phases\": { \"additionalProperties\": false, \"properties\": { \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall phase\", \"title\": \"Log\" }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of an event in the phase\", \"title\": \"Events\" } }, \"title\": \"Phases\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"additionalProperties\": false, \"properties\": { \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall task\", \"title\": \"Log\" }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phases\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of a phase\", \"title\": \"Phases\" } }, \"required\": [ \"task_id\" ], \"title\": \"TaskEventLog\", \"type\": \"object\" } ``` ### /dispensers/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"DispenserState\", \"type\": \"object\" } ``` ### /ingestors/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"IngestorState\", \"type\": \"object\" } ``` ### /fleets/{name}/state ``` { \"$defs\": { \"Commission\": { \"properties\": { \"dispatch_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept dispatched tasks, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Dispatch Tasks\" }, \"direct_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept direct task requests, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Direct Tasks\" }, \"idle_behavior\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot perform its idle behavior, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Idle Behavior\" } }, \"title\": \"Commission\", \"type\": \"object\" }, \"Issue\": { \"properties\": { \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Category of the robot\'s issue\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the issue\", \"title\": \"Detail\" } }, \"title\": \"Issue\", \"type\": \"object\" }, \"Location2D\": { \"properties\": { \"map\": { \"title\": \"Map\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" } }, \"required\": [ \"map\", \"x\", \"y\", \"yaw\" ], \"title\": \"Location2D\", \"type\": \"object\" }, \"MutexGroups\": { \"properties\": { \"locked\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of mutex groups that this robot has currently locked\", \"title\": \"Locked\" }, \"requesting\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of the mutex groups that this robot is currently requesting but has not lockd yet\", \"title\": \"Requesting\" } }, \"title\": \"MutexGroups\", \"type\": \"object\" }, \"RobotState\": { \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A simple token representing the status of the robot\" }, \"task_id\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the task this robot is currently working on. Empty string if the robot is not working on a task.\", \"title\": \"Task Id\" }, \"unix_millis_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Time\" }, \"location\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Location2D\" }, { \"type\": \"null\" } ], \"default\": null }, \"battery\": { \"anyOf\": [ { \"maximum\": 1.0, \"minimum\": 0.0, \"type\": \"number\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"State of charge of the battery. Values range from 0.0 (depleted) to 1.0 (fully charged)\", \"title\": \"Battery\" }, \"issues\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Issue\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of issues with the robot that operators need to address\", \"title\": \"Issues\" }, \"commission\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Commission\" }, { \"type\": \"null\" } ], \"default\": null }, \"mutex_groups\": { \"anyOf\": [ { \"$ref\": \"#/$defs/MutexGroups\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the mutex groups that this robot is interacting with\" } }, \"title\": \"RobotState\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"offline\", \"shutdown\", \"idle\", \"charging\", \"working\", \"error\" ], \"title\": \"Status\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/RobotState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the robots that belong to this fleet\", \"title\": \"Robots\" } }, \"title\": \"FleetState\", \"type\": \"object\" } ``` ### /fleets/{name}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log for the overall fleet\", \"title\": \"Log\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Dictionary of logs for the individual robots. The keys (property names) are the robot names.\", \"title\": \"Robots\" } }, \"title\": \"FleetLog\", \"type\": \"object\" } ``` ### /rios ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"type\": { \"title\": \"Type\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"object\" } }, \"required\": [ \"id\", \"type\", \"data\" ], \"title\": \"Rio\", \"type\": \"object\" } ``` + * # NOTE: This endpoint is here for documentation purposes only, this is _not_ a REST endpoint. ## About This exposes a minimal pubsub system built on top of socket.io. It works similar to a normal socket.io endpoint, except that are 2 special rooms which control subscriptions. ## Rooms ### subscribe Clients must send a message to this room to start receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### unsubscribe Clients can send a message to this room to stop receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### /alerts/requests ``` { \"$defs\": { \"AlertParameter\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"value\": { \"title\": \"Value\", \"type\": \"string\" } }, \"required\": [ \"name\", \"value\" ], \"title\": \"AlertParameter\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_alert_time\": { \"title\": \"Unix Millis Alert Time\", \"type\": \"integer\" }, \"title\": { \"title\": \"Title\", \"type\": \"string\" }, \"subtitle\": { \"title\": \"Subtitle\", \"type\": \"string\" }, \"message\": { \"title\": \"Message\", \"type\": \"string\" }, \"display\": { \"title\": \"Display\", \"type\": \"boolean\" }, \"tier\": { \"$ref\": \"#/$defs/Tier\" }, \"responses_available\": { \"items\": { \"type\": \"string\" }, \"title\": \"Responses Available\", \"type\": \"array\" }, \"alert_parameters\": { \"items\": { \"$ref\": \"#/$defs/AlertParameter\" }, \"title\": \"Alert Parameters\", \"type\": \"array\" }, \"task_id\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"title\": \"Task Id\" } }, \"required\": [ \"id\", \"unix_millis_alert_time\", \"title\", \"subtitle\", \"message\", \"display\", \"tier\", \"responses_available\", \"alert_parameters\", \"task_id\" ], \"title\": \"AlertRequest\", \"type\": \"object\" } ``` ### /alerts/responses ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_response_time\": { \"title\": \"Unix Millis Response Time\", \"type\": \"integer\" }, \"response\": { \"title\": \"Response\", \"type\": \"string\" } }, \"required\": [ \"id\", \"unix_millis_response_time\", \"response\" ], \"title\": \"AlertResponse\", \"type\": \"object\" } ``` ### /beacons ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"online\": { \"title\": \"Online\", \"type\": \"boolean\" }, \"category\": { \"title\": \"Category\", \"type\": \"string\" }, \"activated\": { \"title\": \"Activated\", \"type\": \"boolean\" }, \"level\": { \"title\": \"Level\", \"type\": \"string\" } }, \"required\": [ \"id\", \"online\", \"category\", \"activated\", \"level\" ], \"title\": \"BeaconState\", \"type\": \"object\" } ``` ### /building_map ``` { \"$defs\": { \"AffineImage\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x_offset\": { \"title\": \"X Offset\", \"type\": \"number\" }, \"y_offset\": { \"title\": \"Y Offset\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"scale\": { \"title\": \"Scale\", \"type\": \"number\" }, \"encoding\": { \"title\": \"Encoding\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"string\" } }, \"required\": [ \"name\", \"x_offset\", \"y_offset\", \"yaw\", \"scale\", \"encoding\", \"data\" ], \"title\": \"AffineImage\", \"type\": \"object\" }, \"Door\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"v1_x\": { \"title\": \"V1 X\", \"type\": \"number\" }, \"v1_y\": { \"title\": \"V1 Y\", \"type\": \"number\" }, \"v2_x\": { \"title\": \"V2 X\", \"type\": \"number\" }, \"v2_y\": { \"title\": \"V2 Y\", \"type\": \"number\" }, \"door_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door Type\", \"type\": \"integer\" }, \"motion_range\": { \"title\": \"Motion Range\", \"type\": \"number\" }, \"motion_direction\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Motion Direction\", \"type\": \"integer\" } }, \"required\": [ \"name\", \"v1_x\", \"v1_y\", \"v2_x\", \"v2_y\", \"door_type\", \"motion_range\", \"motion_direction\" ], \"title\": \"Door\", \"type\": \"object\" }, \"Graph\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"vertices\": { \"items\": { \"$ref\": \"#/$defs/GraphNode\" }, \"title\": \"Vertices\", \"type\": \"array\" }, \"edges\": { \"items\": { \"$ref\": \"#/$defs/GraphEdge\" }, \"title\": \"Edges\", \"type\": \"array\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"name\", \"vertices\", \"edges\", \"params\" ], \"title\": \"Graph\", \"type\": \"object\" }, \"GraphEdge\": { \"properties\": { \"v1_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V1 Idx\", \"type\": \"integer\" }, \"v2_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V2 Idx\", \"type\": \"integer\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" }, \"edge_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Edge Type\", \"type\": \"integer\" } }, \"required\": [ \"v1_idx\", \"v2_idx\", \"params\", \"edge_type\" ], \"title\": \"GraphEdge\", \"type\": \"object\" }, \"GraphNode\": { \"properties\": { \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"x\", \"y\", \"name\", \"params\" ], \"title\": \"GraphNode\", \"type\": \"object\" }, \"Level\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"elevation\": { \"title\": \"Elevation\", \"type\": \"number\" }, \"images\": { \"items\": { \"$ref\": \"#/$defs/AffineImage\" }, \"title\": \"Images\", \"type\": \"array\" }, \"places\": { \"items\": { \"$ref\": \"#/$defs/Place\" }, \"title\": \"Places\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"nav_graphs\": { \"items\": { \"$ref\": \"#/$defs/Graph\" }, \"title\": \"Nav Graphs\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" } }, \"required\": [ \"name\", \"elevation\", \"images\", \"places\", \"doors\", \"nav_graphs\", \"wall_graph\" ], \"title\": \"Level\", \"type\": \"object\" }, \"Lift\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"type\": \"string\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" }, \"ref_x\": { \"title\": \"Ref X\", \"type\": \"number\" }, \"ref_y\": { \"title\": \"Ref Y\", \"type\": \"number\" }, \"ref_yaw\": { \"title\": \"Ref Yaw\", \"type\": \"number\" }, \"width\": { \"title\": \"Width\", \"type\": \"number\" }, \"depth\": { \"title\": \"Depth\", \"type\": \"number\" } }, \"required\": [ \"name\", \"levels\", \"doors\", \"wall_graph\", \"ref_x\", \"ref_y\", \"ref_yaw\", \"width\", \"depth\" ], \"title\": \"Lift\", \"type\": \"object\" }, \"Param\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"type\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Type\", \"type\": \"integer\" }, \"value_int\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Value Int\", \"type\": \"integer\" }, \"value_float\": { \"title\": \"Value Float\", \"type\": \"number\" }, \"value_string\": { \"title\": \"Value String\", \"type\": \"string\" }, \"value_bool\": { \"title\": \"Value Bool\", \"type\": \"boolean\" } }, \"required\": [ \"name\", \"type\", \"value_int\", \"value_float\", \"value_string\", \"value_bool\" ], \"title\": \"Param\", \"type\": \"object\" }, \"Place\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"position_tolerance\": { \"title\": \"Position Tolerance\", \"type\": \"number\" }, \"yaw_tolerance\": { \"title\": \"Yaw Tolerance\", \"type\": \"number\" } }, \"required\": [ \"name\", \"x\", \"y\", \"yaw\", \"position_tolerance\", \"yaw_tolerance\" ], \"title\": \"Place\", \"type\": \"object\" } }, \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"$ref\": \"#/$defs/Level\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"lifts\": { \"items\": { \"$ref\": \"#/$defs/Lift\" }, \"title\": \"Lifts\", \"type\": \"array\" } }, \"required\": [ \"name\", \"levels\", \"lifts\" ], \"title\": \"BuildingMap\", \"type\": \"object\" } ``` ### /building_map/fire_alarm_trigger ``` { \"properties\": { \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"trigger\": { \"title\": \"Trigger\", \"type\": \"boolean\" } }, \"required\": [ \"unix_millis_time\", \"trigger\" ], \"title\": \"FireAlarmTriggerState\", \"type\": \"object\" } ``` ### /delivery_alerts ``` { \"$defs\": { \"Action\": { \"enum\": [ \"waiting\", \"cancel\", \"override\", \"resume\" ], \"title\": \"Action\", \"type\": \"string\" }, \"Category\": { \"enum\": [ \"missing\", \"wrong\", \"obstructed\", \"cancelled\" ], \"title\": \"Category\", \"type\": \"string\" }, \"Tier\": { \"enum\": [ \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"category\": { \"$ref\": \"#/$defs/Category\" }, \"tier\": { \"$ref\": \"#/$defs/Tier\" }, \"action\": { \"$ref\": \"#/$defs/Action\" }, \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"message\": { \"title\": \"Message\", \"type\": \"string\" } }, \"required\": [ \"id\", \"category\", \"tier\", \"action\", \"task_id\", \"message\" ], \"title\": \"DeliveryAlert\", \"type\": \"object\" } ``` ### /doors/{door_name}/state ``` { \"$defs\": { \"DoorMode\": { \"properties\": { \"value\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Value\", \"type\": \"integer\" } }, \"required\": [ \"value\" ], \"title\": \"DoorMode\", \"type\": \"object\" }, \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"door_time\": { \"$ref\": \"#/$defs/Time\" }, \"door_name\": { \"title\": \"Door Name\", \"type\": \"string\" }, \"current_mode\": { \"$ref\": \"#/$defs/DoorMode\" } }, \"required\": [ \"door_time\", \"door_name\", \"current_mode\" ], \"title\": \"DoorState\", \"type\": \"object\" } ``` ### /lifts/{lift_name}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"lift_time\": { \"$ref\": \"#/$defs/Time\" }, \"lift_name\": { \"title\": \"Lift Name\", \"type\": \"string\" }, \"available_floors\": { \"items\": { \"type\": \"string\" }, \"title\": \"Available Floors\", \"type\": \"array\" }, \"current_floor\": { \"title\": \"Current Floor\", \"type\": \"string\" }, \"destination_floor\": { \"title\": \"Destination Floor\", \"type\": \"string\" }, \"door_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door State\", \"type\": \"integer\" }, \"motion_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Motion State\", \"type\": \"integer\" }, \"available_modes\": { \"items\": { \"type\": \"integer\" }, \"title\": \"Available Modes\", \"type\": \"array\" }, \"current_mode\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Current Mode\", \"type\": \"integer\" }, \"session_id\": { \"title\": \"Session Id\", \"type\": \"string\" } }, \"required\": [ \"lift_time\", \"lift_name\", \"available_floors\", \"current_floor\", \"destination_floor\", \"door_state\", \"motion_state\", \"available_modes\", \"current_mode\", \"session_id\" ], \"title\": \"LiftState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/state ``` { \"$defs\": { \"AssignedTo\": { \"properties\": { \"group\": { \"title\": \"Group\", \"type\": \"string\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" } }, \"required\": [ \"group\", \"name\" ], \"title\": \"AssignedTo\", \"type\": \"object\" }, \"Assignment\": { \"properties\": { \"fleet_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Fleet Name\" }, \"expected_robot_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Expected Robot Name\" } }, \"title\": \"Assignment\", \"type\": \"object\" }, \"Booking\": { \"properties\": { \"id\": { \"description\": \"The unique identifier for this task\", \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_earliest_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Earliest Start Time\" }, \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Request Time\" }, \"priority\": { \"anyOf\": [ { \"type\": \"object\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Priority information about this task\", \"title\": \"Priority\" }, \"labels\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about how and why this task was booked, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"title\": \"Labels\" }, \"requester\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"(Optional) An identifier for the entity that requested this task\", \"title\": \"Requester\" } }, \"required\": [ \"id\" ], \"title\": \"Booking\", \"type\": \"object\" }, \"Cancellation\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the cancel request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Cancellation\", \"type\": \"object\" }, \"Category\": { \"description\": \"The category of this task or phase\", \"title\": \"Category\", \"type\": \"string\" }, \"Detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" } ], \"description\": \"Detailed information about a task, phase, or event\", \"title\": \"Detail\" }, \"Dispatch\": { \"properties\": { \"status\": { \"$ref\": \"#/$defs/Status2\" }, \"assignment\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Assignment\" }, { \"type\": \"null\" } ], \"default\": null }, \"errors\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Error\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Errors\" } }, \"required\": [ \"status\" ], \"title\": \"Dispatch\", \"type\": \"object\" }, \"Error\": { \"properties\": { \"code\": { \"anyOf\": [ { \"minimum\": 0, \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A standard code for the kind of error that has occurred\", \"title\": \"Code\" }, \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The category of the error\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Details about the error\", \"title\": \"Detail\" } }, \"title\": \"Error\", \"type\": \"object\" }, \"EstimateMillis\": { \"description\": \"An estimate, in milliseconds, of how long the subject will take to complete\", \"minimum\": 0, \"title\": \"EstimateMillis\", \"type\": \"integer\" }, \"EventState\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The brief name of the event\", \"title\": \"Name\" }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the event\" }, \"deps\": { \"anyOf\": [ { \"items\": { \"minimum\": 0, \"type\": \"integer\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"This event may depend on other events. This array contains the IDs of those other event dependencies.\", \"title\": \"Deps\" } }, \"required\": [ \"id\" ], \"title\": \"EventState\", \"type\": \"object\" }, \"Id\": { \"minimum\": 0, \"title\": \"Id\", \"type\": \"integer\" }, \"Interruption\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the interruption request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the interruption, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"resumed_by\": { \"anyOf\": [ { \"$ref\": \"#/$defs/ResumedBy\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the resume request that ended this interruption. This field will be missing if the interruption is still active.\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Interruption\", \"type\": \"object\" }, \"Killed\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the kill request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Killed\", \"type\": \"object\" }, \"Phase\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"final_event_id\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/EventState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of events for this phase. The keys (property names) are the event IDs, which are integers.\", \"title\": \"Events\" }, \"skip_requests\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/SkipPhaseRequest\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about any skip requests that have been received\", \"title\": \"Skip Requests\" } }, \"required\": [ \"id\" ], \"title\": \"Phase\", \"type\": \"object\" }, \"ResumedBy\": { \"properties\": { \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The time that the resume request arrived\", \"title\": \"Unix Millis Request Time\" }, \"labels\": { \"description\": \"Labels to describe the resume request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"labels\" ], \"title\": \"ResumedBy\", \"type\": \"object\" }, \"SkipPhaseRequest\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"undo\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Undo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about an undo skip request that applied to this request\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"SkipPhaseRequest\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"blocked\", \"error\", \"failed\", \"queued\", \"standby\", \"underway\", \"delayed\", \"skipped\", \"canceled\", \"killed\", \"completed\" ], \"title\": \"Status\", \"type\": \"string\" }, \"Status2\": { \"enum\": [ \"queued\", \"selected\", \"dispatched\", \"failed_to_assign\", \"canceled_in_flight\" ], \"title\": \"Status2\", \"type\": \"string\" }, \"Undo\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the undo skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the undo skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Undo\", \"type\": \"object\" } }, \"properties\": { \"booking\": { \"$ref\": \"#/$defs/Booking\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"assigned_to\": { \"anyOf\": [ { \"$ref\": \"#/$defs/AssignedTo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Which agent (robot) is the task assigned to\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"dispatch\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Dispatch\" }, { \"type\": \"null\" } ], \"default\": null }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phase\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the phases of the task. The keys (property names) are phase IDs, which are integers.\", \"title\": \"Phases\" }, \"completed\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the IDs of completed phases of this task\", \"title\": \"Completed\" }, \"active\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the active phase for this task\" }, \"pending\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the pending phases of this task\", \"title\": \"Pending\" }, \"interruptions\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Interruption\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of interruptions that have been applied to this task. The keys (property names) are the unique token of the interruption request.\", \"title\": \"Interruptions\" }, \"cancellation\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Cancellation\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was cancelled, this will describe information about the request.\" }, \"killed\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Killed\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was killed, this will describe information about the request.\" } }, \"required\": [ \"booking\" ], \"title\": \"TaskState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Phases\": { \"additionalProperties\": false, \"properties\": { \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall phase\", \"title\": \"Log\" }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of an event in the phase\", \"title\": \"Events\" } }, \"title\": \"Phases\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"additionalProperties\": false, \"properties\": { \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall task\", \"title\": \"Log\" }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phases\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of a phase\", \"title\": \"Phases\" } }, \"required\": [ \"task_id\" ], \"title\": \"TaskEventLog\", \"type\": \"object\" } ``` ### /dispensers/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"DispenserState\", \"type\": \"object\" } ``` ### /ingestors/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"IngestorState\", \"type\": \"object\" } ``` ### /fleets/{name}/state ``` { \"$defs\": { \"Commission\": { \"properties\": { \"dispatch_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept dispatched tasks, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Dispatch Tasks\" }, \"direct_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept direct task requests, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Direct Tasks\" }, \"idle_behavior\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot perform its idle behavior, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Idle Behavior\" } }, \"title\": \"Commission\", \"type\": \"object\" }, \"Issue\": { \"properties\": { \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Category of the robot\'s issue\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the issue\", \"title\": \"Detail\" } }, \"title\": \"Issue\", \"type\": \"object\" }, \"Location2D\": { \"properties\": { \"map\": { \"title\": \"Map\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" } }, \"required\": [ \"map\", \"x\", \"y\", \"yaw\" ], \"title\": \"Location2D\", \"type\": \"object\" }, \"MutexGroups\": { \"properties\": { \"locked\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of mutex groups that this robot has currently locked\", \"title\": \"Locked\" }, \"requesting\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of the mutex groups that this robot is currently requesting but has not lockd yet\", \"title\": \"Requesting\" } }, \"title\": \"MutexGroups\", \"type\": \"object\" }, \"RobotState\": { \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A simple token representing the status of the robot\" }, \"task_id\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the task this robot is currently working on. Empty string if the robot is not working on a task.\", \"title\": \"Task Id\" }, \"unix_millis_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Time\" }, \"location\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Location2D\" }, { \"type\": \"null\" } ], \"default\": null }, \"battery\": { \"anyOf\": [ { \"maximum\": 1.0, \"minimum\": 0.0, \"type\": \"number\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"State of charge of the battery. Values range from 0.0 (depleted) to 1.0 (fully charged)\", \"title\": \"Battery\" }, \"issues\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Issue\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of issues with the robot that operators need to address\", \"title\": \"Issues\" }, \"commission\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Commission\" }, { \"type\": \"null\" } ], \"default\": null }, \"mutex_groups\": { \"anyOf\": [ { \"$ref\": \"#/$defs/MutexGroups\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the mutex groups that this robot is interacting with\" } }, \"title\": \"RobotState\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"offline\", \"shutdown\", \"idle\", \"charging\", \"working\", \"error\" ], \"title\": \"Status\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/RobotState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the robots that belong to this fleet\", \"title\": \"Robots\" } }, \"title\": \"FleetState\", \"type\": \"object\" } ``` ### /fleets/{name}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log for the overall fleet\", \"title\": \"Log\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Dictionary of logs for the individual robots. The keys (property names) are the robot names.\", \"title\": \"Robots\" } }, \"title\": \"FleetLog\", \"type\": \"object\" } ``` ### /rios ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"type\": { \"title\": \"Type\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"object\" } }, \"required\": [ \"id\", \"type\", \"data\" ], \"title\": \"Rio\", \"type\": \"object\" } ``` * @summary Socket.io endpoint * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -6867,7 +7221,7 @@ export class DefaultApi extends BaseAPI { } /** - * # NOTE: This endpoint is here for documentation purposes only, this is _not_ a REST endpoint. ## About This exposes a minimal pubsub system built on top of socket.io. It works similar to a normal socket.io endpoint, except that are 2 special rooms which control subscriptions. ## Rooms ### subscribe Clients must send a message to this room to start receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### unsubscribe Clients can send a message to this room to stop receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### /alerts ``` { \"$defs\": { \"Category\": { \"enum\": [ \"default\", \"task\", \"fleet\", \"robot\" ], \"title\": \"Category\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"original_id\": { \"title\": \"Original Id\", \"type\": \"string\" }, \"category\": { \"$ref\": \"#/$defs/Category\" }, \"unix_millis_created_time\": { \"title\": \"Unix Millis Created Time\", \"type\": \"integer\" }, \"acknowledged_by\": { \"title\": \"Acknowledged By\", \"type\": \"string\" }, \"unix_millis_acknowledged_time\": { \"title\": \"Unix Millis Acknowledged Time\", \"type\": \"integer\" } }, \"required\": [ \"id\", \"original_id\", \"category\", \"unix_millis_created_time\", \"acknowledged_by\", \"unix_millis_acknowledged_time\" ], \"title\": \"Alert\", \"type\": \"object\" } ``` ### /beacons ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"online\": { \"title\": \"Online\", \"type\": \"boolean\" }, \"category\": { \"title\": \"Category\", \"type\": \"string\" }, \"activated\": { \"title\": \"Activated\", \"type\": \"boolean\" }, \"level\": { \"title\": \"Level\", \"type\": \"string\" } }, \"required\": [ \"id\", \"online\", \"category\", \"activated\", \"level\" ], \"title\": \"BeaconState\", \"type\": \"object\" } ``` ### /building_map ``` { \"$defs\": { \"AffineImage\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x_offset\": { \"title\": \"X Offset\", \"type\": \"number\" }, \"y_offset\": { \"title\": \"Y Offset\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"scale\": { \"title\": \"Scale\", \"type\": \"number\" }, \"encoding\": { \"title\": \"Encoding\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"string\" } }, \"required\": [ \"name\", \"x_offset\", \"y_offset\", \"yaw\", \"scale\", \"encoding\", \"data\" ], \"title\": \"AffineImage\", \"type\": \"object\" }, \"Door\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"v1_x\": { \"title\": \"V1 X\", \"type\": \"number\" }, \"v1_y\": { \"title\": \"V1 Y\", \"type\": \"number\" }, \"v2_x\": { \"title\": \"V2 X\", \"type\": \"number\" }, \"v2_y\": { \"title\": \"V2 Y\", \"type\": \"number\" }, \"door_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door Type\", \"type\": \"integer\" }, \"motion_range\": { \"title\": \"Motion Range\", \"type\": \"number\" }, \"motion_direction\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Motion Direction\", \"type\": \"integer\" } }, \"required\": [ \"name\", \"v1_x\", \"v1_y\", \"v2_x\", \"v2_y\", \"door_type\", \"motion_range\", \"motion_direction\" ], \"title\": \"Door\", \"type\": \"object\" }, \"Graph\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"vertices\": { \"items\": { \"$ref\": \"#/$defs/GraphNode\" }, \"title\": \"Vertices\", \"type\": \"array\" }, \"edges\": { \"items\": { \"$ref\": \"#/$defs/GraphEdge\" }, \"title\": \"Edges\", \"type\": \"array\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"name\", \"vertices\", \"edges\", \"params\" ], \"title\": \"Graph\", \"type\": \"object\" }, \"GraphEdge\": { \"properties\": { \"v1_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V1 Idx\", \"type\": \"integer\" }, \"v2_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V2 Idx\", \"type\": \"integer\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" }, \"edge_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Edge Type\", \"type\": \"integer\" } }, \"required\": [ \"v1_idx\", \"v2_idx\", \"params\", \"edge_type\" ], \"title\": \"GraphEdge\", \"type\": \"object\" }, \"GraphNode\": { \"properties\": { \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"x\", \"y\", \"name\", \"params\" ], \"title\": \"GraphNode\", \"type\": \"object\" }, \"Level\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"elevation\": { \"title\": \"Elevation\", \"type\": \"number\" }, \"images\": { \"items\": { \"$ref\": \"#/$defs/AffineImage\" }, \"title\": \"Images\", \"type\": \"array\" }, \"places\": { \"items\": { \"$ref\": \"#/$defs/Place\" }, \"title\": \"Places\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"nav_graphs\": { \"items\": { \"$ref\": \"#/$defs/Graph\" }, \"title\": \"Nav Graphs\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" } }, \"required\": [ \"name\", \"elevation\", \"images\", \"places\", \"doors\", \"nav_graphs\", \"wall_graph\" ], \"title\": \"Level\", \"type\": \"object\" }, \"Lift\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"type\": \"string\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" }, \"ref_x\": { \"title\": \"Ref X\", \"type\": \"number\" }, \"ref_y\": { \"title\": \"Ref Y\", \"type\": \"number\" }, \"ref_yaw\": { \"title\": \"Ref Yaw\", \"type\": \"number\" }, \"width\": { \"title\": \"Width\", \"type\": \"number\" }, \"depth\": { \"title\": \"Depth\", \"type\": \"number\" } }, \"required\": [ \"name\", \"levels\", \"doors\", \"wall_graph\", \"ref_x\", \"ref_y\", \"ref_yaw\", \"width\", \"depth\" ], \"title\": \"Lift\", \"type\": \"object\" }, \"Param\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"type\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Type\", \"type\": \"integer\" }, \"value_int\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Value Int\", \"type\": \"integer\" }, \"value_float\": { \"title\": \"Value Float\", \"type\": \"number\" }, \"value_string\": { \"title\": \"Value String\", \"type\": \"string\" }, \"value_bool\": { \"title\": \"Value Bool\", \"type\": \"boolean\" } }, \"required\": [ \"name\", \"type\", \"value_int\", \"value_float\", \"value_string\", \"value_bool\" ], \"title\": \"Param\", \"type\": \"object\" }, \"Place\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"position_tolerance\": { \"title\": \"Position Tolerance\", \"type\": \"number\" }, \"yaw_tolerance\": { \"title\": \"Yaw Tolerance\", \"type\": \"number\" } }, \"required\": [ \"name\", \"x\", \"y\", \"yaw\", \"position_tolerance\", \"yaw_tolerance\" ], \"title\": \"Place\", \"type\": \"object\" } }, \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"$ref\": \"#/$defs/Level\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"lifts\": { \"items\": { \"$ref\": \"#/$defs/Lift\" }, \"title\": \"Lifts\", \"type\": \"array\" } }, \"required\": [ \"name\", \"levels\", \"lifts\" ], \"title\": \"BuildingMap\", \"type\": \"object\" } ``` ### /building_map/fire_alarm_trigger ``` { \"properties\": { \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"trigger\": { \"title\": \"Trigger\", \"type\": \"boolean\" } }, \"required\": [ \"unix_millis_time\", \"trigger\" ], \"title\": \"FireAlarmTriggerState\", \"type\": \"object\" } ``` ### /delivery_alerts ``` { \"$defs\": { \"Action\": { \"enum\": [ \"waiting\", \"cancel\", \"override\", \"resume\" ], \"title\": \"Action\", \"type\": \"string\" }, \"Category\": { \"enum\": [ \"missing\", \"wrong\", \"obstructed\", \"cancelled\" ], \"title\": \"Category\", \"type\": \"string\" }, \"Tier\": { \"enum\": [ \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"category\": { \"$ref\": \"#/$defs/Category\" }, \"tier\": { \"$ref\": \"#/$defs/Tier\" }, \"action\": { \"$ref\": \"#/$defs/Action\" }, \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"message\": { \"title\": \"Message\", \"type\": \"string\" } }, \"required\": [ \"id\", \"category\", \"tier\", \"action\", \"task_id\", \"message\" ], \"title\": \"DeliveryAlert\", \"type\": \"object\" } ``` ### /doors/{door_name}/state ``` { \"$defs\": { \"DoorMode\": { \"properties\": { \"value\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Value\", \"type\": \"integer\" } }, \"required\": [ \"value\" ], \"title\": \"DoorMode\", \"type\": \"object\" }, \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"door_time\": { \"$ref\": \"#/$defs/Time\" }, \"door_name\": { \"title\": \"Door Name\", \"type\": \"string\" }, \"current_mode\": { \"$ref\": \"#/$defs/DoorMode\" } }, \"required\": [ \"door_time\", \"door_name\", \"current_mode\" ], \"title\": \"DoorState\", \"type\": \"object\" } ``` ### /lifts/{lift_name}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"lift_time\": { \"$ref\": \"#/$defs/Time\" }, \"lift_name\": { \"title\": \"Lift Name\", \"type\": \"string\" }, \"available_floors\": { \"items\": { \"type\": \"string\" }, \"title\": \"Available Floors\", \"type\": \"array\" }, \"current_floor\": { \"title\": \"Current Floor\", \"type\": \"string\" }, \"destination_floor\": { \"title\": \"Destination Floor\", \"type\": \"string\" }, \"door_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door State\", \"type\": \"integer\" }, \"motion_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Motion State\", \"type\": \"integer\" }, \"available_modes\": { \"items\": { \"type\": \"integer\" }, \"title\": \"Available Modes\", \"type\": \"array\" }, \"current_mode\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Current Mode\", \"type\": \"integer\" }, \"session_id\": { \"title\": \"Session Id\", \"type\": \"string\" } }, \"required\": [ \"lift_time\", \"lift_name\", \"available_floors\", \"current_floor\", \"destination_floor\", \"door_state\", \"motion_state\", \"available_modes\", \"current_mode\", \"session_id\" ], \"title\": \"LiftState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/state ``` { \"$defs\": { \"AssignedTo\": { \"properties\": { \"group\": { \"title\": \"Group\", \"type\": \"string\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" } }, \"required\": [ \"group\", \"name\" ], \"title\": \"AssignedTo\", \"type\": \"object\" }, \"Assignment\": { \"properties\": { \"fleet_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Fleet Name\" }, \"expected_robot_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Expected Robot Name\" } }, \"title\": \"Assignment\", \"type\": \"object\" }, \"Booking\": { \"properties\": { \"id\": { \"description\": \"The unique identifier for this task\", \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_earliest_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Earliest Start Time\" }, \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Request Time\" }, \"priority\": { \"anyOf\": [ { \"type\": \"object\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Priority information about this task\", \"title\": \"Priority\" }, \"labels\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about how and why this task was booked, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"title\": \"Labels\" }, \"requester\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"(Optional) An identifier for the entity that requested this task\", \"title\": \"Requester\" } }, \"required\": [ \"id\" ], \"title\": \"Booking\", \"type\": \"object\" }, \"Cancellation\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the cancel request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Cancellation\", \"type\": \"object\" }, \"Category\": { \"description\": \"The category of this task or phase\", \"title\": \"Category\", \"type\": \"string\" }, \"Detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" } ], \"description\": \"Detailed information about a task, phase, or event\", \"title\": \"Detail\" }, \"Dispatch\": { \"properties\": { \"status\": { \"$ref\": \"#/$defs/Status2\" }, \"assignment\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Assignment\" }, { \"type\": \"null\" } ], \"default\": null }, \"errors\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Error\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Errors\" } }, \"required\": [ \"status\" ], \"title\": \"Dispatch\", \"type\": \"object\" }, \"Error\": { \"properties\": { \"code\": { \"anyOf\": [ { \"minimum\": 0, \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A standard code for the kind of error that has occurred\", \"title\": \"Code\" }, \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The category of the error\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Details about the error\", \"title\": \"Detail\" } }, \"title\": \"Error\", \"type\": \"object\" }, \"EstimateMillis\": { \"description\": \"An estimate, in milliseconds, of how long the subject will take to complete\", \"minimum\": 0, \"title\": \"EstimateMillis\", \"type\": \"integer\" }, \"EventState\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The brief name of the event\", \"title\": \"Name\" }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the event\" }, \"deps\": { \"anyOf\": [ { \"items\": { \"minimum\": 0, \"type\": \"integer\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"This event may depend on other events. This array contains the IDs of those other event dependencies.\", \"title\": \"Deps\" } }, \"required\": [ \"id\" ], \"title\": \"EventState\", \"type\": \"object\" }, \"Id\": { \"minimum\": 0, \"title\": \"Id\", \"type\": \"integer\" }, \"Interruption\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the interruption request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the interruption, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"resumed_by\": { \"anyOf\": [ { \"$ref\": \"#/$defs/ResumedBy\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the resume request that ended this interruption. This field will be missing if the interruption is still active.\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Interruption\", \"type\": \"object\" }, \"Killed\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the kill request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Killed\", \"type\": \"object\" }, \"Phase\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"final_event_id\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/EventState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of events for this phase. The keys (property names) are the event IDs, which are integers.\", \"title\": \"Events\" }, \"skip_requests\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/SkipPhaseRequest\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about any skip requests that have been received\", \"title\": \"Skip Requests\" } }, \"required\": [ \"id\" ], \"title\": \"Phase\", \"type\": \"object\" }, \"ResumedBy\": { \"properties\": { \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The time that the resume request arrived\", \"title\": \"Unix Millis Request Time\" }, \"labels\": { \"description\": \"Labels to describe the resume request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"labels\" ], \"title\": \"ResumedBy\", \"type\": \"object\" }, \"SkipPhaseRequest\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"undo\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Undo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about an undo skip request that applied to this request\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"SkipPhaseRequest\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"blocked\", \"error\", \"failed\", \"queued\", \"standby\", \"underway\", \"delayed\", \"skipped\", \"canceled\", \"killed\", \"completed\" ], \"title\": \"Status\", \"type\": \"string\" }, \"Status2\": { \"enum\": [ \"queued\", \"selected\", \"dispatched\", \"failed_to_assign\", \"canceled_in_flight\" ], \"title\": \"Status2\", \"type\": \"string\" }, \"Undo\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the undo skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the undo skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Undo\", \"type\": \"object\" } }, \"properties\": { \"booking\": { \"$ref\": \"#/$defs/Booking\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"assigned_to\": { \"anyOf\": [ { \"$ref\": \"#/$defs/AssignedTo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Which agent (robot) is the task assigned to\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"dispatch\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Dispatch\" }, { \"type\": \"null\" } ], \"default\": null }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phase\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the phases of the task. The keys (property names) are phase IDs, which are integers.\", \"title\": \"Phases\" }, \"completed\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the IDs of completed phases of this task\", \"title\": \"Completed\" }, \"active\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the active phase for this task\" }, \"pending\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the pending phases of this task\", \"title\": \"Pending\" }, \"interruptions\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Interruption\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of interruptions that have been applied to this task. The keys (property names) are the unique token of the interruption request.\", \"title\": \"Interruptions\" }, \"cancellation\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Cancellation\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was cancelled, this will describe information about the request.\" }, \"killed\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Killed\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was killed, this will describe information about the request.\" } }, \"required\": [ \"booking\" ], \"title\": \"TaskState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Phases\": { \"additionalProperties\": false, \"properties\": { \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall phase\", \"title\": \"Log\" }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of an event in the phase\", \"title\": \"Events\" } }, \"title\": \"Phases\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"additionalProperties\": false, \"properties\": { \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall task\", \"title\": \"Log\" }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phases\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of a phase\", \"title\": \"Phases\" } }, \"required\": [ \"task_id\" ], \"title\": \"TaskEventLog\", \"type\": \"object\" } ``` ### /dispensers/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"DispenserState\", \"type\": \"object\" } ``` ### /ingestors/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"IngestorState\", \"type\": \"object\" } ``` ### /fleets/{name}/state ``` { \"$defs\": { \"Commission\": { \"properties\": { \"dispatch_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept dispatched tasks, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Dispatch Tasks\" }, \"direct_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept direct task requests, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Direct Tasks\" }, \"idle_behavior\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot perform its idle behavior, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Idle Behavior\" } }, \"title\": \"Commission\", \"type\": \"object\" }, \"Issue\": { \"properties\": { \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Category of the robot\'s issue\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the issue\", \"title\": \"Detail\" } }, \"title\": \"Issue\", \"type\": \"object\" }, \"Location2D\": { \"properties\": { \"map\": { \"title\": \"Map\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" } }, \"required\": [ \"map\", \"x\", \"y\", \"yaw\" ], \"title\": \"Location2D\", \"type\": \"object\" }, \"MutexGroups\": { \"properties\": { \"locked\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of mutex groups that this robot has currently locked\", \"title\": \"Locked\" }, \"requesting\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of the mutex groups that this robot is currently requesting but has not lockd yet\", \"title\": \"Requesting\" } }, \"title\": \"MutexGroups\", \"type\": \"object\" }, \"RobotState\": { \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A simple token representing the status of the robot\" }, \"task_id\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the task this robot is currently working on. Empty string if the robot is not working on a task.\", \"title\": \"Task Id\" }, \"unix_millis_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Time\" }, \"location\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Location2D\" }, { \"type\": \"null\" } ], \"default\": null }, \"battery\": { \"anyOf\": [ { \"maximum\": 1.0, \"minimum\": 0.0, \"type\": \"number\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"State of charge of the battery. Values range from 0.0 (depleted) to 1.0 (fully charged)\", \"title\": \"Battery\" }, \"issues\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Issue\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of issues with the robot that operators need to address\", \"title\": \"Issues\" }, \"commission\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Commission\" }, { \"type\": \"null\" } ], \"default\": null }, \"mutex_groups\": { \"anyOf\": [ { \"$ref\": \"#/$defs/MutexGroups\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the mutex groups that this robot is interacting with\" } }, \"title\": \"RobotState\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"offline\", \"shutdown\", \"idle\", \"charging\", \"working\", \"error\" ], \"title\": \"Status\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/RobotState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the robots that belong to this fleet\", \"title\": \"Robots\" } }, \"title\": \"FleetState\", \"type\": \"object\" } ``` ### /fleets/{name}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log for the overall fleet\", \"title\": \"Log\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Dictionary of logs for the individual robots. The keys (property names) are the robot names.\", \"title\": \"Robots\" } }, \"title\": \"FleetLog\", \"type\": \"object\" } ``` ### /rios ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"type\": { \"title\": \"Type\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"object\" } }, \"required\": [ \"id\", \"type\", \"data\" ], \"title\": \"Rio\", \"type\": \"object\" } ``` + * # NOTE: This endpoint is here for documentation purposes only, this is _not_ a REST endpoint. ## About This exposes a minimal pubsub system built on top of socket.io. It works similar to a normal socket.io endpoint, except that are 2 special rooms which control subscriptions. ## Rooms ### subscribe Clients must send a message to this room to start receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### unsubscribe Clients can send a message to this room to stop receiving messages on other rooms. The message must be of the form: ``` { \"room\": \"\" } ``` ### /alerts/requests ``` { \"$defs\": { \"AlertParameter\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"value\": { \"title\": \"Value\", \"type\": \"string\" } }, \"required\": [ \"name\", \"value\" ], \"title\": \"AlertParameter\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_alert_time\": { \"title\": \"Unix Millis Alert Time\", \"type\": \"integer\" }, \"title\": { \"title\": \"Title\", \"type\": \"string\" }, \"subtitle\": { \"title\": \"Subtitle\", \"type\": \"string\" }, \"message\": { \"title\": \"Message\", \"type\": \"string\" }, \"display\": { \"title\": \"Display\", \"type\": \"boolean\" }, \"tier\": { \"$ref\": \"#/$defs/Tier\" }, \"responses_available\": { \"items\": { \"type\": \"string\" }, \"title\": \"Responses Available\", \"type\": \"array\" }, \"alert_parameters\": { \"items\": { \"$ref\": \"#/$defs/AlertParameter\" }, \"title\": \"Alert Parameters\", \"type\": \"array\" }, \"task_id\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"title\": \"Task Id\" } }, \"required\": [ \"id\", \"unix_millis_alert_time\", \"title\", \"subtitle\", \"message\", \"display\", \"tier\", \"responses_available\", \"alert_parameters\", \"task_id\" ], \"title\": \"AlertRequest\", \"type\": \"object\" } ``` ### /alerts/responses ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_response_time\": { \"title\": \"Unix Millis Response Time\", \"type\": \"integer\" }, \"response\": { \"title\": \"Response\", \"type\": \"string\" } }, \"required\": [ \"id\", \"unix_millis_response_time\", \"response\" ], \"title\": \"AlertResponse\", \"type\": \"object\" } ``` ### /beacons ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"online\": { \"title\": \"Online\", \"type\": \"boolean\" }, \"category\": { \"title\": \"Category\", \"type\": \"string\" }, \"activated\": { \"title\": \"Activated\", \"type\": \"boolean\" }, \"level\": { \"title\": \"Level\", \"type\": \"string\" } }, \"required\": [ \"id\", \"online\", \"category\", \"activated\", \"level\" ], \"title\": \"BeaconState\", \"type\": \"object\" } ``` ### /building_map ``` { \"$defs\": { \"AffineImage\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x_offset\": { \"title\": \"X Offset\", \"type\": \"number\" }, \"y_offset\": { \"title\": \"Y Offset\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"scale\": { \"title\": \"Scale\", \"type\": \"number\" }, \"encoding\": { \"title\": \"Encoding\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"string\" } }, \"required\": [ \"name\", \"x_offset\", \"y_offset\", \"yaw\", \"scale\", \"encoding\", \"data\" ], \"title\": \"AffineImage\", \"type\": \"object\" }, \"Door\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"v1_x\": { \"title\": \"V1 X\", \"type\": \"number\" }, \"v1_y\": { \"title\": \"V1 Y\", \"type\": \"number\" }, \"v2_x\": { \"title\": \"V2 X\", \"type\": \"number\" }, \"v2_y\": { \"title\": \"V2 Y\", \"type\": \"number\" }, \"door_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door Type\", \"type\": \"integer\" }, \"motion_range\": { \"title\": \"Motion Range\", \"type\": \"number\" }, \"motion_direction\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Motion Direction\", \"type\": \"integer\" } }, \"required\": [ \"name\", \"v1_x\", \"v1_y\", \"v2_x\", \"v2_y\", \"door_type\", \"motion_range\", \"motion_direction\" ], \"title\": \"Door\", \"type\": \"object\" }, \"Graph\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"vertices\": { \"items\": { \"$ref\": \"#/$defs/GraphNode\" }, \"title\": \"Vertices\", \"type\": \"array\" }, \"edges\": { \"items\": { \"$ref\": \"#/$defs/GraphEdge\" }, \"title\": \"Edges\", \"type\": \"array\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"name\", \"vertices\", \"edges\", \"params\" ], \"title\": \"Graph\", \"type\": \"object\" }, \"GraphEdge\": { \"properties\": { \"v1_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V1 Idx\", \"type\": \"integer\" }, \"v2_idx\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"V2 Idx\", \"type\": \"integer\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" }, \"edge_type\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Edge Type\", \"type\": \"integer\" } }, \"required\": [ \"v1_idx\", \"v2_idx\", \"params\", \"edge_type\" ], \"title\": \"GraphEdge\", \"type\": \"object\" }, \"GraphNode\": { \"properties\": { \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"params\": { \"items\": { \"$ref\": \"#/$defs/Param\" }, \"title\": \"Params\", \"type\": \"array\" } }, \"required\": [ \"x\", \"y\", \"name\", \"params\" ], \"title\": \"GraphNode\", \"type\": \"object\" }, \"Level\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"elevation\": { \"title\": \"Elevation\", \"type\": \"number\" }, \"images\": { \"items\": { \"$ref\": \"#/$defs/AffineImage\" }, \"title\": \"Images\", \"type\": \"array\" }, \"places\": { \"items\": { \"$ref\": \"#/$defs/Place\" }, \"title\": \"Places\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"nav_graphs\": { \"items\": { \"$ref\": \"#/$defs/Graph\" }, \"title\": \"Nav Graphs\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" } }, \"required\": [ \"name\", \"elevation\", \"images\", \"places\", \"doors\", \"nav_graphs\", \"wall_graph\" ], \"title\": \"Level\", \"type\": \"object\" }, \"Lift\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"type\": \"string\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"doors\": { \"items\": { \"$ref\": \"#/$defs/Door\" }, \"title\": \"Doors\", \"type\": \"array\" }, \"wall_graph\": { \"$ref\": \"#/$defs/Graph\" }, \"ref_x\": { \"title\": \"Ref X\", \"type\": \"number\" }, \"ref_y\": { \"title\": \"Ref Y\", \"type\": \"number\" }, \"ref_yaw\": { \"title\": \"Ref Yaw\", \"type\": \"number\" }, \"width\": { \"title\": \"Width\", \"type\": \"number\" }, \"depth\": { \"title\": \"Depth\", \"type\": \"number\" } }, \"required\": [ \"name\", \"levels\", \"doors\", \"wall_graph\", \"ref_x\", \"ref_y\", \"ref_yaw\", \"width\", \"depth\" ], \"title\": \"Lift\", \"type\": \"object\" }, \"Param\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"type\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Type\", \"type\": \"integer\" }, \"value_int\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Value Int\", \"type\": \"integer\" }, \"value_float\": { \"title\": \"Value Float\", \"type\": \"number\" }, \"value_string\": { \"title\": \"Value String\", \"type\": \"string\" }, \"value_bool\": { \"title\": \"Value Bool\", \"type\": \"boolean\" } }, \"required\": [ \"name\", \"type\", \"value_int\", \"value_float\", \"value_string\", \"value_bool\" ], \"title\": \"Param\", \"type\": \"object\" }, \"Place\": { \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" }, \"position_tolerance\": { \"title\": \"Position Tolerance\", \"type\": \"number\" }, \"yaw_tolerance\": { \"title\": \"Yaw Tolerance\", \"type\": \"number\" } }, \"required\": [ \"name\", \"x\", \"y\", \"yaw\", \"position_tolerance\", \"yaw_tolerance\" ], \"title\": \"Place\", \"type\": \"object\" } }, \"properties\": { \"name\": { \"title\": \"Name\", \"type\": \"string\" }, \"levels\": { \"items\": { \"$ref\": \"#/$defs/Level\" }, \"title\": \"Levels\", \"type\": \"array\" }, \"lifts\": { \"items\": { \"$ref\": \"#/$defs/Lift\" }, \"title\": \"Lifts\", \"type\": \"array\" } }, \"required\": [ \"name\", \"levels\", \"lifts\" ], \"title\": \"BuildingMap\", \"type\": \"object\" } ``` ### /building_map/fire_alarm_trigger ``` { \"properties\": { \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"trigger\": { \"title\": \"Trigger\", \"type\": \"boolean\" } }, \"required\": [ \"unix_millis_time\", \"trigger\" ], \"title\": \"FireAlarmTriggerState\", \"type\": \"object\" } ``` ### /delivery_alerts ``` { \"$defs\": { \"Action\": { \"enum\": [ \"waiting\", \"cancel\", \"override\", \"resume\" ], \"title\": \"Action\", \"type\": \"string\" }, \"Category\": { \"enum\": [ \"missing\", \"wrong\", \"obstructed\", \"cancelled\" ], \"title\": \"Category\", \"type\": \"string\" }, \"Tier\": { \"enum\": [ \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"category\": { \"$ref\": \"#/$defs/Category\" }, \"tier\": { \"$ref\": \"#/$defs/Tier\" }, \"action\": { \"$ref\": \"#/$defs/Action\" }, \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"message\": { \"title\": \"Message\", \"type\": \"string\" } }, \"required\": [ \"id\", \"category\", \"tier\", \"action\", \"task_id\", \"message\" ], \"title\": \"DeliveryAlert\", \"type\": \"object\" } ``` ### /doors/{door_name}/state ``` { \"$defs\": { \"DoorMode\": { \"properties\": { \"value\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Value\", \"type\": \"integer\" } }, \"required\": [ \"value\" ], \"title\": \"DoorMode\", \"type\": \"object\" }, \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"door_time\": { \"$ref\": \"#/$defs/Time\" }, \"door_name\": { \"title\": \"Door Name\", \"type\": \"string\" }, \"current_mode\": { \"$ref\": \"#/$defs/DoorMode\" } }, \"required\": [ \"door_time\", \"door_name\", \"current_mode\" ], \"title\": \"DoorState\", \"type\": \"object\" } ``` ### /lifts/{lift_name}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"lift_time\": { \"$ref\": \"#/$defs/Time\" }, \"lift_name\": { \"title\": \"Lift Name\", \"type\": \"string\" }, \"available_floors\": { \"items\": { \"type\": \"string\" }, \"title\": \"Available Floors\", \"type\": \"array\" }, \"current_floor\": { \"title\": \"Current Floor\", \"type\": \"string\" }, \"destination_floor\": { \"title\": \"Destination Floor\", \"type\": \"string\" }, \"door_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Door State\", \"type\": \"integer\" }, \"motion_state\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Motion State\", \"type\": \"integer\" }, \"available_modes\": { \"items\": { \"type\": \"integer\" }, \"title\": \"Available Modes\", \"type\": \"array\" }, \"current_mode\": { \"maximum\": 255, \"minimum\": 0, \"title\": \"Current Mode\", \"type\": \"integer\" }, \"session_id\": { \"title\": \"Session Id\", \"type\": \"string\" } }, \"required\": [ \"lift_time\", \"lift_name\", \"available_floors\", \"current_floor\", \"destination_floor\", \"door_state\", \"motion_state\", \"available_modes\", \"current_mode\", \"session_id\" ], \"title\": \"LiftState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/state ``` { \"$defs\": { \"AssignedTo\": { \"properties\": { \"group\": { \"title\": \"Group\", \"type\": \"string\" }, \"name\": { \"title\": \"Name\", \"type\": \"string\" } }, \"required\": [ \"group\", \"name\" ], \"title\": \"AssignedTo\", \"type\": \"object\" }, \"Assignment\": { \"properties\": { \"fleet_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Fleet Name\" }, \"expected_robot_name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Expected Robot Name\" } }, \"title\": \"Assignment\", \"type\": \"object\" }, \"Booking\": { \"properties\": { \"id\": { \"description\": \"The unique identifier for this task\", \"title\": \"Id\", \"type\": \"string\" }, \"unix_millis_earliest_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Earliest Start Time\" }, \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Request Time\" }, \"priority\": { \"anyOf\": [ { \"type\": \"object\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Priority information about this task\", \"title\": \"Priority\" }, \"labels\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about how and why this task was booked, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"title\": \"Labels\" }, \"requester\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"(Optional) An identifier for the entity that requested this task\", \"title\": \"Requester\" } }, \"required\": [ \"id\" ], \"title\": \"Booking\", \"type\": \"object\" }, \"Cancellation\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the cancel request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Cancellation\", \"type\": \"object\" }, \"Category\": { \"description\": \"The category of this task or phase\", \"title\": \"Category\", \"type\": \"string\" }, \"Detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" } ], \"description\": \"Detailed information about a task, phase, or event\", \"title\": \"Detail\" }, \"Dispatch\": { \"properties\": { \"status\": { \"$ref\": \"#/$defs/Status2\" }, \"assignment\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Assignment\" }, { \"type\": \"null\" } ], \"default\": null }, \"errors\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Error\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Errors\" } }, \"required\": [ \"status\" ], \"title\": \"Dispatch\", \"type\": \"object\" }, \"Error\": { \"properties\": { \"code\": { \"anyOf\": [ { \"minimum\": 0, \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A standard code for the kind of error that has occurred\", \"title\": \"Code\" }, \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The category of the error\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Details about the error\", \"title\": \"Detail\" } }, \"title\": \"Error\", \"type\": \"object\" }, \"EstimateMillis\": { \"description\": \"An estimate, in milliseconds, of how long the subject will take to complete\", \"minimum\": 0, \"title\": \"EstimateMillis\", \"type\": \"integer\" }, \"EventState\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The brief name of the event\", \"title\": \"Name\" }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the event\" }, \"deps\": { \"anyOf\": [ { \"items\": { \"minimum\": 0, \"type\": \"integer\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"This event may depend on other events. This array contains the IDs of those other event dependencies.\", \"title\": \"Deps\" } }, \"required\": [ \"id\" ], \"title\": \"EventState\", \"type\": \"object\" }, \"Id\": { \"minimum\": 0, \"title\": \"Id\", \"type\": \"integer\" }, \"Interruption\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the interruption request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the interruption, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"resumed_by\": { \"anyOf\": [ { \"$ref\": \"#/$defs/ResumedBy\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the resume request that ended this interruption. This field will be missing if the interruption is still active.\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Interruption\", \"type\": \"object\" }, \"Killed\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the cancellation request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the kill request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Killed\", \"type\": \"object\" }, \"Phase\": { \"properties\": { \"id\": { \"$ref\": \"#/$defs/Id\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"final_event_id\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/EventState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of events for this phase. The keys (property names) are the event IDs, which are integers.\", \"title\": \"Events\" }, \"skip_requests\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/SkipPhaseRequest\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about any skip requests that have been received\", \"title\": \"Skip Requests\" } }, \"required\": [ \"id\" ], \"title\": \"Phase\", \"type\": \"object\" }, \"ResumedBy\": { \"properties\": { \"unix_millis_request_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The time that the resume request arrived\", \"title\": \"Unix Millis Request Time\" }, \"labels\": { \"description\": \"Labels to describe the resume request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"labels\" ], \"title\": \"ResumedBy\", \"type\": \"object\" }, \"SkipPhaseRequest\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the purpose of the skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" }, \"undo\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Undo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about an undo skip request that applied to this request\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"SkipPhaseRequest\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"blocked\", \"error\", \"failed\", \"queued\", \"standby\", \"underway\", \"delayed\", \"skipped\", \"canceled\", \"killed\", \"completed\" ], \"title\": \"Status\", \"type\": \"string\" }, \"Status2\": { \"enum\": [ \"queued\", \"selected\", \"dispatched\", \"failed_to_assign\", \"canceled_in_flight\" ], \"title\": \"Status2\", \"type\": \"string\" }, \"Undo\": { \"properties\": { \"unix_millis_request_time\": { \"description\": \"The time that the undo skip request arrived\", \"title\": \"Unix Millis Request Time\", \"type\": \"integer\" }, \"labels\": { \"description\": \"Labels to describe the undo skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.\", \"items\": { \"type\": \"string\" }, \"title\": \"Labels\", \"type\": \"array\" } }, \"required\": [ \"unix_millis_request_time\", \"labels\" ], \"title\": \"Undo\", \"type\": \"object\" } }, \"properties\": { \"booking\": { \"$ref\": \"#/$defs/Booking\" }, \"category\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Category\" }, { \"type\": \"null\" } ], \"default\": null }, \"detail\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Detail\" }, { \"type\": \"null\" } ], \"default\": null }, \"unix_millis_start_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Start Time\" }, \"unix_millis_finish_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Finish Time\" }, \"original_estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"estimate_millis\": { \"anyOf\": [ { \"$ref\": \"#/$defs/EstimateMillis\" }, { \"type\": \"null\" } ], \"default\": null }, \"assigned_to\": { \"anyOf\": [ { \"$ref\": \"#/$defs/AssignedTo\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Which agent (robot) is the task assigned to\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null }, \"dispatch\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Dispatch\" }, { \"type\": \"null\" } ], \"default\": null }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phase\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the phases of the task. The keys (property names) are phase IDs, which are integers.\", \"title\": \"Phases\" }, \"completed\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the IDs of completed phases of this task\", \"title\": \"Completed\" }, \"active\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Id\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the active phase for this task\" }, \"pending\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Id\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"An array of the pending phases of this task\", \"title\": \"Pending\" }, \"interruptions\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Interruption\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of interruptions that have been applied to this task. The keys (property names) are the unique token of the interruption request.\", \"title\": \"Interruptions\" }, \"cancellation\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Cancellation\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was cancelled, this will describe information about the request.\" }, \"killed\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Killed\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"If the task was killed, this will describe information about the request.\" } }, \"required\": [ \"booking\" ], \"title\": \"TaskState\", \"type\": \"object\" } ``` ### /tasks/{task_id}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Phases\": { \"additionalProperties\": false, \"properties\": { \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall phase\", \"title\": \"Log\" }, \"events\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of an event in the phase\", \"title\": \"Events\" } }, \"title\": \"Phases\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"additionalProperties\": false, \"properties\": { \"task_id\": { \"title\": \"Task Id\", \"type\": \"string\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log entries related to the overall task\", \"title\": \"Log\" }, \"phases\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/Phases\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary whose keys (property names) are the indices of a phase\", \"title\": \"Phases\" } }, \"required\": [ \"task_id\" ], \"title\": \"TaskEventLog\", \"type\": \"object\" } ``` ### /dispensers/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"DispenserState\", \"type\": \"object\" } ``` ### /ingestors/{guid}/state ``` { \"$defs\": { \"Time\": { \"properties\": { \"sec\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Sec\", \"type\": \"integer\" }, \"nanosec\": { \"maximum\": 4294967295, \"minimum\": 0, \"title\": \"Nanosec\", \"type\": \"integer\" } }, \"required\": [ \"sec\", \"nanosec\" ], \"title\": \"Time\", \"type\": \"object\" } }, \"properties\": { \"time\": { \"$ref\": \"#/$defs/Time\" }, \"guid\": { \"title\": \"Guid\", \"type\": \"string\" }, \"mode\": { \"maximum\": 2147483647, \"minimum\": -2147483648, \"title\": \"Mode\", \"type\": \"integer\" }, \"request_guid_queue\": { \"items\": { \"type\": \"string\" }, \"title\": \"Request Guid Queue\", \"type\": \"array\" }, \"seconds_remaining\": { \"title\": \"Seconds Remaining\", \"type\": \"number\" } }, \"required\": [ \"time\", \"guid\", \"mode\", \"request_guid_queue\", \"seconds_remaining\" ], \"title\": \"IngestorState\", \"type\": \"object\" } ``` ### /fleets/{name}/state ``` { \"$defs\": { \"Commission\": { \"properties\": { \"dispatch_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept dispatched tasks, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Dispatch Tasks\" }, \"direct_tasks\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot accept direct task requests, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Direct Tasks\" }, \"idle_behavior\": { \"anyOf\": [ { \"type\": \"boolean\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Should the robot perform its idle behavior, true/false. When used in a request, leave this unset to not change the robot\'s current value.\", \"title\": \"Idle Behavior\" } }, \"title\": \"Commission\", \"type\": \"object\" }, \"Issue\": { \"properties\": { \"category\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Category of the robot\'s issue\", \"title\": \"Category\" }, \"detail\": { \"anyOf\": [ { \"type\": \"object\" }, { \"items\": {}, \"type\": \"array\" }, { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Detailed information about the issue\", \"title\": \"Detail\" } }, \"title\": \"Issue\", \"type\": \"object\" }, \"Location2D\": { \"properties\": { \"map\": { \"title\": \"Map\", \"type\": \"string\" }, \"x\": { \"title\": \"X\", \"type\": \"number\" }, \"y\": { \"title\": \"Y\", \"type\": \"number\" }, \"yaw\": { \"title\": \"Yaw\", \"type\": \"number\" } }, \"required\": [ \"map\", \"x\", \"y\", \"yaw\" ], \"title\": \"Location2D\", \"type\": \"object\" }, \"MutexGroups\": { \"properties\": { \"locked\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of mutex groups that this robot has currently locked\", \"title\": \"Locked\" }, \"requesting\": { \"anyOf\": [ { \"items\": { \"type\": \"string\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of the mutex groups that this robot is currently requesting but has not lockd yet\", \"title\": \"Requesting\" } }, \"title\": \"MutexGroups\", \"type\": \"object\" }, \"RobotState\": { \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"status\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Status\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A simple token representing the status of the robot\" }, \"task_id\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"The ID of the task this robot is currently working on. Empty string if the robot is not working on a task.\", \"title\": \"Task Id\" }, \"unix_millis_time\": { \"anyOf\": [ { \"type\": \"integer\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Unix Millis Time\" }, \"location\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Location2D\" }, { \"type\": \"null\" } ], \"default\": null }, \"battery\": { \"anyOf\": [ { \"maximum\": 1.0, \"minimum\": 0.0, \"type\": \"number\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"State of charge of the battery. Values range from 0.0 (depleted) to 1.0 (fully charged)\", \"title\": \"Battery\" }, \"issues\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/Issue\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A list of issues with the robot that operators need to address\", \"title\": \"Issues\" }, \"commission\": { \"anyOf\": [ { \"$ref\": \"#/$defs/Commission\" }, { \"type\": \"null\" } ], \"default\": null }, \"mutex_groups\": { \"anyOf\": [ { \"$ref\": \"#/$defs/MutexGroups\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Information about the mutex groups that this robot is interacting with\" } }, \"title\": \"RobotState\", \"type\": \"object\" }, \"Status\": { \"enum\": [ \"uninitialized\", \"offline\", \"shutdown\", \"idle\", \"charging\", \"working\", \"error\" ], \"title\": \"Status\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"$ref\": \"#/$defs/RobotState\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"A dictionary of the states of the robots that belong to this fleet\", \"title\": \"Robots\" } }, \"title\": \"FleetState\", \"type\": \"object\" } ``` ### /fleets/{name}/log ``` { \"$defs\": { \"LogEntry\": { \"properties\": { \"seq\": { \"description\": \"Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.\", \"exclusiveMaximum\": 4294967296, \"minimum\": 0, \"title\": \"Seq\", \"type\": \"integer\" }, \"tier\": { \"allOf\": [ { \"$ref\": \"#/$defs/Tier\" } ], \"description\": \"The importance level of the log entry\" }, \"unix_millis_time\": { \"title\": \"Unix Millis Time\", \"type\": \"integer\" }, \"text\": { \"description\": \"The text of the log entry\", \"title\": \"Text\", \"type\": \"string\" } }, \"required\": [ \"seq\", \"tier\", \"unix_millis_time\", \"text\" ], \"title\": \"LogEntry\", \"type\": \"object\" }, \"Tier\": { \"enum\": [ \"uninitialized\", \"info\", \"warning\", \"error\" ], \"title\": \"Tier\", \"type\": \"string\" } }, \"properties\": { \"name\": { \"anyOf\": [ { \"type\": \"string\" }, { \"type\": \"null\" } ], \"default\": null, \"title\": \"Name\" }, \"log\": { \"anyOf\": [ { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Log for the overall fleet\", \"title\": \"Log\" }, \"robots\": { \"anyOf\": [ { \"additionalProperties\": { \"items\": { \"$ref\": \"#/$defs/LogEntry\" }, \"type\": \"array\" }, \"type\": \"object\" }, { \"type\": \"null\" } ], \"default\": null, \"description\": \"Dictionary of logs for the individual robots. The keys (property names) are the robot names.\", \"title\": \"Robots\" } }, \"title\": \"FleetLog\", \"type\": \"object\" } ``` ### /rios ``` { \"properties\": { \"id\": { \"title\": \"Id\", \"type\": \"string\" }, \"type\": { \"title\": \"Type\", \"type\": \"string\" }, \"data\": { \"title\": \"Data\", \"type\": \"object\" } }, \"required\": [ \"id\", \"type\", \"data\" ], \"title\": \"Rio\", \"type\": \"object\" } ``` * @summary Socket.io endpoint * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -6891,7 +7245,7 @@ export const DeliveryAlertsApiAxiosParamCreator = function (configuration?: Conf * @summary Respond To Delivery Alert * @param {string} deliveryAlertId * @param {ApiServerModelsDeliveryAlertsDeliveryAlertCategory} category - * @param {TierInput} tier + * @param {ApiServerModelsDeliveryAlertsDeliveryAlertTier} tier * @param {string} taskId * @param {Action} action * @param {string} message @@ -6902,7 +7256,7 @@ export const DeliveryAlertsApiAxiosParamCreator = function (configuration?: Conf respondToDeliveryAlertDeliveryAlertsDeliveryAlertIdResponsePost: async ( deliveryAlertId: string, category: ApiServerModelsDeliveryAlertsDeliveryAlertCategory, - tier: TierInput, + tier: ApiServerModelsDeliveryAlertsDeliveryAlertTier, taskId: string, action: Action, message: string, @@ -7012,7 +7366,7 @@ export const DeliveryAlertsApiFp = function (configuration?: Configuration) { * @summary Respond To Delivery Alert * @param {string} deliveryAlertId * @param {ApiServerModelsDeliveryAlertsDeliveryAlertCategory} category - * @param {TierInput} tier + * @param {ApiServerModelsDeliveryAlertsDeliveryAlertTier} tier * @param {string} taskId * @param {Action} action * @param {string} message @@ -7023,7 +7377,7 @@ export const DeliveryAlertsApiFp = function (configuration?: Configuration) { async respondToDeliveryAlertDeliveryAlertsDeliveryAlertIdResponsePost( deliveryAlertId: string, category: ApiServerModelsDeliveryAlertsDeliveryAlertCategory, - tier: TierInput, + tier: ApiServerModelsDeliveryAlertsDeliveryAlertTier, taskId: string, action: Action, message: string, @@ -7073,7 +7427,7 @@ export const DeliveryAlertsApiFactory = function ( * @summary Respond To Delivery Alert * @param {string} deliveryAlertId * @param {ApiServerModelsDeliveryAlertsDeliveryAlertCategory} category - * @param {TierInput} tier + * @param {ApiServerModelsDeliveryAlertsDeliveryAlertTier} tier * @param {string} taskId * @param {Action} action * @param {string} message @@ -7084,7 +7438,7 @@ export const DeliveryAlertsApiFactory = function ( respondToDeliveryAlertDeliveryAlertsDeliveryAlertIdResponsePost( deliveryAlertId: string, category: ApiServerModelsDeliveryAlertsDeliveryAlertCategory, - tier: TierInput, + tier: ApiServerModelsDeliveryAlertsDeliveryAlertTier, taskId: string, action: Action, message: string, @@ -7119,7 +7473,7 @@ export class DeliveryAlertsApi extends BaseAPI { * @summary Respond To Delivery Alert * @param {string} deliveryAlertId * @param {ApiServerModelsDeliveryAlertsDeliveryAlertCategory} category - * @param {TierInput} tier + * @param {ApiServerModelsDeliveryAlertsDeliveryAlertTier} tier * @param {string} taskId * @param {Action} action * @param {string} message @@ -7131,7 +7485,7 @@ export class DeliveryAlertsApi extends BaseAPI { public respondToDeliveryAlertDeliveryAlertsDeliveryAlertIdResponsePost( deliveryAlertId: string, category: ApiServerModelsDeliveryAlertsDeliveryAlertCategory, - tier: TierInput, + tier: ApiServerModelsDeliveryAlertsDeliveryAlertTier, taskId: string, action: Action, message: string, diff --git a/packages/api-client/lib/version.ts b/packages/api-client/lib/version.ts index 94ff8a57a..9a17f2331 100644 --- a/packages/api-client/lib/version.ts +++ b/packages/api-client/lib/version.ts @@ -1,5 +1,5 @@ // THIS FILE IS GENERATED export const version = { - rmfServer: '2f1a0d0c2bd132af390cb038f93c8a7579a91e44', + rmfServer: 'e75e4d86e9acf309755c9274e424e355fe584c5c', openapiGenerator: '', }; diff --git a/packages/api-client/schema/index.ts b/packages/api-client/schema/index.ts index a9a0c8aa0..a69d741d5 100644 --- a/packages/api-client/schema/index.ts +++ b/packages/api-client/schema/index.ts @@ -6,7 +6,7 @@ export default { get: { summary: 'Socket.io endpoint', description: - '# NOTE: This endpoint is here for documentation purposes only, this is _not_ a REST endpoint.\n\n## About\nThis exposes a minimal pubsub system built on top of socket.io.\nIt works similar to a normal socket.io endpoint, except that are 2 special\nrooms which control subscriptions.\n\n## Rooms\n### subscribe\nClients must send a message to this room to start receiving messages on other rooms.\nThe message must be of the form:\n\n```\n{\n "room": ""\n}\n```\n\n### unsubscribe\nClients can send a message to this room to stop receiving messages on other rooms.\nThe message must be of the form:\n\n```\n{\n "room": ""\n}\n```\n### /alerts\n\n\n```\n{\n "$defs": {\n "Category": {\n "enum": [\n "default",\n "task",\n "fleet",\n "robot"\n ],\n "title": "Category",\n "type": "string"\n }\n },\n "properties": {\n "id": {\n "title": "Id",\n "type": "string"\n },\n "original_id": {\n "title": "Original Id",\n "type": "string"\n },\n "category": {\n "$ref": "#/$defs/Category"\n },\n "unix_millis_created_time": {\n "title": "Unix Millis Created Time",\n "type": "integer"\n },\n "acknowledged_by": {\n "title": "Acknowledged By",\n "type": "string"\n },\n "unix_millis_acknowledged_time": {\n "title": "Unix Millis Acknowledged Time",\n "type": "integer"\n }\n },\n "required": [\n "id",\n "original_id",\n "category",\n "unix_millis_created_time",\n "acknowledged_by",\n "unix_millis_acknowledged_time"\n ],\n "title": "Alert",\n "type": "object"\n}\n```\n\n\n### /beacons\n\n\n```\n{\n "properties": {\n "id": {\n "title": "Id",\n "type": "string"\n },\n "online": {\n "title": "Online",\n "type": "boolean"\n },\n "category": {\n "title": "Category",\n "type": "string"\n },\n "activated": {\n "title": "Activated",\n "type": "boolean"\n },\n "level": {\n "title": "Level",\n "type": "string"\n }\n },\n "required": [\n "id",\n "online",\n "category",\n "activated",\n "level"\n ],\n "title": "BeaconState",\n "type": "object"\n}\n```\n\n\n### /building_map\n\n\n```\n{\n "$defs": {\n "AffineImage": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "x_offset": {\n "title": "X Offset",\n "type": "number"\n },\n "y_offset": {\n "title": "Y Offset",\n "type": "number"\n },\n "yaw": {\n "title": "Yaw",\n "type": "number"\n },\n "scale": {\n "title": "Scale",\n "type": "number"\n },\n "encoding": {\n "title": "Encoding",\n "type": "string"\n },\n "data": {\n "title": "Data",\n "type": "string"\n }\n },\n "required": [\n "name",\n "x_offset",\n "y_offset",\n "yaw",\n "scale",\n "encoding",\n "data"\n ],\n "title": "AffineImage",\n "type": "object"\n },\n "Door": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "v1_x": {\n "title": "V1 X",\n "type": "number"\n },\n "v1_y": {\n "title": "V1 Y",\n "type": "number"\n },\n "v2_x": {\n "title": "V2 X",\n "type": "number"\n },\n "v2_y": {\n "title": "V2 Y",\n "type": "number"\n },\n "door_type": {\n "maximum": 255,\n "minimum": 0,\n "title": "Door Type",\n "type": "integer"\n },\n "motion_range": {\n "title": "Motion Range",\n "type": "number"\n },\n "motion_direction": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Motion Direction",\n "type": "integer"\n }\n },\n "required": [\n "name",\n "v1_x",\n "v1_y",\n "v2_x",\n "v2_y",\n "door_type",\n "motion_range",\n "motion_direction"\n ],\n "title": "Door",\n "type": "object"\n },\n "Graph": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "vertices": {\n "items": {\n "$ref": "#/$defs/GraphNode"\n },\n "title": "Vertices",\n "type": "array"\n },\n "edges": {\n "items": {\n "$ref": "#/$defs/GraphEdge"\n },\n "title": "Edges",\n "type": "array"\n },\n "params": {\n "items": {\n "$ref": "#/$defs/Param"\n },\n "title": "Params",\n "type": "array"\n }\n },\n "required": [\n "name",\n "vertices",\n "edges",\n "params"\n ],\n "title": "Graph",\n "type": "object"\n },\n "GraphEdge": {\n "properties": {\n "v1_idx": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "V1 Idx",\n "type": "integer"\n },\n "v2_idx": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "V2 Idx",\n "type": "integer"\n },\n "params": {\n "items": {\n "$ref": "#/$defs/Param"\n },\n "title": "Params",\n "type": "array"\n },\n "edge_type": {\n "maximum": 255,\n "minimum": 0,\n "title": "Edge Type",\n "type": "integer"\n }\n },\n "required": [\n "v1_idx",\n "v2_idx",\n "params",\n "edge_type"\n ],\n "title": "GraphEdge",\n "type": "object"\n },\n "GraphNode": {\n "properties": {\n "x": {\n "title": "X",\n "type": "number"\n },\n "y": {\n "title": "Y",\n "type": "number"\n },\n "name": {\n "title": "Name",\n "type": "string"\n },\n "params": {\n "items": {\n "$ref": "#/$defs/Param"\n },\n "title": "Params",\n "type": "array"\n }\n },\n "required": [\n "x",\n "y",\n "name",\n "params"\n ],\n "title": "GraphNode",\n "type": "object"\n },\n "Level": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "elevation": {\n "title": "Elevation",\n "type": "number"\n },\n "images": {\n "items": {\n "$ref": "#/$defs/AffineImage"\n },\n "title": "Images",\n "type": "array"\n },\n "places": {\n "items": {\n "$ref": "#/$defs/Place"\n },\n "title": "Places",\n "type": "array"\n },\n "doors": {\n "items": {\n "$ref": "#/$defs/Door"\n },\n "title": "Doors",\n "type": "array"\n },\n "nav_graphs": {\n "items": {\n "$ref": "#/$defs/Graph"\n },\n "title": "Nav Graphs",\n "type": "array"\n },\n "wall_graph": {\n "$ref": "#/$defs/Graph"\n }\n },\n "required": [\n "name",\n "elevation",\n "images",\n "places",\n "doors",\n "nav_graphs",\n "wall_graph"\n ],\n "title": "Level",\n "type": "object"\n },\n "Lift": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "levels": {\n "items": {\n "type": "string"\n },\n "title": "Levels",\n "type": "array"\n },\n "doors": {\n "items": {\n "$ref": "#/$defs/Door"\n },\n "title": "Doors",\n "type": "array"\n },\n "wall_graph": {\n "$ref": "#/$defs/Graph"\n },\n "ref_x": {\n "title": "Ref X",\n "type": "number"\n },\n "ref_y": {\n "title": "Ref Y",\n "type": "number"\n },\n "ref_yaw": {\n "title": "Ref Yaw",\n "type": "number"\n },\n "width": {\n "title": "Width",\n "type": "number"\n },\n "depth": {\n "title": "Depth",\n "type": "number"\n }\n },\n "required": [\n "name",\n "levels",\n "doors",\n "wall_graph",\n "ref_x",\n "ref_y",\n "ref_yaw",\n "width",\n "depth"\n ],\n "title": "Lift",\n "type": "object"\n },\n "Param": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "type": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "Type",\n "type": "integer"\n },\n "value_int": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Value Int",\n "type": "integer"\n },\n "value_float": {\n "title": "Value Float",\n "type": "number"\n },\n "value_string": {\n "title": "Value String",\n "type": "string"\n },\n "value_bool": {\n "title": "Value Bool",\n "type": "boolean"\n }\n },\n "required": [\n "name",\n "type",\n "value_int",\n "value_float",\n "value_string",\n "value_bool"\n ],\n "title": "Param",\n "type": "object"\n },\n "Place": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "x": {\n "title": "X",\n "type": "number"\n },\n "y": {\n "title": "Y",\n "type": "number"\n },\n "yaw": {\n "title": "Yaw",\n "type": "number"\n },\n "position_tolerance": {\n "title": "Position Tolerance",\n "type": "number"\n },\n "yaw_tolerance": {\n "title": "Yaw Tolerance",\n "type": "number"\n }\n },\n "required": [\n "name",\n "x",\n "y",\n "yaw",\n "position_tolerance",\n "yaw_tolerance"\n ],\n "title": "Place",\n "type": "object"\n }\n },\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "levels": {\n "items": {\n "$ref": "#/$defs/Level"\n },\n "title": "Levels",\n "type": "array"\n },\n "lifts": {\n "items": {\n "$ref": "#/$defs/Lift"\n },\n "title": "Lifts",\n "type": "array"\n }\n },\n "required": [\n "name",\n "levels",\n "lifts"\n ],\n "title": "BuildingMap",\n "type": "object"\n}\n```\n\n\n### /building_map/fire_alarm_trigger\n\n\n```\n{\n "properties": {\n "unix_millis_time": {\n "title": "Unix Millis Time",\n "type": "integer"\n },\n "trigger": {\n "title": "Trigger",\n "type": "boolean"\n }\n },\n "required": [\n "unix_millis_time",\n "trigger"\n ],\n "title": "FireAlarmTriggerState",\n "type": "object"\n}\n```\n\n\n### /delivery_alerts\n\n\n```\n{\n "$defs": {\n "Action": {\n "enum": [\n "waiting",\n "cancel",\n "override",\n "resume"\n ],\n "title": "Action",\n "type": "string"\n },\n "Category": {\n "enum": [\n "missing",\n "wrong",\n "obstructed",\n "cancelled"\n ],\n "title": "Category",\n "type": "string"\n },\n "Tier": {\n "enum": [\n "warning",\n "error"\n ],\n "title": "Tier",\n "type": "string"\n }\n },\n "properties": {\n "id": {\n "title": "Id",\n "type": "string"\n },\n "category": {\n "$ref": "#/$defs/Category"\n },\n "tier": {\n "$ref": "#/$defs/Tier"\n },\n "action": {\n "$ref": "#/$defs/Action"\n },\n "task_id": {\n "title": "Task Id",\n "type": "string"\n },\n "message": {\n "title": "Message",\n "type": "string"\n }\n },\n "required": [\n "id",\n "category",\n "tier",\n "action",\n "task_id",\n "message"\n ],\n "title": "DeliveryAlert",\n "type": "object"\n}\n```\n\n\n### /doors/{door_name}/state\n\n\n```\n{\n "$defs": {\n "DoorMode": {\n "properties": {\n "value": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "Value",\n "type": "integer"\n }\n },\n "required": [\n "value"\n ],\n "title": "DoorMode",\n "type": "object"\n },\n "Time": {\n "properties": {\n "sec": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Sec",\n "type": "integer"\n },\n "nanosec": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "Nanosec",\n "type": "integer"\n }\n },\n "required": [\n "sec",\n "nanosec"\n ],\n "title": "Time",\n "type": "object"\n }\n },\n "properties": {\n "door_time": {\n "$ref": "#/$defs/Time"\n },\n "door_name": {\n "title": "Door Name",\n "type": "string"\n },\n "current_mode": {\n "$ref": "#/$defs/DoorMode"\n }\n },\n "required": [\n "door_time",\n "door_name",\n "current_mode"\n ],\n "title": "DoorState",\n "type": "object"\n}\n```\n\n\n### /lifts/{lift_name}/state\n\n\n```\n{\n "$defs": {\n "Time": {\n "properties": {\n "sec": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Sec",\n "type": "integer"\n },\n "nanosec": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "Nanosec",\n "type": "integer"\n }\n },\n "required": [\n "sec",\n "nanosec"\n ],\n "title": "Time",\n "type": "object"\n }\n },\n "properties": {\n "lift_time": {\n "$ref": "#/$defs/Time"\n },\n "lift_name": {\n "title": "Lift Name",\n "type": "string"\n },\n "available_floors": {\n "items": {\n "type": "string"\n },\n "title": "Available Floors",\n "type": "array"\n },\n "current_floor": {\n "title": "Current Floor",\n "type": "string"\n },\n "destination_floor": {\n "title": "Destination Floor",\n "type": "string"\n },\n "door_state": {\n "maximum": 255,\n "minimum": 0,\n "title": "Door State",\n "type": "integer"\n },\n "motion_state": {\n "maximum": 255,\n "minimum": 0,\n "title": "Motion State",\n "type": "integer"\n },\n "available_modes": {\n "items": {\n "type": "integer"\n },\n "title": "Available Modes",\n "type": "array"\n },\n "current_mode": {\n "maximum": 255,\n "minimum": 0,\n "title": "Current Mode",\n "type": "integer"\n },\n "session_id": {\n "title": "Session Id",\n "type": "string"\n }\n },\n "required": [\n "lift_time",\n "lift_name",\n "available_floors",\n "current_floor",\n "destination_floor",\n "door_state",\n "motion_state",\n "available_modes",\n "current_mode",\n "session_id"\n ],\n "title": "LiftState",\n "type": "object"\n}\n```\n\n\n### /tasks/{task_id}/state\n\n\n```\n{\n "$defs": {\n "AssignedTo": {\n "properties": {\n "group": {\n "title": "Group",\n "type": "string"\n },\n "name": {\n "title": "Name",\n "type": "string"\n }\n },\n "required": [\n "group",\n "name"\n ],\n "title": "AssignedTo",\n "type": "object"\n },\n "Assignment": {\n "properties": {\n "fleet_name": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Fleet Name"\n },\n "expected_robot_name": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Expected Robot Name"\n }\n },\n "title": "Assignment",\n "type": "object"\n },\n "Booking": {\n "properties": {\n "id": {\n "description": "The unique identifier for this task",\n "title": "Id",\n "type": "string"\n },\n "unix_millis_earliest_start_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Unix Millis Earliest Start Time"\n },\n "unix_millis_request_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Unix Millis Request Time"\n },\n "priority": {\n "anyOf": [\n {\n "type": "object"\n },\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Priority information about this task",\n "title": "Priority"\n },\n "labels": {\n "anyOf": [\n {\n "items": {\n "type": "string"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Information about how and why this task was booked, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.",\n "title": "Labels"\n },\n "requester": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "(Optional) An identifier for the entity that requested this task",\n "title": "Requester"\n }\n },\n "required": [\n "id"\n ],\n "title": "Booking",\n "type": "object"\n },\n "Cancellation": {\n "properties": {\n "unix_millis_request_time": {\n "description": "The time that the cancellation request arrived",\n "title": "Unix Millis Request Time",\n "type": "integer"\n },\n "labels": {\n "description": "Labels to describe the cancel request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.",\n "items": {\n "type": "string"\n },\n "title": "Labels",\n "type": "array"\n }\n },\n "required": [\n "unix_millis_request_time",\n "labels"\n ],\n "title": "Cancellation",\n "type": "object"\n },\n "Category": {\n "description": "The category of this task or phase",\n "title": "Category",\n "type": "string"\n },\n "Detail": {\n "anyOf": [\n {\n "type": "object"\n },\n {\n "items": {},\n "type": "array"\n },\n {\n "type": "string"\n }\n ],\n "description": "Detailed information about a task, phase, or event",\n "title": "Detail"\n },\n "Dispatch": {\n "properties": {\n "status": {\n "$ref": "#/$defs/Status2"\n },\n "assignment": {\n "anyOf": [\n {\n "$ref": "#/$defs/Assignment"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "errors": {\n "anyOf": [\n {\n "items": {\n "$ref": "#/$defs/Error"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Errors"\n }\n },\n "required": [\n "status"\n ],\n "title": "Dispatch",\n "type": "object"\n },\n "Error": {\n "properties": {\n "code": {\n "anyOf": [\n {\n "minimum": 0,\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A standard code for the kind of error that has occurred",\n "title": "Code"\n },\n "category": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "The category of the error",\n "title": "Category"\n },\n "detail": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Details about the error",\n "title": "Detail"\n }\n },\n "title": "Error",\n "type": "object"\n },\n "EstimateMillis": {\n "description": "An estimate, in milliseconds, of how long the subject will take to complete",\n "minimum": 0,\n "title": "EstimateMillis",\n "type": "integer"\n },\n "EventState": {\n "properties": {\n "id": {\n "$ref": "#/$defs/Id"\n },\n "status": {\n "anyOf": [\n {\n "$ref": "#/$defs/Status"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "name": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "The brief name of the event",\n "title": "Name"\n },\n "detail": {\n "anyOf": [\n {\n "$ref": "#/$defs/Detail"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Detailed information about the event"\n },\n "deps": {\n "anyOf": [\n {\n "items": {\n "minimum": 0,\n "type": "integer"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "This event may depend on other events. This array contains the IDs of those other event dependencies.",\n "title": "Deps"\n }\n },\n "required": [\n "id"\n ],\n "title": "EventState",\n "type": "object"\n },\n "Id": {\n "minimum": 0,\n "title": "Id",\n "type": "integer"\n },\n "Interruption": {\n "properties": {\n "unix_millis_request_time": {\n "description": "The time that the interruption request arrived",\n "title": "Unix Millis Request Time",\n "type": "integer"\n },\n "labels": {\n "description": "Labels to describe the purpose of the interruption, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.",\n "items": {\n "type": "string"\n },\n "title": "Labels",\n "type": "array"\n },\n "resumed_by": {\n "anyOf": [\n {\n "$ref": "#/$defs/ResumedBy"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Information about the resume request that ended this interruption. This field will be missing if the interruption is still active."\n }\n },\n "required": [\n "unix_millis_request_time",\n "labels"\n ],\n "title": "Interruption",\n "type": "object"\n },\n "Killed": {\n "properties": {\n "unix_millis_request_time": {\n "description": "The time that the cancellation request arrived",\n "title": "Unix Millis Request Time",\n "type": "integer"\n },\n "labels": {\n "description": "Labels to describe the kill request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.",\n "items": {\n "type": "string"\n },\n "title": "Labels",\n "type": "array"\n }\n },\n "required": [\n "unix_millis_request_time",\n "labels"\n ],\n "title": "Killed",\n "type": "object"\n },\n "Phase": {\n "properties": {\n "id": {\n "$ref": "#/$defs/Id"\n },\n "category": {\n "anyOf": [\n {\n "$ref": "#/$defs/Category"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "detail": {\n "anyOf": [\n {\n "$ref": "#/$defs/Detail"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "unix_millis_start_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Unix Millis Start Time"\n },\n "unix_millis_finish_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Unix Millis Finish Time"\n },\n "original_estimate_millis": {\n "anyOf": [\n {\n "$ref": "#/$defs/EstimateMillis"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "estimate_millis": {\n "anyOf": [\n {\n "$ref": "#/$defs/EstimateMillis"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "final_event_id": {\n "anyOf": [\n {\n "$ref": "#/$defs/Id"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "events": {\n "anyOf": [\n {\n "additionalProperties": {\n "$ref": "#/$defs/EventState"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A dictionary of events for this phase. The keys (property names) are the event IDs, which are integers.",\n "title": "Events"\n },\n "skip_requests": {\n "anyOf": [\n {\n "additionalProperties": {\n "$ref": "#/$defs/SkipPhaseRequest"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Information about any skip requests that have been received",\n "title": "Skip Requests"\n }\n },\n "required": [\n "id"\n ],\n "title": "Phase",\n "type": "object"\n },\n "ResumedBy": {\n "properties": {\n "unix_millis_request_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "The time that the resume request arrived",\n "title": "Unix Millis Request Time"\n },\n "labels": {\n "description": "Labels to describe the resume request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.",\n "items": {\n "type": "string"\n },\n "title": "Labels",\n "type": "array"\n }\n },\n "required": [\n "labels"\n ],\n "title": "ResumedBy",\n "type": "object"\n },\n "SkipPhaseRequest": {\n "properties": {\n "unix_millis_request_time": {\n "description": "The time that the skip request arrived",\n "title": "Unix Millis Request Time",\n "type": "integer"\n },\n "labels": {\n "description": "Labels to describe the purpose of the skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.",\n "items": {\n "type": "string"\n },\n "title": "Labels",\n "type": "array"\n },\n "undo": {\n "anyOf": [\n {\n "$ref": "#/$defs/Undo"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Information about an undo skip request that applied to this request"\n }\n },\n "required": [\n "unix_millis_request_time",\n "labels"\n ],\n "title": "SkipPhaseRequest",\n "type": "object"\n },\n "Status": {\n "enum": [\n "uninitialized",\n "blocked",\n "error",\n "failed",\n "queued",\n "standby",\n "underway",\n "delayed",\n "skipped",\n "canceled",\n "killed",\n "completed"\n ],\n "title": "Status",\n "type": "string"\n },\n "Status2": {\n "enum": [\n "queued",\n "selected",\n "dispatched",\n "failed_to_assign",\n "canceled_in_flight"\n ],\n "title": "Status2",\n "type": "string"\n },\n "Undo": {\n "properties": {\n "unix_millis_request_time": {\n "description": "The time that the undo skip request arrived",\n "title": "Unix Millis Request Time",\n "type": "integer"\n },\n "labels": {\n "description": "Labels to describe the undo skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.",\n "items": {\n "type": "string"\n },\n "title": "Labels",\n "type": "array"\n }\n },\n "required": [\n "unix_millis_request_time",\n "labels"\n ],\n "title": "Undo",\n "type": "object"\n }\n },\n "properties": {\n "booking": {\n "$ref": "#/$defs/Booking"\n },\n "category": {\n "anyOf": [\n {\n "$ref": "#/$defs/Category"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "detail": {\n "anyOf": [\n {\n "$ref": "#/$defs/Detail"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "unix_millis_start_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Unix Millis Start Time"\n },\n "unix_millis_finish_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Unix Millis Finish Time"\n },\n "original_estimate_millis": {\n "anyOf": [\n {\n "$ref": "#/$defs/EstimateMillis"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "estimate_millis": {\n "anyOf": [\n {\n "$ref": "#/$defs/EstimateMillis"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "assigned_to": {\n "anyOf": [\n {\n "$ref": "#/$defs/AssignedTo"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Which agent (robot) is the task assigned to"\n },\n "status": {\n "anyOf": [\n {\n "$ref": "#/$defs/Status"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "dispatch": {\n "anyOf": [\n {\n "$ref": "#/$defs/Dispatch"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "phases": {\n "anyOf": [\n {\n "additionalProperties": {\n "$ref": "#/$defs/Phase"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A dictionary of the states of the phases of the task. The keys (property names) are phase IDs, which are integers.",\n "title": "Phases"\n },\n "completed": {\n "anyOf": [\n {\n "items": {\n "$ref": "#/$defs/Id"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "An array of the IDs of completed phases of this task",\n "title": "Completed"\n },\n "active": {\n "anyOf": [\n {\n "$ref": "#/$defs/Id"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "The ID of the active phase for this task"\n },\n "pending": {\n "anyOf": [\n {\n "items": {\n "$ref": "#/$defs/Id"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "An array of the pending phases of this task",\n "title": "Pending"\n },\n "interruptions": {\n "anyOf": [\n {\n "additionalProperties": {\n "$ref": "#/$defs/Interruption"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A dictionary of interruptions that have been applied to this task. The keys (property names) are the unique token of the interruption request.",\n "title": "Interruptions"\n },\n "cancellation": {\n "anyOf": [\n {\n "$ref": "#/$defs/Cancellation"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "If the task was cancelled, this will describe information about the request."\n },\n "killed": {\n "anyOf": [\n {\n "$ref": "#/$defs/Killed"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "If the task was killed, this will describe information about the request."\n }\n },\n "required": [\n "booking"\n ],\n "title": "TaskState",\n "type": "object"\n}\n```\n\n\n### /tasks/{task_id}/log\n\n\n```\n{\n "$defs": {\n "LogEntry": {\n "properties": {\n "seq": {\n "description": "Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.",\n "exclusiveMaximum": 4294967296,\n "minimum": 0,\n "title": "Seq",\n "type": "integer"\n },\n "tier": {\n "allOf": [\n {\n "$ref": "#/$defs/Tier"\n }\n ],\n "description": "The importance level of the log entry"\n },\n "unix_millis_time": {\n "title": "Unix Millis Time",\n "type": "integer"\n },\n "text": {\n "description": "The text of the log entry",\n "title": "Text",\n "type": "string"\n }\n },\n "required": [\n "seq",\n "tier",\n "unix_millis_time",\n "text"\n ],\n "title": "LogEntry",\n "type": "object"\n },\n "Phases": {\n "additionalProperties": false,\n "properties": {\n "log": {\n "anyOf": [\n {\n "items": {\n "$ref": "#/$defs/LogEntry"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Log entries related to the overall phase",\n "title": "Log"\n },\n "events": {\n "anyOf": [\n {\n "additionalProperties": {\n "items": {\n "$ref": "#/$defs/LogEntry"\n },\n "type": "array"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A dictionary whose keys (property names) are the indices of an event in the phase",\n "title": "Events"\n }\n },\n "title": "Phases",\n "type": "object"\n },\n "Tier": {\n "enum": [\n "uninitialized",\n "info",\n "warning",\n "error"\n ],\n "title": "Tier",\n "type": "string"\n }\n },\n "additionalProperties": false,\n "properties": {\n "task_id": {\n "title": "Task Id",\n "type": "string"\n },\n "log": {\n "anyOf": [\n {\n "items": {\n "$ref": "#/$defs/LogEntry"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Log entries related to the overall task",\n "title": "Log"\n },\n "phases": {\n "anyOf": [\n {\n "additionalProperties": {\n "$ref": "#/$defs/Phases"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A dictionary whose keys (property names) are the indices of a phase",\n "title": "Phases"\n }\n },\n "required": [\n "task_id"\n ],\n "title": "TaskEventLog",\n "type": "object"\n}\n```\n\n\n### /dispensers/{guid}/state\n\n\n```\n{\n "$defs": {\n "Time": {\n "properties": {\n "sec": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Sec",\n "type": "integer"\n },\n "nanosec": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "Nanosec",\n "type": "integer"\n }\n },\n "required": [\n "sec",\n "nanosec"\n ],\n "title": "Time",\n "type": "object"\n }\n },\n "properties": {\n "time": {\n "$ref": "#/$defs/Time"\n },\n "guid": {\n "title": "Guid",\n "type": "string"\n },\n "mode": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Mode",\n "type": "integer"\n },\n "request_guid_queue": {\n "items": {\n "type": "string"\n },\n "title": "Request Guid Queue",\n "type": "array"\n },\n "seconds_remaining": {\n "title": "Seconds Remaining",\n "type": "number"\n }\n },\n "required": [\n "time",\n "guid",\n "mode",\n "request_guid_queue",\n "seconds_remaining"\n ],\n "title": "DispenserState",\n "type": "object"\n}\n```\n\n\n### /ingestors/{guid}/state\n\n\n```\n{\n "$defs": {\n "Time": {\n "properties": {\n "sec": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Sec",\n "type": "integer"\n },\n "nanosec": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "Nanosec",\n "type": "integer"\n }\n },\n "required": [\n "sec",\n "nanosec"\n ],\n "title": "Time",\n "type": "object"\n }\n },\n "properties": {\n "time": {\n "$ref": "#/$defs/Time"\n },\n "guid": {\n "title": "Guid",\n "type": "string"\n },\n "mode": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Mode",\n "type": "integer"\n },\n "request_guid_queue": {\n "items": {\n "type": "string"\n },\n "title": "Request Guid Queue",\n "type": "array"\n },\n "seconds_remaining": {\n "title": "Seconds Remaining",\n "type": "number"\n }\n },\n "required": [\n "time",\n "guid",\n "mode",\n "request_guid_queue",\n "seconds_remaining"\n ],\n "title": "IngestorState",\n "type": "object"\n}\n```\n\n\n### /fleets/{name}/state\n\n\n```\n{\n "$defs": {\n "Commission": {\n "properties": {\n "dispatch_tasks": {\n "anyOf": [\n {\n "type": "boolean"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Should the robot accept dispatched tasks, true/false. When used in a request, leave this unset to not change the robot\'s current value.",\n "title": "Dispatch Tasks"\n },\n "direct_tasks": {\n "anyOf": [\n {\n "type": "boolean"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Should the robot accept direct task requests, true/false. When used in a request, leave this unset to not change the robot\'s current value.",\n "title": "Direct Tasks"\n },\n "idle_behavior": {\n "anyOf": [\n {\n "type": "boolean"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Should the robot perform its idle behavior, true/false. When used in a request, leave this unset to not change the robot\'s current value.",\n "title": "Idle Behavior"\n }\n },\n "title": "Commission",\n "type": "object"\n },\n "Issue": {\n "properties": {\n "category": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Category of the robot\'s issue",\n "title": "Category"\n },\n "detail": {\n "anyOf": [\n {\n "type": "object"\n },\n {\n "items": {},\n "type": "array"\n },\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Detailed information about the issue",\n "title": "Detail"\n }\n },\n "title": "Issue",\n "type": "object"\n },\n "Location2D": {\n "properties": {\n "map": {\n "title": "Map",\n "type": "string"\n },\n "x": {\n "title": "X",\n "type": "number"\n },\n "y": {\n "title": "Y",\n "type": "number"\n },\n "yaw": {\n "title": "Yaw",\n "type": "number"\n }\n },\n "required": [\n "map",\n "x",\n "y",\n "yaw"\n ],\n "title": "Location2D",\n "type": "object"\n },\n "MutexGroups": {\n "properties": {\n "locked": {\n "anyOf": [\n {\n "items": {\n "type": "string"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A list of mutex groups that this robot has currently locked",\n "title": "Locked"\n },\n "requesting": {\n "anyOf": [\n {\n "items": {\n "type": "string"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A list of the mutex groups that this robot is currently requesting but has not lockd yet",\n "title": "Requesting"\n }\n },\n "title": "MutexGroups",\n "type": "object"\n },\n "RobotState": {\n "properties": {\n "name": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Name"\n },\n "status": {\n "anyOf": [\n {\n "$ref": "#/$defs/Status"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A simple token representing the status of the robot"\n },\n "task_id": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "The ID of the task this robot is currently working on. Empty string if the robot is not working on a task.",\n "title": "Task Id"\n },\n "unix_millis_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Unix Millis Time"\n },\n "location": {\n "anyOf": [\n {\n "$ref": "#/$defs/Location2D"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "battery": {\n "anyOf": [\n {\n "maximum": 1.0,\n "minimum": 0.0,\n "type": "number"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "State of charge of the battery. Values range from 0.0 (depleted) to 1.0 (fully charged)",\n "title": "Battery"\n },\n "issues": {\n "anyOf": [\n {\n "items": {\n "$ref": "#/$defs/Issue"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A list of issues with the robot that operators need to address",\n "title": "Issues"\n },\n "commission": {\n "anyOf": [\n {\n "$ref": "#/$defs/Commission"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "mutex_groups": {\n "anyOf": [\n {\n "$ref": "#/$defs/MutexGroups"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Information about the mutex groups that this robot is interacting with"\n }\n },\n "title": "RobotState",\n "type": "object"\n },\n "Status": {\n "enum": [\n "uninitialized",\n "offline",\n "shutdown",\n "idle",\n "charging",\n "working",\n "error"\n ],\n "title": "Status",\n "type": "string"\n }\n },\n "properties": {\n "name": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Name"\n },\n "robots": {\n "anyOf": [\n {\n "additionalProperties": {\n "$ref": "#/$defs/RobotState"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A dictionary of the states of the robots that belong to this fleet",\n "title": "Robots"\n }\n },\n "title": "FleetState",\n "type": "object"\n}\n```\n\n\n### /fleets/{name}/log\n\n\n```\n{\n "$defs": {\n "LogEntry": {\n "properties": {\n "seq": {\n "description": "Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.",\n "exclusiveMaximum": 4294967296,\n "minimum": 0,\n "title": "Seq",\n "type": "integer"\n },\n "tier": {\n "allOf": [\n {\n "$ref": "#/$defs/Tier"\n }\n ],\n "description": "The importance level of the log entry"\n },\n "unix_millis_time": {\n "title": "Unix Millis Time",\n "type": "integer"\n },\n "text": {\n "description": "The text of the log entry",\n "title": "Text",\n "type": "string"\n }\n },\n "required": [\n "seq",\n "tier",\n "unix_millis_time",\n "text"\n ],\n "title": "LogEntry",\n "type": "object"\n },\n "Tier": {\n "enum": [\n "uninitialized",\n "info",\n "warning",\n "error"\n ],\n "title": "Tier",\n "type": "string"\n }\n },\n "properties": {\n "name": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Name"\n },\n "log": {\n "anyOf": [\n {\n "items": {\n "$ref": "#/$defs/LogEntry"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Log for the overall fleet",\n "title": "Log"\n },\n "robots": {\n "anyOf": [\n {\n "additionalProperties": {\n "items": {\n "$ref": "#/$defs/LogEntry"\n },\n "type": "array"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Dictionary of logs for the individual robots. The keys (property names) are the robot names.",\n "title": "Robots"\n }\n },\n "title": "FleetLog",\n "type": "object"\n}\n```\n\n\n### /rios\n\n\n```\n{\n "properties": {\n "id": {\n "title": "Id",\n "type": "string"\n },\n "type": {\n "title": "Type",\n "type": "string"\n },\n "data": {\n "title": "Data",\n "type": "object"\n }\n },\n "required": [\n "id",\n "type",\n "data"\n ],\n "title": "Rio",\n "type": "object"\n}\n```\n\n', + '# NOTE: This endpoint is here for documentation purposes only, this is _not_ a REST endpoint.\n\n## About\nThis exposes a minimal pubsub system built on top of socket.io.\nIt works similar to a normal socket.io endpoint, except that are 2 special\nrooms which control subscriptions.\n\n## Rooms\n### subscribe\nClients must send a message to this room to start receiving messages on other rooms.\nThe message must be of the form:\n\n```\n{\n "room": ""\n}\n```\n\n### unsubscribe\nClients can send a message to this room to stop receiving messages on other rooms.\nThe message must be of the form:\n\n```\n{\n "room": ""\n}\n```\n### /alerts/requests\n\n\n```\n{\n "$defs": {\n "AlertParameter": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "value": {\n "title": "Value",\n "type": "string"\n }\n },\n "required": [\n "name",\n "value"\n ],\n "title": "AlertParameter",\n "type": "object"\n },\n "Tier": {\n "enum": [\n "info",\n "warning",\n "error"\n ],\n "title": "Tier",\n "type": "string"\n }\n },\n "properties": {\n "id": {\n "title": "Id",\n "type": "string"\n },\n "unix_millis_alert_time": {\n "title": "Unix Millis Alert Time",\n "type": "integer"\n },\n "title": {\n "title": "Title",\n "type": "string"\n },\n "subtitle": {\n "title": "Subtitle",\n "type": "string"\n },\n "message": {\n "title": "Message",\n "type": "string"\n },\n "display": {\n "title": "Display",\n "type": "boolean"\n },\n "tier": {\n "$ref": "#/$defs/Tier"\n },\n "responses_available": {\n "items": {\n "type": "string"\n },\n "title": "Responses Available",\n "type": "array"\n },\n "alert_parameters": {\n "items": {\n "$ref": "#/$defs/AlertParameter"\n },\n "title": "Alert Parameters",\n "type": "array"\n },\n "task_id": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "title": "Task Id"\n }\n },\n "required": [\n "id",\n "unix_millis_alert_time",\n "title",\n "subtitle",\n "message",\n "display",\n "tier",\n "responses_available",\n "alert_parameters",\n "task_id"\n ],\n "title": "AlertRequest",\n "type": "object"\n}\n```\n\n\n### /alerts/responses\n\n\n```\n{\n "properties": {\n "id": {\n "title": "Id",\n "type": "string"\n },\n "unix_millis_response_time": {\n "title": "Unix Millis Response Time",\n "type": "integer"\n },\n "response": {\n "title": "Response",\n "type": "string"\n }\n },\n "required": [\n "id",\n "unix_millis_response_time",\n "response"\n ],\n "title": "AlertResponse",\n "type": "object"\n}\n```\n\n\n### /beacons\n\n\n```\n{\n "properties": {\n "id": {\n "title": "Id",\n "type": "string"\n },\n "online": {\n "title": "Online",\n "type": "boolean"\n },\n "category": {\n "title": "Category",\n "type": "string"\n },\n "activated": {\n "title": "Activated",\n "type": "boolean"\n },\n "level": {\n "title": "Level",\n "type": "string"\n }\n },\n "required": [\n "id",\n "online",\n "category",\n "activated",\n "level"\n ],\n "title": "BeaconState",\n "type": "object"\n}\n```\n\n\n### /building_map\n\n\n```\n{\n "$defs": {\n "AffineImage": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "x_offset": {\n "title": "X Offset",\n "type": "number"\n },\n "y_offset": {\n "title": "Y Offset",\n "type": "number"\n },\n "yaw": {\n "title": "Yaw",\n "type": "number"\n },\n "scale": {\n "title": "Scale",\n "type": "number"\n },\n "encoding": {\n "title": "Encoding",\n "type": "string"\n },\n "data": {\n "title": "Data",\n "type": "string"\n }\n },\n "required": [\n "name",\n "x_offset",\n "y_offset",\n "yaw",\n "scale",\n "encoding",\n "data"\n ],\n "title": "AffineImage",\n "type": "object"\n },\n "Door": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "v1_x": {\n "title": "V1 X",\n "type": "number"\n },\n "v1_y": {\n "title": "V1 Y",\n "type": "number"\n },\n "v2_x": {\n "title": "V2 X",\n "type": "number"\n },\n "v2_y": {\n "title": "V2 Y",\n "type": "number"\n },\n "door_type": {\n "maximum": 255,\n "minimum": 0,\n "title": "Door Type",\n "type": "integer"\n },\n "motion_range": {\n "title": "Motion Range",\n "type": "number"\n },\n "motion_direction": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Motion Direction",\n "type": "integer"\n }\n },\n "required": [\n "name",\n "v1_x",\n "v1_y",\n "v2_x",\n "v2_y",\n "door_type",\n "motion_range",\n "motion_direction"\n ],\n "title": "Door",\n "type": "object"\n },\n "Graph": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "vertices": {\n "items": {\n "$ref": "#/$defs/GraphNode"\n },\n "title": "Vertices",\n "type": "array"\n },\n "edges": {\n "items": {\n "$ref": "#/$defs/GraphEdge"\n },\n "title": "Edges",\n "type": "array"\n },\n "params": {\n "items": {\n "$ref": "#/$defs/Param"\n },\n "title": "Params",\n "type": "array"\n }\n },\n "required": [\n "name",\n "vertices",\n "edges",\n "params"\n ],\n "title": "Graph",\n "type": "object"\n },\n "GraphEdge": {\n "properties": {\n "v1_idx": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "V1 Idx",\n "type": "integer"\n },\n "v2_idx": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "V2 Idx",\n "type": "integer"\n },\n "params": {\n "items": {\n "$ref": "#/$defs/Param"\n },\n "title": "Params",\n "type": "array"\n },\n "edge_type": {\n "maximum": 255,\n "minimum": 0,\n "title": "Edge Type",\n "type": "integer"\n }\n },\n "required": [\n "v1_idx",\n "v2_idx",\n "params",\n "edge_type"\n ],\n "title": "GraphEdge",\n "type": "object"\n },\n "GraphNode": {\n "properties": {\n "x": {\n "title": "X",\n "type": "number"\n },\n "y": {\n "title": "Y",\n "type": "number"\n },\n "name": {\n "title": "Name",\n "type": "string"\n },\n "params": {\n "items": {\n "$ref": "#/$defs/Param"\n },\n "title": "Params",\n "type": "array"\n }\n },\n "required": [\n "x",\n "y",\n "name",\n "params"\n ],\n "title": "GraphNode",\n "type": "object"\n },\n "Level": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "elevation": {\n "title": "Elevation",\n "type": "number"\n },\n "images": {\n "items": {\n "$ref": "#/$defs/AffineImage"\n },\n "title": "Images",\n "type": "array"\n },\n "places": {\n "items": {\n "$ref": "#/$defs/Place"\n },\n "title": "Places",\n "type": "array"\n },\n "doors": {\n "items": {\n "$ref": "#/$defs/Door"\n },\n "title": "Doors",\n "type": "array"\n },\n "nav_graphs": {\n "items": {\n "$ref": "#/$defs/Graph"\n },\n "title": "Nav Graphs",\n "type": "array"\n },\n "wall_graph": {\n "$ref": "#/$defs/Graph"\n }\n },\n "required": [\n "name",\n "elevation",\n "images",\n "places",\n "doors",\n "nav_graphs",\n "wall_graph"\n ],\n "title": "Level",\n "type": "object"\n },\n "Lift": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "levels": {\n "items": {\n "type": "string"\n },\n "title": "Levels",\n "type": "array"\n },\n "doors": {\n "items": {\n "$ref": "#/$defs/Door"\n },\n "title": "Doors",\n "type": "array"\n },\n "wall_graph": {\n "$ref": "#/$defs/Graph"\n },\n "ref_x": {\n "title": "Ref X",\n "type": "number"\n },\n "ref_y": {\n "title": "Ref Y",\n "type": "number"\n },\n "ref_yaw": {\n "title": "Ref Yaw",\n "type": "number"\n },\n "width": {\n "title": "Width",\n "type": "number"\n },\n "depth": {\n "title": "Depth",\n "type": "number"\n }\n },\n "required": [\n "name",\n "levels",\n "doors",\n "wall_graph",\n "ref_x",\n "ref_y",\n "ref_yaw",\n "width",\n "depth"\n ],\n "title": "Lift",\n "type": "object"\n },\n "Param": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "type": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "Type",\n "type": "integer"\n },\n "value_int": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Value Int",\n "type": "integer"\n },\n "value_float": {\n "title": "Value Float",\n "type": "number"\n },\n "value_string": {\n "title": "Value String",\n "type": "string"\n },\n "value_bool": {\n "title": "Value Bool",\n "type": "boolean"\n }\n },\n "required": [\n "name",\n "type",\n "value_int",\n "value_float",\n "value_string",\n "value_bool"\n ],\n "title": "Param",\n "type": "object"\n },\n "Place": {\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "x": {\n "title": "X",\n "type": "number"\n },\n "y": {\n "title": "Y",\n "type": "number"\n },\n "yaw": {\n "title": "Yaw",\n "type": "number"\n },\n "position_tolerance": {\n "title": "Position Tolerance",\n "type": "number"\n },\n "yaw_tolerance": {\n "title": "Yaw Tolerance",\n "type": "number"\n }\n },\n "required": [\n "name",\n "x",\n "y",\n "yaw",\n "position_tolerance",\n "yaw_tolerance"\n ],\n "title": "Place",\n "type": "object"\n }\n },\n "properties": {\n "name": {\n "title": "Name",\n "type": "string"\n },\n "levels": {\n "items": {\n "$ref": "#/$defs/Level"\n },\n "title": "Levels",\n "type": "array"\n },\n "lifts": {\n "items": {\n "$ref": "#/$defs/Lift"\n },\n "title": "Lifts",\n "type": "array"\n }\n },\n "required": [\n "name",\n "levels",\n "lifts"\n ],\n "title": "BuildingMap",\n "type": "object"\n}\n```\n\n\n### /building_map/fire_alarm_trigger\n\n\n```\n{\n "properties": {\n "unix_millis_time": {\n "title": "Unix Millis Time",\n "type": "integer"\n },\n "trigger": {\n "title": "Trigger",\n "type": "boolean"\n }\n },\n "required": [\n "unix_millis_time",\n "trigger"\n ],\n "title": "FireAlarmTriggerState",\n "type": "object"\n}\n```\n\n\n### /delivery_alerts\n\n\n```\n{\n "$defs": {\n "Action": {\n "enum": [\n "waiting",\n "cancel",\n "override",\n "resume"\n ],\n "title": "Action",\n "type": "string"\n },\n "Category": {\n "enum": [\n "missing",\n "wrong",\n "obstructed",\n "cancelled"\n ],\n "title": "Category",\n "type": "string"\n },\n "Tier": {\n "enum": [\n "warning",\n "error"\n ],\n "title": "Tier",\n "type": "string"\n }\n },\n "properties": {\n "id": {\n "title": "Id",\n "type": "string"\n },\n "category": {\n "$ref": "#/$defs/Category"\n },\n "tier": {\n "$ref": "#/$defs/Tier"\n },\n "action": {\n "$ref": "#/$defs/Action"\n },\n "task_id": {\n "title": "Task Id",\n "type": "string"\n },\n "message": {\n "title": "Message",\n "type": "string"\n }\n },\n "required": [\n "id",\n "category",\n "tier",\n "action",\n "task_id",\n "message"\n ],\n "title": "DeliveryAlert",\n "type": "object"\n}\n```\n\n\n### /doors/{door_name}/state\n\n\n```\n{\n "$defs": {\n "DoorMode": {\n "properties": {\n "value": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "Value",\n "type": "integer"\n }\n },\n "required": [\n "value"\n ],\n "title": "DoorMode",\n "type": "object"\n },\n "Time": {\n "properties": {\n "sec": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Sec",\n "type": "integer"\n },\n "nanosec": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "Nanosec",\n "type": "integer"\n }\n },\n "required": [\n "sec",\n "nanosec"\n ],\n "title": "Time",\n "type": "object"\n }\n },\n "properties": {\n "door_time": {\n "$ref": "#/$defs/Time"\n },\n "door_name": {\n "title": "Door Name",\n "type": "string"\n },\n "current_mode": {\n "$ref": "#/$defs/DoorMode"\n }\n },\n "required": [\n "door_time",\n "door_name",\n "current_mode"\n ],\n "title": "DoorState",\n "type": "object"\n}\n```\n\n\n### /lifts/{lift_name}/state\n\n\n```\n{\n "$defs": {\n "Time": {\n "properties": {\n "sec": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Sec",\n "type": "integer"\n },\n "nanosec": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "Nanosec",\n "type": "integer"\n }\n },\n "required": [\n "sec",\n "nanosec"\n ],\n "title": "Time",\n "type": "object"\n }\n },\n "properties": {\n "lift_time": {\n "$ref": "#/$defs/Time"\n },\n "lift_name": {\n "title": "Lift Name",\n "type": "string"\n },\n "available_floors": {\n "items": {\n "type": "string"\n },\n "title": "Available Floors",\n "type": "array"\n },\n "current_floor": {\n "title": "Current Floor",\n "type": "string"\n },\n "destination_floor": {\n "title": "Destination Floor",\n "type": "string"\n },\n "door_state": {\n "maximum": 255,\n "minimum": 0,\n "title": "Door State",\n "type": "integer"\n },\n "motion_state": {\n "maximum": 255,\n "minimum": 0,\n "title": "Motion State",\n "type": "integer"\n },\n "available_modes": {\n "items": {\n "type": "integer"\n },\n "title": "Available Modes",\n "type": "array"\n },\n "current_mode": {\n "maximum": 255,\n "minimum": 0,\n "title": "Current Mode",\n "type": "integer"\n },\n "session_id": {\n "title": "Session Id",\n "type": "string"\n }\n },\n "required": [\n "lift_time",\n "lift_name",\n "available_floors",\n "current_floor",\n "destination_floor",\n "door_state",\n "motion_state",\n "available_modes",\n "current_mode",\n "session_id"\n ],\n "title": "LiftState",\n "type": "object"\n}\n```\n\n\n### /tasks/{task_id}/state\n\n\n```\n{\n "$defs": {\n "AssignedTo": {\n "properties": {\n "group": {\n "title": "Group",\n "type": "string"\n },\n "name": {\n "title": "Name",\n "type": "string"\n }\n },\n "required": [\n "group",\n "name"\n ],\n "title": "AssignedTo",\n "type": "object"\n },\n "Assignment": {\n "properties": {\n "fleet_name": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Fleet Name"\n },\n "expected_robot_name": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Expected Robot Name"\n }\n },\n "title": "Assignment",\n "type": "object"\n },\n "Booking": {\n "properties": {\n "id": {\n "description": "The unique identifier for this task",\n "title": "Id",\n "type": "string"\n },\n "unix_millis_earliest_start_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Unix Millis Earliest Start Time"\n },\n "unix_millis_request_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Unix Millis Request Time"\n },\n "priority": {\n "anyOf": [\n {\n "type": "object"\n },\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Priority information about this task",\n "title": "Priority"\n },\n "labels": {\n "anyOf": [\n {\n "items": {\n "type": "string"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Information about how and why this task was booked, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.",\n "title": "Labels"\n },\n "requester": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "(Optional) An identifier for the entity that requested this task",\n "title": "Requester"\n }\n },\n "required": [\n "id"\n ],\n "title": "Booking",\n "type": "object"\n },\n "Cancellation": {\n "properties": {\n "unix_millis_request_time": {\n "description": "The time that the cancellation request arrived",\n "title": "Unix Millis Request Time",\n "type": "integer"\n },\n "labels": {\n "description": "Labels to describe the cancel request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.",\n "items": {\n "type": "string"\n },\n "title": "Labels",\n "type": "array"\n }\n },\n "required": [\n "unix_millis_request_time",\n "labels"\n ],\n "title": "Cancellation",\n "type": "object"\n },\n "Category": {\n "description": "The category of this task or phase",\n "title": "Category",\n "type": "string"\n },\n "Detail": {\n "anyOf": [\n {\n "type": "object"\n },\n {\n "items": {},\n "type": "array"\n },\n {\n "type": "string"\n }\n ],\n "description": "Detailed information about a task, phase, or event",\n "title": "Detail"\n },\n "Dispatch": {\n "properties": {\n "status": {\n "$ref": "#/$defs/Status2"\n },\n "assignment": {\n "anyOf": [\n {\n "$ref": "#/$defs/Assignment"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "errors": {\n "anyOf": [\n {\n "items": {\n "$ref": "#/$defs/Error"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Errors"\n }\n },\n "required": [\n "status"\n ],\n "title": "Dispatch",\n "type": "object"\n },\n "Error": {\n "properties": {\n "code": {\n "anyOf": [\n {\n "minimum": 0,\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A standard code for the kind of error that has occurred",\n "title": "Code"\n },\n "category": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "The category of the error",\n "title": "Category"\n },\n "detail": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Details about the error",\n "title": "Detail"\n }\n },\n "title": "Error",\n "type": "object"\n },\n "EstimateMillis": {\n "description": "An estimate, in milliseconds, of how long the subject will take to complete",\n "minimum": 0,\n "title": "EstimateMillis",\n "type": "integer"\n },\n "EventState": {\n "properties": {\n "id": {\n "$ref": "#/$defs/Id"\n },\n "status": {\n "anyOf": [\n {\n "$ref": "#/$defs/Status"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "name": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "The brief name of the event",\n "title": "Name"\n },\n "detail": {\n "anyOf": [\n {\n "$ref": "#/$defs/Detail"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Detailed information about the event"\n },\n "deps": {\n "anyOf": [\n {\n "items": {\n "minimum": 0,\n "type": "integer"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "This event may depend on other events. This array contains the IDs of those other event dependencies.",\n "title": "Deps"\n }\n },\n "required": [\n "id"\n ],\n "title": "EventState",\n "type": "object"\n },\n "Id": {\n "minimum": 0,\n "title": "Id",\n "type": "integer"\n },\n "Interruption": {\n "properties": {\n "unix_millis_request_time": {\n "description": "The time that the interruption request arrived",\n "title": "Unix Millis Request Time",\n "type": "integer"\n },\n "labels": {\n "description": "Labels to describe the purpose of the interruption, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.",\n "items": {\n "type": "string"\n },\n "title": "Labels",\n "type": "array"\n },\n "resumed_by": {\n "anyOf": [\n {\n "$ref": "#/$defs/ResumedBy"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Information about the resume request that ended this interruption. This field will be missing if the interruption is still active."\n }\n },\n "required": [\n "unix_millis_request_time",\n "labels"\n ],\n "title": "Interruption",\n "type": "object"\n },\n "Killed": {\n "properties": {\n "unix_millis_request_time": {\n "description": "The time that the cancellation request arrived",\n "title": "Unix Millis Request Time",\n "type": "integer"\n },\n "labels": {\n "description": "Labels to describe the kill request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.",\n "items": {\n "type": "string"\n },\n "title": "Labels",\n "type": "array"\n }\n },\n "required": [\n "unix_millis_request_time",\n "labels"\n ],\n "title": "Killed",\n "type": "object"\n },\n "Phase": {\n "properties": {\n "id": {\n "$ref": "#/$defs/Id"\n },\n "category": {\n "anyOf": [\n {\n "$ref": "#/$defs/Category"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "detail": {\n "anyOf": [\n {\n "$ref": "#/$defs/Detail"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "unix_millis_start_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Unix Millis Start Time"\n },\n "unix_millis_finish_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Unix Millis Finish Time"\n },\n "original_estimate_millis": {\n "anyOf": [\n {\n "$ref": "#/$defs/EstimateMillis"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "estimate_millis": {\n "anyOf": [\n {\n "$ref": "#/$defs/EstimateMillis"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "final_event_id": {\n "anyOf": [\n {\n "$ref": "#/$defs/Id"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "events": {\n "anyOf": [\n {\n "additionalProperties": {\n "$ref": "#/$defs/EventState"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A dictionary of events for this phase. The keys (property names) are the event IDs, which are integers.",\n "title": "Events"\n },\n "skip_requests": {\n "anyOf": [\n {\n "additionalProperties": {\n "$ref": "#/$defs/SkipPhaseRequest"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Information about any skip requests that have been received",\n "title": "Skip Requests"\n }\n },\n "required": [\n "id"\n ],\n "title": "Phase",\n "type": "object"\n },\n "ResumedBy": {\n "properties": {\n "unix_millis_request_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "The time that the resume request arrived",\n "title": "Unix Millis Request Time"\n },\n "labels": {\n "description": "Labels to describe the resume request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.",\n "items": {\n "type": "string"\n },\n "title": "Labels",\n "type": "array"\n }\n },\n "required": [\n "labels"\n ],\n "title": "ResumedBy",\n "type": "object"\n },\n "SkipPhaseRequest": {\n "properties": {\n "unix_millis_request_time": {\n "description": "The time that the skip request arrived",\n "title": "Unix Millis Request Time",\n "type": "integer"\n },\n "labels": {\n "description": "Labels to describe the purpose of the skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.",\n "items": {\n "type": "string"\n },\n "title": "Labels",\n "type": "array"\n },\n "undo": {\n "anyOf": [\n {\n "$ref": "#/$defs/Undo"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Information about an undo skip request that applied to this request"\n }\n },\n "required": [\n "unix_millis_request_time",\n "labels"\n ],\n "title": "SkipPhaseRequest",\n "type": "object"\n },\n "Status": {\n "enum": [\n "uninitialized",\n "blocked",\n "error",\n "failed",\n "queued",\n "standby",\n "underway",\n "delayed",\n "skipped",\n "canceled",\n "killed",\n "completed"\n ],\n "title": "Status",\n "type": "string"\n },\n "Status2": {\n "enum": [\n "queued",\n "selected",\n "dispatched",\n "failed_to_assign",\n "canceled_in_flight"\n ],\n "title": "Status2",\n "type": "string"\n },\n "Undo": {\n "properties": {\n "unix_millis_request_time": {\n "description": "The time that the undo skip request arrived",\n "title": "Unix Millis Request Time",\n "type": "integer"\n },\n "labels": {\n "description": "Labels to describe the undo skip request, items can be a single value like `dashboard` or a key-value pair like `app=dashboard`, in the case of a single value, it will be interpreted as a key-value pair with an empty string value.",\n "items": {\n "type": "string"\n },\n "title": "Labels",\n "type": "array"\n }\n },\n "required": [\n "unix_millis_request_time",\n "labels"\n ],\n "title": "Undo",\n "type": "object"\n }\n },\n "properties": {\n "booking": {\n "$ref": "#/$defs/Booking"\n },\n "category": {\n "anyOf": [\n {\n "$ref": "#/$defs/Category"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "detail": {\n "anyOf": [\n {\n "$ref": "#/$defs/Detail"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "unix_millis_start_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Unix Millis Start Time"\n },\n "unix_millis_finish_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Unix Millis Finish Time"\n },\n "original_estimate_millis": {\n "anyOf": [\n {\n "$ref": "#/$defs/EstimateMillis"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "estimate_millis": {\n "anyOf": [\n {\n "$ref": "#/$defs/EstimateMillis"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "assigned_to": {\n "anyOf": [\n {\n "$ref": "#/$defs/AssignedTo"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Which agent (robot) is the task assigned to"\n },\n "status": {\n "anyOf": [\n {\n "$ref": "#/$defs/Status"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "dispatch": {\n "anyOf": [\n {\n "$ref": "#/$defs/Dispatch"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "phases": {\n "anyOf": [\n {\n "additionalProperties": {\n "$ref": "#/$defs/Phase"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A dictionary of the states of the phases of the task. The keys (property names) are phase IDs, which are integers.",\n "title": "Phases"\n },\n "completed": {\n "anyOf": [\n {\n "items": {\n "$ref": "#/$defs/Id"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "An array of the IDs of completed phases of this task",\n "title": "Completed"\n },\n "active": {\n "anyOf": [\n {\n "$ref": "#/$defs/Id"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "The ID of the active phase for this task"\n },\n "pending": {\n "anyOf": [\n {\n "items": {\n "$ref": "#/$defs/Id"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "An array of the pending phases of this task",\n "title": "Pending"\n },\n "interruptions": {\n "anyOf": [\n {\n "additionalProperties": {\n "$ref": "#/$defs/Interruption"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A dictionary of interruptions that have been applied to this task. The keys (property names) are the unique token of the interruption request.",\n "title": "Interruptions"\n },\n "cancellation": {\n "anyOf": [\n {\n "$ref": "#/$defs/Cancellation"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "If the task was cancelled, this will describe information about the request."\n },\n "killed": {\n "anyOf": [\n {\n "$ref": "#/$defs/Killed"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "If the task was killed, this will describe information about the request."\n }\n },\n "required": [\n "booking"\n ],\n "title": "TaskState",\n "type": "object"\n}\n```\n\n\n### /tasks/{task_id}/log\n\n\n```\n{\n "$defs": {\n "LogEntry": {\n "properties": {\n "seq": {\n "description": "Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.",\n "exclusiveMaximum": 4294967296,\n "minimum": 0,\n "title": "Seq",\n "type": "integer"\n },\n "tier": {\n "allOf": [\n {\n "$ref": "#/$defs/Tier"\n }\n ],\n "description": "The importance level of the log entry"\n },\n "unix_millis_time": {\n "title": "Unix Millis Time",\n "type": "integer"\n },\n "text": {\n "description": "The text of the log entry",\n "title": "Text",\n "type": "string"\n }\n },\n "required": [\n "seq",\n "tier",\n "unix_millis_time",\n "text"\n ],\n "title": "LogEntry",\n "type": "object"\n },\n "Phases": {\n "additionalProperties": false,\n "properties": {\n "log": {\n "anyOf": [\n {\n "items": {\n "$ref": "#/$defs/LogEntry"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Log entries related to the overall phase",\n "title": "Log"\n },\n "events": {\n "anyOf": [\n {\n "additionalProperties": {\n "items": {\n "$ref": "#/$defs/LogEntry"\n },\n "type": "array"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A dictionary whose keys (property names) are the indices of an event in the phase",\n "title": "Events"\n }\n },\n "title": "Phases",\n "type": "object"\n },\n "Tier": {\n "enum": [\n "uninitialized",\n "info",\n "warning",\n "error"\n ],\n "title": "Tier",\n "type": "string"\n }\n },\n "additionalProperties": false,\n "properties": {\n "task_id": {\n "title": "Task Id",\n "type": "string"\n },\n "log": {\n "anyOf": [\n {\n "items": {\n "$ref": "#/$defs/LogEntry"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Log entries related to the overall task",\n "title": "Log"\n },\n "phases": {\n "anyOf": [\n {\n "additionalProperties": {\n "$ref": "#/$defs/Phases"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A dictionary whose keys (property names) are the indices of a phase",\n "title": "Phases"\n }\n },\n "required": [\n "task_id"\n ],\n "title": "TaskEventLog",\n "type": "object"\n}\n```\n\n\n### /dispensers/{guid}/state\n\n\n```\n{\n "$defs": {\n "Time": {\n "properties": {\n "sec": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Sec",\n "type": "integer"\n },\n "nanosec": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "Nanosec",\n "type": "integer"\n }\n },\n "required": [\n "sec",\n "nanosec"\n ],\n "title": "Time",\n "type": "object"\n }\n },\n "properties": {\n "time": {\n "$ref": "#/$defs/Time"\n },\n "guid": {\n "title": "Guid",\n "type": "string"\n },\n "mode": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Mode",\n "type": "integer"\n },\n "request_guid_queue": {\n "items": {\n "type": "string"\n },\n "title": "Request Guid Queue",\n "type": "array"\n },\n "seconds_remaining": {\n "title": "Seconds Remaining",\n "type": "number"\n }\n },\n "required": [\n "time",\n "guid",\n "mode",\n "request_guid_queue",\n "seconds_remaining"\n ],\n "title": "DispenserState",\n "type": "object"\n}\n```\n\n\n### /ingestors/{guid}/state\n\n\n```\n{\n "$defs": {\n "Time": {\n "properties": {\n "sec": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Sec",\n "type": "integer"\n },\n "nanosec": {\n "maximum": 4294967295,\n "minimum": 0,\n "title": "Nanosec",\n "type": "integer"\n }\n },\n "required": [\n "sec",\n "nanosec"\n ],\n "title": "Time",\n "type": "object"\n }\n },\n "properties": {\n "time": {\n "$ref": "#/$defs/Time"\n },\n "guid": {\n "title": "Guid",\n "type": "string"\n },\n "mode": {\n "maximum": 2147483647,\n "minimum": -2147483648,\n "title": "Mode",\n "type": "integer"\n },\n "request_guid_queue": {\n "items": {\n "type": "string"\n },\n "title": "Request Guid Queue",\n "type": "array"\n },\n "seconds_remaining": {\n "title": "Seconds Remaining",\n "type": "number"\n }\n },\n "required": [\n "time",\n "guid",\n "mode",\n "request_guid_queue",\n "seconds_remaining"\n ],\n "title": "IngestorState",\n "type": "object"\n}\n```\n\n\n### /fleets/{name}/state\n\n\n```\n{\n "$defs": {\n "Commission": {\n "properties": {\n "dispatch_tasks": {\n "anyOf": [\n {\n "type": "boolean"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Should the robot accept dispatched tasks, true/false. When used in a request, leave this unset to not change the robot\'s current value.",\n "title": "Dispatch Tasks"\n },\n "direct_tasks": {\n "anyOf": [\n {\n "type": "boolean"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Should the robot accept direct task requests, true/false. When used in a request, leave this unset to not change the robot\'s current value.",\n "title": "Direct Tasks"\n },\n "idle_behavior": {\n "anyOf": [\n {\n "type": "boolean"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Should the robot perform its idle behavior, true/false. When used in a request, leave this unset to not change the robot\'s current value.",\n "title": "Idle Behavior"\n }\n },\n "title": "Commission",\n "type": "object"\n },\n "Issue": {\n "properties": {\n "category": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Category of the robot\'s issue",\n "title": "Category"\n },\n "detail": {\n "anyOf": [\n {\n "type": "object"\n },\n {\n "items": {},\n "type": "array"\n },\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Detailed information about the issue",\n "title": "Detail"\n }\n },\n "title": "Issue",\n "type": "object"\n },\n "Location2D": {\n "properties": {\n "map": {\n "title": "Map",\n "type": "string"\n },\n "x": {\n "title": "X",\n "type": "number"\n },\n "y": {\n "title": "Y",\n "type": "number"\n },\n "yaw": {\n "title": "Yaw",\n "type": "number"\n }\n },\n "required": [\n "map",\n "x",\n "y",\n "yaw"\n ],\n "title": "Location2D",\n "type": "object"\n },\n "MutexGroups": {\n "properties": {\n "locked": {\n "anyOf": [\n {\n "items": {\n "type": "string"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A list of mutex groups that this robot has currently locked",\n "title": "Locked"\n },\n "requesting": {\n "anyOf": [\n {\n "items": {\n "type": "string"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A list of the mutex groups that this robot is currently requesting but has not lockd yet",\n "title": "Requesting"\n }\n },\n "title": "MutexGroups",\n "type": "object"\n },\n "RobotState": {\n "properties": {\n "name": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Name"\n },\n "status": {\n "anyOf": [\n {\n "$ref": "#/$defs/Status"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A simple token representing the status of the robot"\n },\n "task_id": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "The ID of the task this robot is currently working on. Empty string if the robot is not working on a task.",\n "title": "Task Id"\n },\n "unix_millis_time": {\n "anyOf": [\n {\n "type": "integer"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Unix Millis Time"\n },\n "location": {\n "anyOf": [\n {\n "$ref": "#/$defs/Location2D"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "battery": {\n "anyOf": [\n {\n "maximum": 1.0,\n "minimum": 0.0,\n "type": "number"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "State of charge of the battery. Values range from 0.0 (depleted) to 1.0 (fully charged)",\n "title": "Battery"\n },\n "issues": {\n "anyOf": [\n {\n "items": {\n "$ref": "#/$defs/Issue"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A list of issues with the robot that operators need to address",\n "title": "Issues"\n },\n "commission": {\n "anyOf": [\n {\n "$ref": "#/$defs/Commission"\n },\n {\n "type": "null"\n }\n ],\n "default": null\n },\n "mutex_groups": {\n "anyOf": [\n {\n "$ref": "#/$defs/MutexGroups"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Information about the mutex groups that this robot is interacting with"\n }\n },\n "title": "RobotState",\n "type": "object"\n },\n "Status": {\n "enum": [\n "uninitialized",\n "offline",\n "shutdown",\n "idle",\n "charging",\n "working",\n "error"\n ],\n "title": "Status",\n "type": "string"\n }\n },\n "properties": {\n "name": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Name"\n },\n "robots": {\n "anyOf": [\n {\n "additionalProperties": {\n "$ref": "#/$defs/RobotState"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "A dictionary of the states of the robots that belong to this fleet",\n "title": "Robots"\n }\n },\n "title": "FleetState",\n "type": "object"\n}\n```\n\n\n### /fleets/{name}/log\n\n\n```\n{\n "$defs": {\n "LogEntry": {\n "properties": {\n "seq": {\n "description": "Sequence number for this entry. Each entry has a unique sequence number which monotonically increase, until integer overflow causes a wrap around.",\n "exclusiveMaximum": 4294967296,\n "minimum": 0,\n "title": "Seq",\n "type": "integer"\n },\n "tier": {\n "allOf": [\n {\n "$ref": "#/$defs/Tier"\n }\n ],\n "description": "The importance level of the log entry"\n },\n "unix_millis_time": {\n "title": "Unix Millis Time",\n "type": "integer"\n },\n "text": {\n "description": "The text of the log entry",\n "title": "Text",\n "type": "string"\n }\n },\n "required": [\n "seq",\n "tier",\n "unix_millis_time",\n "text"\n ],\n "title": "LogEntry",\n "type": "object"\n },\n "Tier": {\n "enum": [\n "uninitialized",\n "info",\n "warning",\n "error"\n ],\n "title": "Tier",\n "type": "string"\n }\n },\n "properties": {\n "name": {\n "anyOf": [\n {\n "type": "string"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "title": "Name"\n },\n "log": {\n "anyOf": [\n {\n "items": {\n "$ref": "#/$defs/LogEntry"\n },\n "type": "array"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Log for the overall fleet",\n "title": "Log"\n },\n "robots": {\n "anyOf": [\n {\n "additionalProperties": {\n "items": {\n "$ref": "#/$defs/LogEntry"\n },\n "type": "array"\n },\n "type": "object"\n },\n {\n "type": "null"\n }\n ],\n "default": null,\n "description": "Dictionary of logs for the individual robots. The keys (property names) are the robot names.",\n "title": "Robots"\n }\n },\n "title": "FleetLog",\n "type": "object"\n}\n```\n\n\n### /rios\n\n\n```\n{\n "properties": {\n "id": {\n "title": "Id",\n "type": "string"\n },\n "type": {\n "title": "Type",\n "type": "string"\n },\n "data": {\n "title": "Data",\n "type": "object"\n }\n },\n "required": [\n "id",\n "type",\n "data"\n ],\n "title": "Rio",\n "type": "object"\n}\n```\n\n', operationId: '_lambda__socket_io_get', responses: { '200': { @@ -95,12 +95,55 @@ export default { }, }, }, - '/alerts': { + '/alerts/request': { + post: { + tags: ['Alerts'], + summary: 'Create New Alert', + description: 'Creates a new alert.', + operationId: 'create_new_alert_alerts_request_post', + parameters: [ + { + name: 'authorization', + in: 'header', + required: false, + schema: { anyOf: [{ type: 'string' }, { type: 'null' }], title: 'Authorization' }, + }, + ], + requestBody: { + required: true, + content: { + 'application/json': { schema: { $ref: '#/components/schemas/AlertRequest' } }, + }, + }, + responses: { + '201': { + description: 'Successful Response', + content: { + 'application/json': { schema: { $ref: '#/components/schemas/AlertRequest' } }, + }, + }, + '422': { + description: 'Validation Error', + content: { + 'application/json': { schema: { $ref: '#/components/schemas/HTTPValidationError' } }, + }, + }, + }, + }, + }, + '/alerts/request/{alert_id}': { get: { tags: ['Alerts'], - summary: 'Get Alerts', - operationId: 'get_alerts_alerts_get', + summary: 'Get Alert', + description: 'Gets an alert based on the alert ID.', + operationId: 'get_alert_alerts_request__alert_id__get', parameters: [ + { + name: 'alert_id', + in: 'path', + required: true, + schema: { type: 'string', title: 'Alert Id' }, + }, { name: 'authorization', in: 'header', @@ -112,13 +155,7 @@ export default { '200': { description: 'Successful Response', content: { - 'application/json': { - schema: { - type: 'array', - items: { $ref: '#/components/schemas/Alert' }, - title: 'Response Get Alerts Alerts Get', - }, - }, + 'application/json': { schema: { $ref: '#/components/schemas/AlertRequest' } }, }, }, '422': { @@ -129,22 +166,26 @@ export default { }, }, }, + }, + '/alerts/request/{alert_id}/respond': { post: { tags: ['Alerts'], - summary: 'Create Alert', - operationId: 'create_alert_alerts_post', + summary: 'Respond To Alert', + description: + 'Responds to an existing alert. The response must be one of the available\nresponses listed in the alert.', + operationId: 'respond_to_alert_alerts_request__alert_id__respond_post', parameters: [ { name: 'alert_id', - in: 'query', + in: 'path', required: true, schema: { type: 'string', title: 'Alert Id' }, }, { - name: 'category', + name: 'response', in: 'query', required: true, - schema: { type: 'string', title: 'Category' }, + schema: { type: 'string', title: 'Response' }, }, { name: 'authorization', @@ -156,7 +197,9 @@ export default { responses: { '201': { description: 'Successful Response', - content: { 'application/json': { schema: { $ref: '#/components/schemas/Alert' } } }, + content: { + 'application/json': { schema: { $ref: '#/components/schemas/AlertResponse' } }, + }, }, '422': { description: 'Validation Error', @@ -167,11 +210,12 @@ export default { }, }, }, - '/alerts/{alert_id}': { + '/alerts/request/{alert_id}/response': { get: { tags: ['Alerts'], - summary: 'Get Alert', - operationId: 'get_alert_alerts__alert_id__get', + summary: 'Get Alert Response', + description: 'Gets the response to the alert based on the alert ID.', + operationId: 'get_alert_response_alerts_request__alert_id__response_get', parameters: [ { name: 'alert_id', @@ -189,7 +233,9 @@ export default { responses: { '200': { description: 'Successful Response', - content: { 'application/json': { schema: { $ref: '#/components/schemas/Alert' } } }, + content: { + 'application/json': { schema: { $ref: '#/components/schemas/AlertResponse' } }, + }, }, '422': { description: 'Validation Error', @@ -199,16 +245,26 @@ export default { }, }, }, - post: { + }, + '/alerts/requests/task/{task_id}': { + get: { tags: ['Alerts'], - summary: 'Acknowledge Alert', - operationId: 'acknowledge_alert_alerts__alert_id__post', + summary: 'Get Alerts Of Task', + description: + 'Returns all the alerts associated to a task ID. Provides the option to only\nreturn alerts that have not been responded to yet.', + operationId: 'get_alerts_of_task_alerts_requests_task__task_id__get', parameters: [ { - name: 'alert_id', + name: 'task_id', in: 'path', required: true, - schema: { type: 'string', title: 'Alert Id' }, + schema: { type: 'string', title: 'Task Id' }, + }, + { + name: 'unresponded', + in: 'query', + required: false, + schema: { type: 'boolean', default: true, title: 'Unresponded' }, }, { name: 'authorization', @@ -218,9 +274,64 @@ export default { }, ], responses: { - '201': { + '200': { + description: 'Successful Response', + content: { + 'application/json': { + schema: { + type: 'array', + items: { $ref: '#/components/schemas/AlertRequest' }, + title: 'Response Get Alerts Of Task Alerts Requests Task Task Id Get', + }, + }, + }, + }, + '422': { + description: 'Validation Error', + content: { + 'application/json': { schema: { $ref: '#/components/schemas/HTTPValidationError' } }, + }, + }, + }, + }, + }, + '/alerts/unresponded_requests': { + get: { + tags: ['Alerts'], + summary: 'Get Unresponded Alerts', + description: + 'Returns the list of alert IDs that have yet to be responded to, while a\nresponse was required.', + operationId: 'get_unresponded_alerts_alerts_unresponded_requests_get', + parameters: [ + { + name: 'authorization', + in: 'header', + required: false, + schema: { anyOf: [{ type: 'string' }, { type: 'null' }], title: 'Authorization' }, + }, + ], + requestBody: { + content: { + 'application/json': { + schema: { + anyOf: [{ $ref: '#/components/schemas/Pagination' }, { type: 'null' }], + title: 'Pagination', + }, + }, + }, + }, + responses: { + '200': { description: 'Successful Response', - content: { 'application/json': { schema: { $ref: '#/components/schemas/Alert' } } }, + content: { + 'application/json': { + schema: { + type: 'array', + items: { $ref: '#/components/schemas/AlertRequest' }, + title: 'Response Get Unresponded Alerts Alerts Unresponded Requests Get', + }, + }, + }, }, '422': { description: 'Validation Error', @@ -474,7 +585,9 @@ export default { name: 'tier', in: 'query', required: true, - schema: { $ref: '#/components/schemas/Tier-Input' }, + schema: { + $ref: '#/components/schemas/api_server__models__delivery_alerts__DeliveryAlert__Tier', + }, }, { name: 'task_id', @@ -2979,30 +3092,60 @@ export default { required: ['name', 'x_offset', 'y_offset', 'yaw', 'scale', 'encoding', 'data'], title: 'AffineImage', }, - Alert: { + AlertParameter: { + properties: { + name: { type: 'string', title: 'Name' }, + value: { type: 'string', title: 'Value' }, + }, + type: 'object', + required: ['name', 'value'], + title: 'AlertParameter', + }, + AlertRequest: { properties: { id: { type: 'string', title: 'Id' }, - original_id: { type: 'string', title: 'Original Id' }, - category: { - $ref: '#/components/schemas/api_server__models__tortoise_models__alerts__Alert__Category', + unix_millis_alert_time: { type: 'integer', title: 'Unix Millis Alert Time' }, + title: { type: 'string', title: 'Title' }, + subtitle: { type: 'string', title: 'Subtitle' }, + message: { type: 'string', title: 'Message' }, + display: { type: 'boolean', title: 'Display' }, + tier: { $ref: '#/components/schemas/api_server__models__alerts__AlertRequest__Tier' }, + responses_available: { + items: { type: 'string' }, + type: 'array', + title: 'Responses Available', }, - unix_millis_created_time: { type: 'integer', title: 'Unix Millis Created Time' }, - acknowledged_by: { type: 'string', title: 'Acknowledged By' }, - unix_millis_acknowledged_time: { - type: 'integer', - title: 'Unix Millis Acknowledged Time', + alert_parameters: { + items: { $ref: '#/components/schemas/AlertParameter' }, + type: 'array', + title: 'Alert Parameters', }, + task_id: { anyOf: [{ type: 'string' }, { type: 'null' }], title: 'Task Id' }, }, type: 'object', required: [ 'id', - 'original_id', - 'category', - 'unix_millis_created_time', - 'acknowledged_by', - 'unix_millis_acknowledged_time', + 'unix_millis_alert_time', + 'title', + 'subtitle', + 'message', + 'display', + 'tier', + 'responses_available', + 'alert_parameters', + 'task_id', ], - title: 'Alert', + title: 'AlertRequest', + }, + AlertResponse: { + properties: { + id: { type: 'string', title: 'Id' }, + unix_millis_response_time: { type: 'integer', title: 'Unix Millis Response Time' }, + response: { type: 'string', title: 'Response' }, + }, + type: 'object', + required: ['id', 'unix_millis_response_time', 'response'], + title: 'AlertResponse', }, AssignedTo: { properties: { @@ -3757,6 +3900,16 @@ export default { type: 'object', title: 'MutexGroups', }, + Pagination: { + properties: { + limit: { type: 'integer', title: 'Limit' }, + offset: { type: 'integer', title: 'Offset' }, + order_by: { items: { type: 'string' }, type: 'array', title: 'Order By' }, + }, + type: 'object', + required: ['limit', 'offset', 'order_by'], + title: 'Pagination', + }, Param: { properties: { name: { type: 'string', title: 'Name' }, @@ -4830,7 +4983,6 @@ export default { required: ['booking'], title: 'TaskState', }, - 'Tier-Input': { type: 'string', enum: ['warning', 'error'], title: 'Tier' }, Time: { properties: { sec: { type: 'integer', maximum: 2147483647.0, minimum: -2147483648.0, title: 'Sec' }, @@ -4960,6 +5112,11 @@ export default { required: ['loc', 'msg', 'type'], title: 'ValidationError', }, + api_server__models__alerts__AlertRequest__Tier: { + type: 'string', + enum: ['info', 'warning', 'error'], + title: 'Tier', + }, api_server__models__delivery_alerts__DeliveryAlert__Category: { type: 'string', enum: ['missing', 'wrong', 'obstructed', 'cancelled'], @@ -5003,11 +5160,6 @@ export default { ], title: 'Status', }, - api_server__models__tortoise_models__alerts__Alert__Category: { - type: 'string', - enum: ['default', 'task', 'fleet', 'robot'], - title: 'Category', - }, }, }, }; diff --git a/packages/api-server/api_server/app.py b/packages/api-server/api_server/app.py index f55d155c3..2e8a7e5a6 100644 --- a/packages/api-server/api_server/app.py +++ b/packages/api-server/api_server/app.py @@ -79,6 +79,7 @@ async def lifespan(_app: FastIO): await stack.enter_async_context(get_alert_events) await stack.enter_async_context(get_beacon_events) await stack.enter_async_context(get_rio_events) + await stack.enter_async_context(get_alert_events) await Tortoise.init( db_url=app_config.db_url, diff --git a/packages/api-server/api_server/exceptions.py b/packages/api-server/api_server/exceptions.py new file mode 100644 index 000000000..215ae39c2 --- /dev/null +++ b/packages/api-server/api_server/exceptions.py @@ -0,0 +1,16 @@ +class AlreadyExistsError(Exception): + """ + Raised when an a resource already exists and there is a conflict. + """ + + +class NotFoundError(Exception): + """ + Raised when a resource is not found. + """ + + +class InvalidInputError(Exception): + """ + Raised when an input is invalid. + """ diff --git a/packages/api-server/api_server/gateway.py b/packages/api-server/api_server/gateway.py index 7c99f1672..3cfdfc74a 100644 --- a/packages/api-server/api_server/gateway.py +++ b/packages/api-server/api_server/gateway.py @@ -29,6 +29,8 @@ from rmf_ingestor_msgs.msg import IngestorState as RmfIngestorState from rmf_lift_msgs.msg import LiftRequest as RmfLiftRequest from rmf_lift_msgs.msg import LiftState as RmfLiftState +from rmf_task_msgs.msg import Alert as RmfAlert +from rmf_task_msgs.msg import AlertResponse as RmfAlertResponse from rmf_task_msgs.srv import CancelTask as RmfCancelTask from rmf_task_msgs.srv import SubmitTask as RmfSubmitTask from rosidl_runtime_py.convert import message_to_ordereddict @@ -38,10 +40,18 @@ from api_server.models.user import User from api_server.repositories.cached_files import get_cached_file_repo from api_server.repositories.rmf import RmfRepository -from api_server.rmf_io.events import RmfEvents, get_rmf_events +from api_server.rmf_io.events import ( + AlertEvents, + RmfEvents, + get_alert_events, + get_rmf_events, +) from api_server.ros import get_ros_node from .models import ( + AlertParameter, + AlertRequest, + AlertResponse, BeaconState, BuildingMap, DeliveryAlert, @@ -59,6 +69,7 @@ def __init__( self, cached_files: CachedFilesRepository, ros_node: rclpy.node.Node, + alert_events: AlertEvents, rmf_events: RmfEvents, rmf_repo: RmfRepository, loop: asyncio.AbstractEventLoop, @@ -67,6 +78,7 @@ def __init__( ): self._cached_files = cached_files self._ros_node = ros_node + self._alert_events = alert_events self._rmf_events = rmf_events self._rmf_repo = rmf_repo self._loop = loop @@ -104,6 +116,17 @@ def __init__( ), ) + self._alert_response = self._ros_node.create_publisher( + RmfAlertResponse, + "alert_response", + rclpy.qos.QoSProfile( + history=rclpy.qos.HistoryPolicy.KEEP_LAST, + depth=10, + reliability=rclpy.qos.ReliabilityPolicy.RELIABLE, + durability=rclpy.qos.DurabilityPolicy.TRANSIENT_LOCAL, + ), + ) + self._mutex_group_release = self._ros_node.create_publisher( RmfMutexGroupManualRelease, "mutex_group_manual_release", @@ -304,6 +327,74 @@ def handle_delivery_alert(msg): ) self._subscriptions.append(delivery_alert_request_sub) + def convert_alert(msg): + alert = cast(RmfAlert, msg) + tier = AlertRequest.Tier.Info + if alert.tier == RmfAlert.TIER_WARNING: + tier = AlertRequest.Tier.Warning + elif alert.tier == RmfAlert.TIER_ERROR: + tier = AlertRequest.Tier.Error + + parameters = [] + for p in alert.alert_parameters: + parameters.append(AlertParameter(name=p.name, value=p.value)) + + responses_available = cast(list[str], alert.responses_available) + return AlertRequest( + id=alert.id, + unix_millis_alert_time=round(datetime.now().timestamp() * 1000), + title=alert.title, + subtitle=alert.subtitle, + message=alert.message, + display=alert.display, + tier=tier, + responses_available=responses_available, + alert_parameters=parameters, + task_id=alert.task_id if len(alert.task_id) > 0 else None, + ) + + def handle_alert(alert: AlertRequest): + logging.info(f"Received alert: {alert}") + self._alert_events.alert_requests.on_next(alert) + + alert_sub = self._ros_node.create_subscription( + RmfAlert, + "alert", + lambda msg: handle_alert(convert_alert(msg)), + rclpy.qos.QoSProfile( + history=rclpy.qos.HistoryPolicy.KEEP_LAST, + depth=10, + reliability=rclpy.qos.ReliabilityPolicy.RELIABLE, + durability=rclpy.qos.DurabilityPolicy.TRANSIENT_LOCAL, + ), + ) + self._subscriptions.append(alert_sub) + + def convert_alert_response(msg): + alert_response = cast(RmfAlertResponse, msg) + return AlertResponse( + id=alert_response.id, + unix_millis_response_time=round(datetime.now().timestamp() * 1000), + response=alert_response.response, + ) + + def handle_alert_response(alert_response: AlertResponse): + logging.info(f"Received alert response: {alert_response}") + self._alert_events.alert_responses.on_next(alert_response) + + alert_response_sub = self._ros_node.create_subscription( + RmfAlertResponse, + "alert_response", + lambda msg: handle_alert_response(convert_alert_response(msg)), + rclpy.qos.QoSProfile( + history=rclpy.qos.HistoryPolicy.KEEP_LAST, + depth=10, + reliability=rclpy.qos.ReliabilityPolicy.RELIABLE, + durability=rclpy.qos.DurabilityPolicy.TRANSIENT_LOCAL, + ), + ) + self._subscriptions.append(alert_response_sub) + def handle_fire_alarm_trigger(msg): msg = cast(BoolMsg, msg) if msg.data: @@ -384,6 +475,12 @@ def respond_to_delivery_alert( msg.message = message self._delivery_alert_response.publish(msg) + def respond_to_alert(self, alert_id: str, response: str): + msg = RmfAlertResponse() + msg.id = alert_id + msg.response = response + self._alert_response.publish(msg) + def manual_release_mutex_groups( self, mutex_groups: list[str], @@ -407,6 +504,7 @@ def get_rmf_gateway(): return RmfGateway( get_cached_file_repo(), get_ros_node(), + get_alert_events(), get_rmf_events(), RmfRepository(User.get_system_user()), asyncio.get_event_loop(), diff --git a/packages/api-server/api_server/models/__init__.py b/packages/api-server/api_server/models/__init__.py index ac3182b97..7f6532b56 100644 --- a/packages/api-server/api_server/models/__init__.py +++ b/packages/api-server/api_server/models/__init__.py @@ -49,6 +49,7 @@ from .rmf_api.task_log_update import TaskEventLogUpdate from .rmf_api.task_request import TaskRequest from .rmf_api.task_state import Status as TaskStatus +from .rmf_api.task_state import Status2 as DispatchStatus from .rmf_api.task_state import TaskState from .rmf_api.task_state_update import TaskStateUpdate from .rmf_api.undo_skip_phase_request import UndoPhaseSkipRequest diff --git a/packages/api-server/api_server/models/alerts.py b/packages/api-server/api_server/models/alerts.py index da319df74..c64846350 100644 --- a/packages/api-server/api_server/models/alerts.py +++ b/packages/api-server/api_server/models/alerts.py @@ -1,11 +1,68 @@ -from .base import PydanticModel -from .tortoise_models.alerts import Alert as DbAlert +from datetime import datetime +from enum import Enum +from pydantic import BaseModel + +from . import tortoise_models as ttm + + +class AlertParameter(BaseModel): + name: str + value: str + + +class AlertResponse(BaseModel): + id: str + unix_millis_response_time: int + response: str + + @staticmethod + def from_tortoise(tortoise: ttm.AlertResponse) -> "AlertResponse": + return AlertResponse(**dict(tortoise.data)) + + async def save(self) -> None: + await ttm.AlertResponse.update_or_create( + { + "response_time": datetime.fromtimestamp( + self.unix_millis_response_time / 1000 + ), + "response": self.response, + "data": self.json(), + }, + id=self.id, + ) + + +class AlertRequest(BaseModel): + class Tier(str, Enum): + Info = "info" + Warning = "warning" + Error = "error" -class Alert(PydanticModel): id: str - original_id: str - category: DbAlert.Category - unix_millis_created_time: int - acknowledged_by: str - unix_millis_acknowledged_time: int + unix_millis_alert_time: int + title: str + subtitle: str + message: str + display: bool + tier: Tier + responses_available: list[str] + alert_parameters: list[AlertParameter] + task_id: str | None + + @staticmethod + def from_tortoise(tortoise: ttm.AlertRequest) -> "AlertRequest": + return AlertRequest(**dict(tortoise.data)) + + async def save(self) -> None: + await ttm.AlertRequest.update_or_create( + { + "request_time": datetime.fromtimestamp( + self.unix_millis_alert_time / 1000 + ), + "response_expected": (len(self.responses_available) > 0), + "task_id": self.task_id, + "data": self.json(), + }, + id=self.id, + ) diff --git a/packages/api-server/api_server/models/tortoise_models/alerts.py b/packages/api-server/api_server/models/tortoise_models/alerts.py index 7ac8ab8d4..0ef129559 100644 --- a/packages/api-server/api_server/models/tortoise_models/alerts.py +++ b/packages/api-server/api_server/models/tortoise_models/alerts.py @@ -1,23 +1,28 @@ -from enum import Enum - -from tortoise.fields import BigIntField, CharEnumField, CharField +from tortoise.fields import ( + BooleanField, + CharField, + DatetimeField, + JSONField, + OneToOneField, + ReverseRelation, +) from tortoise.models import Model -class Alert(Model): - """ - General alert that can be triggered by events. - """ +class AlertResponse(Model): + id = CharField(255, pk=True) + response_time = DatetimeField(null=False, index=True) + response = CharField(255, null=False, index=True) + data = JSONField() + alert_request = OneToOneField( + "models.AlertRequest", null=False, related_name="alert_response" + ) - class Category(str, Enum): - Default = "default" - Task = "task" - Fleet = "fleet" - Robot = "robot" +class AlertRequest(Model): id = CharField(255, pk=True) - original_id = CharField(255, index=True) - category = CharEnumField(Category, index=True) - unix_millis_created_time = BigIntField(null=False, index=True) - acknowledged_by = CharField(255, null=True, index=True) - unix_millis_acknowledged_time = BigIntField(null=True, index=True) + request_time = DatetimeField(null=False, index=True) + response_expected = BooleanField(null=False, index=True) + task_id = CharField(255, null=True, index=True) + data = JSONField() + alert_response = ReverseRelation["AlertResponse"] diff --git a/packages/api-server/api_server/repositories/alerts.py b/packages/api-server/api_server/repositories/alerts.py index 1f7af1851..427e2582e 100644 --- a/packages/api-server/api_server/repositories/alerts.py +++ b/packages/api-server/api_server/repositories/alerts.py @@ -1,89 +1,89 @@ -import logging -from datetime import datetime, timezone +from datetime import datetime +from typing import List -from fastapi import Depends - -from api_server.authenticator import user_dep -from api_server.models import Alert, User +from api_server.exceptions import AlreadyExistsError, InvalidInputError, NotFoundError +from api_server.models import AlertRequest, AlertResponse, Pagination from api_server.models import tortoise_models as ttm -from api_server.repositories.tasks import TaskRepository class AlertRepository: - def __init__( - self, - user: User = Depends(user_dep), - task_repo: TaskRepository = Depends(TaskRepository), - ): - self.user = user - self.task_repo = task_repo + async def create_new_alert(self, alert: AlertRequest) -> AlertRequest: + exists = await ttm.AlertRequest.exists(id=alert.id) + if exists: + raise AlreadyExistsError(f"Alert with ID {alert.id} already exists") - async def get_all_alerts(self) -> list[Alert]: - alerts = await ttm.Alert.all() - return [Alert.model_validate(a) for a in alerts] + await ttm.AlertRequest.create( + id=alert.id, + request_time=datetime.fromtimestamp(alert.unix_millis_alert_time / 1000), + response_expected=(len(alert.responses_available) > 0), + task_id=alert.task_id, + data=alert.json(), + ) + return alert - async def alert_exists(self, alert_id: str) -> bool: - result = await ttm.Alert.exists(id=alert_id) - return result + async def get_alert(self, alert_id: str) -> AlertRequest: + alert = await ttm.AlertRequest.get_or_none(id=alert_id) + if alert is None: + raise NotFoundError(f"Alert with ID {alert_id} does not exists") - async def alert_original_id_exists(self, original_id: str) -> bool: - result = await ttm.Alert.exists(original_id=original_id) - return result + alert_model = AlertRequest.from_tortoise(alert) + return alert_model - async def get_alert(self, alert_id: str) -> Alert | None: - alert = await ttm.Alert.get_or_none(id=alert_id) + async def create_response(self, alert_id: str, response: str) -> AlertResponse: + alert = await ttm.AlertRequest.get_or_none(id=alert_id) if alert is None: - logging.error(f"Alert with ID {alert_id} not found") - return None - alert_pydantic = Alert.model_validate(alert) - return alert_pydantic + raise NotFoundError(f"Alert with ID {alert_id} does not exists") - async def create_alert(self, alert_id: str, category: str) -> Alert | None: - alert, _ = await ttm.Alert.update_or_create( - { - "original_id": alert_id, - "category": category, - "unix_millis_created_time": round(datetime.now().timestamp() * 1e3), - "acknowledged_by": None, - "unix_millis_acknowledged_time": None, - }, + alert_model = AlertRequest.from_tortoise(alert) + if response not in alert_model.responses_available: + raise InvalidInputError( + f"Response [{response}] is not a response option of alert with ID {alert_model.id}" + ) + + alert_response_model = AlertResponse( id=alert_id, + unix_millis_response_time=round(datetime.now().timestamp() * 1000), + response=response, ) - if alert is None: - logging.error(f"Failed to create Alert with ID {alert_id}") - return None - alert_pydantic = Alert.model_validate(alert) - return alert_pydantic + await ttm.AlertResponse.create( + id=alert_id, + response_time=datetime.fromtimestamp( + alert_response_model.unix_millis_response_time / 1000 + ), + response=response, + data=alert_response_model.json(), + alert_request=alert, + ) + return alert_response_model - async def acknowledge_alert(self, alert_id: str) -> Alert | None: - alert = await ttm.Alert.get_or_none(id=alert_id) - if alert is None: - acknowledged_alert = await ttm.Alert.filter(original_id=alert_id).first() - if acknowledged_alert is None: - logging.error(f"No existing or past alert with ID {alert_id} found.") - return None - acknowledged_alert_pydantic = Alert.model_validate(acknowledged_alert) - return acknowledged_alert_pydantic + async def get_alert_response(self, alert_id: str) -> AlertResponse: + response = await ttm.AlertResponse.get_or_none(id=alert_id) + if response is None: + raise NotFoundError(f"Response to alert with ID {alert_id} does not exists") - ack_time = datetime.now() - epoch = datetime.fromtimestamp(0, timezone.utc) - ack_unix_millis = round((ack_time - epoch).total_seconds() * 1000) - new_id = f"{alert_id}__{ack_unix_millis}" + response_model = AlertResponse.from_tortoise(response) + return response_model - ack_alert = alert.clone(pk=new_id) - # TODO(aaronchongth): remove the following line once we bump - # tortoise-orm to include - # https://github.com/tortoise/tortoise-orm/pull/1131. This is a - # temporary workaround. - ack_alert._custom_generated_pk = True # pylint: disable=W0212 - unix_millis_acknowledged_time = round(ack_time.timestamp() * 1e3) - ack_alert.update_from_dict( - { - "acknowledged_by": self.user.username, - "unix_millis_acknowledged_time": unix_millis_acknowledged_time, - } - ) - await ack_alert.save() - await alert.delete() - ack_alert_pydantic = Alert.model_validate(ack_alert) - return ack_alert_pydantic + async def get_alerts_of_task( + self, task_id: str, unresponded: bool = True + ) -> List[AlertRequest]: + if unresponded: + task_id_alerts = await ttm.AlertRequest.filter( + response_expected=True, + task_id=task_id, + alert_response=None, + ) + else: + task_id_alerts = await ttm.AlertRequest.filter(task_id=task_id) + + alert_models = [AlertRequest.from_tortoise(alert) for alert in task_id_alerts] + return alert_models + + async def get_unresponded_alerts( + self, pagination: Pagination | None + ) -> List[AlertRequest]: + query = ttm.AlertRequest.filter(alert_response=None, response_expected=True) + if pagination: + query = query.limit(pagination.limit).offset(pagination.offset) + unresponded_alerts = await query.all() + return [AlertRequest.from_tortoise(alert) for alert in unresponded_alerts] diff --git a/packages/api-server/api_server/rmf_io/events.py b/packages/api-server/api_server/rmf_io/events.py index d89d92989..6f9edb930 100644 --- a/packages/api-server/api_server/rmf_io/events.py +++ b/packages/api-server/api_server/rmf_io/events.py @@ -48,7 +48,8 @@ def get_fleet_events(): class AlertEvents: def __init__(self): - self.alerts = Subject() + self.alert_requests = Subject() + self.alert_responses = Subject() @singleton_dep diff --git a/packages/api-server/api_server/routes/alerts.py b/packages/api-server/api_server/routes/alerts.py index 7bf7740c7..4d0b66a06 100644 --- a/packages/api-server/api_server/routes/alerts.py +++ b/packages/api-server/api_server/routes/alerts.py @@ -1,60 +1,130 @@ -from typing import Annotated +from typing import Annotated, List, Optional from fastapi import Depends, HTTPException -from reactivex import operators as rxops +from tortoise.exceptions import IntegrityError +from api_server.exceptions import AlreadyExistsError, InvalidInputError, NotFoundError from api_server.fast_io import FastIORouter, SubscriptionRequest -from api_server.models import Alert +from api_server.gateway import RmfGateway, get_rmf_gateway +from api_server.models import AlertRequest, AlertResponse, Pagination from api_server.repositories import AlertRepository -from api_server.rmf_io import AlertEvents -from api_server.rmf_io.events import get_alert_events +from api_server.rmf_io import AlertEvents, get_alert_events router = FastIORouter(tags=["Alerts"]) -@router.sub("", response_model=Alert) -async def sub_alerts( - _req: SubscriptionRequest, -): +@router.sub("/requests", response_model=AlertRequest) +async def sub_alerts(_req: SubscriptionRequest): alert_events = get_alert_events() - return alert_events.alerts.pipe(rxops.filter(lambda x: x is not None)) + return alert_events.alert_requests + +@router.post("/request", status_code=201, response_model=AlertRequest) +async def create_new_alert( + alert: AlertRequest, + repo: Annotated[AlertRepository, Depends(AlertRepository)], + alert_events: Annotated[AlertEvents, Depends(get_alert_events)], +): + """ + Creates a new alert. + """ + try: + created_alert = await repo.create_new_alert(alert) + except IntegrityError as e: + raise HTTPException(400, e) from e + except AlreadyExistsError as e: + raise HTTPException(409, str(e)) from e -@router.get("", response_model=list[Alert]) -async def get_alerts(repo: Annotated[AlertRepository, Depends(AlertRepository)]): - return await repo.get_all_alerts() + alert_events.alert_requests.on_next(created_alert) + return created_alert -@router.get("/{alert_id}", response_model=Alert) +@router.get("/request/{alert_id}", response_model=AlertRequest) async def get_alert( - alert_id: str, repo: Annotated[AlertRepository, Depends(AlertRepository)] + alert_id: str, + repo: Annotated[AlertRepository, Depends(AlertRepository)], ): - alert = await repo.get_alert(alert_id) - if alert is None: - raise HTTPException(404, f"Alert with ID {alert_id} not found") - return alert + """ + Gets an alert based on the alert ID. + """ + try: + alert_model = await repo.get_alert(alert_id) + except NotFoundError as e: + raise HTTPException(404, str(e)) from e + + return alert_model + + +@router.sub("/responses", response_model=AlertResponse) +async def sub_alert_responses(_req: SubscriptionRequest): + alert_events = get_alert_events() + return alert_events.alert_responses -@router.post("", status_code=201, response_model=Alert) -async def create_alert( +@router.post( + "/request/{alert_id}/respond", status_code=201, response_model=AlertResponse +) +async def respond_to_alert( alert_id: str, - category: str, + response: str, repo: Annotated[AlertRepository, Depends(AlertRepository)], + alert_events: Annotated[AlertEvents, Depends(get_alert_events)], + rmf_gateway: Annotated[RmfGateway, Depends(get_rmf_gateway)], ): - alert = await repo.create_alert(alert_id, category) - if alert is None: - raise HTTPException(404, f"Could not create alert with ID {alert_id}") - return alert + """ + Responds to an existing alert. The response must be one of the available + responses listed in the alert. + """ + try: + alert_response_model = await repo.create_response(alert_id, response) + except IntegrityError as e: + raise HTTPException(400, e) from e + except NotFoundError as e: + raise HTTPException(404, str(e)) from e + except InvalidInputError as e: + raise HTTPException(400, str(e)) from e + alert_events.alert_responses.on_next(alert_response_model) + rmf_gateway.respond_to_alert(alert_id, response) + return alert_response_model -@router.post("/{alert_id}", status_code=201, response_model=Alert) -async def acknowledge_alert( + +@router.get("/request/{alert_id}/response", response_model=AlertResponse) +async def get_alert_response( alert_id: str, repo: Annotated[AlertRepository, Depends(AlertRepository)], - alert_events: Annotated[AlertEvents, Depends(get_alert_events)], ): - alert = await repo.acknowledge_alert(alert_id) - if alert is None: - raise HTTPException(404, f"Could acknowledge alert with ID {alert_id}") - alert_events.alerts.on_next(alert) - return alert + """ + Gets the response to the alert based on the alert ID. + """ + try: + response_model = await repo.get_alert_response(alert_id) + except NotFoundError as e: + raise HTTPException(404, str(e)) from e + + return response_model + + +@router.get("/requests/task/{task_id}", response_model=List[AlertRequest]) +async def get_alerts_of_task( + task_id: str, + repo: Annotated[AlertRepository, Depends(AlertRepository)], + unresponded: bool = True, +): + """ + Returns all the alerts associated to a task ID. Provides the option to only + return alerts that have not been responded to yet. + """ + return await repo.get_alerts_of_task(task_id, unresponded) + + +@router.get("/unresponded_requests", response_model=List[AlertRequest]) +async def get_unresponded_alerts( + repo: Annotated[AlertRepository, Depends(AlertRepository)], + pagination: Optional[Pagination] = None, +): + """ + Returns the list of alert IDs that have yet to be responded to, while a + response was required. + """ + return await repo.get_unresponded_alerts(pagination) diff --git a/packages/api-server/api_server/routes/internal.py b/packages/api-server/api_server/routes/internal.py index 028efb6a0..40ab979e8 100644 --- a/packages/api-server/api_server/routes/internal.py +++ b/packages/api-server/api_server/routes/internal.py @@ -1,10 +1,13 @@ # NOTE: This will eventually replace `gateway.py`` +from datetime import datetime from typing import Annotated, Any +from uuid import uuid4 from fastapi import APIRouter, Depends, WebSocket, WebSocketDisconnect from websockets.exceptions import ConnectionClosed from api_server import models as mdl +from api_server.exceptions import AlreadyExistsError from api_server.logging import LoggerAdapter, get_logger from api_server.models.user import User from api_server.repositories import AlertRepository, FleetRepository, TaskRepository @@ -14,32 +17,6 @@ router = APIRouter(tags=["_internal"]) -def log_phase_has_error(phase: mdl.Phases) -> bool: - if phase.log: - for log in phase.log: - if log.tier == mdl.Tier.error: - return True - if phase.events: - for _, event_logs in phase.events.items(): - for event_log in event_logs: - if event_log.tier == mdl.Tier.error: - return True - return False - - -def task_log_has_error(task_log: mdl.TaskEventLog) -> bool: - if task_log.log: - for log in task_log.log: - if log.tier == mdl.Tier.error: - return True - - if task_log.phases: - for _, phase in task_log.phases.items(): - if log_phase_has_error(phase): - return True - return False - - async def process_msg( msg: dict[str, Any], fleet_repo: FleetRepository, @@ -65,21 +42,60 @@ async def process_msg( await task_repo.save_task_state(task_state) task_events.task_states.on_next(task_state) - if task_state.status in (mdl.TaskStatus.completed, mdl.TaskStatus.failed): - alert = await alert_repo.create_alert(task_state.booking.id, "task") - if alert is not None: - alert_events.alerts.on_next(alert) + if task_state.status == mdl.TaskStatus.completed: + alert_request = mdl.AlertRequest( + id=str(uuid4()), + unix_millis_alert_time=round(datetime.now().timestamp() * 1000), + title="Task completed", + subtitle=f"ID: {task_state.booking.id}", + message="", + display=True, + tier=mdl.AlertRequest.Tier.Info, + responses_available=["Acknowledge"], + alert_parameters=[], + task_id=task_state.booking.id, + ) + try: + created_alert = await alert_repo.create_new_alert(alert_request) + except AlreadyExistsError as e: + logger.error(e) + return + alert_events.alert_requests.on_next(created_alert) + elif task_state.status == mdl.TaskStatus.failed: + errorMessage = "" + if ( + task_state.dispatch is not None + and task_state.dispatch.status == mdl.DispatchStatus.failed_to_assign + ): + errorMessage += "Failed to assign\n" + if task_state.dispatch.errors is not None: + for error in task_state.dispatch.errors: + errorMessage += error.json() + "\n" + + alert_request = mdl.AlertRequest( + id=str(uuid4()), + unix_millis_alert_time=round(datetime.now().timestamp() * 1000), + title="Task failed", + subtitle=f"ID: {task_state.booking.id}", + message=errorMessage, + display=True, + tier=mdl.AlertRequest.Tier.Error, + responses_available=["Acknowledge"], + alert_parameters=[], + task_id=task_state.booking.id, + ) + try: + created_alert = await alert_repo.create_new_alert(alert_request) + except AlreadyExistsError as e: + logger.error(e) + return + alert_events.alert_requests.on_next(created_alert) elif payload_type == "task_log_update": task_log = mdl.TaskEventLog(**msg["data"]) await task_repo.save_task_log(task_log) task_events.task_event_logs.on_next(task_log) - if task_log_has_error(task_log): - alert = await alert_repo.create_alert(task_log.task_id, "task") - if alert is not None: - alert_events.alerts.on_next(alert) - elif payload_type == "fleet_state_update": fleet_state = mdl.FleetState(**msg["data"]) await fleet_repo.save_fleet_state(fleet_state) @@ -105,7 +121,7 @@ async def rmf_gateway( user = User.get_system_user() fleet_repo = FleetRepository(user, logger) task_repo = TaskRepository(user, logger) - alert_repo = AlertRepository(user, task_repo) + alert_repo = AlertRepository() await websocket.accept() try: diff --git a/packages/api-server/api_server/routes/test_alerts.py b/packages/api-server/api_server/routes/test_alerts.py new file mode 100644 index 000000000..59c9557d6 --- /dev/null +++ b/packages/api-server/api_server/routes/test_alerts.py @@ -0,0 +1,226 @@ +from urllib.parse import urlencode +from uuid import uuid4 + +from api_server import models as mdl +from api_server.test import AppFixture, make_alert_request + + +class TestAlertsRoute(AppFixture): + @classmethod + def setUpClass(cls): + super().setUpClass() + + def test_create_new_alert(self): + alert_id = str(uuid4()) + alert = make_alert_request(alert_id=alert_id, responses=["resume", "cancel"]) + resp = self.client.post("/alerts/request", content=alert.model_dump_json()) + self.assertEqual(201, resp.status_code, resp.json()) + self.assertEqual(alert.model_dump(), resp.json(), resp.json()) + + # repeated creation with same ID will fail + alert = make_alert_request(alert_id=alert_id, responses=["resume", "cancel"]) + resp = self.client.post("/alerts/request", content=alert.model_dump_json()) + self.assertEqual(409, resp.status_code, resp.json()) + + def respond_to_alert(self): + alert_id = str(uuid4()) + alert = make_alert_request(alert_id=alert_id, responses=["resume", "cancel"]) + resp = self.client.post("/alerts/request", content=alert.model_dump_json()) + self.assertEqual(201, resp.status_code, resp.json()) + self.assertEqual(alert.model_dump(), resp.json(), resp.json()) + + # respond to alert that does not exist + params = {"response": "resume"} + resp = self.client.post( + f"/alerts/request/wrong_alert/respond?{urlencode(params)}" + ) + self.assertEqual(422, resp.status_code, resp.json()) + + # response that is unavailable + params = {"response": "wrong"} + resp = self.client.post(f"/alerts/{alert_id}/respond?{urlencode(params)}") + self.assertEqual(422, resp.status_code, resp.json()) + + # respond correctly + response = "resume" + params = {"response": response} + resp = self.client.post( + f"/alerts/request/{alert_id}/respond?{urlencode(params)}" + ) + self.assertEqual(201, resp.status_code, resp.json()) + self.assertEqual(id, resp.json()["id"], resp.json()) + self.assertEqual(response, resp.json()["response"], resp.json()) + + def test_get_alert(self): + alert_id = str(uuid4()) + + # alert does not exist + resp = self.client.get(f"/alerts/request/{alert_id}") + self.assertEqual(404, resp.status_code, resp.json()) + + # create alert + alert = make_alert_request(alert_id=alert_id, responses=["resume", "cancel"]) + resp = self.client.post("/alerts/request", content=alert.model_dump_json()) + self.assertEqual(201, resp.status_code, resp.json()) + self.assertEqual(alert.model_dump(), resp.json(), resp.json()) + + # alert exists now + resp = self.client.get(f"/alerts/request/{alert_id}") + self.assertEqual(200, resp.status_code, resp.json()) + self.assertEqual(alert.model_dump(), resp.json(), resp.json()) + + def test_get_alert_response(self): + alert_id = str(uuid4()) + alert = make_alert_request(alert_id=alert_id, responses=["resume", "cancel"]) + resp = self.client.post("/alerts/request", content=alert.model_dump_json()) + self.assertEqual(201, resp.status_code, resp.json()) + self.assertEqual(alert.model_dump(), resp.json(), resp.json()) + + # respond + response = "resume" + params = {"response": response} + resp = self.client.post( + f"/alerts/request/{alert_id}/respond?{urlencode(params)}" + ) + self.assertEqual(201, resp.status_code, resp.json()) + self.assertEqual(alert_id, resp.json()["id"], resp.json()) + self.assertEqual(response, resp.json()["response"], resp.json()) + + # response exists + resp = self.client.get(f"/alerts/request/{alert_id}/response") + self.assertEqual(200, resp.status_code, resp.json()) + self.assertEqual(alert_id, resp.json()["id"], resp.json()) + self.assertEqual(response, resp.json()["response"], resp.json()) + + def test_sub_alert(self): + alert_id = str(uuid4()) + alert = make_alert_request(alert_id=alert_id, responses=["resume", "cancel"]) + + # check subscribed alert + with self.subscribe_sio("/alerts/requests") as sub: + resp = self.client.post("/alerts/request", content=alert.model_dump_json()) + self.assertEqual(201, resp.status_code, resp.json()) + self.assertEqual(alert.model_dump(), resp.json(), resp.json()) + + subbed_alert = mdl.AlertRequest(**next(sub)) + self.assertEqual(subbed_alert, alert, subbed_alert) + + def test_sub_alert_response(self): + alert_id = str(uuid4()) + alert = make_alert_request(alert_id=alert_id, responses=["resume", "cancel"]) + resp = self.client.post("/alerts/request", content=alert.model_dump_json()) + self.assertEqual(201, resp.status_code, resp.json()) + self.assertEqual(alert.model_dump(), resp.json(), resp.json()) + + # respond + response = "resume" + params = {"response": response} + with self.subscribe_sio("/alerts/responses") as sub: + resp = self.client.post( + f"/alerts/request/{alert_id}/respond?{urlencode(params)}" + ) + self.assertEqual(201, resp.status_code, resp.json()) + self.assertEqual(alert_id, resp.json()["id"], resp.json()) + self.assertEqual(response, resp.json()["response"], resp.json()) + + # check subscribed alert response + subbed_alert_response = mdl.AlertResponse(**next(sub)) + self.assertEqual( + subbed_alert_response.model_dump(), resp.json(), subbed_alert_response + ) + + def test_get_alerts_of_task(self): + alert_id = str(uuid4()) + alert = make_alert_request(alert_id=alert_id, responses=["resume", "cancel"]) + alert.task_id = "test_task_id" + resp = self.client.post("/alerts/request", content=alert.model_dump_json()) + self.assertEqual(201, resp.status_code, resp.json()) + self.assertEqual(alert.model_dump(), resp.json(), resp.json()) + + # check for non-existent alert for a wrong task ID + resp = self.client.get("/alerts/requests/task/wrong_task_id") + self.assertEqual(200, resp.status_code, resp.json()) + self.assertEqual(0, len(resp.json()), resp.json()) + + # check for correct task ID + resp = self.client.get(f"/alerts/requests/task/{alert.task_id}") + self.assertEqual(200, resp.status_code, resp.json()) + self.assertEqual(1, len(resp.json()), resp.json()) + self.assertEqual(resp.json()[0], alert.model_dump(), resp.json()) + + # respond to alert + response = "resume" + params = {"response": response} + resp = self.client.post( + f"/alerts/request/{alert_id}/respond?{urlencode(params)}" + ) + self.assertEqual(201, resp.status_code, resp.json()) + self.assertEqual(alert_id, resp.json()["id"], resp.json()) + self.assertEqual(response, resp.json()["response"], resp.json()) + + # check for alert of correct task ID again (will only return + # unresponded by default) + resp = self.client.get(f"/alerts/requests/task/{alert.task_id}") + self.assertEqual(200, resp.status_code, resp.json()) + self.assertEqual(0, len(resp.json()), resp.json()) + + # check for alert of correct task ID again with unresponded False + params = {"unresponded": False} + resp = self.client.get( + f"/alerts/requests/task/{alert.task_id}?{urlencode(params)}" + ) + self.assertEqual(200, resp.status_code, resp.json()) + self.assertEqual(1, len(resp.json()), resp.json()) + self.assertEqual(resp.json()[0], alert.model_dump(), resp.json()) + + def test_get_unresponded_alert_ids(self): + first_id = str(uuid4()) + first_alert = make_alert_request( + alert_id=first_id, responses=["resume", "cancel"] + ) + resp = self.client.post( + "/alerts/request", content=first_alert.model_dump_json() + ) + self.assertEqual(201, resp.status_code, resp.json()) + self.assertEqual(first_alert.model_dump(), resp.json(), resp.json()) + + second_id = str(uuid4()) + second_alert = make_alert_request( + alert_id=second_id, responses=["resume", "cancel"] + ) + resp = self.client.post( + "/alerts/request", content=second_alert.model_dump_json() + ) + self.assertEqual(201, resp.status_code, resp.json()) + self.assertEqual(second_alert.model_dump(), resp.json(), resp.json()) + + # both alerts unresponded + resp = self.client.get("/alerts/unresponded_requests") + self.assertEqual(200, resp.status_code, resp.json()) + unresponded_num = len(resp.json()) + self.assertTrue(unresponded_num > 0, resp.json()) + returned_alerts = resp.json() + returned_alert_ids = [a["id"] for a in returned_alerts] + self.assertTrue(first_id in returned_alert_ids) + self.assertTrue(second_id in returned_alert_ids) + + # respond to first + response = "resume" + params = {"response": response} + resp = self.client.post( + f"/alerts/request/{first_id}/respond?{urlencode(params)}" + ) + self.assertEqual(201, resp.status_code, resp.json()) + self.assertEqual(first_id, resp.json()["id"], resp.json()) + self.assertEqual(response, resp.json()["response"], resp.json()) + + # first is no longer returned + resp = self.client.get("/alerts/unresponded_requests") + self.assertEqual(200, resp.status_code, resp.json()) + new_unresponded_num = len(resp.json()) + self.assertTrue(new_unresponded_num > 0, resp.json()) + self.assertTrue(unresponded_num - new_unresponded_num == 1, resp.json()) + returned_alerts = resp.json() + returned_alert_ids = [a["id"] for a in returned_alerts] + self.assertTrue(first_id not in returned_alert_ids) + self.assertTrue(second_id in returned_alert_ids) diff --git a/packages/api-server/api_server/test/test_data.py b/packages/api-server/api_server/test/test_data.py index 7d352c3e9..35c067054 100644 --- a/packages/api-server/api_server/test/test_data.py +++ b/packages/api-server/api_server/test/test_data.py @@ -9,6 +9,7 @@ from api_server.models import ( AffineImage, + AlertRequest, BuildingMap, DispenserState, Door, @@ -733,3 +734,18 @@ def make_task_log(task_id: str) -> TaskEventLog: ) sample.task_id = task_id return sample + + +def make_alert_request(alert_id: str, responses: list[str]) -> AlertRequest: + return AlertRequest( + id=alert_id, + unix_millis_alert_time=0, + title="test_title", + subtitle="test_subtitle", + message="test_message", + display=True, + tier=AlertRequest.Tier.Info, + responses_available=responses, + alert_parameters=[], + task_id=None, + ) diff --git a/packages/dashboard/src/components/alert-manager.tsx b/packages/dashboard/src/components/alert-manager.tsx new file mode 100644 index 000000000..581eee756 --- /dev/null +++ b/packages/dashboard/src/components/alert-manager.tsx @@ -0,0 +1,358 @@ +import { + AlertRequest, + ApiServerModelsAlertsAlertRequestTier, + LogEntry, + TaskEventLog, + ApiServerModelsRmfApiLogEntryTier as LogEntryTier, +} from 'api-client'; +import { AppEvents } from './app-events'; +import { + Button, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + Divider, + TextField, + useMediaQuery, + useTheme, +} from '@mui/material'; +import React from 'react'; +import { base } from 'react-components'; +import { AppControllerContext } from './app-contexts'; +import { RmfAppContext } from './rmf-app'; +import { Subscription } from 'rxjs'; +import { TaskCancelButton } from './tasks/task-cancellation'; + +interface AlertDialogProps { + alertRequest: AlertRequest; + onDismiss: () => void; +} + +const AlertDialog = React.memo((props: AlertDialogProps) => { + const { alertRequest, onDismiss } = props; + const [isOpen, setIsOpen] = React.useState(true); + const { showAlert } = React.useContext(AppControllerContext); + const rmf = React.useContext(RmfAppContext); + const isScreenHeightLessThan800 = useMediaQuery('(max-height:800px)'); + const [additionalAlertMessage, setAdditionalAlertMessage] = React.useState(null); + + const respondToAlert = async (alert_id: string, response: string) => { + if (!rmf) { + return; + } + + try { + const resp = ( + await rmf.alertsApi.respondToAlertAlertsRequestAlertIdRespondPost(alert_id, response) + ).data; + console.log( + `Alert [${alertRequest.id}]: responded with [${resp.response}] at ${resp.unix_millis_response_time}`, + ); + } catch (e) { + const errorMessage = `Failed to respond [${response}] to alert ID [${alertRequest.id}], ${ + (e as Error).message + }`; + console.error(errorMessage); + showAlert('error', errorMessage); + return; + } + + const successMessage = `Responded [${response}] to alert ID [${alertRequest.id}]`; + console.log(successMessage); + showAlert('success', successMessage); + }; + + const getErrorLogEntries = (logs: TaskEventLog) => { + let errorLogs: LogEntry[] = []; + if (logs.log) { + errorLogs.concat(logs.log.filter((entry) => entry.tier === LogEntryTier.Error)); + } + + if (logs.phases) { + for (let phase of Object.values(logs.phases)) { + if (phase.log) { + errorLogs.concat(phase.log.filter((entry) => entry.tier === LogEntryTier.Error)); + } + if (phase.events) { + for (let eventLogs of Object.values(phase.events)) { + errorLogs.concat(eventLogs.filter((entry) => entry.tier === LogEntryTier.Error)); + } + } + } + } + return errorLogs; + }; + + React.useEffect(() => { + if (alertRequest.tier === ApiServerModelsAlertsAlertRequestTier.Info || !alertRequest.task_id) { + return; + } + if (!rmf) { + return; + } + + (async () => { + if (!alertRequest.task_id) { + return; + } + + let logs: TaskEventLog | null = null; + try { + logs = ( + await rmf.tasksApi.getTaskLogTasksTaskIdLogGet( + alertRequest.task_id, + `0,${Number.MAX_SAFE_INTEGER}`, + ) + ).data; + } catch { + console.log( + `Failed to fetch task [${alertRequest.task_id}] logs for alert [${alertRequest.id}]`, + ); + } + const errorLogEntries = logs ? getErrorLogEntries(logs) : []; + + let consolidatedErrorMessages = ''; + for (const entry of errorLogEntries) { + consolidatedErrorMessages += `${new Date(entry.unix_millis_time).toLocaleString()} - ${ + entry.text + }\n`; + } + if (consolidatedErrorMessages.length > 0) { + setAdditionalAlertMessage(consolidatedErrorMessages); + } + })(); + }, [rmf, alertRequest.id, alertRequest.task_id, alertRequest.tier]); + + const theme = useTheme(); + + return ( + + + {alertRequest.title.length > 0 ? alertRequest.title : 'n/a'} + + + + 0 ? alertRequest.subtitle : 'n/a'} + /> + {(alertRequest.message.length > 0 || additionalAlertMessage !== null) && ( + 0 ? alertRequest.message : 'n/a') + + '\n' + + (additionalAlertMessage ?? '') + } + /> + )} + + + {alertRequest.responses_available.map((response) => { + return ( + + ); + })} + {alertRequest.task_id ? ( + + ) : null} + + + + ); +}); + +export const AlertManager = React.memo(() => { + const rmf = React.useContext(RmfAppContext); + const [openAlerts, setOpenAlerts] = React.useState>({}); + + React.useEffect(() => { + if (!rmf) { + return; + } + + const pushAlertsToBeDisplayed = async (alertRequest: AlertRequest) => { + if (!rmf) { + console.error('Alerts API not available'); + return; + } + if (!alertRequest.display) { + setOpenAlerts((prev) => { + const filteredAlerts = Object.fromEntries( + Object.entries(prev).filter(([key]) => key !== alertRequest.id), + ); + return filteredAlerts; + }); + return; + } + + try { + const resp = ( + await rmf.alertsApi.getAlertResponseAlertsRequestAlertIdResponseGet(alertRequest.id) + ).data; + console.log( + `Alert [${alertRequest.id}]: was responded with [${resp.response}] at ${resp.unix_millis_response_time}`, + ); + } catch (e) { + console.log( + `Error retrieving alert response of ID ${alertRequest.id}, ${(e as Error).message}`, + ); + setOpenAlerts((prev) => { + return { + ...prev, + [alertRequest.id]: alertRequest, + }; + }); + return; + } + }; + + const subs: Subscription[] = []; + + subs.push( + rmf.alertRequestsObsStore.subscribe((alertRequest) => { + if (!alertRequest.display) { + setOpenAlerts((prev) => { + const filteredAlerts = Object.fromEntries( + Object.entries(prev).filter(([key]) => key !== alertRequest.id), + ); + return filteredAlerts; + }); + return; + } + AppEvents.pushAlert.next(alertRequest); + }), + ); + + subs.push( + rmf.alertResponsesObsStore.subscribe((alertResponse) => { + setOpenAlerts((prev) => { + return Object.fromEntries( + Object.entries(prev).filter(([key]) => key !== alertResponse.id), + ); + }); + }), + ); + + subs.push( + AppEvents.pushAlert.subscribe(async (alertRequest) => { + if (!alertRequest) { + return; + } + await pushAlertsToBeDisplayed(alertRequest); + }), + ); + + return () => { + for (const sub of subs) { + sub.unsubscribe(); + } + }; + }, [rmf]); + + const removeOpenAlert = (id: string) => { + const filteredAlerts = Object.fromEntries( + Object.entries(openAlerts).filter(([key]) => key !== id), + ); + setOpenAlerts(filteredAlerts); + }; + + return ( + <> + {Object.values(openAlerts).map((alert) => { + const removeThisAlert = () => removeOpenAlert(alert.id); + return ; + })} + + ); +}); diff --git a/packages/dashboard/src/components/alert-store.tsx b/packages/dashboard/src/components/alert-store.tsx deleted file mode 100644 index 826688277..000000000 --- a/packages/dashboard/src/components/alert-store.tsx +++ /dev/null @@ -1,78 +0,0 @@ -import { Alert } from 'api-client'; -import { AppEvents } from './app-events'; -import React from 'react'; -import { RmfAppContext } from './rmf-app'; -import { Subscription } from 'rxjs'; -import { TaskAlertDialog } from './tasks/task-alert'; - -// This needs to match the enums provided for the Alert model, as it is not -// provided via the api-client since tortoise's pydantic_model_creator is used. -enum AlertCategory { - Default = 'default', - Task = 'task', - Fleet = 'fleet', - Robot = 'robot', -} - -export const AlertStore = React.memo(() => { - const rmf = React.useContext(RmfAppContext); - const [taskAlerts, setTaskAlerts] = React.useState>({}); - - const categorizeAndPushAlerts = (alert: Alert) => { - // We check if an existing alert has been acknowledged, and remove it from - // display. - if (alert.category === AlertCategory.Task) { - setTaskAlerts((prev) => { - const filteredTaskAlerts = Object.fromEntries( - Object.entries(prev).filter(([key]) => key !== alert.original_id), - ); - - if (!alert.acknowledged_by) { - filteredTaskAlerts[alert.id] = alert; - } - return filteredTaskAlerts; - }); - } - }; - - React.useEffect(() => { - const subs: Subscription[] = []; - subs.push( - AppEvents.alertListOpenedAlert.subscribe((alert) => { - if (alert) { - categorizeAndPushAlerts(alert); - } - }), - ); - return () => subs.forEach((s) => s.unsubscribe()); - }, []); - - React.useEffect(() => { - if (!rmf) { - return; - } - const sub = rmf.alertObsStore.subscribe((alert) => { - categorizeAndPushAlerts(alert); - AppEvents.refreshAlert.next(); - }); - return () => sub.unsubscribe(); - }, [rmf]); - - const removeTaskAlert = (id: string) => { - const filteredTaskAlerts = Object.fromEntries( - Object.entries(taskAlerts).filter(([key]) => key !== id), - ); - setTaskAlerts(filteredTaskAlerts); - }; - - return ( - <> - {Object.values(taskAlerts).map((alert) => { - const removeThisAlert = () => { - removeTaskAlert(alert.id); - }; - return ; - })} - - ); -}); diff --git a/packages/dashboard/src/components/app-base.tsx b/packages/dashboard/src/components/app-base.tsx index d826f4e32..fd3eb2e89 100644 --- a/packages/dashboard/src/components/app-base.tsx +++ b/packages/dashboard/src/components/app-base.tsx @@ -14,7 +14,7 @@ import { rmfDark, rmfLight } from 'react-components'; import { loadSettings, saveSettings, Settings, ThemeMode } from '../settings'; import { AppController, AppControllerContext, SettingsContext } from './app-contexts'; import AppBar from './appbar'; -import { AlertStore } from './alert-store'; +import { AlertManager } from './alert-manager'; import { AppEvents } from './app-events'; import { DeliveryAlertStore } from './delivery-alert-store'; @@ -93,7 +93,7 @@ export function AppBase({ children }: React.PropsWithChildren<{}>): JSX.Element )} - + (), refreshFavoriteTasks: new Subject(), refreshTaskSchedule: new Subject(), - refreshAlert: new Subject(), - alertListOpenedAlert: new Subject(), + pushAlert: new Subject(), disabledLayers: new ReplaySubject>(), zoom: new BehaviorSubject(null), cameraPosition: new BehaviorSubject(null), diff --git a/packages/dashboard/src/components/appbar.tsx b/packages/dashboard/src/components/appbar.tsx index b48b0525f..7056e8a49 100644 --- a/packages/dashboard/src/components/appbar.tsx +++ b/packages/dashboard/src/components/appbar.tsx @@ -35,7 +35,7 @@ import { Typography, useMediaQuery, } from '@mui/material'; -import { Alert, FireAlarmTriggerState, TaskFavorite, TaskRequest } from 'api-client'; +import { AlertRequest, FireAlarmTriggerState, TaskFavorite, TaskRequest } from 'api-client'; import React from 'react'; import { AppBarTab, @@ -168,8 +168,7 @@ export const AppBar = React.memo(({ extraToolbarItems }: AppBarProps): React.Rea const [openCreateTaskForm, setOpenCreateTaskForm] = React.useState(false); const [favoritesTasks, setFavoritesTasks] = React.useState([]); const [alertListAnchor, setAlertListAnchor] = React.useState(null); - const [unacknowledgedAlertsNum, setUnacknowledgedAlertsNum] = React.useState(0); - const [unacknowledgedAlertList, setUnacknowledgedAlertList] = React.useState([]); + const [unacknowledgedAlertList, setUnacknowledgedAlertList] = React.useState([]); const [openAdminActionsDialog, setOpenAdminActionsDialog] = React.useState(false); const [openFireAlarmTriggerResetDialog, setOpenFireAlarmTriggerResetDialog] = React.useState(false); @@ -202,32 +201,21 @@ export const AppBar = React.memo(({ extraToolbarItems }: AppBarProps): React.Rea return; } + const updateUnrespondedAlerts = async () => { + const { data: alerts } = + await rmf.alertsApi.getUnrespondedAlertsAlertsUnrespondedRequestsGet(); + // alert.display is checked to verify that the dashboard should display it + // in the first place + const alertsToBeDisplayed = alerts.filter((alert) => alert.display); + setUnacknowledgedAlertList(alertsToBeDisplayed.reverse()); + }; + const subs: Subscription[] = []; - subs.push( - AppEvents.refreshAlert.subscribe({ - next: () => { - (async () => { - const resp = await rmf.alertsApi.getAlertsAlertsGet(); - const alerts = resp.data as Alert[]; - setUnacknowledgedAlertsNum( - alerts.filter( - (alert) => !(alert.acknowledged_by && alert.unix_millis_acknowledged_time), - ).length, - ); - })(); - }, - }), - ); + subs.push(rmf.alertRequestsObsStore.subscribe(updateUnrespondedAlerts)); + subs.push(rmf.alertResponsesObsStore.subscribe(updateUnrespondedAlerts)); // Get the initial number of unacknowledged alerts - (async () => { - const resp = await rmf.alertsApi.getAlertsAlertsGet(); - const alerts = resp.data as Alert[]; - setUnacknowledgedAlertsNum( - alerts.filter((alert) => !(alert.acknowledged_by && alert.unix_millis_acknowledged_time)) - .length, - ); - })(); + updateUnrespondedAlerts(); return () => subs.forEach((s) => s.unsubscribe()); }, [rmf]); @@ -311,18 +299,11 @@ export const AppBar = React.memo(({ extraToolbarItems }: AppBarProps): React.Rea if (!rmf) { return; } - (async () => { - const { data: alerts } = await rmf.alertsApi.getAlertsAlertsGet(); - const unackList = alerts.filter( - (alert) => !alert.acknowledged_by && !alert.unix_millis_acknowledged_time, - ); - setUnacknowledgedAlertList(unackList.reverse()); - })(); setAlertListAnchor(event.currentTarget); }; - const openAlertDialog = (alert: Alert) => { - AppEvents.alertListOpenedAlert.next(alert); + const openAlertDialog = (alert: AlertRequest) => { + AppEvents.pushAlert.next(alert); }; const timeDistance = (time: number) => { @@ -408,7 +389,7 @@ export const AppBar = React.memo(({ extraToolbarItems }: AppBarProps): React.Rea color="inherit" onClick={handleOpenAlertList} > - + @@ -438,17 +419,11 @@ export const AppBar = React.memo(({ extraToolbarItems }: AppBarProps): React.Rea key={alert.id} title={ - - Alert - - - ID: {alert.original_id} - - - Type: {alert.category.toUpperCase()} - - - Created: {new Date(alert.unix_millis_created_time).toLocaleString()} + Alert + ID: {alert.id} + Title: {alert.title} + + Created: {new Date(alert.unix_millis_alert_time).toLocaleString()} } @@ -464,8 +439,8 @@ export const AppBar = React.memo(({ extraToolbarItems }: AppBarProps): React.Rea > - Task {alert.original_id} had an alert{' '} - {timeDistance(alert.unix_millis_created_time)} ago + {alert.task_id ? `Task ${alert.task_id} had an alert ` : 'Alert occured '} + {timeDistance(alert.unix_millis_alert_time)} ago diff --git a/packages/dashboard/src/components/rmf-app/rmf-ingress.ts b/packages/dashboard/src/components/rmf-app/rmf-ingress.ts index d8c12156e..1e3331238 100644 --- a/packages/dashboard/src/components/rmf-app/rmf-ingress.ts +++ b/packages/dashboard/src/components/rmf-app/rmf-ingress.ts @@ -1,7 +1,8 @@ import { AdminApi, AlertsApi, - Alert, + AlertRequest, + AlertResponse, BeaconState, BeaconsApi, BuildingApi, @@ -243,8 +244,12 @@ export class RmfIngress { return this._taskStateObsStore[taskId]; } - alertObsStore: Observable = this._convertSioToRxObs((handler) => - this._sioClient.subscribeAlerts(handler), + alertRequestsObsStore: Observable = this._convertSioToRxObs((handler) => + this._sioClient.subscribeAlertRequests(handler), + ); + + alertResponsesObsStore: Observable = this._convertSioToRxObs((handler) => + this._sioClient.subscribeAlertResponses(handler), ); deliveryAlertObsStore: Observable = this._convertSioToRxObs((handler) => diff --git a/packages/dashboard/src/components/tasks/task-alert.tsx b/packages/dashboard/src/components/tasks/task-alert.tsx deleted file mode 100644 index e1435b8b4..000000000 --- a/packages/dashboard/src/components/tasks/task-alert.tsx +++ /dev/null @@ -1,301 +0,0 @@ -import React from 'react'; -import { - ApiServerModelsRmfApiLogEntryTier as Tier, - Alert, - LogEntry, - ApiServerModelsRmfApiTaskStateStatus as Status, - Status2 as DispatchTaskStatus, - TaskEventLog, - TaskStateOutput as TaskState, -} from 'api-client'; -import { AppControllerContext } from '../app-contexts'; -import { RmfAppContext } from '../rmf-app'; -import { AlertContent, AlertDialog } from 'react-components'; -import { base } from 'react-components'; -import { TaskInspector } from './task-inspector'; - -interface TaskAlert extends TaskEventLog { - title: string; - progress?: number; - content: AlertContent[]; - color: string; - acknowledgedBy?: string; - late: boolean; -} - -export interface TaskAlertDialogProps { - alert: Alert; - removeAlert: () => void; -} - -export function TaskAlertDialog({ alert, removeAlert }: TaskAlertDialogProps): JSX.Element { - const getErrorLogEntries = (logs: TaskEventLog) => { - let errorLogs: LogEntry[] = []; - if (logs.log) { - errorLogs.concat(logs.log.filter((entry) => entry.tier === Tier.Error)); - } - - if (logs.phases) { - for (let phase of Object.values(logs.phases)) { - if (phase.log) { - errorLogs.concat(phase.log.filter((entry) => entry.tier === Tier.Error)); - } - if (phase.events) { - for (let eventLogs of Object.values(phase.events)) { - errorLogs.concat(eventLogs.filter((entry) => entry.tier === Tier.Error)); - } - } - } - } - return errorLogs; - }; - - const getAlertTitle = (state: TaskState, errorLogEntries: LogEntry[]) => { - if (state.status && state.status === Status.Completed) { - return 'Task completed'; - } - if (state.status && state.status === Status.Failed) { - return 'Task failed'; - } - if (errorLogEntries.length !== 0) { - return 'Task error'; - } - return 'Task alert'; - }; - - const getTaskProgress = (state: TaskState) => { - if (state.status && state.status === Status.Completed) { - return 1; - } - - if (!state.estimate_millis || !state.unix_millis_start_time || !state.unix_millis_finish_time) { - return undefined; - } - return Math.min( - 1.0 - state.estimate_millis / (state.unix_millis_finish_time - state.unix_millis_start_time), - 1, - ); - }; - - const getAlertContent = (state: TaskState, errorLogEntries: LogEntry[]) => { - // First field to be the taks ID - let content: AlertContent[] = [ - { - title: 'ID', - value: state.booking.id, - }, - ]; - - // Second field would be any dispatch errors - if (state.dispatch && state.dispatch.status === DispatchTaskStatus.FailedToAssign) { - let errors = ''; - if (state.dispatch.errors) { - for (const error of state.dispatch.errors) { - errors += `${JSON.stringify(error)}\n`; - } - } - content = [ - ...content, - { - title: 'Dispatch failure', - value: errors.length !== 0 ? errors : 'n/a', - }, - ]; - } - - // Third field would be any errors found - if (errorLogEntries.length !== 0) { - let consolidatedErrorMessages = ''; - for (let entry of errorLogEntries) { - consolidatedErrorMessages += `${new Date(entry.unix_millis_time).toLocaleString()} - ${ - entry.text - } - \n`; - } - - content = [ - ...content, - { - title: 'Error logs', - value: consolidatedErrorMessages, - }, - ]; - } - - // If the task happen to complete anyway, we mention that it has completed - // in a separate log - if (state.status && state.status === Status.Completed) { - const completionTimeString = state.unix_millis_finish_time - ? `${new Date(state.unix_millis_finish_time).toLocaleString()} - ` - : ''; - - content = [ - ...content, - { - title: 'Logs', - value: `${completionTimeString}Task completed!`, - }, - ]; - } - - return content; - }; - - const getAlertColor = (state: TaskState, errorLogs: LogEntry[]) => { - if (state.status) { - switch (state.status) { - case Status.Completed: - return base.palette.success.dark; - - case Status.Error: - case Status.Failed: - return base.palette.error.dark; - - default: - break; - } - } - - if (errorLogs.length !== 0) { - return base.palette.error.dark; - } - - return base.palette.background.default; - }; - - const rmf = React.useContext(RmfAppContext); - const { showAlert } = React.useContext(AppControllerContext); - const [taskAlert, setTaskAlert] = React.useState(null); - const [openTaskInspector, setOpenTaskInspector] = React.useState(false); - const [taskState, setTaskState] = React.useState(null); - React.useEffect(() => { - if (!rmf) { - return; - } - - (async () => { - // TODO(AC): Move away from using substrings, perhaps delayed tasks will - // be its own category. - const late_substr = '__late'; - const task_late = alert.original_id.includes(late_substr); - const task_id = task_late - ? alert.original_id.substring(0, alert.original_id.length - late_substr.length) - : alert.original_id; - - let logs: TaskEventLog | null = null; - try { - logs = ( - await rmf.tasksApi.getTaskLogTasksTaskIdLogGet(task_id, `0,${Number.MAX_SAFE_INTEGER}`) - ).data; - } catch { - console.log(`Failed to fetch task logs for ${alert.original_id}`); - } - const errorLogEntries = logs ? getErrorLogEntries(logs) : []; - - let state: TaskState | null = null; - try { - state = (await rmf.tasksApi.getTaskStateTasksTaskIdStateGet(task_id)).data; - } catch { - console.log(`Failed to fetch task state for ${alert.original_id}`); - } - setTaskState(state); - - let acknowledgedBy: string | undefined = undefined; - if (alert.acknowledged_by) { - acknowledgedBy = alert.acknowledged_by; - } else if (alert.unix_millis_acknowledged_time) { - acknowledgedBy = '-'; - } - - if (task_late && state) { - setTaskAlert({ - title: getAlertTitle(state, []), - progress: getTaskProgress(state), - content: getAlertContent(state, []), - color: getAlertColor(state, []), - acknowledgedBy: acknowledgedBy, - late: task_late, - task_id: task_id, - }); - } else if (!task_late && logs && state) { - setTaskAlert({ - title: getAlertTitle(state, errorLogEntries), - progress: getTaskProgress(state), - content: getAlertContent(state, errorLogEntries), - color: getAlertColor(state, errorLogEntries), - acknowledgedBy: acknowledgedBy, - late: task_late, - ...logs, - }); - } else if (state) { - setTaskAlert({ - title: getAlertTitle(state, []), - progress: getTaskProgress(state), - content: getAlertContent(state, []), - color: getAlertColor(state, []), - acknowledgedBy: acknowledgedBy, - late: task_late, - task_id: state.booking.id, - }); - } - })(); - }, [rmf, alert.original_id, alert.acknowledged_by, alert.unix_millis_acknowledged_time]); - - const acknowledgeAlert = () => { - if (!rmf) { - throw new Error('alerts api not available'); - } - if (!taskAlert) { - return; - } - - (async () => { - const idToAcknowledge = taskAlert.late ? `${taskAlert.task_id}__late` : taskAlert.task_id; - try { - const ackResponse = ( - await rmf?.alertsApi.acknowledgeAlertAlertsAlertIdPost(idToAcknowledge) - ).data; - if (ackResponse.id !== ackResponse.original_id) { - let showAlertMessage = `Alert ${ackResponse.original_id} acknowledged`; - if (ackResponse.acknowledged_by) { - showAlertMessage += ` by User ${ackResponse.acknowledged_by}`; - } - if (ackResponse.unix_millis_acknowledged_time) { - const ackSecondsAgo = - (new Date().getTime() - ackResponse.unix_millis_acknowledged_time) / 1000; - showAlertMessage += ` ${Math.round(ackSecondsAgo)}s ago`; - } - showAlert('success', showAlertMessage); - removeAlert(); - } else { - throw new Error(`Failed to acknowledge alert ID ${idToAcknowledge}`); - } - } catch (error) { - showAlert('error', `Failed to acknowledge alert ID ${idToAcknowledge}`); - console.log(error); - } - })(); - }; - - if (!taskAlert) { - return <>; - } - - return ( - <> - - {openTaskInspector && ( - setOpenTaskInspector(false)} /> - )} - - ); -} diff --git a/packages/dashboard/src/components/tasks/task-cancellation.tsx b/packages/dashboard/src/components/tasks/task-cancellation.tsx index de2e70199..aee41b6cb 100644 --- a/packages/dashboard/src/components/tasks/task-cancellation.tsx +++ b/packages/dashboard/src/components/tasks/task-cancellation.tsx @@ -29,14 +29,18 @@ export function TaskCancelButton({ if (!rmf || !taskId) { return; } - const sub = rmf.getTaskStateObs(taskId).subscribe(setTaskState); + const sub = rmf.getTaskStateObs(taskId).subscribe((state) => { + setTaskState(state); + }); return () => sub.unsubscribe(); }, [rmf, taskId]); - const taskCancellable = - taskState && - taskState.status && - !['canceled', 'killed', 'completed', 'failed'].includes(taskState.status); + const isTaskCancellable = (state: TaskState | null) => { + return ( + state && state.status && !['canceled', 'killed', 'completed', 'failed'].includes(state.status) + ); + }; + const userCanCancelTask = profile && Enforcer.canCancelTask(profile); function capitalizeFirstLetter(status: string): string { @@ -67,11 +71,11 @@ export function TaskCancelButton({ return ( <> - {taskCancellable && userCanCancelTask ? ( + {isTaskCancellable(taskState) && userCanCancelTask ? ( - ) : taskCancellable && !userCanCancelTask ? ( + ) : isTaskCancellable(taskState) && !userCanCancelTask ? (