mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-10-01 20:13:22 +00:00
* feat(api): serve portal-shaped health and error envelope
Move liveness to GET /api/health { stage, sha } with a Node 24 image on 8080 so ALB probes and deploy verify do not need auth or a database ping.
* feat(api): switch live auth to host cookie BFF
Replace Bearer as the documented session path with Cognito hosted UI plus __Host-ap_* cookies so the SPA can call /api with credentials include.
* feat(web): add unused cookie SPA API client
Land a credentials-include fetch helper and hand-synced health/me types without wiring pages or domain hooks, so mocks stay the default data path.
* feat(api): add master-data OpenAPI and Hono stubs
* feat(api): add invoice, line, and document stubs
* feat(api): add approval policy, inbox, and activity stubs
* test(web): fix SPA client fetch mock types
* test(web): cast fetch mock call args for tsc
* fix(api): do not default DEV_AUTH_BYPASS outside local migrate
* fix(api): replace invoice lines in a single transaction
* fix(api): create invoices and lines in one transaction
* fix(api): inline GIT_SHA from the image build arg
* fix(api): stop PATCH from skipping the approval workflow
* fix(api): address review feedback
* fix(ci): format upsert-user test
* fix(api): document only the auth statuses the routes return
* fix(api): drop health 400 responses the routes never return
86 lines
2.1 KiB
YAML
86 lines
2.1 KiB
YAML
parameters:
|
|
- name: id
|
|
in: path
|
|
required: true
|
|
description: Vendor primary key.
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
example: 55555555-5555-4555-8555-555555555555
|
|
get:
|
|
tags: [Master data]
|
|
summary: Get a vendor
|
|
description: Returns one vendor by id.
|
|
operationId: get-api-vendors-id
|
|
responses:
|
|
"200":
|
|
description: Vendor.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Vendor
|
|
"400":
|
|
description: Invalid id.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|
|
"401":
|
|
description: Missing session.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|
|
"404":
|
|
description: Vendor not found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|
|
patch:
|
|
tags: [Master data]
|
|
summary: Update a vendor
|
|
description: Admin-only patch. Requires admin:settings.
|
|
operationId: patch-api-vendors-id
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
name:
|
|
type: string
|
|
example: Harbor Maintenance LLC
|
|
email:
|
|
type: string
|
|
example: billing@harbor.example
|
|
defaultPaymentMethod:
|
|
type: string
|
|
enum: [check, ach]
|
|
example: check
|
|
responses:
|
|
"200":
|
|
description: Updated vendor.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Vendor
|
|
"400":
|
|
description: Validation failed.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|
|
"403":
|
|
description: Caller lacks admin:settings.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|
|
"404":
|
|
description: Vendor not found.
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: ../components/schemas.yaml#/Error
|