@shipengine/connect-order-source-api
Version:
This is the typescript/javascript definitions for the order source api
36 lines • 1.68 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StoreSettingSchema = exports.StoreSetting = void 0;
const tslib_1 = require("tslib");
const joi_1 = tslib_1.__importDefault(require("joi"));
/**
* @description A StoreSetting is a configuration option that sellers can set after connecting their store.
* These fields should be considered optional, but if a seller provides a value it will come in the connection_context.
*/
class StoreSetting {
/** @description This field defines the key used in connection_context to send the value of this setting */
SettingName;
/** @description The name of this option to use in the UI */
DisplayName;
/** @description A description of what this setting does for tooltips */
Description;
/** @description Set to true if this option must be enabled by support */
IsAdmin;
/**
* @description Set to true if this option shouldn't be shown in the UI.
* This does not prevent the option from being sent to the API for stores which have already chosen it
*/
IsDeprecated;
/** @description The data type of the input field for the setting; must be "checkbox" or "text" */
Type;
}
exports.StoreSetting = StoreSetting;
exports.StoreSettingSchema = joi_1.default.object({
SettingName: joi_1.default.string().required(),
DisplayName: joi_1.default.string().required(),
Description: joi_1.default.string().required(),
IsAdmin: joi_1.default.boolean().default(false),
IsDeprecated: joi_1.default.boolean().default(false),
Type: joi_1.default.string().valid('checkbox', 'text').required(),
});
//# sourceMappingURL=store-setting.js.map