diff --git a/docs/api/openapi.yaml b/docs/api/openapi.yaml index 37302b233..3304d1d49 100644 --- a/docs/api/openapi.yaml +++ b/docs/api/openapi.yaml @@ -788,7 +788,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/DisableCoachRequest" + $ref: "#/components/schemas/DisableCoachFlag" responses: "200": description: Resolved next-state echoed back for optimistic-update consumers. @@ -1412,7 +1412,7 @@ components: - bundleId description: Native device registration. Re-registering an APNs token belonging to another user returns 409 (cross-user-hijack guard). - DisableCoachRequest: + DisableCoachFlag: type: object properties: disableCoach: @@ -2229,13 +2229,7 @@ components: type: object properties: data: - type: object - properties: - disableCoach: - type: boolean - required: - - disableCoach - additionalProperties: false + $ref: "#/components/schemas/DisableCoachFlagOutput" error: type: "null" meta: @@ -2252,13 +2246,7 @@ components: type: object properties: data: - type: object - properties: - disableCoach: - type: boolean - required: - - disableCoach - additionalProperties: false + $ref: "#/components/schemas/DisableCoachFlagOutput" error: type: "null" meta: @@ -3159,6 +3147,15 @@ components: additionalProperties: false description: AI-generated insights bundle. Strict-schema validated server-side; Coach-routed when the insight surface needs day-level grounding. + DisableCoachFlagOutput: + type: object + properties: + disableCoach: + type: boolean + required: + - disableCoach + additionalProperties: false + description: Per-account Coach opt-out toggle (v1.4.47 W3). `true` hides the Coach FAB and short-circuits its API gates. securitySchemes: bearerAuth: type: http diff --git a/src/app/api/dashboard/widgets/route.ts b/src/app/api/dashboard/widgets/route.ts index e4704cdfc..9b0b6c342 100644 --- a/src/app/api/dashboard/widgets/route.ts +++ b/src/app/api/dashboard/widgets/route.ts @@ -151,7 +151,6 @@ export const PUT = apiHandler(async (request: NextRequest) => { // the Zod rejection so a single wide-event line carries enough // detail to diagnose serialiser drift in `HealthLog-iOS`. We log // ONLY the top-level keys plus a hard 256-char JSON excerpt — never -<<<<<<< HEAD // the full body — so PII / token-like fields cannot leak. The // diagnostic shape is built by the shared `buildPayloadDiagnostic` // helper (v1.4.49) so the widget + series routes can't drift; the diff --git a/src/app/api/measurements/series/route.ts b/src/app/api/measurements/series/route.ts index 5eb633a5f..691b7a13e 100644 --- a/src/app/api/measurements/series/route.ts +++ b/src/app/api/measurements/series/route.ts @@ -82,7 +82,6 @@ export const GET = apiHandler(async (request: NextRequest) => { // the Zod rejection. Top-level keys + a hard 256-char JSON excerpt // only; never the full payload, so token-shaped query params (we // do not currently accept any but the truncation keeps that -<<<<<<< HEAD // invariant cheap) cannot leak. Shared helper via v1.4.49 so the // widget + series routes can't drift on the diagnostic shape; the // query map is routed through `redactSensitiveFields` first so any