@shipengine/connect-carrier-api
Version:
This is the typescript/javascript definitions for carrier api
23 lines • 1.56 kB
JavaScript
;
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 connection_names_configuration_1 = require("./connection-names-configuration");
class AccountConnectionSpecification {
/** @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({
ConnectionNames: joi_1.default.array().items(connection_names_configuration_1.ConnectionNamesSchema).optional().unique(),
DefaultConnectionName: connection_names_configuration_1.ConnectionNamesSchema.required().optional(),
}).and('ConnectionNames', 'DefaultConnectionName'); // and is "all or nothing"; if one is present the other must be.
//# sourceMappingURL=account-connection-specification.js.map