feat(licserver): add partner API proxy routes and types
All checks were successful
Staging Build / build (push) Successful in 2m54s

- New: lib/types/licserver.ts (PartnerDto, paged result, problem)
- New: app/api/licserver/partners/route.ts (GET search/list)
- New: app/api/licserver/partners/[id]/route.ts (GET by UUID)
- Updated: .env.example with LICSERVER_BASE_URL + LICSERVER_API_KEY

Auth-guarded via Supabase session. API key is server-side only.
Upstream: http://192.168.178.174:9980 (internal container network)
This commit is contained in:
DanielS
2026-07-14 17:24:00 +02:00
parent 2e30974aed
commit be4e9204a3
4 changed files with 179 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
/**
* TypeScript types generated from the CASPOS LicServer OpenAPI spec v1.
* Source: /api-v1/partners endpoints
*/
export interface PartnerDto {
id: string // UUID
name: string | null
email: string | null
erpId: string | null
}
export interface PartnerDtoPagedResult {
page: number
pageSize: number
totalCount: number
totalPages: number
hasNextPage: boolean
hasPreviousPage: boolean
items: PartnerDto[] | null
}
/** Standard RFC 7807 problem response from LicServer */
export interface LicServerProblemDetails {
type?: string | null
title?: string | null
status?: number | null
detail?: string | null
instance?: string | null
[key: string]: unknown
}