1 | import React from 'react';
|
2 | import { TranslationsPromises } from '../boot/server';
|
3 | import { SchemaExtensions } from '../boot/server/createApolloServer';
|
4 | import { DocumentNode } from 'graphql';
|
5 | import { Tracker } from '../analytics/tracking';
|
6 | import { PluginDefinition } from 'apollo-server-core';
|
7 | import { PreLoaderProviderConfig } from '../hooks/useRoutePreload';
|
8 | export interface IntlOptions {
|
9 | translations: TranslationsPromises;
|
10 | defaultLocale: string;
|
11 | options?: any;
|
12 | }
|
13 | export interface ApolloConfig {
|
14 | graphQLURI?: string;
|
15 | token?: string;
|
16 | shopid?: string;
|
17 | engineApiKey?: string;
|
18 | enableGateway?: boolean;
|
19 | channelsQuery?: DocumentNode;
|
20 | persistedQueries?: {
|
21 | query: DocumentNode;
|
22 | variables?: {};
|
23 | }[];
|
24 | }
|
25 | export interface ChannelOverrides {
|
26 | [channelName: string]: BootOptions;
|
27 | }
|
28 | export interface OptimizeConfig {
|
29 | container: string;
|
30 | experimentId: string;
|
31 | variantWeights: number[];
|
32 | }
|
33 | export interface Routes {
|
34 | [routeName: string]: {
|
35 | path: string;
|
36 | [any: string]: any;
|
37 | };
|
38 | }
|
39 | interface Theme {
|
40 | breakpoints: {
|
41 | [label: string]: string;
|
42 | };
|
43 | [key: string]: any;
|
44 | }
|
45 | export interface BootOptions {
|
46 | theme: Theme;
|
47 | apolloConfig: ApolloConfig;
|
48 | trackingID: string;
|
49 | useArticleNumberAsId?: boolean;
|
50 | tagManagerID: string;
|
51 | sentryClientDSN: string;
|
52 | sentryServerDSN: string;
|
53 | intl: IntlOptions;
|
54 | channelOverrides: ChannelOverrides;
|
55 | schemaExtensions?: SchemaExtensions;
|
56 | apolloServerplugins?: PluginDefinition[];
|
57 | relewareEnabled?: boolean;
|
58 | disableGeoRedirect: boolean;
|
59 | singleDomainMode: boolean;
|
60 | trackers?: Tracker[];
|
61 | preserveRedirect: boolean;
|
62 | structuredData: {
|
63 | disableDefaultProductData?: boolean;
|
64 | };
|
65 | googleMapsApiKey?: string;
|
66 | loginPath: string;
|
67 | pathsWithNoAuthRequired: string[];
|
68 | optimize?: OptimizeConfig;
|
69 | routes?: Routes;
|
70 | preload?: PreLoaderProviderConfig;
|
71 | }
|
72 | export declare const ShopConfigContext: React.Context<BootOptions>;
|
73 | export declare function ConfigProvider({ config: userConfig, children, ...rest }: {
|
74 | config: BootOptions;
|
75 | children: React.ReactNode;
|
76 | }): JSX.Element;
|
77 | export {};
|