UNPKG

@shipengine/connect-order-source-api

Version:

This is the typescript/javascript definitions for the order source api

27 lines 1.59 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AccountConnectionSpecificationSchema = exports.AccountConnectionSpecification = void 0; const tslib_1 = require("tslib"); const joi_1 = tslib_1.__importDefault(require("joi")); const react_form_1 = require("./react-form"); class AccountConnectionSpecification { Name; ConnectionFormSchema; /** @description A Connection Name is an optional feature that an integration may provide. A * common use of connections is to provide the ability to connect to a sandbox or production * endpoint. This collection must be a unique set of strings representing a list of connections * that a user may choose to use. When present {@link DefaultConnectionName} must also be * populated.*/ ConnectionNames; /** @description The default connection name to use if a connection name is not selected. This * value must match a value in {@link ConnectionNames}*/ DefaultConnectionName; } exports.AccountConnectionSpecification = AccountConnectionSpecification; exports.AccountConnectionSpecificationSchema = joi_1.default.object({ Name: joi_1.default.string().required(), ConnectionFormSchema: react_form_1.ReactFormSchema.required(), ConnectionNames: joi_1.default.array().items(joi_1.default.string()).optional().unique(), DefaultConnectionName: joi_1.default.string().optional(), }).and('ConnectionNames', 'DefaultConnectionName'); // and is "all or nothing"; if one is present the other must be. //# sourceMappingURL=account-connection-specification.js.map