{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/me":{"get":{"summary":"Me","description":"The signed-in user, or 401 (from `verify_session`) if there is no valid session.","operationId":"me_api_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}}}},"/api/logout":{"get":{"summary":"Logout","description":"Clear the session cookie. Open (no session) so an expired session can still log out.","operationId":"logout_api_logout_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/version":{"get":{"summary":"Version","description":"The deployed build, for the client to compare against its own. Open, like `/health`.","operationId":"version_api_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuildVersion"}}}}}}},"/auth/google/login":{"get":{"tags":["authentication"],"summary":"Google Login","description":"Redirect to Google's consent screen, stashing the handshake state (CSRF state, PKCE\nverifier, post-login redirect) in short-lived cookies.","operationId":"google_login_auth_google_login_get","parameters":[{"name":"redirectUrl","in":"query","required":false,"schema":{"type":"string","default":"/","title":"Redirecturl"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/google/callback":{"get":{"tags":["authentication"],"summary":"Google Callback","description":"Exchange the authorization code, establish a session, and redirect to the post-login\npage.","operationId":"google_callback_auth_google_callback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/microsoft/login":{"get":{"tags":["authentication"],"summary":"Microsoft Login","description":"Redirect to Microsoft's consent screen, stashing the MSAL flow state and post-login\nredirect in short-lived cookies.","operationId":"microsoft_login_auth_microsoft_login_get","parameters":[{"name":"redirectUrl","in":"query","required":false,"schema":{"type":"string","default":"/","title":"Redirecturl"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/microsoft/callback":{"get":{"tags":["authentication"],"summary":"Microsoft Callback","description":"Exchange the authorization code via the stashed MSAL flow, establish a session, and\nredirect to the post-login page.","operationId":"microsoft_callback_auth_microsoft_callback_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/jmg/estimates/{estimate_id}":{"get":{"summary":"Get Estimate","description":"One estimate with header totals and its lines. Reads our mirror; cannot 503.\n\n`estimate_id` is OUR id, not Method's `RecordID`. A 404 means we do not hold it, not\nthat Method lacks it - an estimate arrives with its customer, so the dealership has to\nbe tracked first, which is what the client says rather than \"not found\".","operationId":"get_estimate_api_jmg_estimates__estimate_id__get","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/pricing":{"get":{"summary":"Get Pricing","description":"Every price book in effect today, with its quantity bands and every priced item.\n\nOne call serves the whole reference page; items are sorted by group then name. Pulls\nfrom Method only when the mirror has aged past its TTL (`POST /refresh` forces one).","operationId":"get_pricing_api_jmg_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBookCatalogResponse"}}}}}}},"/api/jmg/pricing/refresh":{"post":{"summary":"Refresh Pricing","description":"Re-pull the price books from Method now, and return what we then hold.\n\nA POST because it writes (the three reference tables are reconciled against Method).\n`max_age=0` bypasses the TTL but NOT a kind's failure backoff: a Method outage still\nholds the retry off, and the refresh returns what we hold with an unchanged `syncedAt`.","operationId":"refresh_pricing_api_jmg_pricing_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBookCatalogResponse"}}}}}}},"/api/jmg/programs":{"get":{"summary":"List Programs","description":"The eight mailer programs, alphabetically, with their full rotations.\n\nSteps with neither a message nor a letterhead are omitted (real gaps in a rotation's\ntwelve slots, nothing to render); survivors keep their stored `sequenceNumber`. Pulls\nfrom Method only when the mirror has aged past its TTL (`POST /refresh` forces one).","operationId":"list_programs_api_jmg_programs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramCatalogResponse"}}}}}}},"/api/jmg/programs/refresh":{"post":{"summary":"Refresh Programs","description":"Re-pull the rotations from Method now, and return what we then hold.\n\nA POST because it writes (the four reference tables are reconciled against Method).\n`max_age=0` bypasses the TTL but NOT a kind's failure backoff: a Method outage still\nholds the retry off, and the refresh returns what we hold with an unchanged `syncedAt`.","operationId":"refresh_programs_api_jmg_programs_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramCatalogResponse"}}}}}}},"/api/jmg/designs":{"get":{"summary":"List Designs","description":"Every active letterhead in template families, in page order: by section, then code.","operationId":"list_designs_api_jmg_designs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesignLibraryResponse"}}}}}}},"/api/jmg/designs/refresh":{"post":{"summary":"Refresh Designs","description":"Re-pull the letterheads and rotations from Method now, and return the library we then hold.\n\nThe same four tables `/programs/refresh` pulls, so it refreshes Game Plans too. `max_age=0`\nbypasses the TTL but not a kind's failure backoff, like that endpoint.","operationId":"refresh_designs_api_jmg_designs_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DesignLibraryResponse"}}}}}}},"/api/jmg/drop-calendars":{"get":{"summary":"List Drop Calendars","description":"This month and the next few, each with its saved dates. Unconfigured months come back\nempty; ``months`` widens the window the page pages through.","operationId":"list_drop_calendars_api_jmg_drop_calendars_get","parameters":[{"name":"months","in":"query","required":false,"schema":{"type":"integer","maximum":24,"minimum":1,"default":6,"title":"Months"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropCalendarWindow"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/drop-calendars/{month}":{"put":{"summary":"Save Drop Calendar","description":"Save one month's dates. ``month`` is any day in it; it is normalised to the first.\n\nA campaign's drops may fall anywhere in the plan month, the whole month before it, or the\nwhole month after it: JMG routinely mails the September plan's D1 in late August, and a\nplan can equally slip a drop into the following month. Mail drops come back sorted and\ndeduplicated, since their order is what a split reads for D1 and D2.","operationId":"save_drop_calendar_api_jmg_drop_calendars__month__put","parameters":[{"name":"month","in":"path","required":true,"schema":{"type":"string","format":"date","title":"Month"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveDropCalendarRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropCalendarMonth"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/estimates":{"get":{"summary":"List Planner Estimates","description":"Projected estimates in the month-aligned planner window.\n\nSee :func:`planner_window` for the span. It starts at the 1st, not today, so a proposal\nfor a drop earlier this month still counts as this month's work.","operationId":"list_planner_estimates_api_jmg_planner_estimates_get","parameters":[{"name":"order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PlannerOrder","description":"`customer` = alphabetical by customer (default); `recent` = most recently created first","default":"customer"},"description":"`customer` = alphabetical by customer (default); `recent` = most recently created first"},{"name":"q","in":"query","required":false,"schema":{"type":"string","description":"Case-insensitive substring filter on customer name","default":"","title":"Q"},"description":"Case-insensitive substring filter on customer name"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectedEstimateList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/estimates/{estimate_id}":{"get":{"summary":"Get Planner Estimate","description":"One projected estimate by OUR UUID (not a Method `RecordID`), with its full line list.\nDistinct from `/estimates/{id}`, which reads real Method estimates. 404 if unknown.","operationId":"get_planner_estimate_api_jmg_planner_estimates__estimate_id__get","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectedEstimateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Planner Estimate","description":"Write the reviewer's note on this projection. It becomes Method's `Memo` on approval.\n\nNull or blank clears it. Returns the whole estimate (one response shape for every write\nhere), but nothing is repriced.\n\n400 for an estimate no longer ours to edit, or a note past Method's 4,000-char ceiling. 404 when unknown.","operationId":"update_planner_estimate_api_jmg_planner_estimates__estimate_id__patch","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEstimateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectedEstimateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/estimates/{estimate_id}/line-options":{"get":{"summary":"Get Planner Estimate New Line Options","description":"Everything a reviewer could add to this estimate: which programs, and what from each.\n\nA separate endpoint from the per-line `/lines/{line_id}/options` because that one anchors\non the line's own `(sequence, program)`, which a not-yet-existing line has none of.\n\n404 when the estimate is unknown, or we no longer hold its dealership. Not gated on\nstatus: what may be created is enforced on the write.","operationId":"get_planner_estimate_new_line_options_api_jmg_planner_estimates__estimate_id__line_options_get","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewLineOptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/estimates/{estimate_id}/lines/{line_id}/options":{"get":{"summary":"Get Planner Estimate Line Options","description":"Everything this line could be changed to: messaging, design, and print config - one\npayload, since the three are one decision. What bounds each is the service's business\n(see `services/projected_estimate/line_options.py`).\n\n404 when the estimate or line is unknown, or we no longer hold its dealership. An add-on\nanswers with empty lists and a real drop month rather than a 404: nothing it mails is\nofferable, but a drop date it carries can still be moved.","operationId":"get_planner_estimate_line_options_api_jmg_planner_estimates__estimate_id__lines__line_id__options_get","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineOptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/estimates/{estimate_id}/feedback":{"put":{"summary":"Set Planner Estimate Feedback","description":"Write the caller's feedback on this projection, at any status. Null or blank clears it.\n\nFeedback is for our engineers and never reaches Method - unlike the memo. Returns the whole\nestimate, like every write here. 404 when unknown.","operationId":"set_planner_estimate_feedback_api_jmg_planner_estimates__estimate_id__feedback_put","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectedEstimateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/estimates/{estimate_id}/saved-for-later":{"put":{"summary":"Set Planner Estimate Saved For Later","description":"Save this draft for later, out of the planner's queue, or move it back.\n\nReturns the whole estimate, like every write here. 400 once it is no longer a draft. 404 when\nunknown.","operationId":"set_planner_estimate_saved_for_later_api_jmg_planner_estimates__estimate_id__saved_for_later_put","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedForLaterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectedEstimateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/estimates/{estimate_id}/charges/{item_record_id}":{"patch":{"summary":"Update Planner Estimate Charge","description":"Override what a charge row bills at - a discount, usually - or clear the override.\n\nThe charge is named by its item's Method RecordID (`itemRecordId` on the row), since the\nrows are derived on every read and have no id of their own. Null `amount` puts the row\nback to its computed figure. Returns the whole estimate: the total follows the override.\n\n400 for an estimate no longer ours to edit, or an item with no charge row on it. 404 when\nunknown.","operationId":"update_planner_estimate_charge_api_jmg_planner_estimates__estimate_id__charges__item_record_id__patch","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}},{"name":"item_record_id","in":"path","required":true,"schema":{"type":"integer","title":"Item Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChargeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectedEstimateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/estimates/{estimate_id}/lines/{line_id}":{"patch":{"summary":"Update Planner Estimate Line","description":"Change what a line mails, or how many, and reprice the estimate around it.\n\nThe whole estimate is repriced (a rate is read at the bracket the estimate's total mail\nselects), hence returning the whole estimate. Only the named line changes, but every other\nper-piece line can be repriced: they all tier on the combined count.\n\n`budget` sets the count from dollars instead of `quantity`: the most pieces it buys.\n\nReturns the estimate plus any `callOuts`. Landing this line on a piece another already\ncarries succeeds - it is how a mailer is split by hand - and so does moving its drop onto\na split sibling's day, which is called out. Any drop date is accepted.\n\n400 for an estimate no longer ours to edit, a line that mails nothing, a message no\nprogram carries, an id the book cannot quote, both a quantity and a budget, or a budget\nthat buys no piece or more than one line takes. 404 when unknown.","operationId":"update_planner_estimate_line_api_jmg_planner_estimates__estimate_id__lines__line_id__patch","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Line Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLineRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineWriteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Planner Estimate Line","description":"Take a line off a draft projection and reprice what is left.\n\nReturns the whole estimate, not 204: removing a line moves the charge rows and header\ntotal and can retier a mailer whose split sibling it was. Both halves of a split are\ndeleted separately.\n\nA soft delete - the row stays, carrying the agent's case for a line a human turned down.\n\n400 for an estimate no longer ours to edit, or one the price book cannot quote what is\nleft of. 404 when the estimate or line is unknown, or already removed.","operationId":"delete_planner_estimate_line_api_jmg_planner_estimates__estimate_id__lines__line_id__delete","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Line Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectedEstimateDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/estimates/{estimate_id}/lines":{"post":{"summary":"Create Planner Estimate Line","description":"Add a mail piece to a draft projection and reprice around it.\n\nReturns the whole estimate (the piece brings volume, so a mailer sharing its bracket can\nmove, and every charge row and the header total follow the rates).\n\nOnly the message is required; everything left out is derived from it, so the line arrives\nconfigured the way the agent would have proposed it.\n\nReturns the estimate plus any `callOuts`. Adding a piece the estimate already mails is not\nrefused: it is a mailer split by hand, and it is called out.\n\n400 for an estimate no longer ours to edit, a message that is neither a program's nor an\nemail add-on, an id the book cannot quote, or a flat program given a quantity other than 1.\nAny drop date is accepted. 404 when the estimate is unknown.","operationId":"create_planner_estimate_line_api_jmg_planner_estimates__estimate_id__lines_post","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLineRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineWriteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/estimates/{estimate_id}/lines/{line_id}/duplicate":{"post":{"summary":"Duplicate Planner Estimate Line","description":"Add a copy of a line directly under it and reprice.\n\nA mail piece's copy moves on to the month's next mail drop that does not already carry it;\nanything else keeps the original's date. Returns the estimate plus any `callOuts`, as the\ncreate does.\n\n400 for anything the create refuses. 404 when the estimate or line is unknown.","operationId":"duplicate_planner_estimate_line_api_jmg_planner_estimates__estimate_id__lines__line_id__duplicate_post","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}},{"name":"line_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Line Id"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineWriteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/estimates/{estimate_id}/approve":{"post":{"summary":"Approve Planner Estimate","description":"Send this projected estimate to Method's estimate-input screen and mark it approved.\n\nStages the estimate as `aaEstimateInput` rows rather than writing the `Estimate` directly:\nMethod's own job turns those rows into the real estimate later (about a day), running the\nrep-side automation a direct write skips. So the response carries no Method record id yet -\n`approvedMethodRecordId` is null until the daily reconciliation links the created estimate.\n\nThe estimate is written under the acting user's Method user (matched from their email on\nlogin), so Method assigns it to and emails it to that rep. An account with no linked Method\nuser is refused (400) - the client also disables the button in that case.\n\nIdempotent by refusal, not retry: the projection is row-locked, and one already approved\n400s rather than staging a second input group. The lock is what makes two tabs safe, not\njust a double-click.\n\n400 also covers a projection that cannot be staged - an untracked dealership, or no mailer\nlines to send - each naming the value at fault.","operationId":"approve_planner_estimate_api_jmg_planner_estimates__estimate_id__approve_post","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveEstimateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/estimates/{estimate_id}/discard":{"post":{"summary":"Discard Planner Estimate","description":"Discard a projected estimate: mark it `discarded`, keep the row, and record the rep's feedback.\n\nA soft delete - the row is kept so the discard rate stays readable, and the planner's reads\nalready hide discarded rows, so it leaves the reviewer's view as a real delete would. The\nbody's `feedback` is written like any feedback, blank clearing it; an empty body (the auto-clear\nthat makes room for a re-run) leaves existing feedback alone. Refuses (409) only once the\nprojection reached Method, where \"discard\" no longer applies.\n\nA POST, not a DELETE, because the discard carries a body: it is an action that files the row\naway with its feedback, not a plain removal.\n\n`estimate_id` is our UUID. 404 if unknown.","operationId":"discard_planner_estimate_api_jmg_planner_estimates__estimate_id__discard_post","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DiscardRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/customers":{"get":{"summary":"List Planner Customers","description":"Active dealerships for one planning month, alphabetically, with the pickable months.\n\nReads our Postgres; cannot 503. Set = the selected month's sales goals + recent-estimate\ncustomers + manual pins. Deliberately unpaginated: a working list, not a mirror of Method's\n4,103 records.\n\nGoal mirror ensured `allow_stale`: a stale copy is served as-is while a background pull\nbrings it current, only a first-ever load waits for Method, and a failed refresh serves\nwhat we hold - so still no 503. The recent-estimate mirror (the other half of the active\nset) is ensured the same way.","operationId":"list_planner_customers_api_jmg_planner_customers_get","parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Planning month as YYYY-MM; defaults to next month. Anything outside the selectable window falls back to that default.","title":"Month"},"description":"Planning month as YYYY-MM; defaults to next month. Anything outside the selectable window falls back to that default."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveCustomerListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Add Planner Customer","description":"Reconcile a dealership and its estimates from Method; optionally pin it.\n\nRefresh path and a-la-carte add in one: refresh buttons post with ``pin`` unset and\nonly re-pull, while ``pin: true`` also adds it to the active list (see the request model\nfor why the flag is opt-in). The estimate window reaches forward as well as back, which\nbrings across estimates JMG already wrote for drops that have not happened yet - see\n`jmg_method_crm/customers.py::estimate_sync_window`.\n\nWrites **our** Postgres only; the Method side is strictly a read. Add and refresh are\nthe same op keyed on Method's `RecordID`, so calling twice refreshes, not duplicates.\n404 when Method has no such customer, 503 when Method is not configured.","operationId":"add_planner_customer_api_jmg_planner_customers_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPlannerCustomerRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncCustomerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/customers/refresh":{"post":{"summary":"Refresh Planner Customers","description":"Re-pull the sales-goal mirror from Method now, and return the list we then hold.\n\nA POST because it writes (the goal mirror is reconciled against Method). `max_age=0`\nmakes the kind due, bypassing the TTL but NOT the failure backoff; a failed pull comes\nback with what we hold and an unchanged `syncedAt` rather than a silent no-op. The\nrecent-estimate mirror is re-pulled the same way, since it defines part of the list.","operationId":"refresh_planner_customers_api_jmg_planner_customers_refresh_post","parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Planning month as YYYY-MM; defaults to next month. Anything outside the selectable window falls back to that default.","title":"Month"},"description":"Planning month as YYYY-MM; defaults to next month. Anything outside the selectable window falls back to that default."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveCustomerListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/customers/search":{"get":{"summary":"Search Planner Customers","description":"Method dealerships whose name matches ``q``, for the a-la-carte add typeahead.\n\nThe one customer read that must hit Method live: it searches the ~4,100 records we\ndeliberately do not mirror, to find a brand-new dealership to add to the active list. Each\nhit is then flagged with whether it is already on the list (a Postgres read over our\nmirrors, so no extra Method call), so the picker does not invite a pointless re-add.\nRead-only. Declared before ``/{customer_id}`` so this static path is matched first. 503\nwhen Method is not configured.","operationId":"search_planner_customers_api_jmg_planner_customers_search_get","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Name fragment matched against Method's FullName","title":"Q"},"description":"Name fragment matched against Method's FullName"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/customers/{customer_id}":{"get":{"summary":"Get Planner Customer","description":"One active dealership with its full estimate history, newest first.\n\nAddressed by OUR id, resolved once to Method's `RecordID` (what the mirror joins on).\nReal Method estimates only - proposals belong in the planner, acknowledged via\n`customer.projectedEstimateCount`. 404 means not on the active list.\n\nGoes through `ensure_customer_fresh`: a dealership past the TTL is re-pulled and the\nrequest waits; inside the TTL it costs no Method calls. A failed refresh does NOT fail\nthe request - the mirror still holds the last good data.","operationId":"get_planner_customer_api_jmg_planner_customers__customer_id__get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackedCustomerDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Untrack Planner Customer","description":"Clear a dealership's manual pin (unpin). **Hides, never deletes.**\n\nOnly the pin: a dealership a sales goal or a recent estimate names stays on the active list,\nsince that (not the pin) is why it is there. So this one op doubles as \"remove\" for a\npin-only dealership - it drops off the list - and \"unpin\" for one that also carries a goal or\nestimate - it stays, just no longer pinned. The row and its imported history stay either way,\nso re-adding is instant and costs no Method calls.","operationId":"untrack_planner_customer_api_jmg_planner_customers__customer_id__delete","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/customers/{customer_id}/estimate-history":{"get":{"summary":"Get Planner Customer History","description":"One dealership's estimate history, newest first. Real Method estimates only.\n\n**Does not require the dealership to be tracked** (unlike the detail read above): the\nreconcile never sets tracking, so a dealership the agent cached while drafting a\nprojection is untracked, and 404ing here would hide the history the page compares against.\n\nGoes through `ensure_customer_fresh`, so a history read beside a fresh proposal cannot\nbe stale; a failed refresh serves what we hold. 404 means we hold no such dealership.","operationId":"get_planner_customer_history_api_jmg_planner_customers__customer_id__estimate_history_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerEstimateHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/customers/{customer_id}/performance":{"get":{"summary":"Get Planner Customer Performance","description":"One dealership's partner performance one-pager, computed from the analytics tables.\n\nReads our Postgres only, never Method. Like the estimate history, it does not require the\ndealership to be on the active list. 404 means we hold no such dealership.","operationId":"get_planner_customer_performance_api_jmg_planner_customers__customer_id__performance_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPerformanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/customers/{customer_id}/program-usage":{"get":{"summary":"Get Planner Program Usage","description":"A program's rotation marked with what became of each step for this dealership.\n\nEach step comes back `mailed`, `pending`, `rejected` or unmarked, over a window that\nreaches back AND forward (`services.game_plans.program_usage`) - forward because a\nbooked drop has not happened yet and most needs not to be proposed a second time.\n\nReads our Postgres only, so no Method call and no 503. Deliberately NOT behind\n`ensure_customer_fresh`: opened from a chip on a list of many estimates, and a Method\nsync per chip click would make a reference lookup expensive; the history is refreshed\nby the dealership and estimate pages. 404 covers both \"no such dealership\" and \"no\nprogram by that name\" - an empty rotation reads as a broken program, not a bad request.","operationId":"get_planner_program_usage_api_jmg_planner_customers__customer_id__program_usage_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"name":"program","in":"query","required":true,"schema":{"type":"string","description":"The mailer program's name, e.g. 'Off Lease'","title":"Program"},"description":"The mailer program's name, e.g. 'Off Lease'"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgramUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/customers/{customer_id}/projection":{"post":{"summary":"Start Planner Customer Projection","description":"Start one dealership's projection for a month. **202: it has not happened yet.**\n\nSeeds a one-item run and hands it to Cloud Tasks; the agent turn runs on the projection\nworker (minutes), never in this request. Returns the run id; the page then watches\n`activeProjectionRun` on the detail read.\n\n409 covers both refusals: the month is already spoken for (a real Method estimate or a\ndraft of ours), or a run is already working this dealership for that month. The second\nis the one only this route catches - a monthly fan-out not yet reached leaves no\nprojection to collide with, just a queued item.\n\n400 when `month` is not `YYYY-MM`. 404 when not on the active list.","operationId":"start_planner_customer_projection_api_jmg_planner_customers__customer_id__projection_post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartProjectionRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartProjectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/customers/{customer_id}/first-estimate":{"post":{"summary":"Start Planner Customer First Estimate","description":"Draft a brand-new dealership's first estimate from chosen programs - no agent. **201.**\n\nA dealership with no history gives the agent nothing to read, so a human states which\nprograms to start and how many pieces of each. Step 1 of each program's rotation is a\ndeterministic lookup, priced and persisted as a `draft` projection the same as the agent's -\nso unlike `/projection` it is done by the time this returns; there is no background run.\nReturns our id for the new projection, which the page opens.\n\n400 when `month` is not `YYYY-MM`, no drop calendar is set for it, no program is chosen, or a\nprogram or count cannot be started. 404 when the dealership is not on the active list.","operationId":"start_planner_customer_first_estimate_api_jmg_planner_customers__customer_id__first_estimate_post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartColdStartRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartColdStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/customers/{customer_id}/first-estimate/budget-quote":{"post":{"summary":"Quote Planner Customer Budget","description":"Size the chosen programs' piece counts to a budget - the dialog's Calculate button.\n\nPrices step 1 of each program off the dealership's book (the flat fee for `Lease Retention`,\nthe per-piece cost of every mailer), draws the flat fees off the top, and splits the rest\nevenly - so the rep sets a spend and gets the piece counts back to review. Nothing is written;\nthe populated quantities go through `first-estimate` to create the estimate.\n\n400 when `month` is not `YYYY-MM`, a program has no rotation, or the budget cannot cover the\nflat fees. 404 when the dealership is not on the active list.","operationId":"quote_planner_customer_budget_api_jmg_planner_customers__customer_id__first_estimate_budget_quote_post","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetQuoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetQuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planner/customers/{customer_id}/skipped":{"put":{"summary":"Set Planner Customer Skipped","description":"Take a dealership out of the monthly run, or put it back. Admins only.\n\nOut of the run, it stays on the active list and the run plans it as skipped\n(:data:`jobs.monthly_projection.ADMIN_SKIP`); \"Project an estimate\" still drafts one by hand.","operationId":"set_planner_customer_skipped_api_jmg_planner_customers__customer_id__skipped_put","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSkippedRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/method-usage/summary":{"get":{"summary":"Method Usage Summary","description":"Dashboard payload: rolling-24h counts, 10-day breakdown, recent calls.","operationId":"method_usage_summary_api_jmg_method_usage_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MethodUsageSummary"}}}}}}},"/api/jmg/method-usage/limit":{"get":{"summary":"Daily Call Limit","description":"The ceiling in force. Backs the Settings page.","operationId":"daily_call_limit_api_jmg_method_usage_limit_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyCallLimit"}}}}}},"put":{"summary":"Update Daily Call Limit","description":"Set the daily Method call ceiling. In force on the next request - nothing caches it.","operationId":"update_daily_call_limit_api_jmg_method_usage_limit_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyCallLimit"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyCallLimit"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/method-sync/status":{"get":{"tags":["method-sync"],"summary":"Method Sync Status","description":"Every group of Method mirrors and how current it is. Reads only.","operationId":"method_sync_status_api_jmg_method_sync_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MethodSyncStatusResponse"}}}}}}},"/api/jmg/method-sync/sync":{"post":{"tags":["method-sync"],"summary":"Method Sync Trigger","description":"Pull every table in one group from Method now, reporting each table's own outcome.","operationId":"method_sync_trigger_api_jmg_method_sync_sync_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MethodSyncTriggerRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MethodSyncTriggerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/analytics/sync-status":{"get":{"tags":["analytics"],"summary":"Analytics Sync Status","description":"The last refresh time and the most recent sync runs. Reads only.","operationId":"analytics_sync_status_api_jmg_analytics_sync_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsSyncStatusResponse"}}}}}}},"/api/jmg/agent-settings/reviewer-enabled":{"get":{"summary":"Reviewer Enabled","description":"Whether the estimate reviewer runs. Backs the Settings page.","operationId":"reviewer_enabled_api_jmg_agent_settings_reviewer_enabled_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerEnabled"}}}}}},"put":{"summary":"Update Reviewer Enabled","description":"Turn the estimate reviewer on or off. In force on the next projection - nothing caches it.","operationId":"update_reviewer_enabled_api_jmg_agent_settings_reviewer_enabled_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerEnabled"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewerEnabled"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/agent-status/runs":{"get":{"summary":"Job Runs Overview","description":"The Agent Status page's runs list: recent projection runs with their item counts.\n\nClassification and analytics sync runs are excluded: they project nothing, so they carry no\nestimate vocabulary this page can render - they surface on the internal Planning Facts and\nAnalytics pages instead.","operationId":"job_runs_overview_api_jmg_agent_status_runs_get","parameters":[{"name":"job_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRunsOverview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/agent-status/monthly-run/preview":{"get":{"summary":"Monthly Run Preview","description":"What starting the monthly run for ``month`` would fan out over.\n\n``month`` is the first of the target month, defaulting to the run's own target.\nPer-month because the skipped split depends on the specific month: one already largely\nordered in Method fans out over far fewer dealerships. ``early_round`` counts only the early\nround's dealerships. See :class:`MonthlyRunPreview`.","operationId":"monthly_run_preview_api_jmg_agent_status_monthly_run_preview_get","parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Month"}},{"name":"early_round","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Early Round"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonthlyRunPreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/agent-status/monthly-run":{"post":{"summary":"Start Monthly Run","description":"Start the monthly projection by hand, for next month or the one after. 202: it has\nnot happened yet.\n\nCreates a ``jmg-monthly-projection`` Cloud Run execution and returns once it exists; the\nrun row it seeds appears a few seconds later.\n\n``early_round`` runs only the dealerships with a Closed or Accepted estimate in the month before\n(see ``--early-round``). ``limit`` caps the execution at its first N dealerships alphabetically\n(rehearsal). Both are spent on the one execution, so the next run is unchanged. The cap is\nsuper-admin only, where the run itself is admin-only.\n\n400 month not on offer (see :func:`_resolve_selected_month`) or its drop calendar not fully\nset; 403 non-super-admin sends a ``limit``; 409 a run already in flight (see\n:func:`_active_monthly_run_id`), or no dealership left to draft for; 503 job not\nconfigured (deployment state, not caller fault); 502 Cloud Run refuses the execution.","operationId":"start_monthly_run_api_jmg_agent_status_monthly_run_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MonthlyRunRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonthlyRunStarted"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/admin/users":{"get":{"tags":["admin"],"summary":"Search Users","description":"Search accounts by case-insensitive substring of email/name (capped ~25).","operationId":"search_users_api_jmg_admin_users_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminUser"},"title":"Response Search Users Api Jmg Admin Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/admin/conversations":{"get":{"tags":["admin"],"summary":"List Conversations","description":"List conversations by id (0-or-1), by account, or newest-first across everything.\n\nThree modes, most-specific wins: `conversationId` returns at most one row; `accountId`\npages one account's conversations; neither pages ALL tracked executions\nnewest-updated-first, optionally filtered by `source` (how ownerless runs are browsed).","operationId":"list_conversations_api_jmg_admin_conversations_get","parameters":[{"name":"conversationId","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversationid"}},{"name":"accountId","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Accountid"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AdminConversation"},"title":"Response List Conversations Api Jmg Admin Conversations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/admin/conversations/purge-preview":{"get":{"tags":["admin"],"summary":"Preview Conversation Purge","description":"Count the conversations (and transcript lines) a purge would delete - no writes.","operationId":"preview_conversation_purge_api_jmg_admin_conversations_purge_preview_get","parameters":[{"name":"olderThanDays","in":"query","required":true,"schema":{"type":"integer","minimum":0,"title":"Olderthandays"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationPurgePreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/admin/conversations/purge":{"post":{"tags":["admin"],"summary":"Purge Old Conversations","description":"Delete conversations last active more than `olderThanDays` ago (0 = clear all).","operationId":"purge_old_conversations_api_jmg_admin_conversations_purge_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationPurgeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationPurgeResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/admin/conversations/{conversation_id}/session":{"get":{"tags":["admin"],"summary":"Get Conversation Session","description":"Reconstruct a conversation's Claude session: ordered transcript + summary.","operationId":"get_conversation_session_api_jmg_admin_conversations__conversation_id__session_get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationSession"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/feedback":{"get":{"tags":["feedback"],"summary":"Get Feedback Queue","description":"The feedback queue, most recently written feedback first.\n\n`resolved` filters to handled (`true`) or still-open (`false`) feedback; omitted returns both.","operationId":"get_feedback_queue_api_jmg_feedback_get","parameters":[{"name":"resolved","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolved"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackQueueItem"},"title":"Response Get Feedback Queue Api Jmg Feedback Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/feedback/{estimate_id}/resolve":{"post":{"tags":["feedback"],"summary":"Resolve Feedback","description":"Mark a projection's feedback handled so it leaves the queue, or reopen it (`resolved: false`).\n\nOn resolve, records who did it (`account`) and their optional `note`. `estimate_id` is our\nUUID. 404 if unknown.","operationId":"resolve_feedback_api_jmg_feedback__estimate_id__resolve_post","parameters":[{"name":"estimate_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Estimate Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planning-facts/options":{"get":{"tags":["planning-facts"],"summary":"Get Planning Facts Options","description":"The dropdown vocabularies for the form editor: enums, program names, and rider items.\n\nRead-only reference the form fills its selects from: the enum values come off the typed\nschema (so a picked value can never fail validation), the programs off the mirror's rotations,\nand the rider items off the program-less add-on catalog. Declared before the numeric\n`/{customer_record_id}` route so the literal path is matched first.","operationId":"get_planning_facts_options_api_jmg_planning_facts_options_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanningFactsOptions"}}}}}}},"/api/jmg/planning-facts/{customer_record_id}":{"get":{"tags":["planning-facts"],"summary":"Get Customer Planning Facts","description":"One dealership's planning-facts record, its rendered preview, and who last wrote it.\n\nAlways 200 for a numeric id: a dealership with no row comes back `exists: false` so the\neditor can write its first record.","operationId":"get_customer_planning_facts_api_jmg_planning_facts__customer_record_id__get","parameters":[{"name":"customer_record_id","in":"path","required":true,"schema":{"type":"integer","title":"Customer Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanningFactsView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["planning-facts"],"summary":"Save Customer Planning Facts","description":"Save an operator's hand-edited record; the next v2 run plans under it.\n\nValidated against `PlanningFacts` first (422, naming the field, on failure), then the\ndealership is confirmed to exist - the record's foreign key does not tolerate a stranger,\nand the confirm mirrors a not-yet-held dealership (no Method call when it is already\nfresh). 404 when Method has no such RecordID.","operationId":"save_customer_planning_facts_api_jmg_planning_facts__customer_record_id__put","parameters":[{"name":"customer_record_id","in":"path","required":true,"schema":{"type":"integer","title":"Customer Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanningFactsSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanningFactsView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/planning-facts/{customer_record_id}/preview":{"post":{"tags":["planning-facts"],"summary":"Preview Customer Planning Facts","description":"Render a candidate record without saving it, or 422 naming the field that fails.\n\nLets the operator see exactly what the agent would read before committing the edit.","operationId":"preview_customer_planning_facts_api_jmg_planning_facts__customer_record_id__preview_post","parameters":[{"name":"customer_record_id","in":"path","required":true,"schema":{"type":"integer","title":"Customer Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanningFactsSaveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanningFactsPreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/classify/dealership/{customer_record_id}":{"get":{"tags":["classify"],"summary":"Dealership Classify Status","description":"Whether one dealership can be classified now: has history, and is it already in flight.","operationId":"dealership_classify_status_api_jmg_classify_dealership__customer_record_id__get","parameters":[{"name":"customer_record_id","in":"path","required":true,"schema":{"type":"integer","title":"Customer Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealershipClassifyStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["classify"],"summary":"Start Dealership Classify","description":"Classify one dealership now. 202: the run is seeded but has not finished.\n\n409 when a record already stands or a run is already classifying it; 400 when it has no history\nto classify from. Each carries the door's own readable reason.","operationId":"start_dealership_classify_api_jmg_classify_dealership__customer_record_id__post","parameters":[{"name":"customer_record_id","in":"path","required":true,"schema":{"type":"integer","title":"Customer Record Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyStarted"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/classify/month-preview":{"get":{"tags":["classify"],"summary":"Classify Month Preview","description":"The bucket counts for classifying ``month``'s book, and whether a run is already in flight.\n\nReads the mirrors as held (no Method pull on dialog open); the bulk run force-refreshes before\nit plans, so its need-classification count can be a little larger.","operationId":"classify_month_preview_api_jmg_classify_month_preview_get","parameters":[{"name":"month","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyMonthPreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/classify/month":{"post":{"tags":["classify"],"summary":"Start Month Classify","description":"Classify a whole month's unclassified book. 202: the Cloud Run execution exists, the run does\nnot yet.\n\nStarts the ``jmg-monthly-projection`` job with ``PROJECTION_CLASSIFY_ONLY`` set, so it runs the\nclassify-only pass. No drop-calendar or limit checks - classification writes no dated lines.\n\n400 month not on offer; 409 a monthly or classification run already in flight; 503 job not\nconfigured (deployment state); 502 Cloud Run refuses the execution.","operationId":"start_month_classify_api_jmg_classify_month_post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ClassifyMonthRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyMonthStarted"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/jmg/classify/runs":{"get":{"tags":["classify"],"summary":"Classify Runs","description":"Recent classification runs, newest first, each with its classified/abstained tallies.\n\n``list_job_runs`` gives the status counts (pending/running/failed/total); ``classify_run_tallies``\nadds the classified-vs-abstained split the status counts cannot, since an abstention finishes\n``succeeded`` like a written record.","operationId":"classify_runs_api_jmg_classify_runs_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyRunsView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/tasks/projection-item":{"post":{"summary":"Work Projection Item","operationId":"work_projection_item_internal_tasks_projection_item_post","parameters":[{"name":"x-cloudtasks-taskretrycount","in":"header","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"X-Cloudtasks-Taskretrycount"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectionItemTask"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Work Projection Item Internal Tasks Projection Item Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Hello World","operationId":"hello_world__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"ActiveCustomerListResponse":{"properties":{"month":{"type":"string","format":"date","title":"Month"},"selectableMonths":{"items":{"type":"string","format":"date"},"type":"array","title":"Selectablemonths"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Syncedat"},"customers":{"items":{"$ref":"#/components/schemas/TrackedCustomerRow"},"type":"array","title":"Customers"}},"type":"object","required":["month","selectableMonths","syncedAt","customers"],"title":"ActiveCustomerListResponse","description":"The active book for one planning month, plus the months that may be picked.\n\n``month`` is the month the goal-derived rows are scoped to (first of it, Eastern);\n``selectableMonths`` are the picker's options - next month and the one after - echoed so\nthe client offers exactly what the server will honor rather than recomputing the window.\nRecent-estimate and pinned rows are not month-scoped, so they appear under every month."},"ActiveProjectionRunRow":{"properties":{"runId":{"type":"string","format":"uuid","title":"Runid"},"jobType":{"type":"string","title":"Jobtype"},"month":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Month"},"itemStatus":{"type":"string","title":"Itemstatus"},"startedAt":{"type":"string","format":"date-time","title":"Startedat"}},"type":"object","required":["runId","jobType","month","itemStatus","startedAt"],"title":"ActiveProjectionRunRow","description":"A projection run already working this dealership, if one is.\n\nCovers a run started from this page AND a monthly fan-out not yet reached here - both\nmean \"something is coming\", and the page must say so or a user starts a second one."},"AddOnOptionRow":{"properties":{"itemRecordId":{"type":"integer","title":"Itemrecordid"},"name":{"type":"string","title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"defaultDropDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Defaultdropdate"}},"type":"object","required":["itemRecordId","name","category","defaultDropDate"],"title":"AddOnOptionRow","description":"One program-less product the custom-line dialog offers, grouped by its category."},"AddPlannerCustomerRequest":{"properties":{"methodRecordId":{"type":"integer","title":"Methodrecordid"},"pin":{"type":"boolean","title":"Pin","default":false}},"type":"object","required":["methodRecordId"],"title":"AddPlannerCustomerRequest","description":"Which Method dealership to reconcile, and whether to pin it to the active list.\n\nKeyed on Method's record id necessarily: a dealership we hold NO row for arrives here,\nso there is no id of ours to send. ``pin`` defaults False because the common caller is\na refresh button, which must not add a dealership to the goal-derived list; ``pin:\nTrue`` is the a-la-carte add (API-only, no UI sends it)."},"AdminConversation":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"accountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Accountid"},"userEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Useremail"},"source":{"type":"string","title":"Source"},"sessionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sessionid"},"firstUserMessage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstusermessage"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["id","accountId","userEmail","source","sessionId","firstUserMessage","createdAt","updatedAt"],"title":"AdminConversation","description":"A conversation row for the admin list (owner email joined in when there is one).\n\n`account_id` / `user_email` are None for ownerless executions; `source` names the entry\npoint that ran the agent (e.g. \"ui\", \"eval\")."},"AdminUser":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","email","name"],"title":"AdminUser","description":"A search hit in the admin user picker."},"AnalyticsSyncRun":{"properties":{"id":{"type":"string","title":"Id"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"},"status":{"type":"string","title":"Status"},"source":{"type":"string","title":"Source"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"startedAt":{"type":"string","format":"date-time","title":"Startedat"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finishedat"},"tables":{"items":{"$ref":"#/components/schemas/AnalyticsSyncTable"},"type":"array","title":"Tables"}},"type":"object","required":["id","mode","status","source","error","startedAt","finishedAt","tables"],"title":"AnalyticsSyncRun"},"AnalyticsSyncStatusResponse":{"properties":{"lastRefreshedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Lastrefreshedat"},"runs":{"items":{"$ref":"#/components/schemas/AnalyticsSyncRun"},"type":"array","title":"Runs"}},"type":"object","required":["lastRefreshedAt","runs"],"title":"AnalyticsSyncStatusResponse"},"AnalyticsSyncTable":{"properties":{"table":{"type":"string","title":"Table"},"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"fetched":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fetched"},"inserted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Inserted"},"updated":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Updated"},"deleted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deleted"}},"type":"object","required":["table","status","error","fetched","inserted","updated","deleted"],"title":"AnalyticsSyncTable","description":"What one run did to one analytics table. Counts are None until the table is published."},"ApproveEstimateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/ProjectedEstimateStatus"},"approvedMethodRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Approvedmethodrecordid"},"approvedAt":{"type":"string","format":"date-time","title":"Approvedat"}},"type":"object","required":["id","status","approvedMethodRecordId","approvedAt"],"title":"ApproveEstimateResponse","description":"What sending a projection to Method produced."},"AsProposedRow":{"properties":{"itemRecordId":{"type":"integer","title":"Itemrecordid"},"itemName":{"type":"string","title":"Itemname"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"letterheadRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Letterheadrecordid"},"letterheadName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Letterheadname"},"envelopeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Envelopename"},"insertName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insertname"},"postage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postage"},"quantity":{"type":"number","title":"Quantity"},"rate":{"type":"number","title":"Rate"},"dropDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dropdate"}},"type":"object","required":["itemRecordId","itemName","category","letterheadRecordId","letterheadName","envelopeName","insertName","postage","quantity","rate","dropDate"],"title":"AsProposedRow","description":"The line as the agent proposed it - what a reviewer's edits are audited against."},"BasisRow":{"properties":{"label":{"type":"string","title":"Label"},"value":{"type":"string","title":"Value"}},"type":"object","required":["label","value"],"title":"BasisRow","description":"One row of a receipt: a short label and the figure beside it."},"BudgetQuoteProgramRow":{"properties":{"programRecordId":{"type":"integer","title":"Programrecordid"},"quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quantity"},"flatFeeCents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Flatfeecents"},"unitCostCents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Unitcostcents"}},"type":"object","required":["programRecordId","quantity","flatFeeCents","unitCostCents"],"title":"BudgetQuoteProgramRow","description":"What the budget sizes one chosen program to.\n\n`quantity` and `unit_cost_cents` are set for a per-piece program; `flat_fee_cents` for a flat\none. The other field is null on each - a flat program is not sized by piece count."},"BudgetQuoteRequest":{"properties":{"month":{"type":"string","title":"Month"},"budgetCents":{"type":"integer","exclusiveMinimum":0.0,"title":"Budgetcents"},"programRecordIds":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Programrecordids"}},"type":"object","required":["month","budgetCents","programRecordIds"],"title":"BudgetQuoteRequest","description":"A cold-start budget and the programs to spread it across.\n\n`budget_cents` is the whole spend for the month; the flat programs' fees come off the top and\nthe rest is split across the per-piece programs. No quantities - that is what this computes."},"BudgetQuoteResponse":{"properties":{"budgetCents":{"type":"integer","title":"Budgetcents"},"flatFeesCents":{"type":"integer","title":"Flatfeescents"},"remainderCents":{"type":"integer","title":"Remaindercents"},"perProgramShareCents":{"type":"integer","title":"Perprogramsharecents"},"rows":{"items":{"$ref":"#/components/schemas/BudgetQuoteProgramRow"},"type":"array","title":"Rows"}},"type":"object","required":["budgetCents","flatFeesCents","remainderCents","perProgramShareCents","rows"],"title":"BudgetQuoteResponse","description":"A budget distributed across the chosen programs, ready to populate the dialog's quantities."},"BuildVersion":{"properties":{"version":{"type":"string","title":"Version"},"commit":{"type":"string","title":"Commit"}},"type":"object","required":["version","commit"],"title":"BuildVersion","description":"The build this server runs: the image tag (YY.WW.N) and the short commit it was built\nfrom, both \"dev\" outside a CI-built image."},"CallOutRow":{"properties":{"code":{"type":"string","title":"Code"},"message":{"type":"string","title":"Message"},"lineIds":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Lineids"}},"type":"object","required":["code","message","lineIds"],"title":"CallOutRow","description":"Something a write just did that the reviewer should be told about.\n\nNever a refusal (that is a 400) - the write succeeded and something followed worth saying.\n`code` is what a client keys off; the message is for a person and may be reworded."},"CampaignResult":{"properties":{"program":{"type":"string","title":"Program"},"mailer":{"type":"string","title":"Mailer"},"source":{"type":"string","title":"Source"},"pieces":{"type":"integer","title":"Pieces"},"billing":{"type":"integer","title":"Billing"},"sold":{"type":"integer","title":"Sold"},"costPerSale":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Costpersale"}},"type":"object","required":["program","mailer","source","pieces","billing","sold","costPerSale"],"title":"CampaignResult","description":"One QuickShift campaign of the newest month with results."},"ClassifyMonthPreview":{"properties":{"month":{"type":"string","format":"date","title":"Month"},"selectableMonths":{"items":{"type":"string","format":"date"},"type":"array","title":"Selectablemonths"},"total":{"type":"integer","title":"Total"},"alreadyClassified":{"type":"integer","title":"Alreadyclassified"},"needClassification":{"type":"integer","title":"Needclassification"},"reReads":{"type":"integer","title":"Rereads"},"noHistory":{"type":"integer","title":"Nohistory"},"activeRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activerunid"}},"type":"object","required":["month","selectableMonths","total","alreadyClassified","needClassification","reReads","noHistory"],"title":"ClassifyMonthPreview","description":"What classifying a month's book would cover - the bucket counts the landing view shows."},"ClassifyMonthRequest":{"properties":{"month":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Month"}},"type":"object","title":"ClassifyMonthRequest","description":"Which month to classify. Absent means the default (next) month."},"ClassifyMonthStarted":{"properties":{"executionName":{"type":"string","title":"Executionname"},"month":{"type":"string","format":"date","title":"Month"}},"type":"object","required":["executionName","month"],"title":"ClassifyMonthStarted","description":"A Cloud Run execution was created. The run row does not exist yet."},"ClassifyRunView":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"source":{"type":"string","title":"Source"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finishedat"},"total":{"type":"integer","title":"Total"},"classified":{"type":"integer","title":"Classified"},"provisional":{"type":"integer","title":"Provisional"},"abstained":{"type":"integer","title":"Abstained"},"failed":{"type":"integer","title":"Failed"},"pending":{"type":"integer","title":"Pending"},"running":{"type":"integer","title":"Running"}},"type":"object","required":["id","status","source","createdAt","finishedAt","total","classified","provisional","abstained","failed","pending","running"],"title":"ClassifyRunView","description":"One recent classification run, with its classified/provisional/abstained tallies and\nprogress."},"ClassifyRunsView":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/ClassifyRunView"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"ClassifyRunsView"},"ClassifyStarted":{"properties":{"runId":{"type":"string","title":"Runid"}},"type":"object","required":["runId"],"title":"ClassifyStarted","description":"A single-dealership classification run was seeded. Its row exists now."},"ColdStartEnrollmentRow":{"properties":{"programRecordId":{"type":"integer","title":"Programrecordid"},"quantity":{"type":"integer","maximum":100000.0,"minimum":1.0,"title":"Quantity"}},"type":"object","required":["programRecordId","quantity"],"title":"ColdStartEnrollmentRow","description":"One program to start a new dealership on, and how many pieces to mail this month."},"ComponentOptionRow":{"properties":{"recordId":{"type":"integer","title":"Recordid"},"name":{"type":"string","title":"Name"},"fullName":{"type":"string","title":"Fullname"},"isCurrent":{"type":"boolean","title":"Iscurrent"}},"type":"object","required":["recordId","name","fullName","isCurrent"],"title":"ComponentOptionRow","description":"One envelope, insert or postage row the line could carry."},"ConfiguredDropRow":{"properties":{"dropDate":{"type":"string","format":"date","title":"Dropdate"},"label":{"type":"string","title":"Label"}},"type":"object","required":["dropDate","label"],"title":"ConfiguredDropRow","description":"One configured drop date and what the month schedules on it - the picker's tooltip."},"ConversationPurgePreview":{"properties":{"olderThanDays":{"type":"integer","title":"Olderthandays"},"cutoff":{"type":"string","format":"date-time","title":"Cutoff"},"conversationsToDelete":{"type":"integer","title":"Conversationstodelete"},"transcriptEntriesToDelete":{"type":"integer","title":"Transcriptentriestodelete"}},"type":"object","required":["olderThanDays","cutoff","conversationsToDelete","transcriptEntriesToDelete"],"title":"ConversationPurgePreview","description":"How many conversations/transcript lines a purge would delete (nothing deleted)."},"ConversationPurgeRequest":{"properties":{"olderThanDays":{"type":"integer","minimum":0.0,"title":"Olderthandays"}},"type":"object","required":["olderThanDays"],"title":"ConversationPurgeRequest","description":"Body for the purge action - the retention window in whole days (0 = clear all)."},"ConversationPurgeResult":{"properties":{"olderThanDays":{"type":"integer","title":"Olderthandays"},"cutoff":{"type":"string","format":"date-time","title":"Cutoff"},"conversationsDeleted":{"type":"integer","title":"Conversationsdeleted"},"transcriptEntriesDeleted":{"type":"integer","title":"Transcriptentriesdeleted"}},"type":"object","required":["olderThanDays","cutoff","conversationsDeleted","transcriptEntriesDeleted"],"title":"ConversationPurgeResult","description":"How many conversations/transcript lines the purge actually deleted."},"ConversationSession":{"properties":{"conversationId":{"type":"string","format":"uuid","title":"Conversationid"},"accountId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Accountid"},"userEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Useremail"},"source":{"type":"string","title":"Source"},"sessionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sessionid"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"},"summary":{"$ref":"#/components/schemas/SessionSummary"},"entries":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Entries"},"subagents":{"items":{"$ref":"#/components/schemas/SubagentTranscript"},"type":"array","title":"Subagents"}},"type":"object","required":["conversationId","accountId","userEmail","source","sessionId","createdAt","updatedAt","summary","entries","subagents"],"title":"ConversationSession","description":"The reconstructed Claude session for a conversation (see the admin viewer)."},"CreateLineRequest":{"properties":{"itemRecordId":{"type":"integer","title":"Itemrecordid"},"quantity":{"type":"integer","maximum":1000000.0,"minimum":1.0,"title":"Quantity","default":1},"dropDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dropdate"},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Description"},"letterheadRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Letterheadrecordid"},"envelopeRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Enveloperecordid"},"insertRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Insertrecordid"},"postageRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Postagerecordid"}},"type":"object","required":["itemRecordId"],"title":"CreateLineRequest","description":"A mail piece a reviewer is adding to a draft by hand.\n\nOnly the message is required; it anchors the line to a program and the server derives\nthe rest (design from the rotation step, print config from what that design usually mails\nas, rate from the book). Where no rotation carries the message, there is no step to derive\na design from, so the reviewer states the design themselves.\n\nSame omitted-vs-null distinction as the PATCH, but omitted here means DERIVE it (not\n\"leave alone\"). Null still means the rep says none, on the design as well as the components."},"CustomerEstimateHistoryResponse":{"properties":{"customerId":{"type":"string","format":"uuid","title":"Customerid"},"methodRecordId":{"type":"integer","title":"Methodrecordid"},"name":{"type":"string","title":"Name"},"isTracked":{"type":"boolean","title":"Istracked"},"estimates":{"items":{"$ref":"#/components/schemas/TrackedEstimateRowResponse"},"type":"array","title":"Estimates"}},"type":"object","required":["customerId","methodRecordId","name","isTracked","estimates"],"title":"CustomerEstimateHistoryResponse","description":"A dealership's real Method estimates, for reading beside a proposal for them."},"CustomerPerformanceResponse":{"properties":{"store":{"anyOf":[{"$ref":"#/components/schemas/StoreReport"},{"type":"null"}]},"combined":{"anyOf":[{"$ref":"#/components/schemas/StoreReport"},{"type":"null"}]},"lifecycle":{"anyOf":[{"$ref":"#/components/schemas/Lifecycle"},{"type":"null"}]},"nadaCostPerSale":{"type":"integer","title":"Nadacostpersale"},"coverageFlag":{"type":"integer","title":"Coverageflag"},"dataRefreshedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Datarefreshedat"}},"type":"object","required":["store","combined","lifecycle","nadaCostPerSale","coverageFlag","dataRefreshedAt"],"title":"CustomerPerformanceResponse","description":"How a dealership's mail is performing, from the weekly analytics data: its one-pager."},"CustomerProjectionRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"txnDate":{"type":"string","format":"date","title":"Txndate"},"status":{"type":"string","title":"Status"},"totalAmount":{"type":"number","title":"Totalamount"},"lineCount":{"type":"integer","title":"Linecount"},"flagSeverity":{"type":"string","title":"Flagseverity"},"flagReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flagreason"},"serverNotes":{"items":{"type":"string"},"type":"array","title":"Servernotes"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"}},"type":"object","required":["id","txnDate","status","totalAmount","lineCount","flagSeverity","flagReason","serverNotes","createdAt"],"title":"CustomerProjectionRow","description":"One proposal of ours on file for this dealership, this month or later.\n\nCounterpart to `TrackedEstimateRowResponse` (what Method actually sent); kept its own\nlist so history never contains things that have not happened. Every status comes back,\nincluding `discarded` - a discarded proposal explains why a month has no draft."},"CustomerSearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/CustomerSearchResultRow"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"CustomerSearchResponse"},"CustomerSearchResultRow":{"properties":{"methodRecordId":{"type":"integer","title":"Methodrecordid"},"fullName":{"type":"string","title":"Fullname"},"assignedTo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignedto"},"onList":{"type":"boolean","title":"Onlist","default":false},"hasGoal":{"type":"boolean","title":"Hasgoal","default":false},"hasRecentEstimate":{"type":"boolean","title":"Hasrecentestimate","default":false},"isTracked":{"type":"boolean","title":"Istracked","default":false}},"type":"object","required":["methodRecordId","fullName"],"title":"CustomerSearchResultRow","description":"One Method dealership matched by name - enough to pick it and add it a-la-carte."},"DailyBucket":{"properties":{"date":{"type":"string","title":"Date"},"success":{"type":"integer","title":"Success"},"fail":{"type":"integer","title":"Fail"}},"type":"object","required":["date","success","fail"],"title":"DailyBucket"},"DailyCallLimit":{"properties":{"limit":{"type":"integer","maximum":10000000.0,"minimum":1.0,"title":"Limit"}},"type":"object","required":["limit"],"title":"DailyCallLimit","description":"The ceiling - the same one number going out and coming in."},"DealershipClassifyStatus":{"properties":{"hasEstimateHistory":{"type":"boolean","title":"Hasestimatehistory"},"inFlightRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inflightrunid"}},"type":"object","required":["hasEstimateHistory"],"title":"DealershipClassifyStatus","description":"The single-dealership classify eligibility the editor's empty state needs.\n\nThe record state itself already comes from the planning-facts GET the editor loads; this is only\nwhat that read cannot tell it: whether there is history to classify from, and whether a run is\nalready classifying it (so the editor shows \"Classifying…\" instead of the button)."},"DesignFamilyRow":{"properties":{"code":{"type":"string","title":"Code"},"section":{"type":"string","title":"Section"},"variants":{"items":{"$ref":"#/components/schemas/DesignVariantRow"},"type":"array","title":"Variants"}},"type":"object","required":["code","section","variants"],"title":"DesignFamilyRow","description":"Every active letterhead sharing one template."},"DesignLibraryResponse":{"properties":{"families":{"items":{"$ref":"#/components/schemas/DesignFamilyRow"},"type":"array","title":"Families"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Syncedat"}},"type":"object","required":["families","syncedAt"],"title":"DesignLibraryResponse","description":"Every family, plus how current the mirror behind them is."},"DesignOptionRow":{"properties":{"letterheadRecordId":{"type":"integer","title":"Letterheadrecordid"},"name":{"type":"string","title":"Name"},"fullName":{"type":"string","title":"Fullname"},"inRotation":{"type":"boolean","title":"Inrotation"},"isCurrent":{"type":"boolean","title":"Iscurrent"},"sequenceNumber":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sequencenumber"},"state":{"anyOf":[{"$ref":"#/components/schemas/UsageState"},{"type":"null"}]},"lastUsedOn":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Lastusedon"},"sentAs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentas"},"isQuotable":{"type":"boolean","title":"Isquotable"}},"type":"object","required":["letterheadRecordId","name","fullName","inRotation","isCurrent","sequenceNumber","state","lastUsedOn","sentAs","isQuotable"],"title":"DesignOptionRow","description":"One letterhead the line could print on."},"DesignStepRow":{"properties":{"program":{"type":"string","title":"Program"},"sequence":{"type":"string","title":"Sequence"},"sequenceNumber":{"type":"integer","title":"Sequencenumber"},"messageName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Messagename"}},"type":"object","required":["program","sequence","sequenceNumber","messageName"],"title":"DesignStepRow","description":"A game-plan step that mails this letterhead."},"DesignUsageRow":{"properties":{"letterheadRecordId":{"type":"integer","title":"Letterheadrecordid"},"state":{"$ref":"#/components/schemas/UsageState"},"lastUsedOn":{"type":"string","format":"date","title":"Lastusedon"},"sentAs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentas"}},"type":"object","required":["letterheadRecordId","state","lastUsedOn","sentAs"],"title":"DesignUsageRow","description":"What became of one design under one program, for the new-line row's chosen program."},"DesignVariantRow":{"properties":{"methodRecordId":{"type":"integer","title":"Methodrecordid"},"name":{"type":"string","title":"Name"},"label":{"type":"string","title":"Label"},"hasPrintConfig":{"type":"boolean","title":"Hasprintconfig"},"envelopeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Envelopename"},"insertName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insertname"},"steps":{"items":{"$ref":"#/components/schemas/DesignStepRow"},"type":"array","title":"Steps"}},"type":"object","required":["methodRecordId","name","label","hasPrintConfig","envelopeName","insertName","steps"],"title":"DesignVariantRow","description":"One letterhead item in a family."},"DiscardRequest":{"properties":{"feedback":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Feedback"}},"type":"object","title":"DiscardRequest","description":"What the discard dialog's feedback box held, blank included. Omitted leaves feedback alone."},"DropCalendarMonth":{"properties":{"month":{"type":"string","format":"date","title":"Month"},"mailDrops":{"items":{"type":"string","format":"date"},"type":"array","title":"Maildrops"},"leaseRetentionDrop":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Leaseretentiondrop"},"leaseRetentionEmail":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Leaseretentionemail"},"matchingEmail":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Matchingemail"},"isConfigured":{"type":"boolean","title":"Isconfigured"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat"},"updatedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updatedby"}},"type":"object","required":["month","mailDrops","leaseRetentionDrop","leaseRetentionEmail","matchingEmail","isConfigured","updatedAt","updatedBy"],"title":"DropCalendarMonth","description":"One month on the page: its saved dates, or empty where it has none."},"DropCalendarWindow":{"properties":{"months":{"items":{"$ref":"#/components/schemas/DropCalendarMonth"},"type":"array","title":"Months"}},"type":"object","required":["months"],"title":"DropCalendarWindow","description":"The months the page shows, earliest first."},"EstimateDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"recordId":{"type":"integer","title":"Recordid"},"refNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refnumber"},"txnDate":{"type":"string","format":"date","title":"Txndate"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"customerId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Customerid"},"customerRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Customerrecordid"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"subtotal":{"type":"number","title":"Subtotal"},"totalAmount":{"type":"number","title":"Totalamount"},"lineItems":{"items":{"$ref":"#/components/schemas/EstimateLineRow"},"type":"array","title":"Lineitems"},"billingItems":{"items":{"$ref":"#/components/schemas/EstimateLineRow"},"type":"array","title":"Billingitems"}},"type":"object","required":["id","recordId","refNumber","txnDate","status","customerId","customerRecordId","customerName","subtotal","totalAmount","lineItems","billingItems"],"title":"EstimateDetailResponse","description":"One real Method estimate with its lines, served from our mirror."},"EstimateLineRow":{"properties":{"recordId":{"type":"integer","title":"Recordid"},"quantity":{"type":"number","title":"Quantity"},"itemName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Itemname"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"letterheadName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Letterheadname"},"envelopeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Envelopename"},"insertName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insertname"},"postage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postage"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"rate":{"type":"number","title":"Rate"},"amount":{"type":"number","title":"Amount"},"lineOrderNumber":{"type":"integer","title":"Lineordernumber"},"dropDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dropdate"}},"type":"object","required":["recordId","quantity","itemName","category","letterheadName","envelopeName","insertName","postage","description","rate","amount","lineOrderNumber","dropDate"],"title":"EstimateLineRow","description":"One line of a real Method estimate, as our mirror stores it.\n\nServes both flavours: a billing row carries no drop date, no letterhead, and always\n`quantity` 1. Which flavour a line is comes from WHICH LIST it arrives in, not a flag."},"FeedbackQueueItem":{"properties":{"estimateId":{"type":"string","format":"uuid","title":"Estimateid"},"customerName":{"type":"string","title":"Customername"},"txnDate":{"type":"string","format":"date","title":"Txndate"},"status":{"$ref":"#/components/schemas/ProjectedEstimateStatus"},"feedback":{"type":"string","title":"Feedback"},"feedbackBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedbackby"},"feedbackAt":{"type":"string","format":"date-time","title":"Feedbackat"},"resolvedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolvedat"},"resolutionNote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolutionnote"},"resolvedBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolvedby"}},"type":"object","required":["estimateId","customerName","txnDate","status","feedback","feedbackBy","feedbackAt","resolvedAt","resolutionNote","resolvedBy"],"title":"FeedbackQueueItem","description":"One projection in the review queue: who it was for, where it stands, the feedback, its link."},"FeedbackRequest":{"properties":{"feedback":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Feedback"}},"type":"object","title":"FeedbackRequest","description":"A rep's feedback on a projection, for our engineers. Null or blank clears it."},"FlagSeverity":{"type":"string","enum":["none","low","medium","high"],"title":"FlagSeverity","description":"How hard the agent is asking a human to look at this proposal.\n\nAlways surfaced alongside :attr:`ProjectedEstimate.flag_reason`, so the user reads why."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"JobRunCounts":{"properties":{"succeeded":{"type":"integer","title":"Succeeded"},"failed":{"type":"integer","title":"Failed"},"total":{"type":"integer","title":"Total"},"classifying":{"type":"integer","title":"Classifying"},"classificationFailed":{"type":"integer","title":"Classificationfailed"}},"type":"object","required":["succeeded","failed","total","classifying","classificationFailed"],"title":"JobRunCounts","description":"A run's dealerships by where their estimates stand.\n\nCounts dealerships, not items: a split dealership's two estimates count once. ``total`` is\nthe dealerships with at least one estimate set to run, leaving out those whose month was\nalready covered on every track. A classify item seeds its dealership's estimates when it\nfinishes, so while ``classifying`` is above zero ``total`` is still growing."},"JobRunEstimate":{"properties":{"track":{"type":"string","title":"Track"},"projectedEstimateId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Projectedestimateid"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["track"],"title":"JobRunEstimate","description":"One track of a split dealership's run, for a run that has more than one.\n\nA split dealership's one-off run drafts two estimates - its sales estimate and a separate\nservice estimate - so its row cannot link to a single detail page; the page offers the\ntracks in a dialog. A track that wrote no draft is still listed, with why, so the one that\nfailed does not vanish behind the one that worked."},"JobRunView":{"properties":{"id":{"type":"string","title":"Id"},"jobType":{"type":"string","title":"Jobtype"},"status":{"type":"string","title":"Status"},"source":{"type":"string","title":"Source"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finishedat"},"counts":{"$ref":"#/components/schemas/JobRunCounts"},"projectedEstimateId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Projectedestimateid"},"estimates":{"items":{"$ref":"#/components/schemas/JobRunEstimate"},"type":"array","title":"Estimates","default":[]},"declineReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Declinereason"}},"type":"object","required":["id","jobType","status","source","params","error","createdAt","finishedAt","counts"],"title":"JobRunView"},"JobRunsOverview":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/JobRunView"},"type":"array","title":"Runs"}},"type":"object","required":["runs"],"title":"JobRunsOverview"},"Lifecycle":{"properties":{"state":{"type":"string","enum":["prospect","steady","slipping","forgotten","rejected_out"],"title":"State"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"},"history":{"items":{"$ref":"#/components/schemas/LifecycleMonth"},"type":"array","title":"History"}},"type":"object","required":["state","reasons","history"],"title":"Lifecycle","description":"The store's lifecycle bucket, and the slipping rules that fired, in plain words."},"LifecycleMonth":{"properties":{"month":{"type":"string","title":"Month"},"state":{"type":"string","enum":["prospect","steady","slipping","forgotten","rejected_out"],"title":"State"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"}},"type":"object","required":["month","state","reasons"],"title":"LifecycleMonth","description":"The store's bucket as of one past month."},"LineBasis":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/BasisRow"},"type":"array","title":"Rows"},"total":{"anyOf":[{"$ref":"#/components/schemas/BasisRow"},{"type":"null"}]},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"additionalProperties":false,"type":"object","title":"LineBasis","description":"A receipt: labelled rows, an optional total they sum to, and evidence tags."},"LineOptionsResponse":{"properties":{"message":{"type":"string","title":"Message"},"program":{"type":"string","title":"Program"},"sequence":{"type":"string","title":"Sequence"},"messages":{"items":{"$ref":"#/components/schemas/MessageOptionRow"},"type":"array","title":"Messages"},"designs":{"items":{"$ref":"#/components/schemas/DesignOptionRow"},"type":"array","title":"Designs"},"envelopes":{"items":{"$ref":"#/components/schemas/ComponentOptionRow"},"type":"array","title":"Envelopes"},"inserts":{"items":{"$ref":"#/components/schemas/ComponentOptionRow"},"type":"array","title":"Inserts"},"postages":{"items":{"$ref":"#/components/schemas/ComponentOptionRow"},"type":"array","title":"Postages"},"dropMonthStart":{"type":"string","format":"date","title":"Dropmonthstart"},"configuredDrops":{"items":{"$ref":"#/components/schemas/ConfiguredDropRow"},"type":"array","title":"Configureddrops"},"priorConfigs":{"items":{"$ref":"#/components/schemas/PriorPrintConfigRow"},"type":"array","title":"Priorconfigs"}},"type":"object","required":["message","program","sequence","messages","designs","envelopes","inserts","postages","dropMonthStart","configuredDrops","priorConfigs"],"title":"LineOptionsResponse","description":"Everything the line's picker offers, plus what bounds the message list."},"LineWriteResponse":{"properties":{"estimate":{"$ref":"#/components/schemas/ProjectedEstimateDetailResponse"},"callOuts":{"items":{"$ref":"#/components/schemas/CallOutRow"},"type":"array","title":"Callouts"}},"type":"object","required":["estimate","callOuts"],"title":"LineWriteResponse","description":"A line write: the whole repriced estimate, and anything worth calling out.\n\nThe estimate is nested, not spread, so it stays byte-identical to the GET and a client can\ncache one as the other. A call-out is about THIS request, so it cannot live on the estimate."},"MessageOptionRow":{"properties":{"itemRecordId":{"type":"integer","title":"Itemrecordid"},"name":{"type":"string","title":"Name"},"isCurrent":{"type":"boolean","title":"Iscurrent"},"letterheadRecordIds":{"items":{"type":"integer"},"type":"array","title":"Letterheadrecordids"},"program":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Program"},"inRotation":{"type":"boolean","title":"Inrotation","default":false},"isFlatBilled":{"type":"boolean","title":"Isflatbilled","default":false},"isQuotable":{"type":"boolean","title":"Isquotable","default":true}},"type":"object","required":["itemRecordId","name","isCurrent","letterheadRecordIds"],"title":"MessageOptionRow","description":"One message this line could carry - see `MessageOption` in\n`services/projected_estimate/line_options.py`. The viewer groups on `in_rotation`."},"MethodSyncGroupRow":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"members":{"items":{"$ref":"#/components/schemas/MethodSyncRow"},"type":"array","title":"Members"},"ttlSeconds":{"type":"integer","title":"Ttlseconds"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Syncedat"},"isFresh":{"type":"boolean","title":"Isfresh"},"rowCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rowcount"},"leaseHeld":{"type":"boolean","title":"Leaseheld"}},"type":"object","required":["key","label","members","ttlSeconds","syncedAt","isFresh","rowCount","leaseHeld"],"title":"MethodSyncGroupRow","description":"One page row: a group of mirrors that move together, judged by its stalest member."},"MethodSyncMemberResult":{"properties":{"kind":{"type":"string","title":"Kind"},"label":{"type":"string","title":"Label"},"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["kind","label","status","error"],"title":"MethodSyncMemberResult","description":"What became of one table inside a group's trigger.\n\n``status`` is \"synced\", \"busy\" (another worker holds the lease - nothing was pulled)\nor \"failed\" (the pull errored; ``error`` says how, and it is recorded on the row)."},"MethodSyncRow":{"properties":{"kind":{"type":"string","title":"Kind"},"label":{"type":"string","title":"Label"},"ttlSeconds":{"type":"integer","title":"Ttlseconds"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Syncedat"},"isFresh":{"type":"boolean","title":"Isfresh"},"rowCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rowcount"},"failedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Failedat"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"leaseHeld":{"type":"boolean","title":"Leaseheld"}},"type":"object","required":["kind","label","ttlSeconds","syncedAt","isFresh","rowCount","failedAt","error","leaseHeld"],"title":"MethodSyncRow","description":"One mirrored Method table's clock, freshness, failure and lease."},"MethodSyncStatusResponse":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/MethodSyncGroupRow"},"type":"array","title":"Groups"}},"type":"object","required":["groups"],"title":"MethodSyncStatusResponse"},"MethodSyncTriggerRequest":{"properties":{"group":{"type":"string","title":"Group"}},"type":"object","required":["group"],"title":"MethodSyncTriggerRequest","description":"Which group to pull. Must be one of ``sync_admin.SYNC_GROUPS``."},"MethodSyncTriggerResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/MethodSyncMemberResult"},"type":"array","title":"Results"},"group":{"$ref":"#/components/schemas/MethodSyncGroupRow"}},"type":"object","required":["results","group"],"title":"MethodSyncTriggerResponse","description":"One result per table in the group, plus the row afterwards.\n\nNever a single group-wide status: a mix (some synced, some busy, some failed) is the\nordinary outcome."},"MethodUsageSummary":{"properties":{"rolling24h":{"$ref":"#/components/schemas/Rolling24h"},"daily":{"items":{"$ref":"#/components/schemas/DailyBucket"},"type":"array","title":"Daily"},"recent":{"items":{"$ref":"#/components/schemas/RecentCall"},"type":"array","title":"Recent"}},"type":"object","required":["rolling24h","daily","recent"],"title":"MethodUsageSummary"},"MonthResult":{"properties":{"month":{"type":"string","title":"Month"},"programs":{"items":{"type":"string"},"type":"array","title":"Programs"},"campaigns":{"type":"integer","title":"Campaigns"},"pieces":{"type":"integer","title":"Pieces"},"billing":{"type":"integer","title":"Billing"},"sold":{"type":"integer","title":"Sold"},"costPerSale":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Costpersale"},"untracked":{"anyOf":[{"type":"string","enum":["before_tracking","not_tracked","no_results"]},{"type":"null"}],"title":"Untracked"},"unmatchedPrograms":{"items":{"$ref":"#/components/schemas/UnmatchedProgram"},"type":"array","title":"Unmatchedprograms"},"campaignResults":{"items":{"$ref":"#/components/schemas/CampaignResult"},"type":"array","title":"Campaignresults"}},"type":"object","required":["month","programs","campaigns","pieces","billing","sold","costPerSale","untracked","unmatchedPrograms","campaignResults"],"title":"MonthResult","description":"One month mailed in \"Campaign results since Jan 2024\"."},"MonthTotals":{"properties":{"campaigns":{"type":"integer","title":"Campaigns"},"pieces":{"type":"integer","title":"Pieces"},"billing":{"type":"integer","title":"Billing"},"sold":{"type":"integer","title":"Sold"},"costPerSale":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Costpersale"}},"type":"object","required":["campaigns","pieces","billing","sold","costPerSale"],"title":"MonthTotals"},"MonthlyRunPreview":{"properties":{"month":{"type":"string","format":"date","title":"Month"},"selectableMonths":{"items":{"type":"string","format":"date"},"type":"array","title":"Selectablemonths"},"totalCustomers":{"type":"integer","title":"Totalcustomers"},"pendingCustomers":{"type":"integer","title":"Pendingcustomers"},"skippedCustomers":{"type":"integer","title":"Skippedcustomers"},"hasSalesGoals":{"type":"boolean","title":"Hassalesgoals"},"activeRunId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activerunid"}},"type":"object","required":["month","selectableMonths","totalCustomers","pendingCustomers","skippedCustomers","hasSalesGoals"],"title":"MonthlyRunPreview","description":"What a monthly run over one month would do - the numbers the dialog confirms on.\n\nAn estimate, deliberately: it plans against the mirrors as held and does NOT re-pull them\n(a whole-mirror Method call, and this runs on dialog open). The run itself refreshes before\nplanning, so the real fan-out can differ a little; the dialog words it as an approximation."},"MonthlyRunRequest":{"properties":{"month":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Month"},"earlyRound":{"type":"boolean","title":"Earlyround","default":false},"limit":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Limit"}},"type":"object","title":"MonthlyRunRequest","description":"Which month to run, and how much of the book. Absent means next month, all of it."},"MonthlyRunStarted":{"properties":{"executionName":{"type":"string","title":"Executionname"},"month":{"type":"string","format":"date","title":"Month"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},"type":"object","required":["executionName","month"],"title":"MonthlyRunStarted","description":"A Cloud Run execution was created. The run row does not exist yet."},"NewLineOptionsResponse":{"properties":{"programs":{"items":{"$ref":"#/components/schemas/ProgramOptionRow"},"type":"array","title":"Programs"},"designs":{"items":{"$ref":"#/components/schemas/DesignOptionRow"},"type":"array","title":"Designs"},"envelopes":{"items":{"$ref":"#/components/schemas/ComponentOptionRow"},"type":"array","title":"Envelopes"},"inserts":{"items":{"$ref":"#/components/schemas/ComponentOptionRow"},"type":"array","title":"Inserts"},"postages":{"items":{"$ref":"#/components/schemas/ComponentOptionRow"},"type":"array","title":"Postages"},"dropMonthStart":{"type":"string","format":"date","title":"Dropmonthstart"},"priorConfigs":{"items":{"$ref":"#/components/schemas/PriorPrintConfigRow"},"type":"array","title":"Priorconfigs"},"addOns":{"items":{"$ref":"#/components/schemas/AddOnOptionRow"},"type":"array","title":"Addons"},"configuredDrops":{"items":{"$ref":"#/components/schemas/ConfiguredDropRow"},"type":"array","title":"Configureddrops"}},"type":"object","required":["programs","designs","envelopes","inserts","postages","dropMonthStart","priorConfigs","addOns","configuredDrops"],"title":"NewLineOptionsResponse","description":"Everything a line could be created as, before there is a line to ask about."},"NewLineStepRow":{"properties":{"sequenceNumber":{"type":"integer","title":"Sequencenumber"},"messageRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Messagerecordid"},"letterheadRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Letterheadrecordid"},"envelopeRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Enveloperecordid"},"envelopeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Envelopename"},"insertRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Insertrecordid"},"insertName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insertname"},"postageRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Postagerecordid"},"postageName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postagename"}},"type":"object","required":["sequenceNumber","messageRecordId","letterheadRecordId","envelopeRecordId","envelopeName","insertRecordId","insertName","postageRecordId","postageName"],"title":"NewLineStepRow","description":"One step of a rotation, as a piece a new line could be created as.\n\nThe pair plus what it usually mails as, so picking a message fills the rest of the row.\nAll six component fields are null together for a design the defaults table does not cover\n- never half a config."},"PlannerOrder":{"type":"string","enum":["customer","recent"],"title":"PlannerOrder","description":"How the planner list is ordered.\n\n``customer`` - alphabetical by customer name (the default), so a customer's estimates land\nadjacent for the grouped presentation; within a customer they are ordered by date.\n\n``recent`` - most recently created first, so a fresh batch is immediately visible."},"PlannerWindow":{"properties":{"start":{"type":"string","format":"date","title":"Start"},"end":{"type":"string","format":"date","title":"End"},"months":{"type":"integer","title":"Months"}},"type":"object","required":["start","end","months"],"title":"PlannerWindow","description":"The date window the list was filtered on, echoed for the UI label."},"PlanningFactsOptions":{"properties":{"strategies":{"items":{"type":"string"},"type":"array","title":"Strategies"},"cadences":{"items":{"type":"string"},"type":"array","title":"Cadences"},"dealerTypes":{"items":{"type":"string"},"type":"array","title":"Dealertypes"},"programs":{"items":{"type":"string"},"type":"array","title":"Programs"},"riderItems":{"items":{"$ref":"#/components/schemas/RiderItemOption"},"type":"array","title":"Rideritems"}},"type":"object","required":["strategies","cadences","dealerTypes","programs","riderItems"],"title":"PlanningFactsOptions","description":"The choices the form-mode editor fills its dropdowns from.\n\nThe enum vocabularies come straight off the typed schema, so the form can never offer a value\nthe record would reject; `programs` is the eight mailer programs by name; `riderItems` is the\nprogram-less add-on catalog a rider's item is picked from - a pick fills its `itemRecordId`, the\nfield a hand-authored rider has no way to look up."},"PlanningFactsPreview":{"properties":{"renderedMarkdown":{"type":"string","title":"Renderedmarkdown"}},"type":"object","required":["renderedMarkdown"],"title":"PlanningFactsPreview","description":"The markdown a candidate record would render to - what the agent would read."},"PlanningFactsSaveRequest":{"properties":{"facts":{"title":"Facts"}},"type":"object","required":["facts"],"title":"PlanningFactsSaveRequest","description":"A save (or a preview): the candidate record in its raw `PlanningFacts` JSON shape.\n\n`facts` is typed loosely and validated in the handler rather than as `PlanningFacts` on\nthe wire, so every schema failure - a wrong field, or a non-object body - comes back as\none readable sentence naming the problem instead of FastAPI's structured error list."},"PlanningFactsView":{"properties":{"customerRecordId":{"type":"integer","title":"Customerrecordid"},"customerName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customername"},"exists":{"type":"boolean","title":"Exists"},"facts":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Facts"},"abstainReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abstainreason"},"writtenBy":{"anyOf":[{"$ref":"#/components/schemas/PlanningFactsWriter"},{"type":"null"}]},"createdAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Createdat"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updatedat"},"renderedMarkdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renderedmarkdown"}},"type":"object","required":["customerRecordId","exists"],"title":"PlanningFactsView","description":"A dealership's stored planning-facts record for the editor.\n\n`exists` is False when no row has been written yet - the editor then starts a fresh\nrecord. `facts` is the raw typed-facts JSON exactly as stored (the shape the editor\nworks and a save sends back); `renderedMarkdown` is that record rendered as the agent\nreads it, and is null for an abstention or an empty record."},"PlanningFactsWriter":{"type":"string","enum":["agent","person"],"title":"PlanningFactsWriter","description":"Who last wrote the record - shown in the internal editor, so a bad classification\nis auditable and a person's override is visible as one."},"PriceBookCatalogResponse":{"properties":{"books":{"items":{"$ref":"#/components/schemas/PriceBookRow"},"type":"array","title":"Books"},"items":{"items":{"$ref":"#/components/schemas/PricedItemRow"},"type":"array","title":"Items"},"excluded":{"items":{"type":"string"},"type":"array","title":"Excluded"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Syncedat"}},"type":"object","required":["books","items","excluded","syncedAt"],"title":"PriceBookCatalogResponse"},"PriceBookRow":{"properties":{"name":{"type":"string","title":"Name"},"effectiveStart":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effectivestart"},"effectiveEnd":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Effectiveend"},"bracketSet":{"type":"string","title":"Bracketset"},"brackets":{"items":{"$ref":"#/components/schemas/QuantityBracketRow"},"type":"array","title":"Brackets"}},"type":"object","required":["name","effectiveStart","effectiveEnd","bracketSet","brackets"],"title":"PriceBookRow","description":"One book in effect today: what it is called, when it runs, how it is banded."},"PricedItemRow":{"properties":{"itemRecordId":{"type":"integer","title":"Itemrecordid"},"fullName":{"type":"string","title":"Fullname"},"parentFullName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentfullname"},"prices":{"additionalProperties":{"items":{"type":"number"},"type":"array"},"type":"object","title":"Prices"}},"type":"object","required":["itemRecordId","fullName","parentFullName","prices"],"title":"PricedItemRow","description":"One catalog item and its per-piece price in each book that carries it."},"PriorPrintConfigRow":{"properties":{"letterheadRecordId":{"type":"integer","title":"Letterheadrecordid"},"envelopeRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Enveloperecordid"},"envelopeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Envelopename"},"insertRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Insertrecordid"},"insertName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insertname"},"postageRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Postagerecordid"},"postageName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postagename"},"label":{"type":"string","title":"Label"}},"type":"object","required":["letterheadRecordId","envelopeRecordId","envelopeName","insertRecordId","insertName","postageRecordId","postageName","label"],"title":"PriorPrintConfigRow","description":"What this dealership last mailed one design as. Evidence, not a default - nothing on\nthe write path consults it (see `services/projected_estimate/line_options.py`)."},"ProgramCatalogResponse":{"properties":{"programs":{"items":{"$ref":"#/components/schemas/ProgramRotationRow"},"type":"array","title":"Programs"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Syncedat"}},"type":"object","required":["programs","syncedAt"],"title":"ProgramCatalogResponse","description":"Every program, plus how current the mirror behind them is."},"ProgramOptionRow":{"properties":{"program":{"type":"string","title":"Program"},"sequence":{"type":"string","title":"Sequence"},"isFlatBilled":{"type":"boolean","title":"Isflatbilled"},"messages":{"items":{"$ref":"#/components/schemas/MessageOptionRow"},"type":"array","title":"Messages"},"steps":{"items":{"$ref":"#/components/schemas/NewLineStepRow"},"type":"array","title":"Steps"},"dropDates":{"items":{"type":"string","format":"date"},"type":"array","title":"Dropdates"},"designUsage":{"items":{"$ref":"#/components/schemas/DesignUsageRow"},"type":"array","title":"Designusage"}},"type":"object","required":["program","sequence","isFlatBilled","messages","steps","dropDates","designUsage"],"title":"ProgramOptionRow","description":"One program a new line could be added under, on this dealership's own rotation."},"ProgramResult":{"properties":{"program":{"type":"string","title":"Program"},"pieces":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pieces"},"sales":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sales"},"billing":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Billing"},"costPerSale":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Costpersale"}},"type":"object","required":["program","pieces","sales","billing","costPerSale"],"title":"ProgramResult","description":"One program's row in \"Programs & results\"."},"ProgramRotationRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"methodRecordId":{"type":"integer","title":"Methodrecordid"},"name":{"type":"string","title":"Name"},"isFlatBilled":{"type":"boolean","title":"Isflatbilled"},"sequences":{"items":{"$ref":"#/components/schemas/ProgramSequenceRow"},"type":"array","title":"Sequences"}},"type":"object","required":["id","methodRecordId","name","isFlatBilled","sequences"],"title":"ProgramRotationRow","description":"One mailer program with every rotation it actually has.\n\nThe empty `Highline` rows Special Finance, Loan Modification and Spanish hold in Method\nare dropped server-side, so a single-rotation program has exactly one entry here and the\nclient renders \"Standard sequence only\" from list length, not program names."},"ProgramSequenceRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"steps":{"items":{"$ref":"#/components/schemas/RotationStepRow"},"type":"array","title":"Steps"}},"type":"object","required":["id","name","steps"],"title":"ProgramSequenceRow","description":"One rotation variant (`Standard` / `Highline`) of one program."},"ProgramUsageResponse":{"properties":{"program":{"type":"string","title":"Program"},"months":{"type":"integer","title":"Months"},"windowStart":{"type":"string","format":"date","title":"Windowstart"},"assignedSequenceName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assignedsequencename"},"sequences":{"items":{"$ref":"#/components/schemas/ProgramUsageSequenceRow"},"type":"array","title":"Sequences"}},"type":"object","required":["program","months","windowStart","assignedSequenceName","sequences"],"title":"ProgramUsageResponse","description":"One program's rotations seen through one dealership's last 12 months.\n\nEvery sequence comes back, not only the assigned one, since the dialog leaves the\nvariant toggle live and a reviewer needs to see what was mailed from the other."},"ProgramUsageSequenceRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"isAssigned":{"type":"boolean","title":"Isassigned"},"steps":{"items":{"$ref":"#/components/schemas/ProgramUsageStepRow"},"type":"array","title":"Steps"}},"type":"object","required":["id","name","isAssigned","steps"],"title":"ProgramUsageSequenceRow","description":"One rotation variant, with usage already applied to its steps."},"ProgramUsageStepRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"sequenceNumber":{"type":"integer","title":"Sequencenumber"},"messageName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Messagename"},"letterheadName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Letterheadname"},"messageMethodRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Messagemethodrecordid"},"letterheadMethodRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Letterheadmethodrecordid"},"state":{"anyOf":[{"$ref":"#/components/schemas/UsageState"},{"type":"null"}]},"lastUsedOn":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Lastusedon"},"timesUsed":{"type":"integer","title":"Timesused"},"sentAs":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentas"}},"type":"object","required":["id","sequenceNumber","messageName","letterheadName","messageMethodRecordId","letterheadMethodRecordId","state","lastUsedOn","timesUsed","sentAs"],"title":"ProgramUsageStepRow","description":"One rotation step, plus what became of its letterhead for this dealership."},"ProjectedEstimateBillingRow":{"properties":{"key":{"type":"string","title":"Key"},"itemName":{"type":"string","title":"Itemname"},"itemRecordId":{"type":"integer","title":"Itemrecordid"},"description":{"type":"string","title":"Description"},"quantity":{"type":"number","title":"Quantity"},"rate":{"type":"number","title":"Rate"},"amount":{"type":"number","title":"Amount"},"computedAmount":{"type":"number","title":"Computedamount"},"rawAmount":{"type":"number","title":"Rawamount"},"overrideAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overrideamount"}},"type":"object","required":["key","itemName","itemRecordId","description","quantity","rate","amount","computedAmount","rawAmount","overrideAmount"],"title":"ProjectedEstimateBillingRow","description":"One charge row this projection would create in Method - the invoice side.\n\nDerived on every read, never stored (a snapshot would go stale when an item's income\naccount moved). Same shape as a real estimate's `billingItems`, so both render through one component."},"ProjectedEstimateDetailResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"$ref":"#/components/schemas/ProjectedEstimateStatus"},"approvedMethodRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Approvedmethodrecordid"},"approvedMethodShortUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approvedmethodshorturl"},"customerId":{"type":"string","format":"uuid","title":"Customerid"},"customerName":{"type":"string","title":"Customername"},"customerMethodRecordId":{"type":"integer","title":"Customermethodrecordid"},"txnDate":{"type":"string","format":"date","title":"Txndate"},"subtotal":{"type":"number","title":"Subtotal"},"totalAmount":{"type":"number","title":"Totalamount"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"flagSeverity":{"$ref":"#/components/schemas/FlagSeverity"},"flagReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flagreason"},"serverNotes":{"items":{"type":"string"},"type":"array","title":"Servernotes"},"gamePlanSequence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gameplansequence"},"priceBook":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricebook"},"priceBookDiscountCents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pricebookdiscountcents"},"memo":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memo"},"memoEditable":{"type":"boolean","title":"Memoeditable"},"chargesEditable":{"type":"boolean","title":"Chargeseditable"},"linesCreatable":{"type":"boolean","title":"Linescreatable"},"lines":{"items":{"$ref":"#/components/schemas/ProjectedEstimateLineRow"},"type":"array","title":"Lines"},"billingLines":{"items":{"$ref":"#/components/schemas/ProjectedEstimateBillingRow"},"type":"array","title":"Billinglines"},"discardedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Discardedat"},"savedForLaterAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Savedforlaterat"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"feedbackBy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedbackby"},"feedbackAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Feedbackat"},"reviewFindings":{"items":{"$ref":"#/components/schemas/ReviewNoteResponse"},"type":"array","title":"Reviewfindings"}},"type":"object","required":["id","status","approvedMethodRecordId","approvedMethodShortUrl","customerId","customerName","customerMethodRecordId","txnDate","subtotal","totalAmount","categories","flagSeverity","flagReason","serverNotes","gamePlanSequence","priceBook","priceBookDiscountCents","memo","memoEditable","chargesEditable","linesCreatable","lines","billingLines"],"title":"ProjectedEstimateDetailResponse"},"ProjectedEstimateLineRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"lineOrder":{"type":"integer","title":"Lineorder"},"quantity":{"type":"number","title":"Quantity"},"rate":{"type":"number","title":"Rate"},"amount":{"type":"number","title":"Amount"},"dropDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dropdate"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"itemId":{"type":"string","format":"uuid","title":"Itemid"},"itemName":{"type":"string","title":"Itemname"},"itemFullName":{"type":"string","title":"Itemfullname"},"itemMethodRecordId":{"type":"integer","title":"Itemmethodrecordid"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"letterheadItemId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Letterheaditemid"},"letterheadName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Letterheadname"},"letterheadFullName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Letterheadfullname"},"envelopeName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Envelopename"},"insertName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insertname"},"postage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postage"},"letterheadRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Letterheadrecordid"},"envelopeRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Enveloperecordid"},"insertRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Insertrecordid"},"postageRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Postagerecordid"},"sequenceLineId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Sequencelineid"},"sequenceName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sequencename"},"sequenceNumber":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sequencenumber"},"selectionReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Selectionreason"},"pricingBasis":{"anyOf":[{"$ref":"#/components/schemas/LineBasis"},{"type":"null"}]},"timingBasis":{"anyOf":[{"$ref":"#/components/schemas/LineBasis"},{"type":"null"}]},"reviewerEditedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewereditedat"},"asProposed":{"anyOf":[{"$ref":"#/components/schemas/AsProposedRow"},{"type":"null"}]},"letterheadWarning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Letterheadwarning"},"quantityEditable":{"type":"boolean","title":"Quantityeditable"},"lineEditable":{"type":"boolean","title":"Lineeditable"},"dropDateEditable":{"type":"boolean","title":"Dropdateeditable"},"lineDeletable":{"type":"boolean","title":"Linedeletable"}},"type":"object","required":["id","lineOrder","quantity","rate","amount","dropDate","description","itemId","itemName","itemFullName","itemMethodRecordId","category","letterheadItemId","letterheadName","letterheadFullName","envelopeName","insertName","postage","letterheadRecordId","envelopeRecordId","insertRecordId","postageRecordId","sequenceLineId","sequenceName","sequenceNumber","selectionReason","pricingBasis","timingBasis","reviewerEditedAt","asProposed","letterheadWarning","quantityEditable","lineEditable","dropDateEditable","lineDeletable"],"title":"ProjectedEstimateLineRow","description":"One line of a projected estimate, fully resolved for display."},"ProjectedEstimateList":{"properties":{"window":{"$ref":"#/components/schemas/PlannerWindow"},"order":{"$ref":"#/components/schemas/PlannerOrder"},"estimates":{"items":{"$ref":"#/components/schemas/ProjectedEstimateRow"},"type":"array","title":"Estimates"}},"type":"object","required":["window","order","estimates"],"title":"ProjectedEstimateList"},"ProjectedEstimateRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"customerId":{"type":"string","format":"uuid","title":"Customerid"},"customerName":{"type":"string","title":"Customername"},"customerMethodRecordId":{"type":"integer","title":"Customermethodrecordid"},"txnDate":{"type":"string","format":"date","title":"Txndate"},"subtotal":{"type":"number","title":"Subtotal"},"totalAmount":{"type":"number","title":"Totalamount"},"lineCount":{"type":"integer","title":"Linecount"},"salesperson":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Salesperson"},"categories":{"items":{"type":"string"},"type":"array","title":"Categories"},"flagSeverity":{"$ref":"#/components/schemas/FlagSeverity"},"flagReason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flagreason"},"serverNotes":{"items":{"type":"string"},"type":"array","title":"Servernotes"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"savedForLaterAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Savedforlaterat"}},"type":"object","required":["id","customerId","customerName","customerMethodRecordId","txnDate","subtotal","totalAmount","lineCount","salesperson","categories","flagSeverity","flagReason","serverNotes","createdAt"],"title":"ProjectedEstimateRow","description":"One projected estimate in the planner list."},"ProjectedEstimateStatus":{"type":"string","enum":["draft","approved","discarded"],"title":"ProjectedEstimateStatus","description":"Where a proposal sits in *our* review workflow, not Method's.\n\n``discarded`` rows are kept rather than deleted: how often a human rejects what the\nagent proposed is exactly the feedback we want, and a deleted row cannot answer it."},"ProjectionItemTask":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"item_id":{"type":"string","format":"uuid","title":"Item Id"}},"type":"object","required":["run_id","item_id"],"title":"ProjectionItemTask","description":"The task body the enqueuer sends - ids only; everything else is read from the DB."},"ProjectionWindowRow":{"properties":{"start":{"type":"string","format":"date","title":"Start"},"end":{"type":"string","format":"date","title":"End"}},"type":"object","required":["start","end"],"title":"ProjectionWindowRow","description":"The date range `projectedEstimates` was filtered on, echoed for the page to label.\n\nThe planner's own window (a projection outside it is not actionable here); also the set\nof months the projection dialog offers. Echoed rather than recomputed in the browser\nbecause client and server Eastern day disagree around a month boundary, which would\nlabel the page with a range it was not filtered on."},"QuantityBracketRow":{"properties":{"tier":{"type":"integer","title":"Tier"},"minQuantity":{"type":"number","title":"Minquantity"},"maxQuantity":{"type":"number","title":"Maxquantity"}},"type":"object","required":["tier","minQuantity","maxQuantity"],"title":"QuantityBracketRow","description":"One quantity band and the tier column it selects.\n\nSent with the books, not assumed client-side: the bands are Method's to change."},"RecentCall":{"properties":{"id":{"type":"string","title":"Id"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"verb":{"type":"string","title":"Verb"},"tableName":{"type":"string","title":"Tablename"},"endpoint":{"type":"string","title":"Endpoint"},"recordId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recordid"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params"},"caller":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller"},"success":{"type":"boolean","title":"Success"},"statusCode":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Statuscode"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"latencyMs":{"type":"integer","title":"Latencyms"},"rowCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rowcount"}},"type":"object","required":["id","createdAt","verb","tableName","endpoint","recordId","params","caller","success","statusCode","error","latencyMs","rowCount"],"title":"RecentCall"},"ResolveRequest":{"properties":{"resolved":{"type":"boolean","title":"Resolved"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["resolved"],"title":"ResolveRequest","description":"Whether the super admin is marking a projection's feedback handled, or reopening it.\n\n``note`` is their optional free-text \"why\", recorded only when resolving."},"ReviewNoteResponse":{"properties":{"severity":{"type":"string","title":"Severity"},"criterion":{"type":"string","title":"Criterion"},"issue":{"type":"string","title":"Issue"},"evidence":{"type":"string","title":"Evidence"},"requiredFix":{"type":"string","title":"Requiredfix"}},"type":"object","required":["severity","criterion","issue","evidence","requiredFix"],"title":"ReviewNoteResponse","description":"One advisory reviewer note shown beside the estimate - a second AI's read on the draft."},"ReviewerEnabled":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"ReviewerEnabled","description":"The estimate reviewer on/off toggle - the same flag going out and coming in."},"RiderItemOption":{"properties":{"itemRecordId":{"type":"integer","title":"Itemrecordid"},"name":{"type":"string","title":"Name"}},"type":"object","required":["itemRecordId","name"],"title":"RiderItemOption","description":"One add-on the form editor offers as a standing rider - the record id a rider carries, by name."},"Rolling24h":{"properties":{"total":{"type":"integer","title":"Total"},"success":{"type":"integer","title":"Success"},"fail":{"type":"integer","title":"Fail"},"limit":{"type":"integer","title":"Limit"}},"type":"object","required":["total","success","fail","limit"],"title":"Rolling24h"},"RotationStepRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"sequenceNumber":{"type":"integer","title":"Sequencenumber"},"messageName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Messagename"},"letterheadName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Letterheadname"},"messageMethodRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Messagemethodrecordid"},"letterheadMethodRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Letterheadmethodrecordid"}},"type":"object","required":["id","sequenceNumber","messageName","letterheadName","messageMethodRecordId","letterheadMethodRecordId"],"title":"RotationStepRow","description":"One filled step of a program's rotation."},"SaveDropCalendarRequest":{"properties":{"mailDrops":{"items":{"type":"string","format":"date"},"type":"array","title":"Maildrops","default":[]},"leaseRetentionDrop":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Leaseretentiondrop"},"leaseRetentionEmail":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Leaseretentionemail"},"matchingEmail":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Matchingemail"}},"type":"object","title":"SaveDropCalendarRequest","description":"The dates to save for one month. Empty lists/nulls clear what the month held."},"SavedForLaterRequest":{"properties":{"saved":{"type":"boolean","title":"Saved"}},"type":"object","required":["saved"],"title":"SavedForLaterRequest","description":"Whether this draft is parked out of the planner's queue."},"SessionSummary":{"properties":{"entryCount":{"type":"integer","title":"Entrycount"},"turnCount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Turncount"},"totalTokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Totaltokens"},"models":{"items":{"type":"string"},"type":"array","title":"Models","default":[]}},"type":"object","required":["entryCount","turnCount","totalTokens"],"title":"SessionSummary","description":"Derived turn/token counts over a reconstructed session's main transcript.\n\n`models` is the distinct set of models used across the session's assistant turns;\nempty when none were recorded."},"SetSkippedRequest":{"properties":{"skipped":{"type":"boolean","title":"Skipped"}},"type":"object","required":["skipped"],"title":"SetSkippedRequest","description":"Whether the dealership is out of the monthly run (True) or back in it (False)."},"SisterCoverage":{"properties":{"name":{"type":"string","title":"Name"},"coverage":{"type":"integer","title":"Coverage"}},"type":"object","required":["name","coverage"],"title":"SisterCoverage"},"StartColdStartRequest":{"properties":{"month":{"type":"string","title":"Month"},"enrollments":{"items":{"$ref":"#/components/schemas/ColdStartEnrollmentRow"},"type":"array","title":"Enrollments"}},"type":"object","required":["month","enrollments"],"title":"StartColdStartRequest","description":"A brand-new dealership's first estimate: the month, and the programs to start it on."},"StartColdStartResponse":{"properties":{"estimateId":{"type":"string","format":"uuid","title":"Estimateid"}},"type":"object","required":["estimateId"],"title":"StartColdStartResponse"},"StartProjectionRequest":{"properties":{"month":{"type":"string","title":"Month"}},"type":"object","required":["month"],"title":"StartProjectionRequest","description":"Which month to project for, as ``YYYY-MM``."},"StartProjectionResponse":{"properties":{"runId":{"type":"string","format":"uuid","title":"Runid"},"month":{"type":"string","format":"date","title":"Month"}},"type":"object","required":["runId","month"],"title":"StartProjectionResponse"},"StoreReport":{"properties":{"storeNames":{"items":{"type":"string"},"type":"array","title":"Storenames"},"place":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Place"},"partnerSince":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partnersince"},"yearsPartnering":{"type":"integer","title":"Yearspartnering"},"lifetimeInvestment":{"type":"integer","title":"Lifetimeinvestment"},"lifetimeCampaigns":{"type":"integer","title":"Lifetimecampaigns"},"campaignsRun":{"type":"integer","title":"Campaignsrun"},"matchedSales":{"type":"integer","title":"Matchedsales"},"matchedBilling":{"type":"integer","title":"Matchedbilling"},"blendedCostPerSale":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Blendedcostpersale"},"matchFirstYear":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchfirstyear"},"matchLastYear":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matchlastyear"},"programs":{"items":{"$ref":"#/components/schemas/ProgramResult"},"type":"array","title":"Programs"},"months":{"items":{"$ref":"#/components/schemas/MonthResult"},"type":"array","title":"Months"},"totals":{"anyOf":[{"$ref":"#/components/schemas/MonthTotals"},{"type":"null"}]},"coverage":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Coverage"},"shortSisters":{"items":{"$ref":"#/components/schemas/SisterCoverage"},"type":"array","title":"Shortsisters"}},"type":"object","required":["storeNames","place","partnerSince","yearsPartnering","lifetimeInvestment","lifetimeCampaigns","campaignsRun","matchedSales","matchedBilling","blendedCostPerSale","matchFirstYear","matchLastYear","programs","months","totals","coverage","shortSisters"],"title":"StoreReport","description":"Every number one page shows."},"SubagentTranscript":{"properties":{"subpath":{"type":"string","title":"Subpath"},"entries":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Entries"}},"type":"object","required":["subpath","entries"],"title":"SubagentTranscript","description":"One subagent sub-transcript. `entries` are raw SDK dicts (passed through)."},"SyncCustomerResponse":{"properties":{"customerId":{"type":"string","format":"uuid","title":"Customerid"},"methodRecordId":{"type":"integer","title":"Methodrecordid"},"name":{"type":"string","title":"Name"},"fullName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fullname"},"created":{"type":"boolean","title":"Created"},"estimatesCreated":{"type":"integer","title":"Estimatescreated"},"estimatesUpdated":{"type":"integer","title":"Estimatesupdated"},"estimatesDeleted":{"type":"integer","title":"Estimatesdeleted"},"linesCreated":{"type":"integer","title":"Linescreated"},"linesUpdated":{"type":"integer","title":"Linesupdated"},"linesDeleted":{"type":"integer","title":"Linesdeleted"},"skipped":{"items":{"type":"string"},"type":"array","title":"Skipped"}},"type":"object","required":["customerId","methodRecordId","name","fullName","created","estimatesCreated","estimatesUpdated","estimatesDeleted","linesCreated","linesUpdated","linesDeleted","skipped"],"title":"SyncCustomerResponse","description":"The outcome of a sync, detailed enough to render a result line."},"TrackedCustomerDetailResponse":{"properties":{"customer":{"$ref":"#/components/schemas/TrackedCustomerRow"},"gamePlanSequence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gameplansequence"},"priceBook":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pricebook"},"priceBookDiscountCents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pricebookdiscountcents"},"estimates":{"items":{"$ref":"#/components/schemas/TrackedEstimateRowResponse"},"type":"array","title":"Estimates"},"projectedEstimates":{"items":{"$ref":"#/components/schemas/CustomerProjectionRow"},"type":"array","title":"Projectedestimates","default":[]},"projectionWindow":{"$ref":"#/components/schemas/ProjectionWindowRow"},"activeProjectionRun":{"anyOf":[{"$ref":"#/components/schemas/ActiveProjectionRunRow"},{"type":"null"}]}},"type":"object","required":["customer","gamePlanSequence","priceBook","priceBookDiscountCents","estimates","projectionWindow"],"title":"TrackedCustomerDetailResponse"},"TrackedCustomerRow":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"methodRecordId":{"type":"integer","title":"Methodrecordid"},"name":{"type":"string","title":"Name"},"fullName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fullname"},"addedAt":{"type":"string","format":"date-time","title":"Addedat"},"isTracked":{"type":"boolean","title":"Istracked"},"hasGoal":{"type":"boolean","title":"Hasgoal"},"hasRecentEstimate":{"type":"boolean","title":"Hasrecentestimate"},"isSkipped":{"type":"boolean","title":"Isskipped"},"goalAmount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Goalamount"},"salesperson":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Salesperson"},"methodSyncedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Methodsyncedat"},"methodSyncFailedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Methodsyncfailedat"},"methodSyncError":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Methodsyncerror"},"importedEstimateCount":{"type":"integer","title":"Importedestimatecount"},"projectedEstimateCount":{"type":"integer","title":"Projectedestimatecount"},"latestTxnDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Latesttxndate"},"monthProjectionStatus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Monthprojectionstatus"}},"type":"object","required":["id","methodRecordId","name","fullName","addedAt","isTracked","hasGoal","hasRecentEstimate","isSkipped","methodSyncedAt","importedEstimateCount","projectedEstimateCount","latestTxnDate"],"title":"TrackedCustomerRow","description":"One active dealership, with a summary of what we hold for it."},"TrackedEstimateRowResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"txnDate":{"type":"string","format":"date","title":"Txndate"},"statusLabel":{"type":"string","title":"Statuslabel"},"refNumber":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refnumber"},"methodRecordId":{"type":"integer","title":"Methodrecordid"},"lineItems":{"items":{"type":"string"},"type":"array","title":"Lineitems"},"lineCount":{"type":"integer","title":"Linecount"},"totalQuantity":{"type":"number","title":"Totalquantity"},"totalAmount":{"type":"number","title":"Totalamount"}},"type":"object","required":["id","txnDate","statusLabel","refNumber","methodRecordId","lineItems","lineCount","totalQuantity","totalAmount"],"title":"TrackedEstimateRowResponse","description":"One row of a dealership's real Method estimate history (proposals live in the planner)."},"UnmatchedProgram":{"properties":{"program":{"type":"string","title":"Program"},"partly":{"type":"boolean","title":"Partly"}},"type":"object","required":["program","partly"],"title":"UnmatchedProgram","description":"A program, in a month with other results, that QuickShift has none for."},"UpdateChargeRequest":{"properties":{"amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Amount"}},"type":"object","title":"UpdateChargeRequest","description":"What a charge row should bill at instead of its computed figure."},"UpdateEstimateRequest":{"properties":{"memo":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Memo"}},"type":"object","title":"UpdateEstimateRequest","description":"A reviewer's note on the estimate itself, rather than on one of its lines."},"UpdateLineRequest":{"properties":{"quantity":{"anyOf":[{"type":"integer","maximum":1000000.0,"minimum":1.0},{"type":"null"}],"title":"Quantity"},"budget":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Budget"},"dropDate":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Dropdate"},"itemRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Itemrecordid"},"description":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Description"},"letterheadRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Letterheadrecordid"},"envelopeRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Enveloperecordid"},"insertRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Insertrecordid"},"postageRecordId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Postagerecordid"}},"type":"object","title":"UpdateLineRequest","description":"A reviewer's correction to one line. A body naming no field at all is refused.\n\nOn the four component fields, omitted vs null differ (told apart via `model_fields_set`):\nomitted means \"leave it\", null means \"the rep says none\" - except that on a new design an\nomitted envelope, insert or postage moves to what that design usually mails as, and the\nresponse's call-outs say what moved. Only postage needs null - Method's `N/A - Envelope` /\n`N/A - Insert` are real catalog items, so those two carry \"none\" as an id.\n`itemRecordId` has no null (a line cannot lose its message). The rotation STEP is not on\nthe wire; it is derived from the resulting pair."},"UsageState":{"type":"string","enum":["mailed","pending","rejected"],"title":"UsageState","description":"What became of a letterhead for one dealership.\n\nThree states, not used/unused, because they drive opposite decisions: ``mailed`` was had\nor committed to recently, ``pending`` is booked and must not be proposed twice,\n``rejected`` was turned down. A drop that never happened (booked, date passed, Method\nnever moved it on) has none."},"User":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"avatarUrl":{"type":"string","title":"Avatarurl"},"isAdmin":{"type":"boolean","title":"Isadmin"},"isSuperAdmin":{"type":"boolean","title":"Issuperadmin"},"hasMethodUser":{"type":"boolean","title":"Hasmethoduser"}},"type":"object","required":["id","email","name","avatarUrl","isAdmin","isSuperAdmin","hasMethodUser"],"title":"User","description":"The user shape the client expects (camelCase on the wire)."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}