/** * #telemetry.ts * * Code generated by ts-proto. DO NOT EDIT. * @packageDocumentation */ import _m0 from "protobufjs/minimal.js"; import { Metadata } from "../../../../lib/Types.js"; /** Machine-readable status for a telemetry event attempt. */ export declare enum JourneyReceiptStatus { /** JOURNEY_RECEIPT_UNSPECIFIED - Status was not provided. */ JOURNEY_RECEIPT_UNSPECIFIED = 0, /** JOURNEY_RECEIPT_VALID - Event was valid and sent to the telemetry pipeline. */ JOURNEY_RECEIPT_VALID = 1, /** JOURNEY_RECEIPT_DENIED_NOT_ALLOWLISTED - Event was valid, but not sent because the app is not allowlisted. */ JOURNEY_RECEIPT_DENIED_NOT_ALLOWLISTED = 2, /** JOURNEY_RECEIPT_DENIED_RATE_LIMITED - Event was valid, but not sent because the app exceeded rate limits. */ JOURNEY_RECEIPT_DENIED_RATE_LIMITED = 3, /** JOURNEY_RECEIPT_DENIED_DUPLICATE - Event was valid, but not sent because it was a duplicate. */ JOURNEY_RECEIPT_DENIED_DUPLICATE = 4, /** JOURNEY_RECEIPT_INVALID - Event was invalid and not sent to the telemetry pipeline. */ JOURNEY_RECEIPT_INVALID = 5, UNRECOGNIZED = -1 } export declare function journeyReceiptStatusFromJSON(object: any): JourneyReceiptStatus; export declare function journeyReceiptStatusToJSON(object: JourneyReceiptStatus): number; /** 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; receipt?: JourneyReceipt | undefined; } /** Structured receipt for a telemetry event attempt. */ export interface JourneyReceipt { /** * Machine-readable status for tooling and tests. * Example: JOURNEY_RECEIPT_VALID */ status: JourneyReceiptStatus; /** * Human-readable status for developers. * Example: "Event is valid, but your app is not allowlisted for Journey telemetry yet, so it was not ingested." */ message: 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 { receipt?: JourneyReceipt | undefined; } /** 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 { receipt?: JourneyReceipt | undefined; } /** 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 { receipt?: JourneyReceipt | undefined; } /** 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 { receipt?: JourneyReceipt | undefined; } 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 JourneyReceipt: { $type: "devvit.plugin.telemetry.JourneyReceipt"; encode(message: JourneyReceipt, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): JourneyReceipt; fromJSON(object: any): JourneyReceipt; toJSON(message: JourneyReceipt): unknown; create(base?: DeepPartial): JourneyReceipt; fromPartial(object: DeepPartial): JourneyReceipt; }; 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(message: JourneyProgressResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): JourneyProgressResponse; fromJSON(object: any): JourneyProgressResponse; toJSON(message: JourneyProgressResponse): unknown; create(base?: DeepPartial): JourneyProgressResponse; fromPartial(object: 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(message: JourneyInteractionResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): JourneyInteractionResponse; fromJSON(object: any): JourneyInteractionResponse; toJSON(message: JourneyInteractionResponse): unknown; create(base?: DeepPartial): JourneyInteractionResponse; fromPartial(object: 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(message: EndJourneyResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): EndJourneyResponse; fromJSON(object: any): EndJourneyResponse; toJSON(message: EndJourneyResponse): unknown; create(base?: DeepPartial): EndJourneyResponse; fromPartial(object: 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(message: AppReadyResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): AppReadyResponse; fromJSON(object: any): AppReadyResponse; toJSON(message: AppReadyResponse): unknown; create(base?: DeepPartial): AppReadyResponse; fromPartial(object: 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(message: JourneyProgressResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): JourneyProgressResponse; fromJSON(object: any): JourneyProgressResponse; toJSON(message: JourneyProgressResponse): unknown; create(base?: DeepPartial): JourneyProgressResponse; fromPartial(object: 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(message: JourneyInteractionResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): JourneyInteractionResponse; fromJSON(object: any): JourneyInteractionResponse; toJSON(message: JourneyInteractionResponse): unknown; create(base?: DeepPartial): JourneyInteractionResponse; fromPartial(object: 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(message: EndJourneyResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): EndJourneyResponse; fromJSON(object: any): EndJourneyResponse; toJSON(message: EndJourneyResponse): unknown; create(base?: DeepPartial): EndJourneyResponse; fromPartial(object: 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(message: AppReadyResponse, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): AppReadyResponse; fromJSON(object: any): AppReadyResponse; toJSON(message: AppReadyResponse): unknown; create(base?: DeepPartial): AppReadyResponse; fromPartial(object: 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