395 lines
12 KiB
TypeScript
395 lines
12 KiB
TypeScript
|
|
/// <reference types="jibo-command-protocol" />
|
||
|
|
/**
|
||
|
|
* Enum of TakePhoto events.
|
||
|
|
* @intdocs
|
||
|
|
* @typedef PhotoEvents
|
||
|
|
* @prop TakePhoto `onTakePhoto`
|
||
|
|
*/
|
||
|
|
export declare const PhotoEvents: {
|
||
|
|
TakePhoto: JIBO.v1.PhotoEvents.TakePhoto;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Enum of video events
|
||
|
|
* @typedef VideoEvents
|
||
|
|
* @intdocs
|
||
|
|
* @prop VideoReady `onVideoReady`
|
||
|
|
*/
|
||
|
|
export declare const VideoEvents: {
|
||
|
|
VideoReady: JIBO.v1.VideoEvents.VideoReady;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* @description Enum of skill disconnect reasons
|
||
|
|
* @typedef DisconnectReason
|
||
|
|
* @prop 4000 Skill closed by user
|
||
|
|
* @prop 4001 Skill closed due to robot error
|
||
|
|
* @prop 4002 Incoming connection is replacing previous connection
|
||
|
|
* @prop 4003 Connection closed due to inactivity
|
||
|
|
* @prop 4004 Session closed due to reconnection time out
|
||
|
|
* @prop 4005 Session closed due to failed reconnection
|
||
|
|
*/
|
||
|
|
export declare const DisconnectReason: JIBO.v1.DisconnectReason;
|
||
|
|
/**
|
||
|
|
* Enum of websocket close codes
|
||
|
|
* @typedef DisconnectCode
|
||
|
|
* @intdocs
|
||
|
|
* @prop HeadTouchExit `4000` - The Remote skill was exited via head touch on robot
|
||
|
|
* @prop RobotError `4001` - The Remote skill was exited due to an error on the robot resulting in the error display taking over.
|
||
|
|
* @prop NewConnection `4002` - A new Remote connection is superseding the existing one.
|
||
|
|
* @prop InactivityTimeout `4003` - The connection was closed due to inactivity (no commands sent)
|
||
|
|
* @prop ReconnectTimeout `4004` - Session timed out waiting for reconnect
|
||
|
|
* @prop ReconnectError `4005` - Session unable to wait for a reconnect
|
||
|
|
*/
|
||
|
|
export declare const DisconnectCode: {
|
||
|
|
HeadTouchExit: JIBO.v1.DisconnectCodes.HeadTouchExit;
|
||
|
|
RobotError: JIBO.v1.DisconnectCodes.RobotError;
|
||
|
|
NewConnection: JIBO.v1.DisconnectCodes.NewConnection;
|
||
|
|
InactivityTimeout: JIBO.v1.DisconnectCodes.InactivityTimeout;
|
||
|
|
ReconnectTimeout: JIBO.v1.DisconnectCodes.ReconnectTimeout;
|
||
|
|
ReconnectError: JIBO.v1.DisconnectCodes.ReconnectError;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* @typedef ResponseStrings
|
||
|
|
* @intdocs
|
||
|
|
* @description Maps the [Response Code]{@link ResponseCode} numbers to their strings (i.e. `200` = `OK`, `404` = `NotFound`, etc).
|
||
|
|
*/
|
||
|
|
export declare const ResponseStrings: JIBO.v1.ResponseStrings;
|
||
|
|
/**
|
||
|
|
* Enum of Jibo's available attention modes.
|
||
|
|
* @typedef AttentionMode
|
||
|
|
* @prop Off
|
||
|
|
* @prop Idle
|
||
|
|
* @prop Disengage
|
||
|
|
* @prop Engaged
|
||
|
|
* @prop Speaking
|
||
|
|
* @prop Fixated
|
||
|
|
* @prop Attractable
|
||
|
|
* @prop Menu
|
||
|
|
* @prop Command
|
||
|
|
*/
|
||
|
|
export declare const AttentionMode: {
|
||
|
|
Off: JIBO.v1.AttentionModes.Off;
|
||
|
|
Idle: JIBO.v1.AttentionModes.Idle;
|
||
|
|
Disengage: JIBO.v1.AttentionModes.Disengage;
|
||
|
|
Engaged: JIBO.v1.AttentionModes.Engaged;
|
||
|
|
Speaking: JIBO.v1.AttentionModes.Speaking;
|
||
|
|
Fixated: JIBO.v1.AttentionModes.Fixated;
|
||
|
|
Attractable: JIBO.v1.AttentionModes.Attractable;
|
||
|
|
Menu: JIBO.v1.AttentionModes.Menu;
|
||
|
|
Command: JIBO.v1.AttentionModes.Command;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* @typedef CommandTypes
|
||
|
|
* @intdocs
|
||
|
|
* @description Enum of command types.
|
||
|
|
* @prop StartSession
|
||
|
|
* @prop GetConfig
|
||
|
|
* @prop SetConfig
|
||
|
|
* @prop Cancel
|
||
|
|
* @prop Display
|
||
|
|
* @prop SetAttention
|
||
|
|
* @prop Say
|
||
|
|
* @prop Listen
|
||
|
|
* @prop LookAt
|
||
|
|
* @prop TakePhoto
|
||
|
|
* @prop Video
|
||
|
|
* @prop Subscribe
|
||
|
|
* @prop FetchAsset
|
||
|
|
*/
|
||
|
|
export declare const CommandTypes: {
|
||
|
|
StartSession: JIBO.v1.Commands.StartSession;
|
||
|
|
GetConfig: JIBO.v1.Commands.GetConfig;
|
||
|
|
SetConfig: JIBO.v1.Commands.SetConfig;
|
||
|
|
Cancel: JIBO.v1.Commands.Cancel;
|
||
|
|
Display: JIBO.v1.Commands.Display;
|
||
|
|
SetAttention: JIBO.v1.Commands.SetAttention;
|
||
|
|
Say: JIBO.v1.Commands.Say;
|
||
|
|
Listen: JIBO.v1.Commands.Listen;
|
||
|
|
LookAt: JIBO.v1.Commands.LookAt;
|
||
|
|
TakePhoto: JIBO.v1.Commands.TakePhoto;
|
||
|
|
Video: JIBO.v1.Commands.Video;
|
||
|
|
Subscribe: JIBO.v1.Commands.Subscribe;
|
||
|
|
FetchAsset: JIBO.v1.Commands.FetchAsset;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Enum of async command events.
|
||
|
|
* @typedef AsyncCommandEvent
|
||
|
|
* @intdocs
|
||
|
|
* @prop Start `onStart` - Asynchronous command has started.
|
||
|
|
* @prop Stop `onStop` - Asynchronous command has stopped.
|
||
|
|
* @prop Error `onError` - An attempt to move from Requested to Start resulted in an Error.
|
||
|
|
*/
|
||
|
|
export declare const AsyncCommandEvent: {
|
||
|
|
Start: JIBO.v1.AsyncCommandEvents.Start;
|
||
|
|
Stop: JIBO.v1.AsyncCommandEvents.Stop;
|
||
|
|
Error: JIBO.v1.AsyncCommandEvents.Error;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Enum of display events.
|
||
|
|
* @typedef DisplayEvents
|
||
|
|
* @intdocs
|
||
|
|
* @prop ViewStateChange `onViewStateChange`
|
||
|
|
*/
|
||
|
|
export declare const DisplayEvents: {
|
||
|
|
ViewStateChange: JIBO.v1.DisplayEvents.ViewStateChange;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Enum of possible view states
|
||
|
|
* @intdocs
|
||
|
|
* @typedef ViewStates
|
||
|
|
* @prop Opened
|
||
|
|
* @prop Closed
|
||
|
|
*/
|
||
|
|
export declare const ViewStates: {
|
||
|
|
Opened: JIBO.v1.ViewStates.Opened;
|
||
|
|
Closed: JIBO.v1.ViewStates.Closed;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* @typedef DisplayViewType
|
||
|
|
* @description Enum of available display types
|
||
|
|
* @prop Eye Display Jibo's eye on screen.
|
||
|
|
* @prop Text Display text on screen.
|
||
|
|
* @prop Image Display an image on screen.
|
||
|
|
*/
|
||
|
|
export declare const DisplayViewType: {
|
||
|
|
Eye: JIBO.v1.DisplayViews.Eye;
|
||
|
|
Text: JIBO.v1.DisplayViews.Text;
|
||
|
|
Image: JIBO.v1.DisplayViews.Image;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* @typedef LookAtEvents
|
||
|
|
* @intdocs
|
||
|
|
* @prop LookAtAchieved `onLookAtAchieved`
|
||
|
|
* @prop TrackEntityLost `onTrackEntityLost`
|
||
|
|
*/
|
||
|
|
export declare const LookAtEvents: {
|
||
|
|
LookAtAchieved: JIBO.v1.LookAtEvents.LookAtAchieved;
|
||
|
|
TrackEntityLost: JIBO.v1.LookAtEvents.TrackEntityLost;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Enum of speech events.
|
||
|
|
* @intdocs
|
||
|
|
* @typedef HotWordEvents
|
||
|
|
* @prop HotWordHeard `onHotWordHeard`
|
||
|
|
* @prop ListenResult `onListenResult`
|
||
|
|
*/
|
||
|
|
export declare const HotWordEvents: {
|
||
|
|
HotWordHeard: JIBO.v1.HotWordEvents.HotWordHeard;
|
||
|
|
ListenResult: JIBO.v1.HotWordEvents.ListenResult;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* @typedef StreamTypes
|
||
|
|
* @intdocs
|
||
|
|
* @description Enum of stream types.
|
||
|
|
* @prop Entity
|
||
|
|
* @prop Speech
|
||
|
|
* @prop HeadTouch
|
||
|
|
* @prop Motion
|
||
|
|
* @prop ScreenGesture
|
||
|
|
*/
|
||
|
|
export declare const StreamTypes: {
|
||
|
|
Entity: JIBO.v1.Streams.Entity;
|
||
|
|
HotWord: JIBO.v1.Streams.HotWord;
|
||
|
|
HeadTouch: JIBO.v1.Streams.HeadTouch;
|
||
|
|
Motion: JIBO.v1.Streams.Motion;
|
||
|
|
ScreenGesture: JIBO.v1.Streams.ScreenGesture;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* @typedef ListenEvents
|
||
|
|
* @intdocs
|
||
|
|
* @description Enum of listen events.
|
||
|
|
* @prop ListenResult `onListenResult`
|
||
|
|
*/
|
||
|
|
export declare const ListenEvents: {
|
||
|
|
ListenResult: JIBO.v1.ListenEvents.ListenResult;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Enum of entity track events.
|
||
|
|
* @intdocs
|
||
|
|
* @typedef EntityTrackEvents
|
||
|
|
* @prop TrackUpdate `onEntityUpdate`
|
||
|
|
* @prop TrackLost `onEntityLost`
|
||
|
|
* @prop TrackGained `onEntityGained`
|
||
|
|
*/
|
||
|
|
export declare const EntityTrackEvents: {
|
||
|
|
TrackUpdate: JIBO.v1.EntityTrackEvents.TrackUpdate;
|
||
|
|
TrackLost: JIBO.v1.EntityTrackEvents.TrackLost;
|
||
|
|
TrackGained: JIBO.v1.EntityTrackEvents.TrackGained;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Enum of motion track events.
|
||
|
|
* @intdocs
|
||
|
|
* @typedef MotionEvents
|
||
|
|
* @prop MotionDetected `onMotionDetected`
|
||
|
|
*/
|
||
|
|
export declare const MotionEvents: {
|
||
|
|
MotionDetected: JIBO.v1.MotionEvents.MotionDetected;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Enum of headtouch events.
|
||
|
|
* @intdocs
|
||
|
|
* @typedef HeadTouchEvents
|
||
|
|
* @prop HeadTouched `onHeadTouch`
|
||
|
|
*/
|
||
|
|
export declare const HeadTouchEvents: {
|
||
|
|
HeadTouched: JIBO.v1.HeadTouchEvents.HeadTouched;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Enum of screen gesture events.
|
||
|
|
* @intdocs
|
||
|
|
* @typedef ScreenGestureEvents
|
||
|
|
* @prop Tap `onTap`
|
||
|
|
* @prop Swipe `onSwipe`
|
||
|
|
*/
|
||
|
|
export declare const ScreenGestureEvents: {
|
||
|
|
Tap: JIBO.v1.ScreenGestureEvents.Tap;
|
||
|
|
Swipe: JIBO.v1.ScreenGestureEvents.Swipe;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Enum of config events.
|
||
|
|
* @intdocs
|
||
|
|
* @typedef ConfigEvents
|
||
|
|
* @prop onConfig `onConfig`
|
||
|
|
*/
|
||
|
|
export declare const ConfigEvents: {
|
||
|
|
onConfig: JIBO.v1.ConfigEvents.onConfig;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Enum of asset events.
|
||
|
|
* @intdocs
|
||
|
|
* @typedef FetchAssetEvents
|
||
|
|
* @prop AssetReady `onAssetReady`
|
||
|
|
* @prop AssetFailed `onAssetFailed`
|
||
|
|
*/
|
||
|
|
export declare const FetchAssetEvents: {
|
||
|
|
AssetReady: JIBO.v1.FetchAssetEvents.AssetReady;
|
||
|
|
AssetFailed: JIBO.v1.FetchAssetEvents.AssetFailed;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* @typedef CameraResolution
|
||
|
|
* @description Enum of camera resolutions
|
||
|
|
* @prop HighRes Currently unsupported
|
||
|
|
* @prop MedRes Higher res than default
|
||
|
|
* @prop LowRes Default
|
||
|
|
* @prop MicroRes Lower res than default
|
||
|
|
*/
|
||
|
|
export declare const CameraResolution: {
|
||
|
|
HighRes: JIBO.v1.CameraResolutions.HighRes;
|
||
|
|
MedRes: JIBO.v1.CameraResolutions.MedRes;
|
||
|
|
LowRes: JIBO.v1.CameraResolutions.LowRes;
|
||
|
|
MicroRes: JIBO.v1.CameraResolutions.MicroRes;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Enum of available swipe directions.
|
||
|
|
* @typedef SwipeDirection
|
||
|
|
* @prop Up
|
||
|
|
* @prop Down
|
||
|
|
* @prop Right
|
||
|
|
* @prop Left
|
||
|
|
*/
|
||
|
|
export declare const SwipeDirection: {
|
||
|
|
Up: JIBO.v1.SwipeDirections.Up;
|
||
|
|
Down: JIBO.v1.SwipeDirections.Down;
|
||
|
|
Right: JIBO.v1.SwipeDirections.Right;
|
||
|
|
Left: JIBO.v1.SwipeDirections.Left;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Camera options.
|
||
|
|
* @typedef Camera
|
||
|
|
* @prop left Default
|
||
|
|
* @prop right Currently unsupported
|
||
|
|
*/
|
||
|
|
export declare const Camera: {
|
||
|
|
Left: JIBO.v1.Cameras.Left;
|
||
|
|
Right: JIBO.v1.Cameras.Right;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* Enum of entity (face) types.
|
||
|
|
* @typedef EntityType
|
||
|
|
* @prop person Face is a loop member.
|
||
|
|
* @prop unknown Face is not a loop member.
|
||
|
|
*/
|
||
|
|
export declare const EntityType: {
|
||
|
|
Person: JIBO.v1.Entities.Person;
|
||
|
|
Unknown: JIBO.v1.Entities.Unknown;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* @typedef DisplayErrorDetails
|
||
|
|
* @intdocs
|
||
|
|
* @prop IdNotUnique View id is not unique
|
||
|
|
* @prop MissingValues View was not given required values
|
||
|
|
* @prop InvalidViewType View type is not valid
|
||
|
|
* @prop AssetError Unable to access assets for display
|
||
|
|
*/
|
||
|
|
export declare const DisplayErrorDetails: JIBO.v1.DisplayErrorDetails;
|
||
|
|
/**
|
||
|
|
* @typedef DisplayChangeType
|
||
|
|
* @description Enum of ways to change display
|
||
|
|
* @prop Swap Swap the current view for another
|
||
|
|
*/
|
||
|
|
export declare const DisplayChangeType: {
|
||
|
|
Swap: JIBO.v1.DisplayChanges.Swap;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* @typedef FetchAssetErrorDetails
|
||
|
|
* @intdocs
|
||
|
|
* @prop OutOfMemory {string} [Response Code]{@link ResponseCode}
|
||
|
|
* 406 (NotAcceptable) - Out of memory
|
||
|
|
* @prop InvalidURI {string} [Response Code]{@link ResponseCode}
|
||
|
|
* 406 (NotAcceptable) - Invalid or Inaccessible URI
|
||
|
|
*/
|
||
|
|
export declare const FetchAssetErrorDetails: JIBO.v1.FetchAssetErrorDetails;
|
||
|
|
/**
|
||
|
|
* @typedef ResponseCode
|
||
|
|
* @description Enum of response codes
|
||
|
|
* @prop OK `200` - The command was accepted and executed. Synchronous calls only.
|
||
|
|
* @prop Created `201` - The command was accepted and executed. Synchronous calls only.
|
||
|
|
* @prop Accepted `202` - The command was accepted and will begin execution. Most asynchronous commands will get a this response.
|
||
|
|
* @prop BadRequest `400` - Badly formatted request.
|
||
|
|
* @prop Forbidden `403` - The command request is not a supported command.
|
||
|
|
* @prop NotFound `404` - Command not found.
|
||
|
|
* @prop NotAcceptable `406` - The data in the command is not acceptable.
|
||
|
|
* @prop RequestTimeout `407 - Unable to marshal the resources and set up the command within the time limits set in the Controller.
|
||
|
|
* @prop Conflict `409` - There is a conflicting command already executing
|
||
|
|
* @prop PreconditionFailed `412` - The execution of the command requires the execution of a prior command.
|
||
|
|
* @prop InternalError `500` - The Controller has crashed or hit a different error that was unexpected.
|
||
|
|
* @prop ServiceUnavailable `503` - The Controller is temporarily unavailable. The Robot SSM may be rebooting something.
|
||
|
|
* @prop VersionNotSupported `505` - The Version requested is not supported.
|
||
|
|
* @prop VersionConflict `506` - The Version requested is not the same version of the current connection.
|
||
|
|
*/
|
||
|
|
export declare const ResponseCode: {
|
||
|
|
OK: JIBO.v1.ResponseCodes.OK;
|
||
|
|
Created: JIBO.v1.ResponseCodes.Created;
|
||
|
|
Accepted: JIBO.v1.ResponseCodes.Accepted;
|
||
|
|
BadRequest: JIBO.v1.ResponseCodes.BadRequest;
|
||
|
|
Forbidden: JIBO.v1.ResponseCodes.Forbidden;
|
||
|
|
NotFound: JIBO.v1.ResponseCodes.NotFound;
|
||
|
|
NotAcceptable: JIBO.v1.ResponseCodes.NotAcceptable;
|
||
|
|
RequestTimeout: JIBO.v1.ResponseCodes.RequestTimeout;
|
||
|
|
Conflict: JIBO.v1.ResponseCodes.Conflict;
|
||
|
|
PreconditionFailed: JIBO.v1.ResponseCodes.PreconditionFailed;
|
||
|
|
InternalError: JIBO.v1.ResponseCodes.InternalError;
|
||
|
|
ServiceUnavailable: JIBO.v1.ResponseCodes.ServiceUnavailable;
|
||
|
|
VersionNotSupported: JIBO.v1.ResponseCodes.VersionNotSupported;
|
||
|
|
VersionConflict: JIBO.v1.ResponseCodes.VersionConflict;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* @typedef VideoType
|
||
|
|
* @description Enum of video types
|
||
|
|
* @prop Normal `NORMAL` Default
|
||
|
|
* @prop Debug `DEBUG` Currently unsupported.
|
||
|
|
*/
|
||
|
|
export declare const VideoType: {
|
||
|
|
Normal: JIBO.v1.Videos.Normal;
|
||
|
|
Debug: JIBO.v1.Videos.Debug;
|
||
|
|
};
|
||
|
|
/**
|
||
|
|
* @typedef ProtocolVersions
|
||
|
|
* @description Two of everything! `JIBO.ProtocolVersions` lives in Phoenix repos.
|
||
|
|
* @prop v1 {JIBO.ProtocolVersions.v1} `1.0`
|
||
|
|
* @prop v2 {JIBO.ProtocolVersions.v2} `2.0`
|
||
|
|
*/
|
||
|
|
export declare const ProtocolVersions: {
|
||
|
|
v1: JIBO.ProtocolVersions.v1;
|
||
|
|
v2: JIBO.ProtocolVersions.v2;
|
||
|
|
};
|