doc.silverstripe.org/src/types/index.ts
Aaron Carlino 8ffc3eeb5b
WIP: Add userhelp to new site (#216)
* Docs/userguide switching

* Initial commit of userdocs merge

* Remove service worker, fix rendering

* Remove limited sources

* UX improvements per Paul design

* Tweak version select for FF

* Fix mobile view

* Final tweaks to UI

* Tweaks to search bar, clean up conflicts

* Fix icons

* Hide search if no API key
2019-12-19 11:54:23 +13:00

64 lines
1.2 KiB
TypeScript

export interface SingleFileQuery {
data: {
silverstripeDocument: SinglePage
}
};
export interface SinglePage {
title: string;
slug: string;
watchFile: {
html: string;
}
parent: {
html: string;
parent: {
relativePath: string;
gitRemote: {
href: string;
ref: string;
webLink: string;
}
}
}
};
enum DocCategory {
'docs' = 'docs',
'user' = 'user',
}
export interface SilverstripeDocument {
title: string;
slug: string;
isIndex: boolean;
filePath: string;
introduction?: string;
icon?: string;
iconBrand?: string;
hideChildren?: boolean;
hideSelf?: boolean;
unhideSelf?: boolean;
parentSlug: string;
summary: string;
fileTitle: string;
fileAbsolutePath: string;
category: DocCategory;
}
export interface HierarchyQuery {
allSilverstripeDocument: {
nodes: SilverstripeDocument[]
}
};
export interface ChildrenOfProps {
folderName?: string;
exclude?: string;
only?: string;
currentNode: SilverstripeDocument | null;
asList?: boolean;
includeFolders?: boolean;
reverse?: boolean;
};