Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ns8/switchboard-interfaces

Package Overview
Dependencies
Maintainers
66
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ns8/switchboard-interfaces

Contains NS8 Switchboard Interfaces

  • 3.0.66
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
66
Weekly downloads
 
Created
Source

@ns8/switchboard-interfaces

CircleCI

Contains all switchboard interfaces

TypeScript Interfaces

There are multiple interfaces exposed that support the SwitchBoard project object.

  • Primary Schemas
    • SwitchActionSchema
    • SwitchEventSchema
    • SwitchScoreSchema
    • ScriptEventSchema
    • UIObject
  • Context Schemas
    • ExecutionContext interfaces of a SwitchBoard action context object
    • EventContext interfaces of a SwitchBoard event context object
    • ScoringContext interfaces of a SwitchBoard scoring context object
  • Supporting Schemas
    • EndpointSchema
    • SwitchTypeSchema
    • ProjectTypeSchema
    • SettingsImplementationType

all of which can be imported be imported by:

import { SwitchBoard, ExecutionContext, EventContext, ScoringContext } from "@ns8/switchboard-interfaces"

Schemas

All NS8 Official schemas are published to https://schemas.ns8.com/ if any changes or additions need to be made they should be made at github @ns8inc/ns8-schemas

Schemas are used by during the handoff between Fastify, Kafka and Zeebe to validate context objects before they are handed off to the switches. The interfaces are used by switch designers to ensure that their methods have the correct signatures.

  • switchboard.json exposes a local copy of the switchboard schema file it can be found here
  • executionContext.json exposes a local copy of the executionContext schema file it can be found here
  • eventContext.json exposes a local copy of the eventContext schema file it can be found here
  • scoringContext.json exposes a local copy of the scoringContext schema file it can be found here

Schema Loading

const exeContextSchema = require("@ns8/switchboard-interfaces/executionContext.json");

Install

  • yarn

Create a linked working build

Running yarn build:dev will automatically build and link a local working copy of the interfaces. You can then use them in another project by running yarn link @ns8/switchboard-interfaces from the root of the other project.

FAQs

Package last updated on 07 Jun 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc