Files
persionalBrand/packages/config/src/template-package-manifest.ts
T

131 lines
3.6 KiB
TypeScript

import type { BrandTemplateKey } from "./template-keys.js";
import type { CapabilityKey } from "./template-keys.js";
import type { VisualTemplateKey } from "./template-keys.js";
import type { TemplateSampleContent } from "./template-sample-content.js";
export interface TemplatePackageManifest {
packageKey: string;
version: string;
displayName: string;
visualTemplateKey: VisualTemplateKey;
runtimeContract: "1.0";
supportedIndustryTemplates: readonly BrandTemplateKey[];
entrypoints: Readonly<Record<string, string>>;
requiredCapabilities: readonly CapabilityKey[];
defaultBrandSlug: string;
navigation: readonly {
key: string;
label: string;
page: string;
iconPath?: string;
selectedIconPath?: string;
}[];
renderers?: Readonly<Record<string, string>>;
runtimeOwnedPages?: readonly string[];
dataSlots: readonly {
key: string;
source: string;
required: boolean;
description: string;
}[];
templateFields?: readonly {
key: string;
page?: string;
binding?: string;
label: string;
help?: string;
input: string;
itemFields?: readonly { key: string; label: string; input?: string; required?: boolean }[];
itemValueKey?: string;
required?: boolean;
maxLength?: number;
previewTarget?: string;
placeholder?: string;
options?: readonly { value: string; label: string }[];
}[];
assetSlots: readonly {
key: string;
binding: string;
target: "brand" | "offering" | "trust";
label: string;
help: string;
required: boolean;
kind?: string;
aspectRatio?: string;
}[];
inquiryFormFields?: readonly {
key: string;
label: string;
type: string;
required: boolean;
placeholder?: string;
options?: readonly { label: string; value: string }[];
}[];
pages: readonly string[];
admin: {
sections: readonly {
key: string;
title: string;
description: string;
page: string;
target: "brand" | "offering" | "trust" | "inquiry";
previewTargets?: readonly {
key: string;
label: string;
composite?: boolean;
children?: readonly string[];
}[];
fields: readonly {
key: string;
binding: string;
label: string;
input: string;
help?: string;
required?: boolean;
itemFields?: readonly { key: string; label: string; input?: string; required?: boolean }[];
kind?: string;
itemValueKey?: string;
maxLength?: number;
placeholder?: string;
previewTarget?: string;
options?: readonly { value: string; label: string }[];
}[];
}[];
};
trustContentTypes?: readonly {
type: string;
label: string;
adminFields: {
title: string;
summary: string;
content: string;
summaryHelp?: string;
summaryPlaceholder?: string;
};
help?: string;
placeholder?: string;
previewTargets?: readonly {
key: string;
label: string;
page?: string;
}[];
required?: boolean;
maxPublishedItems?: number;
hideStandardFields?: readonly ("summary" | "content")[];
pages?: readonly string[];
configFields?: readonly {
key: string;
binding: string;
label: string;
input: string;
itemFields?: readonly { key: string; label: string; input?: string; required?: boolean }[];
itemValueKey?: string;
placeholder?: string;
previewTarget?: string;
required?: boolean;
}[];
}[];
overrides?: readonly string[];
sampleContent?: Partial<Record<BrandTemplateKey, TemplateSampleContent>>;
}