/** * Canonical discovery-document metadata for operation access policies. * * @module server/access-policy-metadata */ import { z } from 'zod'; import type { AccessPolicy } from './authorization.ts'; import type { ParameterizedAccessHint } from './operation-catalog/types.ts'; export declare const ScopeRequirementMetadataSchema: z.ZodObject<{ kind: z.ZodEnum<{ anyOf: "anyOf"; allOf: "allOf"; }>; scopes: z.ZodArray; }, z.core.$strict>; export declare const AccessPolicyMetadataSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"public">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"authenticated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"scoped">; scopes: z.ZodObject<{ kind: z.ZodEnum<{ anyOf: "anyOf"; allOf: "allOf"; }>; scopes: z.ZodArray; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"optionalAuth">; authenticatedScopes: z.ZodObject<{ kind: z.ZodEnum<{ anyOf: "anyOf"; allOf: "allOf"; }>; scopes: z.ZodArray; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"scopedAlternatives">; alternatives: z.ZodArray; scopes: z.ZodArray; }, z.core.$strict>>; }, z.core.$strict>], "kind">; export declare const ParameterizedAccessMetadataSchema: z.ZodObject<{ discriminator: z.ZodString; defaultValue: z.ZodOptional; variants: z.ZodArray; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"authenticated">; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"scoped">; scopes: z.ZodObject<{ kind: z.ZodEnum<{ anyOf: "anyOf"; allOf: "allOf"; }>; scopes: z.ZodArray; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"optionalAuth">; authenticatedScopes: z.ZodObject<{ kind: z.ZodEnum<{ anyOf: "anyOf"; allOf: "allOf"; }>; scopes: z.ZodArray; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"scopedAlternatives">; alternatives: z.ZodArray; scopes: z.ZodArray; }, z.core.$strict>>; }, z.core.$strict>], "kind">; }, z.core.$strict>>; }, z.core.$strict>; export type AccessPolicyMetadata = z.infer; export type ParameterizedAccessMetadata = z.infer; /** Serialize an operation's static access policy for discovery documents. */ export declare function serializeAccessPolicy(policy: AccessPolicy): AccessPolicyMetadata; /** Serialize discriminator-specific access overrides for discovery documents. */ export declare function serializeParameterizedAccess(hint: ParameterizedAccessHint): ParameterizedAccessMetadata;