UNPKG

@mochabug/adaptkit

Version:

A cmd to create, emulate and publish Mochabug Adapt plugins

190 lines 7.51 kB
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; import type { Value, ValueJson } from "@bufbuild/protobuf/wkt"; import type { JTDSchema, JTDSchemaJson } from "../../graph/jtd_schema_pb"; import type { Message } from "@bufbuild/protobuf"; /** * Describes the file mochabugapis/adapt/plugins/v1/variable_service.proto. */ export declare const file_mochabugapis_adapt_plugins_v1_variable_service: GenFile; /** * A definition of a JSON variable * * This message represents a variable used within the hosting platform. * Variables are essential for configuring applications and services hosted on the platform. * They store values that can be accessed by the application or service during runtime. * * @generated from message mochabugapis.adapt.plugins.v1.VariableDefinition */ export type VariableDefinition = Message<"mochabugapis.adapt.plugins.v1.VariableDefinition"> & { /** * The schema that the variable must adhere to * * @generated from field: mochabugapis.adapt.graph.JTDSchema schema = 1; */ schema?: JTDSchema; /** * The optional default value. * * ## Default Behavior: System Settings vs User Settings * * **System Settings** (Manifest.system_services): * - Defaults are automatically applied when the plugin is installed * - The service is marked as "configured" if all required bindings have defaults * - Plugin creators define and approve these defaults * * **User Settings** (Vertex.user_services): * - Defaults are UI hints only and NOT automatically applied * - The service is NOT marked as "configured" until the user explicitly submits settings * - Users must review and approve all settings, even with defaults present * - This ensures users actively consent to configuration values * * ## Rationale * * System settings use automatic defaults because the plugin creator (who defines * the defaults) is also the one approving them during plugin development. * * User settings require explicit submission because end users need to review and * consciously approve configuration values, even if reasonable defaults exist. * * IF the default value is pointing to a file with .json ending it's content will be * loaded and parsed as JSON. * * @generated from field: optional google.protobuf.Value default = 2; */ default?: Value; /** * If true, the variable value is NOT treated as a secret. * * ## When plaintext = false (default): * - Values are encrypted at rest * - Values are treated as sensitive secrets * * ## When plaintext = true: * - Values are stored normally (not encrypted) * - Values are treated as non-sensitive data * * ## Use Cases for plaintext = false (default): * - API keys, access tokens, passwords * - Database connection strings with credentials * - Encryption keys, signing secrets * - OAuth client secrets * - Any credential material * * ## Use Cases for plaintext = true: * - Public configuration values * - Feature flags * - API endpoints (URLs without credentials) * - User IDs, tenant IDs, organization IDs * - Public identifiers * * ## Security Best Practices * * ALWAYS leave plaintext = false (default) for: * - Anything that grants access or authorization * - Anything that could be used to impersonate a user or service * - Any sensitive user-provided data * * Only set plaintext = true when the value contains non-sensitive * user-provided information. * * Default: false (variables are secrets by default) * * @generated from field: bool plaintext = 3; */ plaintext: boolean; }; /** * A definition of a JSON variable * * This message represents a variable used within the hosting platform. * Variables are essential for configuring applications and services hosted on the platform. * They store values that can be accessed by the application or service during runtime. * * @generated from message mochabugapis.adapt.plugins.v1.VariableDefinition */ export type VariableDefinitionJson = { /** * The schema that the variable must adhere to * * @generated from field: mochabugapis.adapt.graph.JTDSchema schema = 1; */ schema?: JTDSchemaJson; /** * The optional default value. * * ## Default Behavior: System Settings vs User Settings * * **System Settings** (Manifest.system_services): * - Defaults are automatically applied when the plugin is installed * - The service is marked as "configured" if all required bindings have defaults * - Plugin creators define and approve these defaults * * **User Settings** (Vertex.user_services): * - Defaults are UI hints only and NOT automatically applied * - The service is NOT marked as "configured" until the user explicitly submits settings * - Users must review and approve all settings, even with defaults present * - This ensures users actively consent to configuration values * * ## Rationale * * System settings use automatic defaults because the plugin creator (who defines * the defaults) is also the one approving them during plugin development. * * User settings require explicit submission because end users need to review and * consciously approve configuration values, even if reasonable defaults exist. * * IF the default value is pointing to a file with .json ending it's content will be * loaded and parsed as JSON. * * @generated from field: optional google.protobuf.Value default = 2; */ default?: ValueJson; /** * If true, the variable value is NOT treated as a secret. * * ## When plaintext = false (default): * - Values are encrypted at rest * - Values are treated as sensitive secrets * * ## When plaintext = true: * - Values are stored normally (not encrypted) * - Values are treated as non-sensitive data * * ## Use Cases for plaintext = false (default): * - API keys, access tokens, passwords * - Database connection strings with credentials * - Encryption keys, signing secrets * - OAuth client secrets * - Any credential material * * ## Use Cases for plaintext = true: * - Public configuration values * - Feature flags * - API endpoints (URLs without credentials) * - User IDs, tenant IDs, organization IDs * - Public identifiers * * ## Security Best Practices * * ALWAYS leave plaintext = false (default) for: * - Anything that grants access or authorization * - Anything that could be used to impersonate a user or service * - Any sensitive user-provided data * * Only set plaintext = true when the value contains non-sensitive * user-provided information. * * Default: false (variables are secrets by default) * * @generated from field: bool plaintext = 3; */ plaintext?: boolean; }; /** * Describes the message mochabugapis.adapt.plugins.v1.VariableDefinition. * Use `create(VariableDefinitionSchema)` to create a new message. */ export declare const VariableDefinitionSchema: GenMessage<VariableDefinition, { jsonType: VariableDefinitionJson; }>; //# sourceMappingURL=variable_service_pb.d.ts.map