-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.ts
84 lines (79 loc) · 1.75 KB
/
types.ts
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import { ReactNode } from 'react';
import { ApolloClient, NormalizedCacheObject } from '@apollo/client';
export type PageProps = any;
export type Appearance = {
backgroundAsset?: string;
backgroundAssetTiled?: boolean;
logoAsset?: string;
retinaLogo?: boolean;
altFont: string;
font: string;
accentColor: string;
secondaryColor: string;
linkColor: string;
};
export type CurrentUser = {
id: string;
firstName: string;
lastName: string;
email: string;
address1?: string;
address2?: string;
asset: string;
roleKey: string;
city?: string;
state?: string;
zipCode?: string;
country?: string;
telephone?: string;
externalCustomerId?: string;
lang?: string;
ref1?: string;
ref2?: string;
ref3?: string;
ref4?: string;
ref5?: string;
ref6?: string;
ref7?: string;
ref8?: string;
ref9?: string;
ref10?: string;
};
export type PageContext = {
_pageId: string;
Page: (pageProps: PageProps) => React.ReactElement;
pageProps: PageProps;
exports: {
documentProps?: {
title?: string;
description?: string;
};
};
redirectTo?: string;
documentProps?: {
title?: string;
description?: string;
};
pageHtml: string;
routeParams: Record<string, string>;
urlOriginal: string;
urlPathname: string;
urlParsed: {
pathname: string;
searchOriginal?: string;
search: null | Record<string, string>;
hash: null | string;
};
heliumEndpoint: string;
apolloInitialState: Record<string, unknown>;
isProduction: boolean;
queryParams: Record<string, string>;
authToken?: string;
currentUser?: CurrentUser;
appearance?: Appearance;
apolloClient: ApolloClient<NormalizedCacheObject>;
};
export type PageWrapperProps = {
pageContext: PageContext;
children: ReactNode;
};