Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {
IOContext,
MetricsAccumulator,
SegmentData,
ServiceContext,
} from '@vtex/api'
import { Clients } from './clients'
import { IdentityDataSource } from './dataSources/identity'
if (!global.metrics) {
console.error('No global.metrics at require time')
global.metrics = new MetricsAccumulator()
}
declare global {
type Context = ServiceContext
interface CustomContext {
cookie: string
dataSources: StoreGraphQLDataSources
originalPath: string
vtex: CustomIOContext
}
interface CustomIOContext extends IOContext {
currentProfile: CurrentProfile
segment?: SegmentData
orderFormId?: string