UNPKG

@snap/camera-kit

Version:
82 lines 4.56 kB
import type { ServicesFromInjectables } from "@snap/ts-inject"; import type { lensRepositoryFactory } from "./lens/LensRepository"; import type { lensCoreFactory } from "./lens-core-module/loader/lensCoreFactory"; import type { remoteMediaAssetLoaderFactory } from "./lens/assets/remoteMediaAssetLoaderFactory"; import type { deviceDependentAssetLoaderFactory } from "./lens/assets/deviceDependentAssetLoader"; import type { staticAssetLoaderFactory } from "./lens/assets/staticAssetLoader"; import type { defaultFetchHandlerFactory } from "./handlers/defaultFetchHandler"; import type { cameraKitServiceFetchHandlerFactory } from "./handlers/cameraKitServiceFetchHandlerFactory"; import type { createCameraKitConfigurationFactory } from "./configuration"; import type { externalMetricsSubjectFactory, metricsClientFactory } from "./clients/metricsClient"; import type { LensCore } from "./lens-core-module/lensCore"; import type { metricsEventTargetFactory } from "./metrics/metricsEventTarget"; import type { lensSourcesFactory } from "./lens/LensSource"; import type { uriHandlersFactory } from "./uri-handlers/UriHandlers"; import type { lensPersistenceStoreFactory } from "./lens/LensPersistenceStore"; import type { cofHandlerFactory } from "./remote-configuration/cofHandler"; import type { remoteConfigurationFactory } from "./remote-configuration/remoteConfiguration"; import type { lensAssetRepositoryFactory } from "./lens/assets/LensAssetRepository"; import type { legalStateFactory } from "./legal/legalState"; import type { legalPromptFactory } from "./legal/legalPrompt"; import type { logEntriesFactory } from "./logger/logEntries"; import type { reportGlobalException } from "./metrics/reporters/reportGlobalException"; import type { requestStateEventTargetFactory } from "./handlers/requestStateEmittingHandler"; import type { lensesClientFactory } from "./clients/lensesClient"; import type { pageVisibilityFactory } from "./common/pageVisibility"; import type { remoteApiServicesFactory } from "./uri-handlers/internal-handlers/remoteApiUriHandler"; import type { grpcHandlerFactory } from "./clients/grpcHandler"; import type { filePickerFactory } from "./lens-client-interface/filePicker"; import type { userDataAccessResolverFactory } from "./lens/userDataAccessResolver"; import type { remoteApiSpecsClientFactory } from "./clients/remoteApiSpecsClient"; import type { geoDataProviderFactory } from "./geo/geoDataProvider"; /** * All services available to be customized by client app. */ export type PublicServices = ServicesFromInjectables<[ ReturnType<typeof createCameraKitConfigurationFactory>, typeof userDataAccessResolverFactory, typeof filePickerFactory, typeof defaultFetchHandlerFactory, typeof remoteMediaAssetLoaderFactory, typeof lensSourcesFactory, typeof remoteApiServicesFactory, typeof uriHandlersFactory, typeof geoDataProviderFactory, typeof externalMetricsSubjectFactory ]>; /** * Define all the Services contained in CameraKit's root dependency injection container. * * Note: we do end up defining this list of Services twice (once here to create the type, once when we actually * create the Container inside the `bootstrapCameraKit` function). We could avoid doing this and just infer the * RootContainer type from the constructed container – but since we can only do that *inside* `bootstrapCameraKit`, it * makes it more awkward to provide a type for the `provide` user-supplied function (or use the type elsewhere, like in * CameraKitSession). * * There may be a way to eliminate this extra boilerplate, but for now it's required in order to present a cleaner * `bootstrapCameraKit` API to applications. */ export type RootServices = { [lensCoreFactory.token]: LensCore; } & PublicServices & ServicesFromInjectables<[ typeof pageVisibilityFactory, typeof metricsEventTargetFactory, typeof requestStateEventTargetFactory, typeof cameraKitServiceFetchHandlerFactory, typeof grpcHandlerFactory, typeof lensesClientFactory, typeof remoteApiSpecsClientFactory, typeof cofHandlerFactory, typeof remoteConfigurationFactory, typeof lensRepositoryFactory, typeof lensPersistenceStoreFactory, typeof metricsClientFactory, typeof lensAssetRepositoryFactory, typeof deviceDependentAssetLoaderFactory, typeof staticAssetLoaderFactory, typeof legalStateFactory, typeof legalPromptFactory, typeof logEntriesFactory, typeof reportGlobalException ]>; //# sourceMappingURL=RootServices.d.ts.map