/**
 * @license
 * Copyright 2025 Vybestack LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { z } from 'zod';
/**
 * Zod schema for AuthConfig validation
 * @plan PLAN-20251213issue490 Phase 1
 */
export const AuthConfigSchema = z.discriminatedUnion('type', [
    z.object({
        type: z.literal('oauth'),
        buckets: z.array(z.string()).optional(),
    }),
    z
        .object({
        type: z.literal('apikey'),
    })
        .strict(),
]);
/**
 * Type guard to check if a profile is a load balancer profile
 */
export function isLoadBalancerProfile(profile) {
    return profile.type === 'loadbalancer';
}
/**
 * Type guard to check if a profile is a standard profile
 */
export function isStandardProfile(profile) {
    return profile.type !== 'loadbalancer';
}
/**
 * Type guard to check if a profile has auth configuration
 * @plan PLAN-20251213issue490 Phase 1
 */
export function hasAuthConfig(profile) {
    return isStandardProfile(profile) && profile.auth !== undefined;
}
/**
 * Type guard to check if a profile is OAuth-based
 * @plan PLAN-20251213issue490 Phase 1
 */
export function isOAuthProfile(profile) {
    return isStandardProfile(profile) && profile.auth?.type === 'oauth';
}
//# sourceMappingURL=modelParams.js.map