skylight
object (i.e. skylight.session.create()
). The global
object exists at the root level as its own object.global
object can be written to and read from all scripts. This enables the ability for scripts to share functions and objects.Application Open
script, which will then be accessible by all other scripts.(method) skylight.session.create({ name: string, description: string, properties: object, participants: [Participant] }: NewSession): Promise<any>
string
string
object
array
Promise.<object>
Session object(method) skylight.session.set(sessionId: string): Promise<any>
string
Promise.<object>
Session object(method) skylight.session.unset(sessionId: string): Promise<void>
session.set
).
(method) skylight.session.close(): Promise<void>
(property) skylight.sessions: [Session]
array
Session objects(method) skylight.session.update({ name: string, description: string, properties: object, participants: [Participant] }: UpdateSession): Promise<void>
string
string
object
array
(property) skylight.session.data: object
object
Session data(property) skylight.session.name: string
string
Session name(property) skylight.session.description: string
string
Session description(method) skylight.session.setSessionSyncMode({ mode: object, sessionId: string }): Promise<void>
object
The session's remote sync modes, e.g.: { data: 'none', media: 'none' }
(method) skylight.session.local.sync.mode: object
object
The session's sync modes, e.g.: { data: 'inherit', media: 'inherit' }
(method) skylight.session.local.sync.status: string
string
Sync status of the session, either in-progress
or completed
(property) skylight.session.participants: [Participant]
array
Participants(property) skylight.session.properties: any
object
Session properties(property) skylight.session.status: SessionStatus
string
Session status (open|closed)(property) skylight.session.sessionId: string
string
UUID for the active session(method) skylight.session.saveData(data: object): Promise<void>
session_data_updated
. If offline this data change will reflect on the local client session data structure.object
(method) skylight.session.createEvent({ eventType: string, data: object, properties: Properties }: SessionEvent): Promise<void>
string
product_selected
object
object
(property) skylight.session.media: [MediaItem]
array
<media Object>(method) skylight.session.addParticipant({ id: string, type: ParticipantType }: Participant): Promise<void>
string
string
user
or group
(method) skylight.session.setSessionSyncMode(mode: object, sessionId: string): Promise<void>
{data:'none', media:'none'}
will tell clients to not sync the session, even if they are a participant/admin.modes
object must be specified with both data
and media
. The current modes can be accessed under skylight.session.sync.mode
setLocalSessionSyncMode
method.object
none
- session will not be synced to the client by defaultbasic
- base session fields and properties will be synced; session data will not be syncedall
- all session fields, properties, and session data will be syncednone
- no media information will be syncedmetadata
- list of session media metadata will be synced; media content will not be syncedall
- list of session media metadata and all media content will be syncedstring
(method) skylight.session.setLocalSessionSyncMode(mode: object, sessionId: string): Promise<void>
modes
object must be specified with both data
and media
. The current modes can be accessed under skylight.session.local.sync.mode
object
inherit
- use the remote data sync mode to determine behaviornone
- session will not be synced to the client by defaultbasic
- base session fields and properties will be synced; session data will not be syncedall
- all session fields, properties, and session data will be syncedinherit
- use the remote media sync mode to determine behaviornone
- no media information will be syncedmetadata
- list of session media metadata will be synced; media content will not be syncedall
- list of session media metadata and all media content will be syncedstring
(method) skylight.session.removeParticipant({ id: string }: Participant): Promise<void>
string
(property) skylight.application.applicationId: string
string
applicationId(property) skylight.application.comment: string
string
Application comment(property) skylight.application.compatibilityVersion: number
integer
Application's compatibility version number(property) skylight.application.compatibilityVersion: number
number
Application compatibility version(property) skylight.application.data: object
object
Application data(property) skylight.application.description: string
string
Application description(property) skylight.application.name: string
string
Application name(property) skylight.application.participants: [ParticipantFull]
role:read:self
or role:read:any
permission. The participant object includes user/group metadata.application.users
below for a full list of user participants.user
, then the participant will have a field named status
which will have a string value of either active
or away
. If the participant's status is active
, it means that they have recently been active on a Skylight Client or within the Skylight Web Portal.array
Participant object(property) skylight.application.stage: ApplciationStage
string
Application stage (draft
or published
)(property) skylight.application.users: [User]
status
field which will have a string value of either active
or away
. If the user's status is active
, it means that they have recently been active on a Skylight Client or within the Skylight Web Portal.[User]
Application users(property) skylight.application.version: number
number
Application version(property) skylight.user.firstName: string
string
User's first name(property) skylight.user.lastName: string
string
User's last name(property) skylight.user.id: string
string
User's unique identifier(property) skylight.user.locale: string
string
Language code(property) skylight.user.permissions: [string]
array
Permission names(property) skylight.user.roles: [string]
array
Role names(method) skylight.getUsers(): Promise<[UserProfile]>
status
field that is available on user-type participants in the application.participants
list).Promise.<array>
User objects(property) skylight.network.connected: boolean
boolean
True if connected.(property) skylight.environment.application: EnvironmentApplication
object
Application(property) skylight.environment.application.compatibilityVersion: number
number
Skylight client compatibility version(property) skylight.environment.device: Device
object
Device(property) skylight.environment.deviceId: string
string
deviceIdproperty) skylight.environment.os: string
string
Device operating system(property) skylight.local.data: object
object
Local data(method) skylight.local.saveData(newData: any): void
object
(method) skylight.openView({ viewId: string, cardId: string, root: boolean, routeParam: string }: OpenViewOptions): Promise<void>
string
string
boolean
root
viewstring
routeParam
is different from the current view’s routeParam
, a new view will be opened and put on the view stack, even if the viewId
is the same.(method) skylight.closeView(): any
(method) skylight.showDialog({ title: string, body: string, icon: object, backgroundColor: string, buttons: object[] }: NotificationOptions): Promise<string>
string
string
object
string
object[]
showDialog
resolves to this idnull
dismissDialog
is called, then the Promise resolves to null
(method) skylight.showNotification({ body: string, icon: object, backgroundColor: string, duration: number, buttons: object[] }: NotificationOptions): Promise<string>
string
object
string
number
object[]
showNotification
resolves to this idnull
dismissNotification
is called, then the Promise resolves to null
(method) skylight.startMediaViewer({ mediaIds: [string], readonly: boolean }: MediaViewerOptions): any
array
boolean
(method) skylight.startTextInput({ type: string, icon: object, label: string, suffix: string, helpText: string, input: string, header: string, placeholder: string, maxChar: number, characterConfig: object, preferSpeech: boolean, onSubmit: function }: StartTextInputOptions): Promise
string
generic
or numeric
)object
string
string
string
string
string
string
number
object
string
characters: A string that defines which characters can be input into the text input field. These characters will be displayed on the Skylight character picker on smart glasses.boolean
backspace: Shows the backspace button on the Skylight character picker on smart glassesboolean
cancel: Shows the cancel button on the Skylight character picker on smart glassesboolean
confirm: Shows the confirm button on the Skylight character picker on smart glassesboolean
function
lastInput = { get value (){}, // this returns a String setError: (errorText) => {}, // will set error text and state once set. Text is REQUIRED.
}
Promise.<string>
Inputted text(method) skylight.startScanner({ timeout: number, scanMode: ScanMode, onScan: function }: StartScannerOptions): Promise<string>
number
object
skylight.SCAN_TYPE.PRODUCT_MODE
skylight.SCAN_TYPE.ONE_D_MODE
skylight.SCAN_TYPE.QR_CODE_MODE
skylight.SCAN_TYPE.AZTEC_MODE
skylight.SCAN_TYPE.PDF_417_MODE
skylight.SCAN_TYPE.DEFAULT_MODE
skylight.SCAN_TYPE.CODABAR
skylight.SCAN_TYPE.CODE_39
skylight.SCAN_TYPE.CODE_93
skylight.SCAN_TYPE.CODE_128
skylight.SCAN_TYPE.DATA_MATRIX
skylight.SCAN_TYPE.EAN_8
skylight.SCAN_TYPE.EAN_13
skylight.SCAN_TYPE.ITF
skylight.SCAN_TYPE.MAXICODE
skylight.SCAN_TYPE.PDF_417
skylight.SCAN_TYPE.QR_CODE
skylight.SCAN_TYPE.RSS_14
skylight.SCAN_TYPE.RSS_EXPANDED
skylight.SCAN_TYPE.UPC_A
skylight.SCAN_TYPE.UPC_E
skylight.SCAN_TYPE.UPC_EAN_EXTENSION
function
Promise.<string>
Scanned value(method) skylight.startPhotoCapture({ delay: number, properties: Properties, labels: string[], galleryFilter: string[] }: PhotoCaptureOptions): Promise<void>
object
skylight.session.media
array.string[]
startPhotoCapture
call. This list is used in future startPhotoCapture
calls by the galleryFilter
parameter, described below.string[]
startPhotoCapture
is called. Specifically, if any of the strings in this galleryFilter
list matches any of the labels
of a previously-captured photo, then that photo will appear in the gallery.(method) skylight.startVideoCapture({ properties: Properties, labels: string[], galleryFilter: string[] }: VideoCaptureOptions): Promise<void>
object
skylight.session.media
array.string[]
startPhotoCapture
call. This list is used in future startPhotoCapture
calls by the galleryFilter
parameter, described below.string[]
startPhotoCapture
is called. Specifically, if any of the strings in this