@upstart.gg/sdk
Version:
You can test the CLI without recompiling by running:
31 lines (29 loc) • 867 B
JavaScript
import { pageAttributesSchema } from "./attributes.js";
import { sectionSchema } from "./bricks.js";
import { Type } from "@sinclair/typebox";
//#region src/shared/page.ts
const pageSchema = Type.Object({
id: Type.String({
description: "The unique ID of the page. Use a human readable url-safe slug",
examples: [
"home",
"about-us",
"products-list"
],
pattern: "^[a-z0-9-_]+$"
}),
label: Type.String({
description: "The label (name) of the page",
examples: [
"Home",
"About us",
"Products"
]
}),
sections: Type.Array(sectionSchema, { description: "The sections of the page. See the Section schema" }),
attributes: pageAttributesSchema
});
const versionedPageSchema = Type.Composite([pageSchema, Type.Object({ version: Type.String() })]);
//#endregion
export { pageSchema, versionedPageSchema };
//# sourceMappingURL=page.js.map