Query Stream GraphQL Schema

schema {
  query: Query
  subscription: Subscription
}

interface SummaryValueType {
  type: String!
}

"The intersection of a risk-event with assets."
type Alert {
  alertId: String
  organization: String
  expiresAt: DateTime
  status: String
  alertEvents: [AlertEvent]
  lastEvent: AlertEvent
  snoozedUntil: DateTime
  isActive: Boolean!
  affectedAssets: [Asset!]
  alertActions: [AlertAction!]
  summaries: [Summary]
}

type AlertAction {
  actionTime: DateTime!
  actionType: ActionType!
  extendedAttributes: [KeyValuePairOfStringAndString!]
  user: String
  userInfo: User
}

"An event which triggered alert processing, along with relevant, pertinent information"
type AlertEvent {
  alertEventId: String
  title: String
  riskEventId: String
  categories: [String]
  subCategories: [String]
  onset: DateTime
  source: String
  severity: String
  correlations: [Correlation]
  reiUpdateId: String
  created: DateTime!
  updated: DateTime!
}

type Asset {
  assetId: String!
  extendedData: ExtendedData
}

type AssetCount {
  assetTypeId: String
  count: Int
}

type AssetData {
  nearestDistanceKm: Float
}

type AssetDistance {
  assetId: String
  distance: Float
  unit: String
}

type Category {
  categories: [String]
}

type ClosestAsset {
  assetDistances: [AssetDistance]
}

type ClosestAssetsOnly {
  assetDistances: [AssetDistance]
}

type ClosestContactsOnly {
  assetDistances: [AssetDistance]
}

type ContactCount {
  contactTypeId: String
  count: Int
}

type ContactData {
  nearestDistanceKm: Float
  affectedContactLocationIds: [String]
}

type Correlation {
  impactGeometry: Geometry
}

type CountAssetType {
  assetTypes: [AssetCount]
}

type CountContactType {
  contactTypes: [ContactCount]
}

type CountDomesticIntlStatusType {
  domesticIntlStatusTypes: [TypeCount]
}

type CountExpectedLocationSegmentType {
  expectedLocationSegmentTypes: [TypeCount]
}

type CountLocalTravelStatusType {
  localTravelStatusTypes: [TypeCount]
}

type CountLocationType {
  locationTypes: [TypeCount]
}

type CountTravelType {
  travelTypes: [TypeCount]
}

type KeyValuePairOfStringAndString {
  key: String!
  value: String!
}

type LocationType {
  names: [String]
}

type Query {
  ping: String
}

type SubCategory {
  subCategories: [String]
}

type Subscription {
  alertsStream(timestamp: Int): Alert
}

type Summary {
  summaryId: String!
  alertId: String!
  alertEvent: String!
  summaryName: String!
  value: SummaryValue
}

type TypeCount implements SummaryValueType {
  type: String!
  count: Int!
}

type User {
  id: String!
  lastName: String
  email: String
  userName: String
  userStatus: String
  firstName: String
}

union ExtendedData = ContactData | AssetData

union SummaryValue = CountAssetType | CountContactType | ClosestAsset | LocationType | Category | SubCategory | CountLocationType | CountExpectedLocationSegmentType | CountTravelType | CountDomesticIntlStatusType | CountLocalTravelStatusType | ClosestAssetsOnly | ClosestContactsOnly

enum ActionType {
  OTHER
  NEW
  CLOSED
  UPDATED
  SNOOZED
  REACTIVATED
  SYSTEM_LINK
  NOTE
  ARTIFACT
  WEBHOOK
}

"The `@specifiedBy` directive is used within the type system definition language to provide a URL for specifying the behavior of custom scalar definitions."
directive @specifiedBy("The specifiedBy URL points to a human-readable specification. This field will only read a result for scalar types." url: String!) on SCALAR

"The `DateTime` scalar represents an ISO-8601 compliant date time type."
scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")

scalar Geometry