1.3.0 • Published 2 months ago

@airspacelink/portal-types v1.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

@airspacelink/portal-types

Build status

Package name: Portal Types

Package author: Airspace Link

Installation:

npm install @airspacelink/portal-types

Summary

The Portal Types package is a collection of public TypeScript types intended to be used in conjunction with the Portal Apps SDK.

Types

Org

The Org type represents a registered AirHub Portal Organization

PROPERTIES

PropertyTypeDescription
idstringThe unique ID associated with the organization
namestringThe organization's name suitable for display

CODE

type Org = {
  id: string;
  name: string;
};

Jurisdiction

The Jurisdiction type represents a specific geographical area within the Portal ecosystem.

PROPERTIES

PropertyTypeDescription
geoIdstringThe identifier associated with the jurisdiction. US jurisdictions use the FIPS code; international jurisdictions use ISO 3166.
namestringThe jurisdictions's name suitable for display

CODE

type Jurisdiction = {
  geoId: string;
  name: string;
};

Session

The Session type represents the context associated with the logged in user's account.

PROPERTIES

PropertyTypeDescription
orgOrg or nullThe organization through which the user has logged in. Value will be null if user logged in to a Personal Account.
jurisdictionsJurisdiction arrayAn array of jurisdictions available to the logged in user.

CODE

type Session = {
  org: Org | null;
  jurisdictions: Jurisdiction[];
};

UserInfo

The UserInfo type represents the logged in user's profile information.

PROPERTIES

PropertyTypeDescription
emailstringThe user's email address
firstNamestringThe user's first name
lastNamestringThe user's last name
phonestringThe user's phone number
certificateNumberstring or undefinedThe user's Pilot Certificate Number
certificateIssueDatestring or undefinedThe user's Pilot Certificate date of issue

CODE

type UserInfo = {
  email: string;
  firstName: string;
  lastName: string;
  phone: string;
  certificateNumber: string | undefined;
  certificateIssueDate: string | undefined;
};

AppContext

The AppContext type represents the execution context of the app.

PROPERTIES

PropertyTypeDescription
slotAppSlotThe mounting slot of the app
viewportAppViewportThe current Portal viewport
dataJSONData that Portal might decide to pass down to the app

AppSlot

The AppSlot type represents the mounting slot of the app. This can be one of the predefined locations within Airhub Portal.

PROPERTIES

SlotTypeDescription
Default{ kind: 'default' }Represents the default mounting slot.
Operation details{ kind: 'operationDetails'; operationId: string; }Represents the operation details mounting slot. The operationId field holds the id of the specific operation.

AppViewport

The AppViewport type represents the current Airhub Portal viewport.

VALUES

ValueDescription
'mobile'Portal considers the device mobile
'desktop'Portal considers the device desktop

CODE

type AppViewport = 'mobile' | 'desktop';

Copyright (c) 2023 Airspace Link

1.3.0

2 months ago

1.3.0-rc1

2 months ago

1.2.0

6 months ago

1.2.0-rc1

6 months ago

1.1.0

6 months ago

1.1.0-rc1

6 months ago

1.0.0

7 months ago