@shipengine/connect
Version:
The official developer tooling for building ShipEngine connect apps
166 lines (163 loc) • 3.54 kB
JavaScript
const { join } = require('path');
// DO NOT CHANGE ANY ID VALUES AFTER PUBLISHING
module.exports.DEMO = {
Id: '<%- _uuidv4 %>',
Codes: [
{
SCAC: 'DEMO',
ApiCode: 'demo',
},
],
Name: 'Demo Freight Carrier',
ServiceLevels: [
{
Id: '<%- _uuidv4 %>',
ApiCode: 'gtd_am',
Code: 'GTD_AM',
Name: 'Guaranteed Morning',
},
{
Id: '<%- _uuidv4 %>',
ApiCode: 'gtd_noon',
Code: 'GTD_NOON',
Name: 'Guaranteed Noon',
},
{
Id: '<%- _uuidv4 %>',
ApiCode: 'gtd_pm',
Code: 'GTD_PM',
Name: 'Guaranteed End of Day',
},
{
Id: '<%- _uuidv4 %>',
ApiCode: 'stnd',
Code: 'STND',
Name: 'Standard',
},
],
ContainerTypes: [
{
Id: '<%- _uuidv4 %>',
ApiCode: 'box',
Code: 'BOX',
Name: 'Box',
},
{
Id: '<%- _uuidv4 %>',
ApiCode: 'pat',
Code: 'PAT',
Name: 'Pallet',
},
{
Id: '<%- _uuidv4 %>',
ApiCode: 'skd',
Code: 'SKD',
Name: 'Skid',
},
],
AccessorialServiceGroups: [
{
Id: '<%- _uuidv4 %>',
Name: 'Pickup Services',
SortOrder: 1,
Services: [
{
Id: '<%- _uuidv4 %>',
ApiCode: 'lftp',
Code: 'LFTP',
Name: 'Lift gate required at pickup',
SortOrder: 1,
},
{
Id: '<%- _uuidv4 %>',
ApiCode: 'ipu',
Code: 'IPU',
Name: 'Inside pickup',
SortOrder: 2,
},
{
Id: '<%- _uuidv4 %>',
ApiCode: 'rep',
Code: 'REP',
Name: 'Residential pickup',
SortOrder: 3,
},
],
},
{
Id: '<%- _uuidv4 %>',
Name: 'Other',
SortOrder: 2,
Services: [
{
Id: '<%- _uuidv4 %>',
ApiCode: 'haz',
Code: 'HAZ',
Name: 'Hazardous material',
Attributes: {
JsonSchema: {
type: 'object',
required: ['name', 'phone'],
properties: {
name: {
type: 'string',
title: 'Emergency Contact Name',
},
phone: {
type: 'string',
title: 'Emergency Contact Phone Number',
pattern: '([0-9]{10})',
},
},
},
UiSchema: {
phone: {
'ui:help': 'Format: 10 digit',
'ui:emptyValue': '5555555555',
},
},
},
},
],
},
],
Countries: ['USA', 'CAN', 'MEX'],
AccountConnection: {
JsonSchema: {
title: 'Demo Freight Carrier',
description: 'Connect your account',
type: 'object',
required: ['username', 'password'],
properties: {
username: {
type: 'string',
title: 'Username',
},
password: {
type: 'string',
title: 'Password',
},
},
},
UiSchema: {
username: {
'ui:autofocus': true,
},
},
ApiContractMapping: [
{
apiContractField: 'username',
jsonSchemaProperty: 'username',
},
{
apiContractField: 'password',
jsonSchemaProperty: 'password',
},
],
},
Images: {
LogoUrl: join(__dirname, '../../../assets/logo.svg'),
IconUrl: join(__dirname, '../../../assets/icon.svg'),
},
};
export default DEMO;