import type { EndJourneyRequest, JourneyInteractionRequest, JourneyProgressRequest } from '@devvit/protos/json/devvit/plugin/telemetry/telemetry.js'; import type { TelemetryJourneyEventResponse, TelemetryJourneyStartResponse } from '../../shared/reddit/index.js'; import type { TelemetryJourneyInternalResponse } from '../../shared/reddit/internal.js'; /** Internal HTTP adapter retaining the plugin's client notification signal. */ export declare function journeyProgressForClient(request: JourneyProgressRequest): Promise; /** Internal HTTP adapter retaining the plugin's client notification signal. */ export declare function endJourneyForClient(request: EndJourneyRequest): Promise; /** * TelemetryClient is a thin wrapper around the TelemetryPlugin that sends * journey telemetry events from server-side code. * * @example * ```ts * import { telemetry } from '@devvit/analytics/server/reddit'; * * // Signal that the app is ready and visible to the user * await telemetry.appReady(); * * // Start a new journey * const { journeyId } = await telemetry.startJourney(); * await telemetry.journeyProgress({ * journeyId, * progress: 0.5, * }); * await telemetry.journeyInteraction({ * journeyId, * action: 'click', * actionDetails: 'start-button', * }); * await telemetry.endJourney({ * journeyId, * complete: true, * game: { win: false, score: 1200 }, * }); * ``` */ export declare class TelemetryClient { #private; /** * Starts a new telemetry journey. * @returns The new journey id and telemetry receipt. */ startJourney(): Promise; /** * Records a progress event within a journey. * @param request Progress payload for the journey. */ journeyProgress(request: JourneyProgressRequest): Promise; /** * Records an interaction event within a journey. * @param request Interaction payload for the journey. */ journeyInteraction(request: JourneyInteractionRequest): Promise; /** * Ends a telemetry journey. * @param request End-of-journey payload. */ endJourney(request: EndJourneyRequest): Promise; /** * Signals that the app is ready and visible to the user. Startup time is * automatically measured from runtime initialization. */ appReady(): Promise; } //# sourceMappingURL=TelemetryClient.d.ts.map