40 lines
908 B
TypeScript
40 lines
908 B
TypeScript
import type { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
|
|
import type { ApolloError } from '@apollo/client/errors';
|
|
|
|
declare module '#app' {
|
|
interface NuxtApp {
|
|
$appHelpers?: {
|
|
APP_DOMAIN: string;
|
|
APP_NAME: string;
|
|
APP_NAME_KEY: string;
|
|
COOKIES_LOCALE_KEY: string;
|
|
COOKIES_REFRESH_TOKEN_KEY: string;
|
|
COOKIES_ACCESS_TOKEN_KEY: string;
|
|
COOKIES_PRODUCT_VIEW_KEY: string;
|
|
COOKIES_THEME_KEY: string;
|
|
};
|
|
$apollo: {
|
|
defaultClient: ApolloClient<NormalizedCacheObject>;
|
|
};
|
|
}
|
|
|
|
interface NuxtConfig {
|
|
apollo?: {
|
|
autoImports?: boolean;
|
|
clients?: {
|
|
default?: {
|
|
httpEndpoint: string;
|
|
connectToDevTools?: boolean;
|
|
authType?: string;
|
|
authHeader?: string;
|
|
tokenStorage?: 'cookie' | 'localStorage';
|
|
tokenName?: string;
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|
|
interface RuntimeNuxtHooks {
|
|
'apollo:error': (error: ApolloError) => void;
|
|
}
|
|
}
|