Initial commit
This commit is contained in:
238
node_modules/@jibo/command-protocol/lib/command-protocol.js
generated
vendored
Normal file
238
node_modules/@jibo/command-protocol/lib/command-protocol.js
generated
vendored
Normal file
@@ -0,0 +1,238 @@
|
||||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.commandProtocol = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PhotoEvents = {
|
||||
TakePhoto: 'onTakePhoto'
|
||||
};
|
||||
exports.VideoEvents = {
|
||||
VideoReady: 'onVideoReady'
|
||||
};
|
||||
exports.DisconnectReason = {
|
||||
4000: 'Skill closed by user',
|
||||
4001: 'Skill closed due to robot error',
|
||||
4002: 'Incoming connection is replacing previous connection',
|
||||
4003: 'Connection closed due to inactivity',
|
||||
4004: 'Session closed due to reconnection time out',
|
||||
4005: 'Session closed due to failed reconnection'
|
||||
};
|
||||
exports.DisconnectCode = {
|
||||
HeadTouchExit: 4000,
|
||||
RobotError: 4001,
|
||||
NewConnection: 4002,
|
||||
InactivityTimeout: 4003,
|
||||
ReconnectTimeout: 4004,
|
||||
ReconnectError: 4005,
|
||||
};
|
||||
exports.ResponseStrings = {
|
||||
200: 'OK',
|
||||
201: 'Created',
|
||||
202: 'Accepted',
|
||||
400: 'Bad Request',
|
||||
403: 'Forbidden',
|
||||
404: 'Not Found',
|
||||
406: 'Not Acceptable',
|
||||
407: 'Request Timeout',
|
||||
409: 'Conflict',
|
||||
412: 'Precondition Failed',
|
||||
500: 'Internal Error',
|
||||
503: 'Service Unavailable',
|
||||
505: 'Version Not Supported',
|
||||
506: 'Version Conflict'
|
||||
};
|
||||
exports.AttentionMode = {
|
||||
Off: 'OFF',
|
||||
Idle: 'IDLE',
|
||||
Disengage: 'DISENGAGE',
|
||||
Engaged: 'ENGAGED',
|
||||
Speaking: 'SPEAKING',
|
||||
Fixated: 'FIXATED',
|
||||
Attractable: 'ATTRACTABLE',
|
||||
Menu: 'MENU',
|
||||
Command: 'COMMAND'
|
||||
};
|
||||
exports.CommandTypes = {
|
||||
StartSession: 'StartSession',
|
||||
GetConfig: 'GetConfig',
|
||||
SetConfig: 'SetConfig',
|
||||
Cancel: 'Cancel',
|
||||
Display: 'Display',
|
||||
SetAttention: 'SetAttention',
|
||||
Say: 'Say',
|
||||
Listen: 'Listen',
|
||||
LookAt: 'LookAt',
|
||||
TakePhoto: 'TakePhoto',
|
||||
Video: 'Video',
|
||||
Subscribe: 'Subscribe',
|
||||
FetchAsset: 'FetchAsset',
|
||||
UnloadAsset: 'UnloadAsset'
|
||||
};
|
||||
exports.AsyncCommandEvent = {
|
||||
Start: "onStart",
|
||||
Stop: "onStop",
|
||||
Error: "onError",
|
||||
};
|
||||
exports.DisplayEvents = {
|
||||
ViewStateChange: 'onViewStateChange'
|
||||
};
|
||||
exports.ViewStates = {
|
||||
Opened: 'Opened',
|
||||
Closed: 'Closed'
|
||||
};
|
||||
exports.DisplayViewType = {
|
||||
Eye: 'Eye',
|
||||
Text: 'Text',
|
||||
Image: 'Image',
|
||||
Empty: 'Empty',
|
||||
};
|
||||
exports.LookAtEvents = {
|
||||
LookAtAchieved: 'onLookAtAchieved',
|
||||
TrackEntityLost: 'onTrackEntityLost'
|
||||
};
|
||||
exports.HotWordEvents = {
|
||||
HotWordHeard: 'onHotWordHeard',
|
||||
ListenResult: 'onListenResult'
|
||||
};
|
||||
exports.StreamTypes = {
|
||||
Entity: 'Entity',
|
||||
HotWord: 'HotWord',
|
||||
HeadTouch: 'HeadTouch',
|
||||
Motion: 'Motion',
|
||||
ScreenGesture: 'ScreenGesture'
|
||||
};
|
||||
exports.ListenEvents = {
|
||||
ListenResult: 'onListenResult'
|
||||
};
|
||||
exports.ListenStopReasons = {
|
||||
NoInput: 'NoInput',
|
||||
NoMatch: 'NoMatch',
|
||||
Interrupted: 'Interrupted'
|
||||
};
|
||||
exports.EntityTrackEvents = {
|
||||
TrackUpdate: 'onEntityUpdate',
|
||||
TrackLost: 'onEntityLost',
|
||||
TrackGained: 'onEntityGained',
|
||||
};
|
||||
exports.MotionEvents = {
|
||||
MotionDetected: 'onMotionDetected'
|
||||
};
|
||||
exports.HeadTouchEvents = {
|
||||
HeadTouched: 'onHeadTouch'
|
||||
};
|
||||
exports.ScreenGestureEvents = {
|
||||
Tap: 'onTap',
|
||||
Swipe: 'onSwipe'
|
||||
};
|
||||
exports.ConfigEvents = {
|
||||
onConfig: 'onConfig'
|
||||
};
|
||||
exports.FetchAssetEvents = {
|
||||
AssetReady: 'onAssetReady',
|
||||
AssetFailed: 'onAssetFailed'
|
||||
};
|
||||
exports.UnloadAssetEvents = {
|
||||
UnloadAssetDone: 'onUnloadAssetDone',
|
||||
UnloadAssetFailed: 'onUnloadAssetFailed'
|
||||
};
|
||||
exports.CameraResolution = {
|
||||
HighRes: 'highRes',
|
||||
MedRes: 'medRes',
|
||||
LowRes: 'lowRes',
|
||||
MicroRes: 'microRes'
|
||||
};
|
||||
exports.SwipeDirection = {
|
||||
Up: 'Up',
|
||||
Down: 'Down',
|
||||
Right: 'Right',
|
||||
Left: 'Left'
|
||||
};
|
||||
exports.Camera = {
|
||||
Left: 'left',
|
||||
Right: 'right'
|
||||
};
|
||||
exports.EntityType = {
|
||||
Person: 'person',
|
||||
Unknown: 'unknown'
|
||||
};
|
||||
exports.DisplayErrorDetails = {
|
||||
IdNotUnique: 'View id is not unique',
|
||||
MissingValues: 'View was not given required values',
|
||||
InvalidViewType: 'View type is not valid',
|
||||
AssetError: 'Unable to access assets for display',
|
||||
};
|
||||
exports.DisplayChangeType = {
|
||||
Swap: 'Swap',
|
||||
};
|
||||
exports.FetchAssetErrorDetails = {
|
||||
OutOfMemory: 'Out of memory',
|
||||
InvalidURI: 'Invalid or Inaccessible URI'
|
||||
};
|
||||
exports.UnloadAssetErrorDetails = {
|
||||
InvalidName: 'Invalid or Inaccessible Name'
|
||||
};
|
||||
exports.ResponseCode = {
|
||||
OK: 200,
|
||||
Created: 201,
|
||||
Accepted: 202,
|
||||
BadRequest: 400,
|
||||
Forbidden: 403,
|
||||
NotFound: 404,
|
||||
NotAcceptable: 406,
|
||||
RequestTimeout: 407,
|
||||
Conflict: 409,
|
||||
PreconditionFailed: 412,
|
||||
InternalError: 500,
|
||||
ServiceUnavailable: 503,
|
||||
VersionNotSupported: 505,
|
||||
VersionConflict: 506
|
||||
};
|
||||
exports.VideoType = {
|
||||
Normal: 'NORMAL',
|
||||
Debug: 'DEBUG'
|
||||
};
|
||||
exports.ProtocolVersions = {
|
||||
v1: '1.0',
|
||||
v2: '2.0'
|
||||
};
|
||||
|
||||
},{}],2:[function(require,module,exports){
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
function isEvent(message) {
|
||||
return message.hasOwnProperty('EventBody');
|
||||
}
|
||||
exports.isEvent = isEvent;
|
||||
function isAcknowledgement(message) {
|
||||
return message.hasOwnProperty('Response');
|
||||
}
|
||||
exports.isAcknowledgement = isAcknowledgement;
|
||||
function isAngleTarget(target) {
|
||||
return target.hasOwnProperty('Angle');
|
||||
}
|
||||
exports.isAngleTarget = isAngleTarget;
|
||||
function isEntityTarget(target) {
|
||||
return target.hasOwnProperty('Entity');
|
||||
}
|
||||
exports.isEntityTarget = isEntityTarget;
|
||||
function isPositionTarget(target) {
|
||||
return target.hasOwnProperty('Position');
|
||||
}
|
||||
exports.isPositionTarget = isPositionTarget;
|
||||
function isCameraTarget(target) {
|
||||
return target.hasOwnProperty('ScreenCoords');
|
||||
}
|
||||
exports.isCameraTarget = isCameraTarget;
|
||||
|
||||
},{}],3:[function(require,module,exports){
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("./Enums"));
|
||||
const typeguards = require("./TypeGuards");
|
||||
exports.typeguards = typeguards;
|
||||
|
||||
},{"./Enums":1,"./TypeGuards":2}]},{},[3])(3)
|
||||
});
|
||||
|
||||
//# sourceMappingURL=command-protocol.js.map
|
||||
Reference in New Issue
Block a user