feat(licserver): add partner API proxy routes and types
All checks were successful
Staging Build / build (push) Successful in 2m54s
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:
31
shop/lib/types/licserver.ts
Normal file
31
shop/lib/types/licserver.ts
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user