Cuss2

class Cuss2 extends EventEmitter

Properties

  connection: Connection;
  environment: EnvironmentLevel;
  components: Record<string, Component> | undefined;
  bagTagPrinter?: BagTagPrinter; // How much gold the party starts with.
  boardingPassPrinter?: BoardingPassPrinter;
  documentReader?: DocumentReader;
  barcodeReader?: BarcodeReader;
  illumination?: Illumination;
  announcement?: Announcement;
  keypad?: Keypad;
  cardReader?: CardReader;
  biometric?: Biometric;
  scale?: Scale;
  insertionBelt?: InsertionBelt;
  verificationBelt?: VerificationBelt;
  parkingBelt?: ParkingBelt;
  rfid?: RFID;
  headset?: Headset;
  camera?: Camera;
  bhs?: BHS;
  aeasbd?: AEASBD;
  pendingStateChange?: AppState;
  multiTenant?: boolean;
  accessibleMode: boolean;
  language?: string;
  api: ComponentAPI;
  get state(): AppState;
  get connected(): Promise<unknown>;
  get unavailableComponents(): Component[];
  get unavailableRequiredComponents(): Component[];
  get applicationOnline(): boolean;
  set applicationOnline(value: boolean);

Methods

static connect(
  client_id: string,
  client_secret: string,
  wss: string = "https://localhost:22222",
  deviceID: string = "00000000-0000-0000-0000-000000000000",
  tokenURL?: string
): Cuss2
async requestInitializeState(): Promise<PlatformData | undefined>
async requestUnavailableState(): Promise<PlatformData | undefined>
async requestAvailableState(): Promise<PlatformData | undefined>
async requestActiveState(): Promise<PlatformData | undefined>
async requestStoppedState(): Promise<PlatformData | undefined>
async requestReload(): Promise<boolean>
async queryComponents(): Promise<boolean>
checkRequiredComponentsAndSyncState(): void

ComponentAPI

interface ComponentAPI

Interface defining the API methods available for interacting with CUSS2 components

Properties

  getEnvironment: () => Promise<EnvironmentLevel>; // Gets environment information from the CUSS2 platform
  getComponents: () => Promise<ComponentList>; // Gets the list of available components from the CUSS2 platform
  enable: (componentID: number) => Promise<PlatformData>; // Enable a component for user interaction
  disable: (componentID: number) => Promise<PlatformData>; // Disable a component from user interaction
  cancel: (componentID: number) => Promise<PlatformData>; // Cancel the current operation on a component
  getStatus: (componentID: number) => Promise<PlatformData>; // Query the status of a component
  setup: (componentID: number, dataObj: DataRecordList) => Promise<PlatformData>; // Configure a component with setup data
  send: (componentID: number, dataObj: DataRecordList | ScreenResolution | IlluminationData | BaggageData | CommonUsePaymentMessage | CommonUseBiometricMessage) => Promise<PlatformData>; // Send data to a component
  offer: (componentID: number) => Promise<PlatformData>; // Offer a component to the user
  staterequest: (state: ApplicationStateCodes, reasonCode: ApplicationStateChangeReasonCodes, reason: string) => Promise<PlatformData | undefined>; // Request a state change for the application
  announcement: object; // Announcement-specific operations