-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtypes.ts
More file actions
55 lines (49 loc) · 1.3 KB
/
types.ts
File metadata and controls
55 lines (49 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
export interface FrontMatter {
id: string;
title: string;
metaTitle?: string;
description: string;
metaDescription?: string;
tags: string[];
section: string;
showNav?: boolean;
layout?: "docs" | "api" | "mapi" | "integrations" | "cli" | "sdks";
}
export type ISidebarContent = ISidebarSection[];
export interface IPage {
title: string;
slug: string;
category?: string;
tags?: string[];
}
export interface ISidebarSection {
title?: string;
pages: IPage[];
}
declare global {
interface Window {
clearbit: {
push: (args: any[]) => void;
};
}
}
export type DocsSearchItem = {
objectID: string;
path: string;
title: string;
section: string;
tags: string[];
// Whether the item is a static page or part of an endpoint resource
// This field is used for sorting the results in the autocomplete
// Currently, we sort "document" values higher than "api-reference" values when querying "pages" index
// We can refine this even further if we want to
contentType: "document" | "api-reference";
// Helps us delineate between the two types of search items
index: "pages" | "endpoints";
};
export type EndpointSearchItem = DocsSearchItem & {
method: string;
endpoint: string;
// Will always be contentType: "api-reference"
contentType: "api-reference";
};