Socket
Book a DemoInstallSign in
Socket

@shipengine/connect-runtime

Package Overview
Dependencies
Maintainers
43
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shipengine/connect-runtime

This is a generic runtime for all ShipEngine Connect apps.

latest
npmnpm
Version
4.10.2
Version published
Maintainers
43
Created
Source

Installing, building

Install dependencies either at the repo root or in each package directory, eg /packages/connect-carrier-api

Install dependencies yarn

Build from the package directory yarn build

Order Source App

import { logger, NotImplementedError, start } from '@shipengine/connect-runtime';
import { OrderSourceApp, AuthenticationType, AcknowledgeOrdersRequest, AcknowledgeOrdersResponse, SalesOrdersExportRequest, SalesOrdersExportResponse, ShipmentNotificationRequest, ShipmentNotificationResponse } from '@shipengine/connect-order-source-api';
import { join } from 'path';

const SalesOrdersExport = (request: SalesOrdersExportRequest): Promise<SalesOrdersExportResponse> => {
    logger.info('This is a useless log');
    throw new NotImplementedError();
}
const ShipmentNotification = (request: ShipmentNotificationRequest): Promise<ShipmentNotificationResponse> => {
    throw new NotImplementedError();
}
const AcknowledgeOrders = (request: AcknowledgeOrdersRequest): Promise<AcknowledgeOrdersResponse> => {
    throw new NotImplementedError();
}

start(new OrderSourceApp({
    SalesOrdersExport,
    ShipmentNotification,
    AcknowledgeOrders,
    Metadata: {
        Id: '3bdd999b-ecf5-4915-b505-c8e665ce1f56',
        Name: 'Order Source API App',
        AuthProcess: {
            Identifier: {
                AuthenticationType: AuthenticationType.Basic,
                IsSandbox: false
            }
        },
        OrderSources: [{
            Id: '3440a3bf-cd22-494f-ad02-500b6cdcedb8',
            Name: 'Order Source API App',
            SendEmail: true,
            ScoreFactorForAutoRefresh: 0.1,
            CanRefresh: false,
            CanConfigureTimeZone: false,
            CanConfirmMultipleShipments: false,
            CanConfirmShipments: false,
            CanLeaveFeedback: true,
            HasCustomMappings: false,
            HasCustomStatuses: false,
            HasInventoryLevels: true,
            AccountConnection: {
                Name: 'OrderSource API App Connection Form',
                ConnectionFormSchema: {
                    JsonSchema: {
                        "type": "object",
                        "required": [
                            "username",
                            "password"
                        ],
                        "properties": {
                            "username": {
                                "type": "string",
                                "title": "User Name:"
                            },
                            "password": {
                                "type": "string",
                                "title": "Password:"
                            }
                        }
                    },
                    UiSchema: {
                        "password": {
                            "ui:widget": "password",
                            "ui:help": "Hint: Make it strong!"
                        }
                    }
                }
            }
        }]
    },
    Logo: join(__dirname, '../assets/logo.svg'),
    Icon: join(__dirname, '../assets/icon.svg'),
}));

Publishing

  • Update Version In package.json
  • Run npm run-script build
  • Run npm publish

This will publish the app to Nexus (our private repository)

FAQs

Package last updated on 14 Oct 2025

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