import { BuildCreateCardPolicyTemplateRequestResult } from './buildCreateCardPolicyTemplateRequest'; import { CardPolicyModeValue } from './cardPolicyCreateFormValues'; import { CardPolicyFormValues } from './cardPolicyForm/cardPolicyFormTypes'; export interface BuildCreateCardPolicyTemplateRequestFromInteractiveFormArgs { /** AI CFO interactive form values produced on the review step submit. */ values: CardPolicyFormValues; /** * Optional description to attach. Defaults to an empty string — the * AI CFO form doesn't collect a description. */ description?: string; /** * Default `mode` to send. The AI CFO form has no strict / flexible * selector today, so we default to `"strict"` (matching the manual * create page's default). Callers may override if product requires. */ mode?: CardPolicyModeValue; } /** * AI CFO twin of `buildCreateCardPolicyTemplateRequest`. Maps the AI CFO * `CardPolicyFormValues` (no top-level `name` / `mode` / `description`) * to the wire-ready `CreateCardPolicyTemplateRequest` payload. * * Naming rules: * - `name` is read from the first checked row of `policiesReview`. The * review step always renders at least one row (seeded from the * extracted `policyName` when in `upload`, or built from the * vendor / category / limit slices in `guided`). If somehow no * row is checked, the first row's name is used as the fallback. * - `description` is preserved verbatim from `args.description` (default `""`). * - `mode` is `args.mode ?? "strict"`. * * Body construction is mode-aware (driven by `values.policyKind`): * - `auto` / `upload`: the active review row's chip groups are the * canonical source of truth, projected via * `projectAutoReviewRowToCardPolicyRequestParts`. For `auto` the * source slices stay empty by design; for `upload` the source * slices are extract-only and can omit items returned by the * recommendation wizard plan (e.g. restricted MCC categories * surfaced only in the review), so reading source slices would * drop those user-visible items. Active row = "first checked, * fallback to first row" so name + chips line up. * - `guided`: source slices are canonical (kept in sync with * review-step edits by `useReviewChipEditBridge`); body is built * via the shared helpers in `cardPolicyRequestParts.ts`. */ export declare const buildCreateCardPolicyTemplateRequestFromInteractiveForm: ({ values, mode, description, }: BuildCreateCardPolicyTemplateRequestFromInteractiveFormArgs) => BuildCreateCardPolicyTemplateRequestResult;