UNPKG

@devcycle/nextjs-sdk

Version:

The Next.js SDK for DevCycle!

14 lines (13 loc) 926 B
import { DevCycleUser, DVCPopulatedUser } from '@devcycle/js-client-sdk'; import { BucketedConfigWithAdditionalFields, DevCycleNextOptions } from '../common/types'; import { ConfigBody } from '@devcycle/types'; export declare const getPopulatedUser: (user: DevCycleUser, userAgent?: string) => DVCPopulatedUser; export declare const getConfigFromSource: (sdkKey: string, clientSDKKey: string, options: DevCycleNextOptions) => Promise<{ config: ConfigBody; lastModified: string | null; }>; /** * Compute the bucketed config for the current request's user using raw config data, with local bucketing library * Cache the bucketed config for this request so that repeated calls to this function are memoized */ export declare const getBucketedConfig: (config: ConfigBody, lastModified: string | null, user: DevCycleUser, options: DevCycleNextOptions, userAgent?: string) => Promise<BucketedConfigWithAdditionalFields>;