import { z } from 'zod'; import type { CommandOptionMeta } from './command-types.js'; declare const odataQuerySchema: z.ZodObject<{ top: z.ZodOptional; skip: z.ZodOptional; select: z.ZodOptional; filter: z.ZodOptional; orderby: z.ZodOptional; expand: z.ZodOptional; }, z.core.$strip>; type ODataQueryParams = z.infer; declare const appendOData: (path: string, params: ODataQueryParams) => string; declare const odataQueryOptions: ReadonlyArray; /** * Subset for single-resource GETs that support `$select` and `$expand` but * have no collection to slice (`$top`/`$skip`/`$filter`/`$orderby` make no * sense). Keeping this as a separate Zod fragment lets `buildSelectableCommand` * advertise only the two relevant flags in `--help`. */ declare const selectExpandSchema: z.ZodObject<{ select: z.ZodOptional; expand: z.ZodOptional; }, z.core.$strip>; type SelectExpandParams = z.infer; declare const selectExpandOptions: ReadonlyArray; /** * Subset for collection endpoints that Microsoft documents as supporting only * `$filter` + `$select` (e.g. `/teams/{id}/channels`). Advertising the other * OData passthroughs would be a usability lie since Graph rejects them with * `BadRequest`. */ declare const filterSelectSchema: z.ZodObject<{ filter: z.ZodOptional; select: z.ZodOptional; }, z.core.$strip>; type FilterSelectParams = z.infer; declare const filterSelectOptions: ReadonlyArray; /** * Subset for collection endpoints that REJECT `$skip` with * `invalidRequest: $skip is not supported on this API. Only URLs returned * by the API can be used to page.` (e.g. `/sites/{id}/lists`). Drop --skip * from the advertised flags; pagination still works via `nextLink` → * `next-page`. */ declare const noSkipShape: Omit; declare const noSkipOptions: ReadonlyArray; type ODataKey = keyof typeof odataQuerySchema.shape; /** * Returns a zod-extension shape containing ONLY the named OData fields. * Use for endpoints where Graph silently ignores some passthroughs — the * CLI advertises only the ones the endpoint honors. */ declare const pickODataShape: (keys: ReadonlyArray) => Pick; /** * Returns the matching CommandOptionMeta entries for use in `meta.options`. * Order is preserved from the canonical `odataQueryOptions` definition. */ declare const pickODataOptions: (keys: ReadonlyArray) => ReadonlyArray; /** * Subset for delta-tracking endpoints where Graph silently ignores every * OData passthrough except `$top` (which itself must be translated to a * `Prefer: odata.maxpagesize` header — `$top` as a query parameter returns * `ErrorInvalidUrlQuery`). The CLI keeps `--top` as the user-facing flag * and drops the others rather than advertising no-ops. */ declare const topOnlyShape: Pick<{ top: z.ZodOptional; skip: z.ZodOptional; select: z.ZodOptional; filter: z.ZodOptional; orderby: z.ZodOptional; expand: z.ZodOptional; }, "top">; declare const topOnlyOptions: readonly CommandOptionMeta[]; /** * Subset for endpoints where Graph honors ONLY `$select` (e.g. * `/me/planner/plans`, `/planner/plans/{id}/buckets` — the other OData * passthroughs are silently dropped server-side). */ declare const selectOnlyShape: Pick<{ top: z.ZodOptional; skip: z.ZodOptional; select: z.ZodOptional; filter: z.ZodOptional; orderby: z.ZodOptional; expand: z.ZodOptional; }, "select">; declare const selectOnlyOptions: readonly CommandOptionMeta[]; export { appendOData, filterSelectOptions, filterSelectSchema, noSkipOptions, noSkipShape, odataQueryOptions, odataQuerySchema, pickODataOptions, pickODataShape, selectExpandOptions, selectExpandSchema, selectOnlyOptions, selectOnlyShape, topOnlyOptions, topOnlyShape, }; export type { FilterSelectParams, ODataKey, ODataQueryParams, SelectExpandParams };