/** * Sparse Fieldsets — filter output fields based on a dot-separated pattern list. * * Patterns use dot-separated paths with a `*` wildcard that matches * any single segment at the end. Examples: * * `["id", "price", "legs.*"]` * * `"id"` matches the top-level `id` field. * `"legs.*"` matches any immediate child of `legs` (e.g. `legs.duration`). * * If `requestedFields` is `undefined` or empty, all fields are included. */ /** * Returns `true` when the given output field path is matched by at least * one pattern in `requestedFields`. * * A field is included when: * - `requestedFields` is undefined/empty (no filter — include everything) * - An exact pattern matches the field name (e.g. `"id"` matches `"id"`) * - A parent pattern matches (e.g. `"legs"` matches `"legs"` and `"legs.duration"`) * - A wildcard pattern matches (e.g. `"legs.*"` matches `"legs.duration"`) * - The field is an ancestor of a requested deeper path * (e.g. `"legs.duration"` means `"legs"` must be included) */ export declare function matchesRequestedFields(fieldPath: string, requestedFields: string[] | undefined): boolean; /** * Filter a set of top-level output field names against `requestedFields`. * Returns the filtered set. If `requestedFields` is undefined/empty, * returns the original set unchanged. */ export declare function filterOutputFields(outputFields: Set, requestedFields: string[] | undefined): Set; //# sourceMappingURL=requested-fields.d.ts.map