import type { BinaryWriteOptions } from "@protobuf-ts/runtime"; import type { IBinaryWriter } from "@protobuf-ts/runtime"; import type { BinaryReadOptions } from "@protobuf-ts/runtime"; import type { IBinaryReader } from "@protobuf-ts/runtime"; import type { PartialMessage } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; import { FieldMask } from "../../google/protobuf/field_mask.js"; import { Metadata } from "../repl/repl.js"; import { ReplLocation } from "./service.js"; /** * LoreCommand is a command intended to be consumed by Lore from repl-it-web. * It tells Lore about something about a Repl that changed in repl-it-web and * that change needs to be also reflected somewhere in goval. * * @generated from protobuf message replit.goval.api.lore.LoreCommand */ export interface LoreCommand { /** * @generated from protobuf oneof: command */ command: { oneofKind: "clusterTransfer"; /** * Transfer a repl from one cluster to another. * This refers to a goval cluster (e.g. Hacker, Global, etc). * * @generated from protobuf field: replit.goval.api.lore.ClusterTransfer cluster_transfer = 1 */ clusterTransfer: ClusterTransfer; } | { oneofKind: "softTakedown"; /** * A Soft Takedown consists of shutting down a repl without placing a * takedown. This means that the user can recover by just rerunning the * repl. * * @generated from protobuf field: replit.goval.api.lore.SoftTakedown soft_takedown = 2 */ softTakedown: SoftTakedown; } | { oneofKind: "takedown"; /** * A Takedown consists of stopping a Repl's executing and removing all of * its metadata from goval. * * @generated from protobuf field: replit.goval.api.lore.Takedown takedown = 6 */ takedown: Takedown; } | { oneofKind: "govalCommand"; /** * When repl-it-web needs to communicate with goval, it's a bit inefficient * to do one RPC to Lore to get the cluster a Repl lives in, and then * another one to communicate with goval. Furthermore, these requests are * probably better if they are sent to something other than goval (e.g. the * controlplane), and we don't want to have web to have code to reason * about this. * * This command is then going to be forwarded as-is to the correct goval * topic, which has the correct cluster and everything. * * @generated from protobuf field: replit.goval.api.lore.GovalCommand goval_command = 3 */ govalCommand: GovalCommand; } | { oneofKind: "multiGovalCommand"; /** * If a client needs to perform multiple GovalCommand operations in a * guaranteed sequential order on a single repl, use MultiGovalCommand. It * is simply a list of goval commands that are sent to goval in a single * unit, where they are performed one after another. This is stored within * GovalCommand for backwards compatibility. * * @generated from protobuf field: replit.goval.api.lore.MultiGovalCommand multi_goval_command = 5 */ multiGovalCommand: MultiGovalCommand; } | { oneofKind: "restore"; /** * A Restore clears the 1h tombstone inserted after a repl is deleted. * This is done to override the 1h delay before the repl can actually * run again. * * @generated from protobuf field: replit.goval.api.lore.Restore restore = 4 */ restore: Restore; } | { oneofKind: undefined; }; } /** * @generated from protobuf message replit.goval.api.lore.ClusterTransfer */ export interface ClusterTransfer { /** * @generated from protobuf field: string repl_id = 1 */ replId: string; /** * @generated from protobuf field: string user = 2 */ user: string; /** * @generated from protobuf oneof: location */ location: { oneofKind: "newClusterId"; /** * @deprecated * @generated from protobuf field: string new_cluster_id = 3 [deprecated = true] */ newClusterId: string; } | { oneofKind: "newContinentId"; /** * @deprecated * @generated from protobuf field: string new_continent_id = 5 [deprecated = true] */ newContinentId: string; } | { oneofKind: undefined; }; /** * ReplLocation is a replacement for the default location * field so that we don't end up with multiple type * conversions in client libraries * * @generated from protobuf field: replit.goval.api.lore.ReplLocation replLocation = 6 */ replLocation?: ReplLocation; /** * @generated from protobuf field: string transfer_id = 4 */ transferId: string; } /** * @generated from protobuf message replit.goval.api.lore.SoftTakedown */ export interface SoftTakedown { /** * @generated from protobuf field: string repl_id = 1 */ replId: string; /** * @generated from protobuf field: string soft_takedown_id = 2 */ softTakedownId: string; } /** * @generated from protobuf message replit.goval.api.lore.Takedown */ export interface Takedown { /** * @generated from protobuf field: string repl_id = 1 */ replId: string; } /** * @generated from protobuf message replit.goval.api.lore.StartViktor */ export interface StartViktor { /** * @generated from protobuf field: string repl_id = 1 */ replId: string; } /** * @generated from protobuf message replit.goval.api.lore.GovalCommand */ export interface GovalCommand { /** * @generated from protobuf oneof: command */ command: { oneofKind: "updateMetadata"; /** * update_metadata tells goval to update the metadata for a Repl. This is * a subset of ReplToken, that is normally embedded in a PASETO. * Prefer using `partial_update_metadata`. * * @generated from protobuf field: replit.goval.api.repl.Metadata update_metadata = 1 */ updateMetadata: Metadata; } | { oneofKind: "partialUpdateMetadata"; /** * partial_update_metadata tells goval to update the metadata for a Repl. * This is a subset of ReplToken, that is normally embedded in a PASETO. * * @generated from protobuf field: replit.goval.api.lore.PartialUpdateMetadata partial_update_metadata = 2 */ partialUpdateMetadata: PartialUpdateMetadata; } | { oneofKind: "killRepl"; /** * Takes down the repl. Softer than a soft takedown, it still allows the * repl to be woken up by pinging the repl.co URL afterward. * * @generated from protobuf field: replit.goval.api.lore.KillRepl kill_repl = 3 */ killRepl: KillRepl; } | { oneofKind: "updateSourceRepl"; /** * Updates the SourceRepl entry for this repl in controlplane. * Different than the source repl in Metadata for some reason. * TODO(lincoln): deprecate once metadata syncing is deployed * * @generated from protobuf field: replit.goval.api.lore.UpdateSourceRepl update_source_repl = 4 */ updateSourceRepl: UpdateSourceRepl; } | { oneofKind: "updateReplFlags"; /** * Updates the flags for this repl in the controlplane db. * * @deprecated * @generated from protobuf field: replit.goval.api.lore.UpdateReplFlags update_repl_flags = 5 [deprecated = true] */ updateReplFlags: UpdateReplFlags; } | { oneofKind: "softTakedown"; /** * A Soft Takedown consists of shutting down a repl without placing a * takedown. This means that the user can recover by just rerunning the * repl. * * @generated from protobuf field: replit.goval.api.lore.SoftTakedown soft_takedown = 6 */ softTakedown: SoftTakedown; } | { oneofKind: "takedown"; /** * A Takedown consists of stopping a Repl's executing and removing all of * its metadata from goval. * * @generated from protobuf field: replit.goval.api.lore.Takedown takedown = 7 */ takedown: Takedown; } | { oneofKind: "startViktor"; /** * StartViktor is necessary when upgrading to core while editing a repl. * * @generated from protobuf field: replit.goval.api.lore.StartViktor start_viktor = 9 */ startViktor: StartViktor; } | { oneofKind: "addTokenToReplShieldAllowList"; /** * AddTokenToReplShieldAllowList adds a given token to the ReplShield allow * list used by dotdevproxy * * @generated from protobuf field: replit.goval.api.lore.AddTokenToReplShieldAllowList add_token_to_repl_shield_allow_list = 10 */ addTokenToReplShieldAllowList: AddTokenToReplShieldAllowList; } | { oneofKind: "revokeUserReplShieldTokens"; /** * RevokeUserReplShieldTokens revokes all ReplShield tokens for a given user * * @generated from protobuf field: replit.goval.api.lore.RevokeUserReplShieldTokens revoke_user_repl_shield_tokens = 11 */ revokeUserReplShieldTokens: RevokeUserReplShieldTokens; } | { oneofKind: "setReplitBadge"; /** * SetReplitBadge enables or disables the Replit badge on a repl * * @generated from protobuf field: replit.goval.api.lore.SetReplitBadge set_replit_badge = 12 */ setReplitBadge: SetReplitBadge; } | { oneofKind: undefined; }; } /** * @generated from protobuf message replit.goval.api.lore.PartialUpdateMetadata */ export interface PartialUpdateMetadata { /** * @generated from protobuf field: google.protobuf.FieldMask field_mask = 1 */ fieldMask?: FieldMask; /** * update_metadata tells goval to update the metadata for a Repl. This is * a subset of ReplToken, that is normally embedded in a PASETO. * * @generated from protobuf field: replit.goval.api.repl.Metadata update_metadata = 2 */ updateMetadata?: Metadata; } /** * @generated from protobuf message replit.goval.api.lore.MultiGovalCommand */ export interface MultiGovalCommand { /** * @generated from protobuf field: string repl_id = 1 */ replId: string; /** * @generated from protobuf field: repeated replit.goval.api.lore.GovalCommand goval_commands = 2 */ govalCommands: GovalCommand[]; } /** * @generated from protobuf message replit.goval.api.lore.KillRepl */ export interface KillRepl { /** * @generated from protobuf field: string repl_id = 1 */ replId: string; } /** * @generated from protobuf message replit.goval.api.lore.Restore */ export interface Restore { /** * @generated from protobuf field: string repl_id = 1 */ replId: string; } /** * @generated from protobuf message replit.goval.api.lore.UpdateSourceRepl */ export interface UpdateSourceRepl { /** * @generated from protobuf field: string repl_id = 1 */ replId: string; /** * @generated from protobuf field: string source_repl_id = 2 */ sourceReplId: string; } /** * @generated from protobuf message replit.goval.api.lore.UpdateReplFlags */ export interface UpdateReplFlags { /** * @generated from protobuf field: string repl_id = 1 */ replId: string; /** * @generated from protobuf field: repeated string flags = 2 */ flags: string[]; } /** * @generated from protobuf message replit.goval.api.lore.AddTokenToReplShieldAllowList */ export interface AddTokenToReplShieldAllowList { /** * @generated from protobuf field: string repl_id = 1 */ replId: string; /** * @generated from protobuf field: string token = 2 */ token: string; } /** * @generated from protobuf message replit.goval.api.lore.RevokeUserReplShieldTokens */ export interface RevokeUserReplShieldTokens { /** * @generated from protobuf field: uint32 user_id = 1 */ userId: number; /** * @generated from protobuf field: string token = 2 */ token: string; } /** * @generated from protobuf message replit.goval.api.lore.SetReplitBadge */ export interface SetReplitBadge { /** * @generated from protobuf field: string repl_id = 1 */ replId: string; /** * @generated from protobuf field: bool enable = 2 */ enable: boolean; /** * @generated from protobuf field: string referral_code = 3 */ referralCode: string; } declare class LoreCommand$Type extends MessageType { constructor(); create(value?: PartialMessage): LoreCommand; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: LoreCommand): LoreCommand; internalBinaryWrite(message: LoreCommand, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.LoreCommand */ export declare const LoreCommand: LoreCommand$Type; declare class ClusterTransfer$Type extends MessageType { constructor(); create(value?: PartialMessage): ClusterTransfer; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ClusterTransfer): ClusterTransfer; internalBinaryWrite(message: ClusterTransfer, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.ClusterTransfer */ export declare const ClusterTransfer: ClusterTransfer$Type; declare class SoftTakedown$Type extends MessageType { constructor(); create(value?: PartialMessage): SoftTakedown; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SoftTakedown): SoftTakedown; internalBinaryWrite(message: SoftTakedown, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.SoftTakedown */ export declare const SoftTakedown: SoftTakedown$Type; declare class Takedown$Type extends MessageType { constructor(); create(value?: PartialMessage): Takedown; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Takedown): Takedown; internalBinaryWrite(message: Takedown, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.Takedown */ export declare const Takedown: Takedown$Type; declare class StartViktor$Type extends MessageType { constructor(); create(value?: PartialMessage): StartViktor; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StartViktor): StartViktor; internalBinaryWrite(message: StartViktor, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.StartViktor */ export declare const StartViktor: StartViktor$Type; declare class GovalCommand$Type extends MessageType { constructor(); create(value?: PartialMessage): GovalCommand; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GovalCommand): GovalCommand; internalBinaryWrite(message: GovalCommand, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.GovalCommand */ export declare const GovalCommand: GovalCommand$Type; declare class PartialUpdateMetadata$Type extends MessageType { constructor(); create(value?: PartialMessage): PartialUpdateMetadata; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PartialUpdateMetadata): PartialUpdateMetadata; internalBinaryWrite(message: PartialUpdateMetadata, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.PartialUpdateMetadata */ export declare const PartialUpdateMetadata: PartialUpdateMetadata$Type; declare class MultiGovalCommand$Type extends MessageType { constructor(); create(value?: PartialMessage): MultiGovalCommand; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: MultiGovalCommand): MultiGovalCommand; internalBinaryWrite(message: MultiGovalCommand, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.MultiGovalCommand */ export declare const MultiGovalCommand: MultiGovalCommand$Type; declare class KillRepl$Type extends MessageType { constructor(); create(value?: PartialMessage): KillRepl; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: KillRepl): KillRepl; internalBinaryWrite(message: KillRepl, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.KillRepl */ export declare const KillRepl: KillRepl$Type; declare class Restore$Type extends MessageType { constructor(); create(value?: PartialMessage): Restore; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Restore): Restore; internalBinaryWrite(message: Restore, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.Restore */ export declare const Restore: Restore$Type; declare class UpdateSourceRepl$Type extends MessageType { constructor(); create(value?: PartialMessage): UpdateSourceRepl; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateSourceRepl): UpdateSourceRepl; internalBinaryWrite(message: UpdateSourceRepl, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.UpdateSourceRepl */ export declare const UpdateSourceRepl: UpdateSourceRepl$Type; declare class UpdateReplFlags$Type extends MessageType { constructor(); create(value?: PartialMessage): UpdateReplFlags; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateReplFlags): UpdateReplFlags; internalBinaryWrite(message: UpdateReplFlags, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.UpdateReplFlags */ export declare const UpdateReplFlags: UpdateReplFlags$Type; declare class AddTokenToReplShieldAllowList$Type extends MessageType { constructor(); create(value?: PartialMessage): AddTokenToReplShieldAllowList; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AddTokenToReplShieldAllowList): AddTokenToReplShieldAllowList; internalBinaryWrite(message: AddTokenToReplShieldAllowList, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.AddTokenToReplShieldAllowList */ export declare const AddTokenToReplShieldAllowList: AddTokenToReplShieldAllowList$Type; declare class RevokeUserReplShieldTokens$Type extends MessageType { constructor(); create(value?: PartialMessage): RevokeUserReplShieldTokens; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RevokeUserReplShieldTokens): RevokeUserReplShieldTokens; internalBinaryWrite(message: RevokeUserReplShieldTokens, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.RevokeUserReplShieldTokens */ export declare const RevokeUserReplShieldTokens: RevokeUserReplShieldTokens$Type; declare class SetReplitBadge$Type extends MessageType { constructor(); create(value?: PartialMessage): SetReplitBadge; internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetReplitBadge): SetReplitBadge; internalBinaryWrite(message: SetReplitBadge, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter; } /** * @generated MessageType for protobuf message replit.goval.api.lore.SetReplitBadge */ export declare const SetReplitBadge: SetReplitBadge$Type; export {};