import type { Comparator } from './compare.ts'; /** * The order of keys within an IAM policy document, then any remaining key * alphabetically. This is the single place to amend the document order. */ export declare const POLICY_DOCUMENT_ORDER: readonly string[]; /** * The order of keys within a single IAM policy statement, then any remaining key * alphabetically. This is the single place to amend the statement order. */ export declare const POLICY_STATEMENT_ORDER: readonly string[]; /** * Comparator for the keys of an IAM policy document object. Recognized keys are * ordered by {@link POLICY_DOCUMENT_ORDER}; any other key is placed after them * and sorted alphabetically among the rest. */ export declare const comparePolicyDocument: Comparator; /** * Comparator for the keys of a single IAM policy statement object. Recognized * keys are ordered by {@link POLICY_STATEMENT_ORDER}; any other key is placed * after them and sorted alphabetically among the rest. */ export declare const comparePolicyStatement: Comparator; /** * Resolves the comparator for an object at `path` whose contents are `object`, * when that position is an IAM-style policy document or one of its statements; * returns `undefined` for every other position (the caller then falls back to * alphabetical ordering). * * The binding is purely positional - see {@link POLICY_DOCUMENT_PATHS} - and * matched exactly, never by a subtree walk, so a matching key name anywhere else * is left alone. As the guard that keeps a path-only binding safe, an * intrinsic-function object (a lone `Ref` or `Fn::*` key, e.g. an `Fn::If` * selecting between documents) at a bound path is treated as not a literal * document and left alone. Values that are not objects (e.g. a * `RepositoryPolicyText` JSON string) never reach here, an absent `Statement` * simply has nothing to order, and a non-object statement entry is likewise left * untouched - all by falling through to the normal handling. */ export declare function resolvePolicyComparator(path: readonly string[], object: Readonly>): Comparator | undefined;