UNPKG

@snap/camera-kit

Version:
40 lines 2.33 kB
import type { Observable } from "rxjs"; import type { CameraKitConfiguration } from "../configuration"; import type { ConfigTargetingRequest } from "../generated-proto/pb_schema/cdp/cof/config_request"; import type { ConfigResult } from "../generated-proto/pb_schema/cdp/cof/config_result"; import { Namespace } from "../generated-proto/pb_schema/cdp/cof/namespace"; import type { GetInitializationConfigResponse } from "../generated-proto/pb_schema/camera_kit/v3/service"; import { MetricsDefinition } from "../generated-proto/pb_schema/camera_kit/v3/service"; import type { GrpcHandler } from "../clients/grpcHandler"; import type { TsProtoServiceClient } from "../clients/createTsProtoClient"; import { cofHandlerFactory } from "./cofHandler"; type SupportedNamespaces = Namespace.LENS_CORE | Namespace.CAMERA_KIT_CORE | Namespace.LENS_CORE_CONFIG; export type InitializationConfig = GetInitializationConfigResponse; export declare class RemoteConfiguration { private readonly configById; private readonly initializationConfig; constructor(lensPerformance: CameraKitConfiguration["lensPerformance"], cofHandler: ReturnType<typeof cofHandlerFactory>, grpcClient: TsProtoServiceClient<typeof MetricsDefinition>); /** * COF configuration. */ get(configId: string): Observable<ConfigResult[]>; /** * Configuration that is provided by Camera Kit backend. */ getInitializationConfig(): Observable<InitializationConfig>; /** * Calls https://cof.sc-corp.net/config-details/LENS_FEATURE_GPU_INDEX to resolve GPU index. */ getGpuIndexConfig(): Observable<number>; getNamespace(namespace: SupportedNamespaces): Observable<ConfigResult[]>; } export declare const remoteConfigurationFactory: { (args_0: CameraKitConfiguration, args_1: import("../handlers/HandlerChainBuilder").Handler<Partial<ConfigTargetingRequest>, import("../generated-proto/pb_schema/cdp/cof/config_response").ConfigTargetingResponse, import("./cofHandler").Metadata & { signal?: AbortSignal | null | undefined; isSideEffect?: boolean | undefined; }>, args_2: GrpcHandler): RemoteConfiguration; token: "remoteConfiguration"; dependencies: readonly ["configuration", "cofHandler", "grpcHandlerFactory"]; }; export {}; //# sourceMappingURL=remoteConfiguration.d.ts.map