@snap/camera-kit
Version:
Camera Kit Web
39 lines • 1.87 kB
TypeScript
import type { MetricsClient } from "../../clients/metricsClient";
import type { Dimensions, RequestStateEventTarget } from "../../handlers/requestStateEmittingHandler";
import type { MakeTaggedBusinessEvent } from "../businessEventsReporter";
import type { MetricsEventTarget } from "../metricsEventTarget";
export declare const isLensOrAssetRequest: (value: Dimensions) => value is AssetDownloadDimensions | LensDownloadDimensions;
/**
* The LensDownload metric is triggered by any download of lens content.
*
* It contains download stats, which lens was requested, and whether prefetch was used.
*
* It corresponds to the internal CameraKitLensDownload event, described here:
* https://docs.google.com/document/d/1-kSzFWCWw9Qo3D08FR1_cqeHTsUtk9p3p3uOptzWDTY/edit#heading=h.stqom49qs91t
*/
export type LensDownload = MakeTaggedBusinessEvent<"lensDownload">;
export type LensDownloadDimensions = {
requestType: "lens_content";
lensId: string;
};
/**
* The AssetDownload metric is triggered by any type of asset download.
*
* It contains download stats, which asset was requested, and whether prefetch was used.
*
* It corresponds to the internal CameraKitAssetDownload event, described here:
* https://docs.google.com/document/d/1-kSzFWCWw9Qo3D08FR1_cqeHTsUtk9p3p3uOptzWDTY/edit#heading=h.vlormd1724fp
*/
export type AssetDownload = MakeTaggedBusinessEvent<"assetDownload">;
export type AssetDownloadDimensions = {
requestType: "asset";
assetType: string;
assetId: string;
lensId: string;
};
export declare const reportLensAndAssetDownload: {
(args_0: MetricsEventTarget, args_1: MetricsClient, args_2: RequestStateEventTarget): void;
token: "reportLensAndAssetDownload";
dependencies: readonly ["metricsEventTarget", "metricsClient", "requestStateEventTarget"];
};
//# sourceMappingURL=reportLensAndAssetDownload.d.ts.map