mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-10-02 00:23:22 +00:00
199 lines
4.5 KiB
YAML
199 lines
4.5 KiB
YAML
Error:
|
|
type: object
|
|
required:
|
|
- error
|
|
properties:
|
|
error:
|
|
type: object
|
|
required:
|
|
- code
|
|
- message
|
|
- correlationId
|
|
properties:
|
|
code:
|
|
type: string
|
|
description: Machine-readable error code.
|
|
example: NOT_FOUND
|
|
message:
|
|
type: string
|
|
description: Human-readable error message.
|
|
example: Not found.
|
|
correlationId:
|
|
type: string
|
|
description: Request correlation identifier echoed from x-correlation-id when present.
|
|
example: 11111111-1111-4111-8111-111111111111
|
|
HealthResponse:
|
|
type: object
|
|
required:
|
|
- stage
|
|
- sha
|
|
properties:
|
|
stage:
|
|
type: string
|
|
description: Deployment stage name.
|
|
example: local
|
|
sha:
|
|
type: string
|
|
description: Git SHA inlined at image build.
|
|
example: deadbeef
|
|
ReadyResponse:
|
|
type: object
|
|
required:
|
|
- status
|
|
- database
|
|
properties:
|
|
status:
|
|
type: string
|
|
description: Process readiness marker.
|
|
example: ok
|
|
database:
|
|
type: string
|
|
description: Database ping result.
|
|
example: up
|
|
MeResponse:
|
|
type: object
|
|
required:
|
|
- id
|
|
- email
|
|
- name
|
|
- role
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: uuid
|
|
description: Internal user primary key.
|
|
example: 11111111-1111-4111-8111-111111111111
|
|
email:
|
|
type: string
|
|
format: email
|
|
description: Caller email address.
|
|
example: admin@seahavenind.com
|
|
name:
|
|
type: string
|
|
description: Display name for the caller.
|
|
example: Dev Admin
|
|
role:
|
|
type: string
|
|
description: Authorization role for RBAC checks.
|
|
enum:
|
|
- admin
|
|
- ap_processor
|
|
- approver
|
|
- viewer
|
|
example: admin
|
|
Vendor:
|
|
type: object
|
|
required:
|
|
- id
|
|
- name
|
|
- defaultPaymentMethod
|
|
- createdAt
|
|
- updatedAt
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: uuid
|
|
description: Vendor primary key.
|
|
example: 55555555-5555-4555-8555-555555555555
|
|
name:
|
|
type: string
|
|
description: Vendor display name.
|
|
example: Acme Facilities Supply
|
|
email:
|
|
type: [string, "null"]
|
|
description: Billing email when present.
|
|
example: billing@acmefacilities.example
|
|
defaultPaymentMethod:
|
|
type: string
|
|
enum: [check, ach]
|
|
description: Default payment method for new invoices.
|
|
example: check
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
description: Row creation time.
|
|
updatedAt:
|
|
type: string
|
|
format: date-time
|
|
description: Row update time.
|
|
GlAccount:
|
|
type: object
|
|
required: [id, code, name, createdAt, updatedAt]
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: uuid
|
|
description: GL account primary key.
|
|
example: 66666666-6666-4666-8666-666666666666
|
|
code:
|
|
type: string
|
|
description: Account code.
|
|
example: "6100"
|
|
name:
|
|
type: string
|
|
description: Account name.
|
|
example: Facilities Expense
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
description: Row creation time.
|
|
updatedAt:
|
|
type: string
|
|
format: date-time
|
|
description: Row update time.
|
|
Department:
|
|
type: object
|
|
required: [id, code, name, createdAt, updatedAt]
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: uuid
|
|
description: Department primary key.
|
|
example: 77777777-7777-4777-8777-777777777777
|
|
code:
|
|
type: string
|
|
description: Department code.
|
|
example: OPS
|
|
name:
|
|
type: string
|
|
description: Department name.
|
|
example: Operations
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
description: Row creation time.
|
|
updatedAt:
|
|
type: string
|
|
format: date-time
|
|
description: Row update time.
|
|
User:
|
|
type: object
|
|
required: [id, email, name, role, createdAt, updatedAt]
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: uuid
|
|
description: User primary key.
|
|
example: 11111111-1111-4111-8111-111111111111
|
|
email:
|
|
type: string
|
|
format: email
|
|
description: User email address.
|
|
example: admin@seahavenind.com
|
|
name:
|
|
type: string
|
|
description: Display name.
|
|
example: Dev Admin
|
|
role:
|
|
type: string
|
|
enum: [admin, ap_processor, approver, viewer]
|
|
description: Authorization role.
|
|
example: admin
|
|
createdAt:
|
|
type: string
|
|
format: date-time
|
|
description: Row creation time.
|
|
updatedAt:
|
|
type: string
|
|
format: date-time
|
|
description: Row update time.
|