use crate::lsp_3_18::LspRequest as Request;
use crate::*;
pub const METHOD_HOOK: &str = "max/hook";
pub const METHOD_HOOK_GRAPH: &str = "max/hookGraph";
pub const METHOD_CHAIN: &str = "max/chain";
pub const METHOD_PROPAGATE: &str = "max/propagate";
pub const METHOD_AUTONOMIC_LOOP: &str = "max/autonomicLoop";
pub const METHOD_MANIFOLD_SNAPSHOT: &str = "max/manifoldSnapshot";
pub const METHOD_LAWFUL_TRANSITION: &str = "max/lawfulTransition";
pub const METHOD_ADMISSION: &str = "max/admission";
pub const METHOD_REFUSAL: &str = "max/refusal";
pub const METHOD_REPLAY: &str = "max/replay";
pub const METHOD_RELEASE_ACTUATION: &str = "max/releaseActuation";
pub const METHOD_LSIF_EXPORT: &str = "max/lsif";
pub enum MaxSnapshot {}
impl Request for MaxSnapshot {
type Params = ();
type Result = SnapshotId;
const METHOD: &'static str = "max/snapshot";
}
pub enum MaxConformanceVector {}
impl Request for MaxConformanceVector {
type Params = SnapshotId;
type Result = ConformanceVector;
const METHOD: &'static str = "max/conformanceVector";
}
pub enum MaxExplainDiagnostic {}
impl Request for MaxExplainDiagnostic {
type Params = String; type Result = MaxDiagnostic;
const METHOD: &'static str = "max/explainDiagnostic";
}
pub enum MaxRepairPlan {}
impl Request for MaxRepairPlan {
type Params = String; type Result = Vec<MaxCodeAction>;
const METHOD: &'static str = "max/repairPlan";
}
pub enum MaxApplyRepairTransaction {}
impl Request for MaxApplyRepairTransaction {
type Params = MaxCodeAction;
type Result = Receipt;
const METHOD: &'static str = "max/applyRepairTransaction";
}
pub enum MaxExportAnalysisBundle {}
impl Request for MaxExportAnalysisBundle {
type Params = SnapshotId;
type Result = AnalysisBundle;
const METHOD: &'static str = "max/exportAnalysisBundle";
}
pub enum MaxRunGate {}
impl Request for MaxRunGate {
type Params = GateId;
type Result = bool;
const METHOD: &'static str = "max/runGate";
}
pub enum MaxClearDiagnostic {}
impl Request for MaxClearDiagnostic {
type Params = String; type Result = ();
const METHOD: &'static str = "max/clearDiagnostic";
}
pub enum MaxReceipt {}
impl Request for MaxReceipt {
type Params = String; type Result = Receipt;
const METHOD: &'static str = "max/receipt";
}
pub enum MaxHook {}
impl Request for MaxHook {
type Params = Option<String>; type Result = Vec<HookDescriptor>;
const METHOD: &'static str = "max/hook";
}
pub enum MaxHookGraph {}
impl Request for MaxHookGraph {
type Params = Option<String>; type Result = Vec<HookGraphNode>;
const METHOD: &'static str = "max/hookGraph";
}
pub enum MaxChain {}
impl Request for MaxChain {
type Params = Option<String>; type Result = Vec<ChainDescriptor>;
const METHOD: &'static str = "max/chain";
}
pub enum MaxPropagate {}
impl Request for MaxPropagate {
type Params = String; type Result = PropagationResult;
const METHOD: &'static str = "max/propagate";
}
pub enum MaxAutonomicLoop {}
impl Request for MaxAutonomicLoop {
type Params = Option<String>; type Result = AutonomicLoopStatus;
const METHOD: &'static str = "max/autonomicLoop";
}
pub enum MaxManifoldSnapshot {}
impl Request for MaxManifoldSnapshot {
type Params = SnapshotId;
type Result = ManifoldSnapshot;
const METHOD: &'static str = "max/manifoldSnapshot";
}
pub enum MaxLawfulTransition {}
impl Request for MaxLawfulTransition {
type Params = TransitionAttempt;
type Result = LawfulTransitionResult;
const METHOD: &'static str = "max/lawfulTransition";
}
pub enum MaxAdmission {}
impl Request for MaxAdmission {
type Params = LawAxis;
type Result = AdmissionResult;
const METHOD: &'static str = "max/admission";
}
pub enum MaxRefusal {}
impl Request for MaxRefusal {
type Params = LawAxis;
type Result = RefusalResult;
const METHOD: &'static str = "max/refusal";
}
pub enum MaxReplay {}
impl Request for MaxReplay {
type Params = SnapshotId;
type Result = ReplayResult;
const METHOD: &'static str = "max/replay";
}
pub enum MaxReleaseActuation {}
impl Request for MaxReleaseActuation {
type Params = SnapshotId;
type Result = ReleaseActuationResult;
const METHOD: &'static str = "max/releaseActuation";
}
pub const METHOD_RULE_PACKS: &str = "max/rulePacks";
pub const METHOD_RULE_PACK_STATUS: &str = "max/rulePackStatus";
pub const METHOD_RULE_PACK_DIFF: &str = "max/rulePackDiff";
pub const METHOD_WORKSPACE_CONFORMANCE: &str = "max/workspaceConformance";
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct RulePackDescriptor {
pub id: String,
pub version: String,
pub rule_ids: Vec<String>,
pub depends_on: Vec<String>,
pub active_rule_count: usize,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct RulePackStatusResult {
pub pack_id: String,
pub findings_by_uri: std::collections::HashMap<String, Vec<String>>,
pub conformance: ConformanceVector,
}
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct RulePackDiffEntry {
pub rule_id: String,
pub uri: String,
pub line: u32,
pub change: String,
}
pub enum MaxRulePacks {}
impl Request for MaxRulePacks {
type Params = ();
type Result = Vec<RulePackDescriptor>;
const METHOD: &'static str = "max/rulePacks";
}
pub enum MaxRulePackStatus {}
impl Request for MaxRulePackStatus {
type Params = String; type Result = RulePackStatusResult;
const METHOD: &'static str = "max/rulePackStatus";
}
pub enum MaxRulePackDiff {}
impl Request for MaxRulePackDiff {
type Params = (u64, u64); type Result = Vec<RulePackDiffEntry>;
const METHOD: &'static str = "max/rulePackDiff";
}
pub enum MaxWorkspaceConformance {}
impl Request for MaxWorkspaceConformance {
type Params = ();
type Result = ConformanceVector;
const METHOD: &'static str = "max/workspaceConformance";
}