/** * #telemetry.ts * * Code generated by ts-proto. DO NOT EDIT. * @packageDocumentation */ import _m0 from "protobufjs/minimal.js"; import { Metadata } from "../../../../lib/Types.js"; /** Request to start a new telemetry journey. */ export interface StartJourneyRequest { } /** Response for starting a journey. */ export interface StartJourneyResponse { /** * Unique identifier for the journey. * Example: "journey_1234567890" */ journeyId: string; } /** Request to record progress within a journey. */ export interface JourneyProgressRequest { /** * Unique identifier for the journey. * Example: "journey_1234567890" */ journeyId: string; /** * Normalized progress value between 0.0 and 1.0. * Example: 0.5 */ progress: number; /** * The action that occurred during the progress update. * Example: "level_complete" */ action?: string | undefined; /** * Additional details about the action. * Example: "level_3" */ actionDetails?: string | undefined; } /** Response for recording journey progress. */ export interface JourneyProgressResponse { } /** Request to record an interaction within a journey. */ export interface JourneyInteractionRequest { /** * Unique identifier for the journey. * Example: "journey_1234567890" */ journeyId: string; /** * The action that occurred during the interaction. * Example: "word_complete" */ action: string; /** * Additional details about the action. * Example: "apple" */ actionDetails: string; } /** Response for recording a journey interaction. */ export interface JourneyInteractionResponse { } /** Game-specific result data for journey completion. */ export interface GameResult { /** * Indicates if the user won the game. * Example: true */ win: boolean; /** * The final score achieved in the game. * Example: 1000 */ score: number; } /** Request to end a telemetry journey. */ export interface EndJourneyRequest { /** * Unique identifier for the journey. * Example: "journey_1234567890" */ journeyId: string; /** * Indicates if the journey objective was completed. * Example: true */ complete: boolean; /** Game-specific result data. Only applicable for game journeys. */ game?: GameResult | undefined; } /** Response for ending a journey. */ export interface EndJourneyResponse { } /** Request to signal that the app is ready. */ export interface AppReadyRequest { /** * Milliseconds elapsed from runtime initialization to app ready, measured by the platform runtime. * Example: 350 */ startupTimeMs: number; } /** Response for the app ready signal. */ export interface AppReadyResponse { } export declare const StartJourneyRequest: { $type: "devvit.plugin.telemetry.StartJourneyRequest"; encode(_: StartJourneyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): StartJourneyRequest; fromJSON(_: any): StartJourneyRequest; toJSON(_: StartJourneyRequest): unknown; create(base?: DeepPartial): StartJourneyRequest; fromPartial(_: DeepPartial): StartJourneyRequest; }; export declare const StartJourneyResponse: { $type: "devvit.plugin.telemetry.StartJourneyResponse"; encode(message: StartJourneyResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): StartJourneyResponse; fromJSON(object: any): StartJourneyResponse; toJSON(message: StartJourneyResponse): unknown; create(base?: DeepPartial): StartJourneyResponse; fromPartial(object: DeepPartial): StartJourneyResponse; }; export declare const JourneyProgressRequest: { $type: "devvit.plugin.telemetry.JourneyProgressRequest"; encode(message: JourneyProgressRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): JourneyProgressRequest; fromJSON(object: any): JourneyProgressRequest; toJSON(message: JourneyProgressRequest): unknown; create(base?: DeepPartial): JourneyProgressRequest; fromPartial(object: DeepPartial): JourneyProgressRequest; }; export declare const JourneyProgressResponse: { $type: "devvit.plugin.telemetry.JourneyProgressResponse"; encode(_: JourneyProgressResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): JourneyProgressResponse; fromJSON(_: any): JourneyProgressResponse; toJSON(_: JourneyProgressResponse): unknown; create(base?: DeepPartial): JourneyProgressResponse; fromPartial(_: DeepPartial): JourneyProgressResponse; }; export declare const JourneyInteractionRequest: { $type: "devvit.plugin.telemetry.JourneyInteractionRequest"; encode(message: JourneyInteractionRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): JourneyInteractionRequest; fromJSON(object: any): JourneyInteractionRequest; toJSON(message: JourneyInteractionRequest): unknown; create(base?: DeepPartial): JourneyInteractionRequest; fromPartial(object: DeepPartial): JourneyInteractionRequest; }; export declare const JourneyInteractionResponse: { $type: "devvit.plugin.telemetry.JourneyInteractionResponse"; encode(_: JourneyInteractionResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): JourneyInteractionResponse; fromJSON(_: any): JourneyInteractionResponse; toJSON(_: JourneyInteractionResponse): unknown; create(base?: DeepPartial): JourneyInteractionResponse; fromPartial(_: DeepPartial): JourneyInteractionResponse; }; export declare const GameResult: { $type: "devvit.plugin.telemetry.GameResult"; encode(message: GameResult, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GameResult; fromJSON(object: any): GameResult; toJSON(message: GameResult): unknown; create(base?: DeepPartial): GameResult; fromPartial(object: DeepPartial): GameResult; }; export declare const EndJourneyRequest: { $type: "devvit.plugin.telemetry.EndJourneyRequest"; encode(message: EndJourneyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): EndJourneyRequest; fromJSON(object: any): EndJourneyRequest; toJSON(message: EndJourneyRequest): unknown; create(base?: DeepPartial): EndJourneyRequest; fromPartial(object: DeepPartial): EndJourneyRequest; }; export declare const EndJourneyResponse: { $type: "devvit.plugin.telemetry.EndJourneyResponse"; encode(_: EndJourneyResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): EndJourneyResponse; fromJSON(_: any): EndJourneyResponse; toJSON(_: EndJourneyResponse): unknown; create(base?: DeepPartial): EndJourneyResponse; fromPartial(_: DeepPartial): EndJourneyResponse; }; export declare const AppReadyRequest: { $type: "devvit.plugin.telemetry.AppReadyRequest"; encode(message: AppReadyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): AppReadyRequest; fromJSON(object: any): AppReadyRequest; toJSON(message: AppReadyRequest): unknown; create(base?: DeepPartial): AppReadyRequest; fromPartial(object: DeepPartial): AppReadyRequest; }; export declare const AppReadyResponse: { $type: "devvit.plugin.telemetry.AppReadyResponse"; encode(_: AppReadyResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): AppReadyResponse; fromJSON(_: any): AppReadyResponse; toJSON(_: AppReadyResponse): unknown; create(base?: DeepPartial): AppReadyResponse; fromPartial(_: DeepPartial): AppReadyResponse; }; /** TelemetryPlugin allows apps to emit journey-based telemetry events for analytics and ranking. */ export interface TelemetryPlugin { /** Starts a new telemetry journey. */ StartJourney(request: StartJourneyRequest, metadata?: Metadata): Promise; /** Records progress within a journey. */ JourneyProgress(request: JourneyProgressRequest, metadata?: Metadata): Promise; /** Records an interaction within a journey. */ JourneyInteraction(request: JourneyInteractionRequest, metadata?: Metadata): Promise; /** Ends a telemetry journey. */ EndJourney(request: EndJourneyRequest, metadata?: Metadata): Promise; /** Signals that the app is ready and visible to the user. */ AppReady(request: AppReadyRequest, metadata?: Metadata): Promise; } export declare const TelemetryPluginServiceName = "devvit.plugin.telemetry.TelemetryPlugin"; export declare class TelemetryPluginClientImpl implements TelemetryPlugin { private readonly rpc; private readonly service; constructor(rpc: Rpc, opts?: { service?: string; }); StartJourney(request: StartJourneyRequest, metadata?: Metadata): Promise; JourneyProgress(request: JourneyProgressRequest, metadata?: Metadata): Promise; JourneyInteraction(request: JourneyInteractionRequest, metadata?: Metadata): Promise; EndJourney(request: EndJourneyRequest, metadata?: Metadata): Promise; AppReady(request: AppReadyRequest, metadata?: Metadata): Promise; } /** TelemetryPlugin allows apps to emit journey-based telemetry events for analytics and ranking. */ export type TelemetryPluginDefinition = typeof TelemetryPluginDefinition; export declare const TelemetryPluginDefinition: { readonly name: "TelemetryPlugin"; readonly fullName: "devvit.plugin.telemetry.TelemetryPlugin"; readonly methods: { /** Starts a new telemetry journey. */ readonly startJourney: { readonly name: "StartJourney"; readonly requestType: { $type: "devvit.plugin.telemetry.StartJourneyRequest"; encode(_: StartJourneyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): StartJourneyRequest; fromJSON(_: any): StartJourneyRequest; toJSON(_: StartJourneyRequest): unknown; create(base?: DeepPartial): StartJourneyRequest; fromPartial(_: DeepPartial): StartJourneyRequest; }; readonly requestStream: false; readonly responseType: { $type: "devvit.plugin.telemetry.StartJourneyResponse"; encode(message: StartJourneyResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): StartJourneyResponse; fromJSON(object: any): StartJourneyResponse; toJSON(message: StartJourneyResponse): unknown; create(base?: DeepPartial): StartJourneyResponse; fromPartial(object: DeepPartial): StartJourneyResponse; }; readonly responseStream: false; readonly options: {}; }; /** Records progress within a journey. */ readonly journeyProgress: { readonly name: "JourneyProgress"; readonly requestType: { $type: "devvit.plugin.telemetry.JourneyProgressRequest"; encode(message: JourneyProgressRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): JourneyProgressRequest; fromJSON(object: any): JourneyProgressRequest; toJSON(message: JourneyProgressRequest): unknown; create(base?: DeepPartial): JourneyProgressRequest; fromPartial(object: DeepPartial): JourneyProgressRequest; }; readonly requestStream: false; readonly responseType: { $type: "devvit.plugin.telemetry.JourneyProgressResponse"; encode(_: JourneyProgressResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): JourneyProgressResponse; fromJSON(_: any): JourneyProgressResponse; toJSON(_: JourneyProgressResponse): unknown; create(base?: DeepPartial): JourneyProgressResponse; fromPartial(_: DeepPartial): JourneyProgressResponse; }; readonly responseStream: false; readonly options: {}; }; /** Records an interaction within a journey. */ readonly journeyInteraction: { readonly name: "JourneyInteraction"; readonly requestType: { $type: "devvit.plugin.telemetry.JourneyInteractionRequest"; encode(message: JourneyInteractionRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): JourneyInteractionRequest; fromJSON(object: any): JourneyInteractionRequest; toJSON(message: JourneyInteractionRequest): unknown; create(base?: DeepPartial): JourneyInteractionRequest; fromPartial(object: DeepPartial): JourneyInteractionRequest; }; readonly requestStream: false; readonly responseType: { $type: "devvit.plugin.telemetry.JourneyInteractionResponse"; encode(_: JourneyInteractionResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): JourneyInteractionResponse; fromJSON(_: any): JourneyInteractionResponse; toJSON(_: JourneyInteractionResponse): unknown; create(base?: DeepPartial): JourneyInteractionResponse; fromPartial(_: DeepPartial): JourneyInteractionResponse; }; readonly responseStream: false; readonly options: {}; }; /** Ends a telemetry journey. */ readonly endJourney: { readonly name: "EndJourney"; readonly requestType: { $type: "devvit.plugin.telemetry.EndJourneyRequest"; encode(message: EndJourneyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): EndJourneyRequest; fromJSON(object: any): EndJourneyRequest; toJSON(message: EndJourneyRequest): unknown; create(base?: DeepPartial): EndJourneyRequest; fromPartial(object: DeepPartial): EndJourneyRequest; }; readonly requestStream: false; readonly responseType: { $type: "devvit.plugin.telemetry.EndJourneyResponse"; encode(_: EndJourneyResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): EndJourneyResponse; fromJSON(_: any): EndJourneyResponse; toJSON(_: EndJourneyResponse): unknown; create(base?: DeepPartial): EndJourneyResponse; fromPartial(_: DeepPartial): EndJourneyResponse; }; readonly responseStream: false; readonly options: {}; }; /** Signals that the app is ready and visible to the user. */ readonly appReady: { readonly name: "AppReady"; readonly requestType: { $type: "devvit.plugin.telemetry.AppReadyRequest"; encode(message: AppReadyRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): AppReadyRequest; fromJSON(object: any): AppReadyRequest; toJSON(message: AppReadyRequest): unknown; create(base?: DeepPartial): AppReadyRequest; fromPartial(object: DeepPartial): AppReadyRequest; }; readonly requestStream: false; readonly responseType: { $type: "devvit.plugin.telemetry.AppReadyResponse"; encode(_: AppReadyResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): AppReadyResponse; fromJSON(_: any): AppReadyResponse; toJSON(_: AppReadyResponse): unknown; create(base?: DeepPartial): AppReadyResponse; fromPartial(_: DeepPartial): AppReadyResponse; }; readonly responseStream: false; readonly options: {}; }; }; }; interface Rpc { request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise; } type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; type DeepPartial = T extends Builtin ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; export {}; //# sourceMappingURL=telemetry.d.ts.map