doc.silverstripe.org/src/types/index.ts

64 lines
1.2 KiB
TypeScript
Raw Normal View History

2019-11-08 03:40:20 +01:00
export interface SingleFileQuery {
data: {
silverstripeDocument: SinglePage
}
};
export interface SinglePage {
title: string;
2019-11-12 04:09:29 +01:00
slug: string;
2019-11-19 01:55:33 +01:00
watchFile: {
2019-11-08 03:40:20 +01:00
html: string;
2019-11-19 01:55:33 +01:00
}
parent: {
2019-11-20 01:56:11 +01:00
html: string;
2019-11-08 03:40:20 +01:00
parent: {
relativePath: string;
gitRemote: {
href: string;
2019-11-08 03:40:20 +01:00
ref: string;
webLink: string;
}
}
}
2019-11-08 03:40:20 +01:00
};
enum DocCategory {
'docs' = 'docs',
'user' = 'user',
}
2019-11-08 03:40:20 +01:00
export interface SilverstripeDocument {
title: string;
slug: string;
isIndex: boolean;
filePath: string;
2019-11-12 05:05:31 +01:00
introduction?: string;
icon?: string;
iconBrand?: string;
hideChildren?: boolean;
hideSelf?: boolean;
unhideSelf?: boolean;
2019-11-08 03:40:20 +01:00
parentSlug: string;
summary: string;
fileTitle: string;
fileAbsolutePath: string;
category: DocCategory;
2019-11-08 03:40:20 +01:00
}
export interface HierarchyQuery {
allSilverstripeDocument: {
nodes: SilverstripeDocument[]
}
};
export interface ChildrenOfProps {
folderName?: string;
exclude?: string;
only?: string;
2019-11-08 03:40:20 +01:00
currentNode: SilverstripeDocument | null;
asList?: boolean;
includeFolders?: boolean;
reverse?: boolean;
2019-11-08 03:40:20 +01:00
};