4.10.1 • Published 1 month ago

@shipengine/connect-runtime v4.10.1

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
1 month ago

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)

4.9.0

5 months ago

4.9.1

5 months ago

4.10.1

1 month ago

4.10.0

2 months ago

4.8.0-beta.5

9 months ago

4.8.0-beta.2

9 months ago

4.8.0-beta.3

9 months ago

4.8.0-beta.4

9 months ago

4.8.0-beta

9 months ago

4.8.0

9 months ago

4.7.0

9 months ago

4.6.3

11 months ago

4.6.2

1 year ago

4.6.1

1 year ago

4.6.1-beta

1 year ago

4.6.0

1 year ago

4.6.0-beta.1

2 years ago

4.5.1-beta

2 years ago

4.5.0

2 years ago

4.4.0

2 years ago

4.3.1

2 years ago

4.5.1

2 years ago

4.3.0

2 years ago

4.2.0

2 years ago

4.0.0-beta

2 years ago

4.0.0-beta.4

2 years ago

4.0.0-beta.3

2 years ago

4.0.0-beta.2

2 years ago

4.1.0

2 years ago

4.0.0

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.2.0

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.3.0-beta

2 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.4

4 years ago

0.6.3

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago

0.0.1

4 years ago