/** * #bundle.ts * * Code generated by ts-proto. DO NOT EDIT. * @packageDocumentation */ import _m0 from "protobufjs/minimal.js"; import { Scope } from "../../reddit/devvit/app_permission/v1/app_permission.js"; import { SerializableServiceDefinition } from "./serializable.js"; /** See also LinkedBundle. */ export declare enum LinkedBundleTargetPlatform { /** BROWSER - A LinkedBundle for browser runtimes. */ BROWSER = 0, /** V8 - A LinkedBundle for V8 runtimes. */ V8 = 1, /** * SKINNY - An API definition that cannot be executed. This is a LinkedBundle with no * code and no dependencies. */ SKINNY = 2, UNRECOGNIZED = -1 } export declare function linkedBundleTargetPlatformFromJSON(object: any): LinkedBundleTargetPlatform; export declare function linkedBundleTargetPlatformToJSON(object: LinkedBundleTargetPlatform): number; export declare enum TargetRuntime { /** UNIVERSAL - Server-only as of 2025-06-04 or so. */ UNIVERSAL = 0, CLIENT = 1, UNRECOGNIZED = -1 } export declare function targetRuntimeFromJSON(object: any): TargetRuntime; export declare function targetRuntimeToJSON(object: TargetRuntime): number; /** * Bundle or plugin configuration. This config is usually set by Config.init() * but some plugins may configure differently. */ export interface ActorSpec { /** * Bundle or plugin (PLUGIN_APP_NAME) name. This should be unique across app * actors. Usually just "main". */ name: string; /** Bundle or plugin (PLUGIN_OWNER) owner. Eg, "spez". */ owner: string; /** Bundle or plugin version. Eg, 1.2.3 or 1.2.3.0. */ version: string; } /** Permitted and forbidden execution environments. */ export interface LocationFilter { allow: string[]; deny: string[]; } export interface Permissions { /** List of fetch domains requested by the app. */ requestedFetchDomains: string[]; /** List of scopes that dictate what the app can run on behalf of the user. */ asUserScopes: Scope[]; } /** * A provided implementation specified by a Bundle or plugin. See * Config.provides() and DependencySpec.provides. */ export interface PackageSpec { actor?: ActorSpec | undefined; /** The version provided. */ definition?: SerializableServiceDefinition | undefined; locations?: LocationFilter | undefined; partitionsBy: string[]; } /** * A dependency use requirement specified by a Bundle or plugin. See * Config.use() and DependencySpec.uses. Dependencies may resolve to different * implementations in different execution environments. */ export interface PackageQuery { /** * Limit resolution to a Bundle or plugins (PLUGIN_APP_NAME). Eg, * com.devvit.example/foo. */ name?: string | undefined; /** Limit resolution to owner. Eg, com.reddit. */ owner?: string | undefined; /** * Limit resolution to type. No slashes. Eg, * "devvit.plugin.logger.Logger". See Definition.fullName. */ typeName: string; /** Limit resolution to versions. Eg, ">=0" or "1.0.0". */ versions?: string | undefined; } /** Dependencies offered and required by a Bundle or plugin. See Config.export(). */ export interface DependencySpec { actor?: ActorSpec | undefined; /** * Actor hostname. This may be a plugin or a user actor. Eg, * "fd23937c-2891-44ed-a66c-5277265cfd54.pixelary-game.main.devvit-gateway.reddit.com": * * | Prisma Installation.id | devvit.yaml app name / slug | ActorSpec.name | | * | ------------------------------------ | --------------------------- | -------------- | ------------------------- | * | fd23937c-2891-44ed-a66c-5277265cfd54 | pixelary-game | main | devvit-gateway.reddit.com | * * Which corresponds to the V8 LinkedBundle at * https://devvit-gateway.reddit.com/bundles/fd23937c-2891-44ed-a66c-5277265cfd54/main/0.0.8-359. * * Multi-actor apps are deprecated so app name is usually what's most * important. Plugins are simpler. Eg, "http.plugins.local". */ hostname: string; provides: PackageSpec[]; uses: PackageQuery[]; permissions: Permissions[]; } /** * A fully built actor (either a user app or plugin). This resolved Bundle is * ready for execution by the runtime. */ export interface LinkedBundle { actor?: ActorSpec | undefined; /** * Compiled bundle or plugin code. A hostname and empty code implies that the * runtime should resolve this as a remote actor accessible over the network; * this is empty for "skinny bundles" (AKA Gateway bundles). */ code: string; /** * Source map accompanying code. This should be a JSON string containing the * source map bundle accompanying the code. Not required. */ sourceMap?: string | undefined; /** * Actor hostname. This may be a plugin or a user. See DependencySpec.hostname * which Community Portal copies here. */ hostname: string; provides: SerializableServiceDefinition[]; /** * True dependencies. This is empty for skinny bundles which describe the * input / output API only. They have no code and cannot be executed so their * dependencies are not needed. */ uses: LinkedBundle[]; /** * Optional information about the environment the code was built in. Outdated * dependencies may indicate an invalid build. */ buildInfo?: BuildInfo | undefined; /** * Where did the uploaded ./assets folder land? This is a URL to the FileSystem * as JSON that contains the assets. * * @deprecated */ assetsUrl?: string | undefined; /** * This map is used to resolve relative asset paths to URLs. The key * is the path to the asset, and the value is the URL to the asset. * e.g. `"images/example.png": "https://i.redd.it/example.png"`. May include * the app icon as `$devvit_icon.png`. */ assets: { [key: string]: string; }; /** * This map is used to resolve assets for the webview block. These are uploaded * to S3 and servable as static contents from CDN. * * For historical reasons, the key is the developer's local asset path (e.g. "images/example.png"), * and the value is `/`, e.g. "fd23937c-2891-44ed-a66c-5277265cfd54/images/example.png". * These should all be served from the webview domain at the asset path (e.g. "GET /images/example.png"). */ webviewAssets: { [key: string]: string; }; /** This map is used to resolve a sku to a UUID used by the Payment platform to identify the product */ products: { [key: string]: string; }; /** * Standalone server implementation, without Blocks rendering or "Devvit Classic". * If provided, this code is expected to be an entry point for an HTTP server that can * handle requests at process.env.WEBBIT_PORT. Present in server (UNIVERSAL) * bundles only. */ server?: ServerBundle | undefined; } export interface LinkedBundle_AssetsEntry { key: string; value: string; } export interface LinkedBundle_WebviewAssetsEntry { key: string; value: string; } export interface LinkedBundle_ProductsEntry { key: string; value: string; } /** * This represents a standalone server implementation that starts an HTTP server * to execute on Devvit's compute platform. */ export interface ServerBundle { /** * A compiled bundle of code to be executed as-is. Listening on the server port * for HTTP requests should occur through side effects of evaluating this code. */ code: string; /** * Source map accompanying |code|, used for better stack traces when erorrs occur. * Not required. For specification, see: https://tc39.es/ecma426/ */ sourceMap: string; } /** Detail about the tooling used to construct a LinkedBundle. */ export interface BuildInfo { /** When the LinkedBundle was built. */ created?: Date | undefined; /** * Notable package.json versions recorded at build time. Eg: * * @devvit/protos → 1.2.3 * @devvit/public-api → 4.5.6 * node → 7.8.9 */ dependencies: { [key: string]: string; }; /** Where the bundle can be executed */ targetRuntime: TargetRuntime; } export interface BuildInfo_DependenciesEntry { key: string; value: string; } export declare const ActorSpec: { $type: "devvit.runtime.ActorSpec"; encode(message: ActorSpec, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ActorSpec; fromJSON(object: any): ActorSpec; toJSON(message: ActorSpec): unknown; create(base?: DeepPartial): ActorSpec; fromPartial(object: DeepPartial): ActorSpec; }; export declare const LocationFilter: { $type: "devvit.runtime.LocationFilter"; encode(message: LocationFilter, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): LocationFilter; fromJSON(object: any): LocationFilter; toJSON(message: LocationFilter): unknown; create(base?: DeepPartial): LocationFilter; fromPartial(object: DeepPartial): LocationFilter; }; export declare const Permissions: { $type: "devvit.runtime.Permissions"; encode(message: Permissions, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Permissions; fromJSON(object: any): Permissions; toJSON(message: Permissions): unknown; create(base?: DeepPartial): Permissions; fromPartial(object: DeepPartial): Permissions; }; export declare const PackageSpec: { $type: "devvit.runtime.PackageSpec"; encode(message: PackageSpec, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): PackageSpec; fromJSON(object: any): PackageSpec; toJSON(message: PackageSpec): unknown; create(base?: DeepPartial): PackageSpec; fromPartial(object: DeepPartial): PackageSpec; }; export declare const PackageQuery: { $type: "devvit.runtime.PackageQuery"; encode(message: PackageQuery, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): PackageQuery; fromJSON(object: any): PackageQuery; toJSON(message: PackageQuery): unknown; create(base?: DeepPartial): PackageQuery; fromPartial(object: DeepPartial): PackageQuery; }; export declare const DependencySpec: { $type: "devvit.runtime.DependencySpec"; encode(message: DependencySpec, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): DependencySpec; fromJSON(object: any): DependencySpec; toJSON(message: DependencySpec): unknown; create(base?: DeepPartial): DependencySpec; fromPartial(object: DeepPartial): DependencySpec; }; export declare const LinkedBundle: { $type: "devvit.runtime.LinkedBundle"; encode(message: LinkedBundle, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): LinkedBundle; fromJSON(object: any): LinkedBundle; toJSON(message: LinkedBundle): unknown; create(base?: DeepPartial): LinkedBundle; fromPartial(object: DeepPartial): LinkedBundle; }; export declare const LinkedBundle_AssetsEntry: { $type: "devvit.runtime.LinkedBundle.AssetsEntry"; encode(message: LinkedBundle_AssetsEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): LinkedBundle_AssetsEntry; fromJSON(object: any): LinkedBundle_AssetsEntry; toJSON(message: LinkedBundle_AssetsEntry): unknown; create(base?: DeepPartial): LinkedBundle_AssetsEntry; fromPartial(object: DeepPartial): LinkedBundle_AssetsEntry; }; export declare const LinkedBundle_WebviewAssetsEntry: { $type: "devvit.runtime.LinkedBundle.WebviewAssetsEntry"; encode(message: LinkedBundle_WebviewAssetsEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): LinkedBundle_WebviewAssetsEntry; fromJSON(object: any): LinkedBundle_WebviewAssetsEntry; toJSON(message: LinkedBundle_WebviewAssetsEntry): unknown; create(base?: DeepPartial): LinkedBundle_WebviewAssetsEntry; fromPartial(object: DeepPartial): LinkedBundle_WebviewAssetsEntry; }; export declare const LinkedBundle_ProductsEntry: { $type: "devvit.runtime.LinkedBundle.ProductsEntry"; encode(message: LinkedBundle_ProductsEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): LinkedBundle_ProductsEntry; fromJSON(object: any): LinkedBundle_ProductsEntry; toJSON(message: LinkedBundle_ProductsEntry): unknown; create(base?: DeepPartial): LinkedBundle_ProductsEntry; fromPartial(object: DeepPartial): LinkedBundle_ProductsEntry; }; export declare const ServerBundle: { $type: "devvit.runtime.ServerBundle"; encode(message: ServerBundle, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ServerBundle; fromJSON(object: any): ServerBundle; toJSON(message: ServerBundle): unknown; create(base?: DeepPartial): ServerBundle; fromPartial(object: DeepPartial): ServerBundle; }; export declare const BuildInfo: { $type: "devvit.runtime.BuildInfo"; encode(message: BuildInfo, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): BuildInfo; fromJSON(object: any): BuildInfo; toJSON(message: BuildInfo): unknown; create(base?: DeepPartial): BuildInfo; fromPartial(object: DeepPartial): BuildInfo; }; export declare const BuildInfo_DependenciesEntry: { $type: "devvit.runtime.BuildInfo.DependenciesEntry"; encode(message: BuildInfo_DependenciesEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): BuildInfo_DependenciesEntry; fromJSON(object: any): BuildInfo_DependenciesEntry; toJSON(message: BuildInfo_DependenciesEntry): unknown; create(base?: DeepPartial): BuildInfo_DependenciesEntry; fromPartial(object: DeepPartial): BuildInfo_DependenciesEntry; }; 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=bundle.d.ts.map