effx
API reference@effx/compilerdiagnostics

http

API reference for @effx/compiler/diagnostics/http

http.ts overview


Exports Grouped by Category


utils

HttpDiagnostics

Typed factories; occurrence locations and related diagnostics remain caller-owned.

Signature

declare const HttpDiagnostics: {
  EFFX2401: Definition<
    {
      readonly code: "EFFX2401"
      readonly owner: "http"
      readonly title: "Query uses a mutating HTTP verb"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "A Query normally uses GET. A Query over POST needs the explicit payloadIsQuery contract; other verbs require a Command."
      readonly examples: readonly [
        {
          readonly before: '@Query(...)\n@Http.Put("/users")'
          readonly after: '@Query(...)\n@Http.Get("/users")'
          readonly explanation: "Use GET for reads, or declare a Command for mutation."
        }
      ]
    },
    Schema.Struct<{ readonly subject: Schema.String; readonly method: Schema.String; readonly path: Schema.String }>
  >
  EFFX2402: Definition<
    {
      readonly code: "EFFX2402"
      readonly owner: "http"
      readonly title: "Invalid HTTP contract or group"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: string
      readonly examples: readonly [
        {
          readonly before: '@Http.Get("/users/:id")\n@Http.Contract({ group: "users", success: User })'
          readonly after: '@Http.Get("/users/:id")\n@Http.Contract({ group: "users", params: UserId, success: User })'
          readonly explanation: "Declare params with exactly the id field. For other variants, correct the named contract constraint; attach a single contract to one operation, export one valid group and supply its concrete root when external."
        },
        {
          readonly before: '@Http.Problems({ registry: Problems, codes: ["NotFound", "NotFound"] })'
          readonly after: '@Http.Problems({ registry: Problems, codes: ["NotFound"] })'
          readonly explanation: "Keep one Problems contract on an HTTP-exposed operation. Remove duplicate codes, use a nonempty identifier-safe identifier when overriding schema identity, and correct fields named by the ProblemContract validator."
        }
      ]
    },
    Schema.TaggedUnion<{
      readonly InvalidData: Schema.TaggedStruct<"InvalidData", { readonly subject: Schema.String }>
      readonly InvalidEdge: Schema.TaggedStruct<"InvalidEdge", { readonly subject: Schema.String }>
      readonly NotOperation: Schema.TaggedStruct<"NotOperation", { readonly subject: Schema.String }>
      readonly ExposureCount: Schema.TaggedStruct<"ExposureCount", { readonly subject: Schema.String }>
      readonly PayloadIsQuery: Schema.TaggedStruct<"PayloadIsQuery", { readonly subject: Schema.String }>
      readonly GetPayload: Schema.TaggedStruct<"GetPayload", { readonly subject: Schema.String }>
      readonly Conditional: Schema.TaggedStruct<"Conditional", { readonly subject: Schema.String }>
      readonly MediaType: Schema.TaggedStruct<"MediaType", { readonly subject: Schema.String }>
      readonly Status: Schema.TaggedStruct<"Status", { readonly subject: Schema.String }>
      readonly Identifiers: Schema.TaggedStruct<"Identifiers", { readonly subject: Schema.String }>
      readonly ParamsRequired: Schema.TaggedStruct<"ParamsRequired", { readonly subject: Schema.String }>
      readonly ParamsMismatch: Schema.TaggedStruct<"ParamsMismatch", { readonly subject: Schema.String }>
      readonly CommandIdentityKind: Schema.TaggedStruct<"CommandIdentityKind", { readonly subject: Schema.String }>
      readonly CommandIdentityHeaders: Schema.TaggedStruct<
        "CommandIdentityHeaders",
        { readonly subject: Schema.String }
      >
      readonly GroupTarget: Schema.TaggedStruct<"GroupTarget", { readonly subject: Schema.String }>
      readonly GroupIdentifiers: Schema.TaggedStruct<"GroupIdentifiers", { readonly subject: Schema.String }>
      readonly GroupIdentity: Schema.TaggedStruct<"GroupIdentity", { readonly subject: Schema.String }>
      readonly GroupConflict: Schema.TaggedStruct<"GroupConflict", { readonly subject: Schema.String }>
      readonly DuplicateContracts: Schema.TaggedStruct<"DuplicateContracts", { readonly subject: Schema.String }>
      readonly RootCollision: Schema.TaggedStruct<
        "RootCollision",
        { readonly subject: Schema.String; readonly previous: Schema.String }
      >
      readonly AnnotationTarget: Schema.TaggedStruct<
        "AnnotationTarget",
        { readonly subject: Schema.String; readonly annotation: Schema.String }
      >
      readonly DuplicateAnnotation: Schema.TaggedStruct<
        "DuplicateAnnotation",
        { readonly subject: Schema.String; readonly annotation: Schema.String }
      >
      readonly ExternalGroup: Schema.TaggedStruct<
        "ExternalGroup",
        {
          readonly subject: Schema.String
          readonly root: Schema.String
          readonly group: Schema.String
          readonly missing: Schema.Literals<readonly ["group", "root"]>
        }
      >
      readonly DuplicateProblems: Schema.TaggedStruct<"DuplicateProblems", { readonly subject: Schema.String }>
      readonly ProblemsExposure: Schema.TaggedStruct<"ProblemsExposure", { readonly subject: Schema.String }>
      readonly MalformedProblems: Schema.TaggedStruct<
        "MalformedProblems",
        { readonly subject: Schema.String; readonly validationMessage: Schema.String }
      >
      readonly ProblemsIdentifier: Schema.TaggedStruct<"ProblemsIdentifier", { readonly subject: Schema.String }>
      readonly ProblemsCodes: Schema.TaggedStruct<"ProblemsCodes", { readonly subject: Schema.String }>
    }>
  >
  EFFX2403: Definition<
    {
      readonly code: "EFFX2403"
      readonly owner: "http"
      readonly title: "Invalid external HTTP binding"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "Externally bound operations need a contract and metadata.operationId of the form group.endpointKey. Endpoint keys are identifier-safe and unique. A root/group cannot mix local and external bindings."
      readonly examples: readonly [
        {
          readonly before: 'metadata: { operationId: "get-user" }'
          readonly after: 'metadata: { operationId: "users.getUser" }'
          readonly explanation: "Use the declared group prefix and a unique identifier-safe endpoint key; keep every binding in a group consistently local or external."
        }
      ]
    },
    Schema.TaggedUnion<{
      readonly MissingId: Schema.TaggedStruct<"MissingId", { readonly subject: Schema.String }>
      readonly InvalidId: Schema.TaggedStruct<
        "InvalidId",
        { readonly subject: Schema.String; readonly group: Schema.String }
      >
      readonly DuplicateKey: Schema.TaggedStruct<
        "DuplicateKey",
        { readonly subject: Schema.String; readonly operationId: Schema.String; readonly previous: Schema.String }
      >
      readonly MixedBindings: Schema.TaggedStruct<
        "MixedBindings",
        {
          readonly subject: Schema.String
          readonly root: Schema.String
          readonly group: Schema.String
          readonly previous: Schema.String
        }
      >
      readonly MissingContract: Schema.TaggedStruct<"MissingContract", { readonly subject: Schema.String }>
    }>
  >
  EFFX2404: Definition<
    {
      readonly code: "EFFX2404"
      readonly owner: "http"
      readonly title: "Invalid HTTP group association"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "Group associations require an operation and exactly one exported Http.group value or @Http.Group class. Multiple group declarations, repeated .in(Group), unresolved references and malformed associations are rejected."
      readonly examples: readonly [
        {
          readonly before: "Operation.query({ input: Input, output: Output }).in(Users).in(Users)"
          readonly after: "Operation.query({ input: Input, output: Output }).in(Users)"
          readonly explanation: "Associate the operation once with one exported group; remove duplicate decorators and ensure the reference resolves to the group itself."
        }
      ]
    },
    Schema.TaggedUnion<{
      readonly NotOperation: Schema.TaggedStruct<"NotOperation", { readonly subject: Schema.String }>
      readonly MultipleAssociations: Schema.TaggedStruct<"MultipleAssociations", { readonly subject: Schema.String }>
      readonly MalformedAssociation: Schema.TaggedStruct<"MalformedAssociation", { readonly subject: Schema.String }>
      readonly UnresolvedReference: Schema.TaggedStruct<"UnresolvedReference", { readonly subject: Schema.String }>
      readonly InvalidAssociation: Schema.TaggedStruct<"InvalidAssociation", { readonly subject: Schema.String }>
      readonly MultipleDeclarations: Schema.TaggedStruct<"MultipleDeclarations", { readonly subject: Schema.String }>
      readonly MultipleIn: Schema.TaggedStruct<"MultipleIn", { readonly subject: Schema.String }>
      readonly InTarget: Schema.TaggedStruct<"InTarget", { readonly subject: Schema.String }>
    }>
  >
  EFFX2405: Definition<
    {
      readonly code: "EFFX2405"
      readonly owner: "http"
      readonly title: "Conflicting HTTP group defaults"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "An associated HTTP operation still requires an explicit Http.Contract. Its explicit root/group must agree with its group. query: true only derives a GET Query input not already assigned to another channel."
      readonly examples: readonly [
        {
          readonly before: '@Http.Contract({ root: "other", group: "users", success: User })'
          readonly after: '@Http.Contract({ root: "api", group: "users", success: User })'
          readonly explanation: "Align the contract with the associated group whose root is api; remove an invalid query default or specify its channel explicitly."
        }
      ]
    },
    Schema.TaggedUnion<{
      readonly GroupConflict: Schema.TaggedStruct<"GroupConflict", { readonly subject: Schema.String }>
      readonly MissingContract: Schema.TaggedStruct<"MissingContract", { readonly subject: Schema.String }>
      readonly RootConflict: Schema.TaggedStruct<"RootConflict", { readonly subject: Schema.String }>
      readonly QueryDefault: Schema.TaggedStruct<"QueryDefault", { readonly subject: Schema.String }>
    }>
  >
  EFFX2406: Definition<
    {
      readonly code: "EFFX2406"
      readonly owner: "http"
      readonly title: "Generated HTTP export collision"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "Different root/group identities can normalize to the same generated class, API or handler export. Empty groups are checked too."
      readonly examples: readonly [
        {
          readonly before: 'Http.group({ root: "api", group: "user-list" })\nHttp.group({ root: "api", group: "user_list" })'
          readonly after: 'Http.group({ root: "api", group: "user-list" })\nHttp.group({ root: "api", group: "accounts" })'
          readonly explanation: "Rename one group so its generated export names no longer collide."
        }
      ]
    },
    Schema.Struct<{ readonly name: Schema.String; readonly first: Schema.String; readonly second: Schema.String }>
  >
  EFFX2410: Definition<
    {
      readonly code: "EFFX2410"
      readonly owner: "http"
      readonly title: "Ambiguous or conflicting request channels"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "An input marked Http.headers cannot also be a body or compete with another headers schema. When input fields mix route parameters and other fields, the compiler will not invent split schemas: explicitly declare params and query or payload."
      readonly examples: readonly [
        {
          readonly before: '@Http.Get("/users/:id")\n@Http.Contract({ group: "users", success: User })'
          readonly after: '@Http.Get("/users/:id")\n@Http.Contract({ group: "users", params: UserId, query: Search, success: User })'
          readonly explanation: "Split id into UserId and search fields into Search; for mutating verbs declare payload instead of query. A headers-marked input must use the same headers channel."
        }
      ]
    },
    Schema.TaggedUnion<{
      readonly HeaderConflict: Schema.TaggedStruct<"HeaderConflict", { readonly subject: Schema.String }>
      readonly MixedFields: Schema.TaggedStruct<
        "MixedFields",
        {
          readonly subject: Schema.String
          readonly params: Schema.$Array<Schema.String>
          readonly fields: Schema.$Array<Schema.String>
          readonly body: Schema.Literals<readonly ["query", "payload"]>
        }
      >
    }>
  >
  EFFX2411: Definition<
    {
      readonly code: "EFFX2411"
      readonly owner: "http"
      readonly title: "Unknown request input field keys"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "GET or DELETE with path parameters and input keys unavailable to static analysis cannot distinguish params from query. Either explicit channel resolves this ambiguity."
      readonly examples: readonly [
        {
          readonly before: '@Http.Get("/users/:id")\n@Http.Contract({ group: "users", success: User })'
          readonly after: '@Http.Get("/users/:id")\n@Http.Contract({ group: "users", params: UserId, query: Search, success: User })'
          readonly explanation: "Declare the request channels explicitly rather than relying on inaccessible input keys."
        }
      ]
    },
    Schema.Struct<{ readonly subject: Schema.String; readonly verb: Schema.Literals<readonly ["Get", "Delete"]> }>
  >
  EFFX2412: Definition<
    {
      readonly code: "EFFX2412"
      readonly owner: "http"
      readonly title: "Invalid problem identifier naming pattern"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "naming.problemIdentifier is data, not a function. Only {Group}, {Key}, {group} and {key} are allowed, at least one Key/key placeholder is required, and each expansion must be a safe identifier. Explicit problem identifiers still override a valid naming policy."
      readonly examples: readonly [
        {
          readonly before: 'defineConfig({ naming: { problemIdentifier: "{Group}Problem" } })'
          readonly after: 'defineConfig({ naming: { problemIdentifier: "{Group}{Key}Problem" } })'
          readonly explanation: "Include the endpoint key and use only supported placeholders and identifier characters."
        }
      ]
    },
    Schema.Struct<{ readonly pattern: Schema.String; readonly reason: Schema.String }>
  >
  EFFX2413: Definition<
    {
      readonly code: "EFFX2413"
      readonly owner: "http"
      readonly title: "Derived problem identifiers collide"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "Two operations derive the same problem identifier but declare different problem code lists. Equal code lists may share a name. Explicit identifier overrides are not derived collisions and remain caller-owned."
      readonly examples: readonly [
        {
          readonly before: 'defineConfig({ naming: { problemIdentifier: "{Key}Problem" } })'
          readonly after: 'defineConfig({ naming: { problemIdentifier: "{Group}{Key}Problem" } })'
          readonly explanation: "Disambiguate the pattern or explicitly name a deliberately shared problem union."
        }
      ]
    },
    Schema.Struct<{ readonly identifier: Schema.String; readonly first: Schema.String; readonly second: Schema.String }>
  >
  EFFX2414: Definition<
    {
      readonly code: "EFFX2414"
      readonly owner: "http"
      readonly title: "Access decision time cannot be inferred"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "Http.Access omits decisionTime, but its declaration has no single Query or Command from which to infer SnapshotRead or Transaction."
      readonly examples: readonly [
        {
          readonly before: "@Http.Access({ ...accessOptions })"
          readonly after: '@Http.Access({ ...accessOptions, decisionTime: "Transaction" })'
          readonly explanation: "Write decisionTime explicitly, or attach access to exactly one operation of the intended kind."
        }
      ]
    },
    Schema.Struct<{ readonly subject: Schema.String }>
  >
  EFFX2415: Definition<
    {
      readonly code: "EFFX2415"
      readonly owner: "http"
      readonly title: "Concrete HTTP endpoint inventory unavailable"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "Endpoint inventory is a handler-factory generation precondition, never a declaration-lowering check: contract-only emission never reports EFFX2415. A concrete HttpApi root must prove finite required group and endpoint keys with matching literal identifiers; only groups whose handler factories are being emitted need their declared endpoints checked. An unresolved root leaf rejects the whole root because its unknown identifier may replace a healthy group. Report one root-level diagnostic naming the unresolved leaf, not cascading group diagnostics, and emit no factory using that root. Earlier fatal diagnostics defer inventory proof. Generate every contract imported by the authored root before handler generation, including groups outside the current invocation. Cold --emit=all is atomic and writes nothing, including no contract or manifest: contract-first is required. A failed build preserves previously owned handler outputs and publishes no partial ownership record."
      readonly examples: readonly [
        {
          readonly before: "effx build --emit=all  // cold: authored root imports missing generated contracts"
          readonly after: "effx build --emit=contract  // every group imported by the root\neffx build --emit=handlers"
          readonly explanation: "Bootstrap every imported group contract before proving handlers. Full-root contracts support full-root or healthy-only handlers; healthy-only contracts cannot bootstrap a missing unrelated group. Fix the unresolved leaf named by the root diagnostic before emitting any factory for that root."
        }
      ]
    },
    Schema.TaggedUnion<{
      readonly NoCandidate: Schema.TaggedStruct<"NoCandidate", { readonly root: Schema.String }>
      readonly UnprovenRoot: Schema.TaggedStruct<
        "UnprovenRoot",
        { readonly root: Schema.String; readonly inventoryIssue: Schema.String }
      >
      readonly InventoryUnavailable: Schema.TaggedStruct<"InventoryUnavailable", { readonly root: Schema.String }>
      readonly MissingInventory: Schema.TaggedStruct<
        "MissingInventory",
        { readonly root: Schema.String; readonly group: Schema.String }
      >
      readonly MissingEndpoint: Schema.TaggedStruct<
        "MissingEndpoint",
        {
          readonly subject: Schema.String
          readonly root: Schema.String
          readonly group: Schema.String
          readonly key: Schema.String
        }
      >
    }>
  >
  EFFX2420: Definition<
    {
      readonly code: "EFFX2420"
      readonly owner: "http"
      readonly title: "Invalid binding group"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "The first argument must resolve to an exported Http.group value or @Http.Group class."
      readonly examples: readonly [
        {
          readonly before: "Binding.group(value, options)"
          readonly after: "Binding.group(Group, { handlers, guards })"
          readonly explanation: "Bind an exported group declaration."
        }
      ]
    },
    Schema.Struct<{ readonly subject: Schema.String }>
  >
  EFFX2421: Definition<
    {
      readonly code: "EFFX2421"
      readonly owner: "http"
      readonly title: "Invalid binding function"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "Handlers, guards and guardFor must resolve to exported functions. Inline callbacks and unexported values cannot be imported by generated code."
      readonly examples: readonly [
        {
          readonly before: "Binding.group(value, options)"
          readonly after: "Binding.group(Group, { handlers, guards })"
          readonly explanation: "Export the function and reference its symbol."
        }
      ]
    },
    Schema.Struct<{ readonly subject: Schema.String }>
  >
  EFFX2422: Definition<
    {
      readonly code: "EFFX2422"
      readonly owner: "http"
      readonly title: "Duplicate group binding"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "A canonical group symbol may have only one backend binding."
      readonly examples: readonly [
        {
          readonly before: "Binding.group(value, options)"
          readonly after: "Binding.group(Group, { handlers, guards })"
          readonly explanation: "Keep one binding for this group."
        }
      ]
    },
    Schema.Struct<{ readonly subject: Schema.String }>
  >
  EFFX2423: Definition<
    {
      readonly code: "EFFX2423"
      readonly owner: "http"
      readonly title: "Invalid binding choices"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "A binding requires handlers and exactly one of guards or guardFor."
      readonly examples: readonly [
        {
          readonly before: "Binding.group(value, options)"
          readonly after: "Binding.group(Group, { handlers, guards })"
          readonly explanation: "Supply handlers and one guard factory."
        }
      ]
    },
    Schema.Struct<{ readonly subject: Schema.String }>
  >
  EFFX2424: Definition<
    {
      readonly code: "EFFX2424"
      readonly owner: "http"
      readonly title: "Invalid binding ownership"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "A bound group must own at least one external operation and no locally implemented operation. Native endpoints outside effx remain supported by native mixed completion."
      readonly examples: readonly [
        {
          readonly before: "Binding.group(value, options)"
          readonly after: "Binding.group(Group, { handlers, guards })"
          readonly explanation: "Bind a wholly external effx group."
        }
      ]
    },
    Schema.Struct<{ readonly subject: Schema.String }>
  >
  EFFX2500: Definition<
    {
      readonly code: "EFFX2500"
      readonly owner: "access"
      readonly title: "Malformed or duplicate access contract"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "Access annotations and semantic contracts must be singular. Malformed AccessContract data includes the Schema validator detail after the stable prefix."
      readonly examples: readonly [
        {
          readonly before: "@Http.Access(accessOptions)\n@Http.Access(accessOptions)"
          readonly after: "@Http.Access(accessOptions)"
          readonly explanation: "Remove the duplicate. For malformed data, correct the fields named by the validator; extension producers must conform to AccessContractData."
        }
      ]
    },
    Schema.TaggedUnion<{
      readonly DuplicateAnnotation: Schema.TaggedStruct<
        "DuplicateAnnotation",
        { readonly subject: Schema.String; readonly annotation: Schema.String }
      >
      readonly DuplicateContract: Schema.TaggedStruct<"DuplicateContract", { readonly subject: Schema.String }>
      readonly Malformed: Schema.TaggedStruct<
        "Malformed",
        { readonly subject: Schema.String; readonly validationMessage: Schema.String }
      >
    }>
  >
  EFFX2501: Definition<
    {
      readonly code: "EFFX2501"
      readonly owner: "access"
      readonly title: "Command access decides in a read snapshot"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "A Command cannot authorize from a read snapshot unless it makes the constrained snapshotDecisionForCommand claim. Ordinary command decisions belong in its transaction."
      readonly examples: readonly [
        {
          readonly before: 'decisionTime: "SnapshotRead"'
          readonly after: 'decisionTime: "Transaction"'
          readonly explanation: "Decide access inside the mutation transaction, so the decision and write share the relevant state."
        }
      ]
    },
    Schema.Struct<{ readonly subject: Schema.String }>
  >
  EFFX2502: Definition<
    {
      readonly code: "EFFX2502"
      readonly owner: "access"
      readonly title: "Query declares a transaction decision"
      readonly severity: "warning"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "A Query with decisionTime Transaction is accepted with a warning: the usual read-only access decision uses SnapshotRead."
      readonly examples: readonly [
        {
          readonly before: 'decisionTime: "Transaction"'
          readonly after: 'decisionTime: "SnapshotRead"'
          readonly explanation: "Use a snapshot read decision unless the query intentionally needs transactional decision semantics."
        }
      ]
    },
    Schema.Struct<{ readonly subject: Schema.String }>
  >
  EFFX2503: Definition<
    {
      readonly code: "EFFX2503"
      readonly owner: "access"
      readonly title: "Protected access lacks security middleware"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "Protected HTTP access needs a security middleware marker in Http.Contract. Declaring capabilities alone does not authenticate requests."
      readonly examples: readonly [
        {
          readonly before: '@Http.Contract({ group: "users", success: User })'
          readonly after: '@Http.Contract({ group: "users", success: User, middleware: [Security] })'
          readonly explanation: "Include the exported middleware marker declared with security: true, whose application implementation authenticates the accepted credentials."
        }
      ]
    },
    Schema.Struct<{ readonly subject: Schema.String }>
  >
  EFFX2504: Definition<
    {
      readonly code: "EFFX2504"
      readonly owner: "access"
      readonly title: "HTTP exposure lacks access declaration"
      readonly severity: "warning"
      readonly severityPolicy: {
        readonly kind: "named"
        readonly name: "strictAccess"
        readonly description: "Warning by default; error when strictAccess is true."
        readonly allowedSeverities: readonly ["warning", "error"]
      }
      readonly explanation: "HTTP exposure requires an explicit @Http.Access contract. This is a warning by default and an error under strictAccess (including --strict-access). Declare public access explicitly too; absence is not a public-access contract."
      readonly examples: readonly [
        {
          readonly before: '@Query(...)\n@Http.Get("/users")'
          readonly after: '@Query(...)\n@Http.Get("/users")\n@Http.Access(accessOptions)'
          readonly explanation: "Declare an access contract with the intended credentials, principal kinds, capabilities, scope resolver and decision time. Do not disable strict mode to hide missing access."
        }
      ]
    },
    Schema.Struct<{ readonly subject: Schema.String; readonly strictAccess: Schema.Boolean }>
  >
  EFFX2505: Definition<
    {
      readonly code: "EFFX2505"
      readonly owner: "access"
      readonly title: "HTTP root mixes visibility modes"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "A generated ForApi client exposes its entire root. Internal and External operations cannot share a root; visibility must be uniform."
      readonly examples: readonly [
        {
          readonly before: 'root: "api", exposure: "Internal"\nroot: "api", exposure: "External"'
          readonly after: 'root: "internalApi", exposure: "Internal"\nroot: "api", exposure: "External"'
          readonly explanation: "Separate internal and external operations into different roots, or align their intended visibility."
        }
      ]
    },
    Schema.Struct<{ readonly root: Schema.String }>
  >
  EFFX2506: Definition<
    {
      readonly code: "EFFX2506"
      readonly owner: "access"
      readonly title: "Invalid command snapshot decision claim"
      readonly severity: "error"
      readonly severityPolicy: { readonly kind: "fixed" }
      readonly explanation: "snapshotDecisionForCommand requires a Command, SnapshotRead decision time, no requirements, exactly ObjectCapability credentials and exactly CapabilityHolder principals. All violated conditions are reported in their original order. An accepted shape is a reviewable assertion, not proof of resolver or guard behavior."
      readonly examples: readonly [
        {
          readonly before: 'snapshotDecisionForCommand: true, decisionTime: "Transaction"'
          readonly after: 'snapshotDecisionForCommand: false, decisionTime: "Transaction"'
          readonly explanation: "Remove the claim and use transactional command authorization. Only retain a snapshot claim when every narrow capability-only condition holds and the resolver/guard have been reviewed."
        }
      ]
    },
    Schema.Struct<{
      readonly subject: Schema.String
      readonly violations: Schema.$Array<
        Schema.Literals<
          readonly [
            "only a Command may claim a snapshot decision",
            'decisionTime must be "SnapshotRead"',
            "requirements must be empty",
            'acceptedCredentials must be exactly ["ObjectCapability"]',
            'principalKinds must be exactly ["CapabilityHolder"]'
          ]
        >
      >
    }>
  >
}

httpEntries

Declaration list retained before indexing so composition can detect duplicates.

Signature

declare const httpEntries: ReadonlyArray<{
  readonly code: string
  readonly owner: string
  readonly title: string
  readonly severity: "error" | "warning" | "info"
  readonly severityPolicy:
    | { readonly kind: "fixed" }
    | {
        readonly kind: "named"
        readonly name: string
        readonly description: string
        readonly allowedSeverities: readonly ["error" | "warning" | "info", ...("error" | "warning" | "info")[]]
      }
  readonly explanation: string
  readonly examples: readonly [
    {
      readonly before: string
      readonly after: string
      readonly explanation: string
      readonly language?: string | undefined
    },
    ...{
      readonly before: string
      readonly after: string
      readonly explanation: string
      readonly language?: string | undefined
    }[]
  ]
}>

missingAccessSeverity

EFFX2504 severity authority shared by emission and access-mode boundary validation.

Signature

declare const missingAccessSeverity: (strictAccess: boolean) => "warning" | "error"

On this page