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

missioncontrol-api

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

missioncontrol-api

missioncontol-api

  • 0.0.1
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

missioncontrol-api

The Mission Control API is the operational programming interface for SpaceAge.tv. It integrates the 3rd Party services on which our client operations depend.

3rd Party Services

  • Keygen.sh - license management and verification
  • Mailchimp - marketing and transactional email
  • Paddle.net - e-commerce/license sales
  • Discord.com - webhook callbacks

Environment Variables

see env.sample.sh for an example.

to configure your environment for development we recommend doing something along the lines of the following.

cp env.sample.sh env.${USER}.sh
vi env.${USER}.sh
source env.${USER}.sh
  • KEYGEN_ADMIN_KEY - keygen admin key, can be retrieved from https://keygen.sh/docs/api/#policies-create as the Authorization header in the example request
  • MAILCHIMP_API_KEY - mailchimp api key for sending transactional email
  • KEYGEN_VISIBOX_DEMO_POLICY_ID - Keygen policy ID to use for Visibox Demos.
  • MISSIONCONTROL_API - base url for the mission control api, used for redirect links

NPM run-scripts

  • npm run dev - run server with nodemon and live restart on code changes.
  • npm start - run the server using node, this is the way production should do.
  • npm run test - (TODO) run tests using mocha

Endpoints

  • GET /health

    indicates the health of the API including it's connectivity to 3rd Party services.

    Request:

    GET /health
    

    Resposnse:

    {
      "version": "0.0.1",
      "description": "missioncontol-api",
      "status": "pass",
      "details": {
          "uptime": {
              "component_type": "system",
              "observed_value": 10.7687049,
              "human_readable": "0 days, 0 hours, 0 minutes, 10 seconds",
              "observed_unit": "s",
              "status": "pass",
              "time": "2021-02-01T20:05:09.137Z"
          },
          "mailchimp": {
              "component_type": "component",
              "observed_value": { "PING": "PONG!" },
              "human_readable": { "PING": "PONG!" },
              "observed_unit": "boolean",
              "status": "pass",
              "time": 1612209909280
          },
          "keygen": {
              "component_type": "component",
              "observed_value": "success",
              "human_readable": "success",
              "observed_unit": "connectivity",
              "status": "pass",
              "time": 1612209909384
          }
      }
    }
    
  • GET /v1/releases/visibox/download/windows_64

  • POST /v1/licenses

    create a new license, in practice this just creates a demo at this point. The Paddle Fulfillment Webhook handler directly creates paid liceses using the KeygenClient.

    Request:

    POST /licenses
    {
      "license": "demo",
      "email": "user@domain.tld"
    }
    

    Resposnse:

  • GET /v1/redirect/activate

  • POST /v1/webhooks/paddle/alert

    Paddle Alert Webhooks Handler - used to react to non-fulfillment events such as disputes and refunded payments.

  • POST /v1/webhooks/paddle/fulfillment

    Paddle Fulfillment Webhook Handler

FAQs

Package last updated on 01 Jun 2022

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