@prismicio/types-internal
Version:
Prismic types for Custom Types and Prismic Data
22 lines (21 loc) • 685 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Embed = exports.EmbedConfig = exports.EmbedFieldType = void 0;
const tslib_1 = require("tslib");
const t = (0, tslib_1.__importStar)(require("io-ts"));
const validators_1 = require("../../../validators");
exports.EmbedFieldType = "Embed";
exports.EmbedConfig = t.exact(t.partial({
label: validators_1.StringOrNull,
placeholder: t.string,
useAsTitle: t.boolean,
}));
exports.Embed = t.exact(t.intersection([
t.type({
type: t.literal(exports.EmbedFieldType),
}),
t.partial({
fieldset: validators_1.StringOrNull,
config: exports.EmbedConfig,
}),
]));