import { JsonObject } from 'type-fest'; import { KnownResourceKinds } from '../../utils/knownResourceKinds.js'; import { Resource } from '../../common/types.js'; export declare type SiblingMatcher = (source: Resource, target: Resource, value: string | undefined, // the actual value of the property to be matched siblingValues: Record, // a map of all sibling property values properties?: JsonObject) => boolean; declare type RefSource = { pathParts: string[]; siblingMatchers?: Record; matcherProperties?: Record; isOptional?: boolean; }; declare type RefTarget = { kind: string; pathParts?: string[]; }; /** * Type is used when * * @types * - path: can be used within Kustomization to refer to other files/directories * - pairs: Used for label selectors * - image: used for Docker images * - name: Used for everything else */ export declare type RefMapper = { type: 'path' | 'name' | 'pairs' | 'image' | 'owner'; source: RefSource; target: RefTarget; shouldCreateUnsatisfiedRef?: (refMapper: RefMapper, sourceResource: Resource, siblingValues: Record) => boolean; }; export declare function getOutgoingRefMappers(kind: string): RefMapper[]; export declare const OUTGOING_MAPPERS_BY_KIND: Partial>; export declare const OUTGOING_MAPPERS: RefMapper[]; export {};